Huffman Code Scenario:
There are 4 symbols (A, B, C and D) in a special language. The frequencies of the symbols in a text written in the language are:
A 40, B 20, C 10, and D 5. Answer the following questions.
1. How many bits do you need to represent the symbols?
2. What is the total number of bits needed in order to encode the entire text?
3. Construct the Huffman tree based on the scenario (paste the Huffman tree below). How many bits do you need now to represent the symbol C?
4. What is the total number of bits using the Huffman codes you created in order to encode the entire text?
5. How many total bits do you save to encode the entire text using the Huffman codes?
Get Answers For Free
Most questions answered within 1 hours.