Question: a) A Huffman Coding table is shown below. Use it to decode 10011001100111 . Write down the decoded message and calculate the average codeword length.

 a) A Huffman Coding table is shown below. Use it to

a) A Huffman Coding table is shown below. Use it to decode 10011001100111 . Write down the decoded message and calculate the average codeword length. b) In the right tabie, we have a Huffman coding dictionary for typical English. With help of any programing language (Python suggested), please apply the dictionary to encode the following poem and calculate the number of bits needed. Please also apply fixed length coding to the same poem and calculate the number of bits needed as well. For the fixed length coding, since there are 27 symbols, we need 5-bit for each code (25=32). Show your calculation, if needed. mary had a little lamb Fittle lamb little lamb mary had a little lamb it is fleece was white as snow everywhere that mary went mary went mary went everywhere that mary went the lamb was sure to go it followed her to school one day school one day school one day it followed her to school one day which was against the rules Please paste the program you have used to come up with the Huffman Coding result. c) Normally, if we know the distribution of letters ahead, we can build a Huffman tree to more efficiently encode a sequence. Consider a sentence below: this is an apple an apple an apple his apple his apple his apple that apple that apple that apple Please 1) counts the frequency of each letter appeared in this sentence, and 2) based on this frequency, calculate a Huffman code (it is not necessanily unique). Then, calculate the average code length when encoding this sentence if we try to use either this new Huffman code dictionary or the one shown in the lecture node

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!