Is not the Canonical Tree the same thing as the Huffman tree formed by the tie-breaking rules?
No, it is not. The Canonical Tree is made out of codeword lengths. The Huffman tree with tie-breaking rules still has frequencies to contend with and that changes the tree around a bit. If you are not convinced, try running the Huffman algorithm with tie-breaking on these frequency values – { a – 20, b – 20, c – 30, d – 30, e – 30 } and then building the Canonical Tree out of the depths that you get from the Huffman tree on these values. • How do I build the Canonical Tree from the frequencies? The idea is that you know how to build the Canonical Tree from the depths, that is, the codeword lengths. So, to build the Canonical Tree from the frequencies, you need to get the codeword lengths from the frequencies. And the straightforward way to do this is to build the Huffman tree on these frequencies. You need to take care to resolve ties in a standard manner, so the project description specifies how you should break ties between equal frequencies. This gives you the Huffman tree from whic