From the encoding table as shown below: Table 1 Symbol Frequency Codeword A 0.29 0.25 100 0.13 101 D 0.15 1100 0.08 1101 0.07
From the encoding table as shown below: Table 1 Symbol Frequency Codeword A 0.29 0.25 100 0.13 101 D 0.15 1100 0.08 1101 0.07 1110 1111 G 0.03 a) Is this a valid prefix code? If yes, build the prefix tree according to the table above; if no, explain why not? b) Now, use Huffman code to assign new codewords to the symbols (A-G) above. Follow the convention that the group/symbol with higher probability is assigned a *0' and that with lower probability is assigned a 1'. List out all the codewords. Frequency Codeword (Huffman) Symbol A 0.29 B 0.25 0.13 D 0.15 0.08 0.07 0.03 c) What is the average codeword length of the original coding (Table 1)? d) What is the average codeword length using Huffman code in part b)? e) What is the minimum average number of bits needed to encode each symbol? f) Using a fixed-length code, what will be the minimum average number of bits needed to encode each symbol?
Step by Step Solution
3.43 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
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