Similar questions 3 more →
Greedy Algorithms



Your answer
Answer & solution
Answer: D (no official key was published)
1. Approach. Average code length is probability-weighted, not the arithmetic mean of the six word lengths. Huffman merging gives lengths 1,2,3,4,5,5, with the shortest code assigned to the most frequent symbol.
2. Derivation and interpretation. Using the independently derived lengths 1,2,3,4,5,5, the weighted average is (1/2)*1+(1/4)*2+(1/8)*3+(1/16)*4+(1/32)*5+(1/32)*5 = 31/16 = 1.9375 bits per symbol. Answer D.