Question: 1. What is an optimal Huffman code based on the following set of frequencies? a: 20, c:11, d:2, e: 10, o:15, m:8, s:10, t:22, u:2
1. What is an optimal Huffman code based on the following set of frequencies? a: 20, c:11, d:2, e: 10, o:15, m:8, s:10, t:22, u:2 a) Draw the tree. Show your work at every step. b) Give the Huffman encoding for each letter. c) What is the minimum number of bits that can be used to encode these d) Assume that the numbers given above represent counts of letters in the hundreds from a file (as in the CLRS example. Here in the file there will be exactly 20 * 100 occurrences of the letter a , 11*100 occurrence of the letter c, etc). We encode the file using the Huffman codes. How much memory will the file require with this encoding?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
