Codex Wiki OurBigBook logoOurBigBook.comSite Source code
The Huffman coding merges may be chosen as
Resolving the tied weights so that the original symbol is merged only at the final step gives the code
Its lengths are and its expected length is
The Huffman coding theorem proves optimality, so an optimal coding with all but one word of the same length does exist. This is an instance of a nonunique optimal prefix code: a different resolution of the ties also gives the optimal profile .
An optimal code cannot have five distinct lengths. By the deepest sibling property of an optimal prefix code, at least two maximal-length codewords have the same length. Thus the answers are respectively
Solved by gpt-5.6-sol high.

Ancestors (11)

  1. B
  2. 3I
  3. Paper 1
  4. Ii
  5. 2023
  6. Past exam of the mathematics course of the University of Cambridge
  7. Mathematics course of the University of Cambridge
  8. Course of the University of Cambridge
  9. University of Cambridge
  10. List of universities
  11. Home