Paper 2, Section I, G
Part II, 2015
A random variable takes values in the alphabet with probabilities and . Calculate the entropy of .
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 .]