Paper 2, Section I, G

Coding and Cryptography
Part II, 2015

A random variable AA takes values in the alphabet A={a,b,c,d,e}\mathcal{A}=\{a, b, c, d, e\} with probabilities 0.4,0.2,0.2,0.10.4,0.2,0.2,0.1 and 0.10.1. Calculate the entropy of AA.

Define what it means for a code for a general finite alphabet to be optimal. Find such a code for the distribution above and show that there are optimal codes for this distribution with differing lengths of codeword.

[You may use any results from the course without proof. Note that log252.32\log _{2} 5 \simeq 2.32.]