Question: You are trying to compress a text file containing a mix of the eight letters a through h . Listed below are the counts of

You are trying to compress a text file containing a mix of the eight letters a through h. Listed below are the counts of the letters in that file.
a b c d e f g h
3216840488424
Carry out Huffman's algorithm based on those counts by following these steps.
a) How many bits are needed to encode this file given the optimal fixed-length encoding?
b) Compile and write down a list of the counts of each character.
c) Using that list, draw the Huffman encoding tree that would result. d)
Write down a list of the characters and each one's Huffman variable-length encoding
e)
How many bits are needed to encode the file using the Huffman variable-length encoding?
f)
What is the compression ration? Recall that this is the number of bits in the Huffman encoding divided by the number of bits in the fixed-length encoding.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!