Paper 2, Section II, G

Coding and Cryptography | Part II, 2019

Describe the Huffman coding scheme and prove that Huffman codes are optimal.

Are the following statements true or false? Justify your answers.

(i) Given mm messages with probabilities p1p2pmp_{1} \geqslant p_{2} \geqslant \cdots \geqslant p_{m} a Huffman coding will assign a unique set of word lengths.

(ii) An optimal code must be Huffman.

(iii) Suppose the mm words of a Huffman code have word lengths s1,s2,,sms_{1}, s_{2}, \ldots, s_{m}. Then

i=1m2si=1\sum_{i=1}^{m} 2^{-s_{i}}=1

[Throughout this question you may assume that a decipherable code with prescribed word lengths exists if and only if there is a prefix-free code with the same word lengths.]

Typos? Please submit corrections to this page on GitHub.