Question: HUFFMAN CODE QUESTION. FIGURE 16.5 4. (Basic) (20 points) Huffman Code. Suppose we have a text consisting only of a, b, c, d, e, f,
HUFFMAN CODE QUESTION.

FIGURE 16.5

4. (Basic) (20 points) Huffman Code. Suppose we have a text consisting only of a, b, c, d, e, f, g where each character appears with the following frequency b C d e f g 10 3 4 8 14 5 6 Note that the length of the text is 50. (a) (5 points) How many bits do we need to store the text file if using a fixed-length code? (b) (10 points) Show the code built by the Huffman algorithm, both as a tree and as a list character. codeword). When combining two trees, the tree with lowest root frequency becomes the left child and the tree with the second-lowest root frequency becomes the right child. Left children are associated with the bit 0, right children with the bit 1.See Fig 16.5 (f) in textbook and Lab09 for more details. (c) (5 points) How many bits do we need to store the text file with this Huffman code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
