Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 codeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started