Paper 1, Section II, 11K11 K

Coding and Cryptography | Part II, 2021

Let Σ1={μ1,…,μN}\Sigma_{1}=\left\{\mu_{1}, \ldots, \mu_{N}\right\} be a finite alphabet and XX a random variable that takes each value μi\mu_{i} with probability pip_{i}. Define the entropy H(X)H(X) of XX.

Suppose Σ2={0,1}\Sigma_{2}=\{0,1\} and c:Σ1→Σ2∗c: \Sigma_{1} \rightarrow \Sigma_{2}^{*} is a decipherable code. Write down an expression for the expected word length E(S)E(S) of cc.

Prove that the minimum expected word length S∗S^{*} of a decipherable code c:Σ1→Σ2∗c: \Sigma_{1} \rightarrow \Sigma_{2}^{*} satisfies

H(X)⩽S∗<H(X)+1.H(X) \leqslant S^{*}<H(X)+1 .

[You can use Kraft's and Gibbs' inequalities as long as they are clearly stated.]

Suppose a decipherable binary code has word lengths s1,…,sNs_{1}, \ldots, s_{N}. Show that

Nlog⁡N⩽s1+⋯+sN.N \log N \leqslant s_{1}+\cdots+s_{N} .

Suppose XX is a source that emits NN sourcewords a1,…,aNa_{1}, \ldots, a_{N} and pip_{i} is the probability that aia_{i} is emitted, where p1⩾p2⩾⋯⩾pNp_{1} \geqslant p_{2} \geqslant \cdots \geqslant p_{N}. Let b1=0b_{1}=0 and bi=∑j=1i−1pjb_{i}=\sum_{j=1}^{i-1} p_{j} for 2⩽i⩽N2 \leqslant i \leqslant N. Let si=⌈−log⁡pi⌉s_{i}=\left\lceil-\log p_{i}\right\rceil for 1⩽i⩽N1 \leqslant i \leqslant N. Now define a code cc by c(ai)=bi∗c\left(a_{i}\right)=b_{i}^{*} where bi∗b_{i}^{*} is the (fractional part of the) binary expansion of bib_{i} to sis_{i} decimal places. Prove that this defines a decipherable code.

What does it mean for a code to be optimal? Is the code cc defined in the previous paragraph in terms of the bi∗b_{i}^{*} necessarily optimal? Justify your answer.

Typos? Please submit corrections to this page on GitHub.