Question: Computing a Huffman coding for the input and proving Huffman tree can represent a perfect binary tree 5. Show how to compute a Huffman Coding
Computing a Huffman coding for the input and proving Huffman tree can represent a perfect binary tree

5. Show how to compute a Huffman Coding for the following input. The Numbers next to cach letter indicate its frequency. Letter Frequency 1/2 1/4 1/8 1/16 1/16 6. Assume that you need to compress a file that contains over an alphabet ? = {a, b ) where ? 2 for some integer value i, and all characters appar with the saine frequency. Show that Hoffman tree will be a perect binary tree. (that is, all leaves are at the same distance from theroot and every internal node has two children.) Prove in 2 ways that this is the optimum tree. 1) Show that this is the result of Huffman code 2) Show that if T is a non-perfect tree for 2, then you could create a better tree with strictly small cost
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
