Question: a) Is this a valid prefix code? If yes, build the prefix tree according to the table above; if no, explain why not? b)
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 0.29 0.25 0.13 D 0.15 0.08 F 0.07 G 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? Table 1 Frequency Codeword Symbol 0.29 A 0.25 100 0.13 101 0.15 D 1100 0.08 1101 0.07 1110 1111 0.03
Step by Step Solution
3.39 Rating (158 Votes )
There are 3 Steps involved in it
Lets go through the questions step by step a Is this a valid prefix code If yes build the prefix tree according to the table above if no explain why n... View full answer
Get step-by-step solutions from verified subject matter experts
