Paper 1, Section II, G

Coding and Cryptography
Part II, 2015

Define the Hamming code. Show that it is a perfect, linear, 1-error correcting code.

I wish to send a message through a noisy channel to a friend. The message consists of a large number N=1,000N=1,000 of letters from a 16 -letter alphabet A\mathcal{A}. When my friend has decoded the message, she can tell whether there have been any errors. If there have, she asks me to send the message again and this is repeated until she has received the message without error. For each individual binary digit that is transmitted, there is independently a small probability p=0.001p=0.001 of an error.

(a) Suppose that I encode my message by writing each letter as a 4-bit binary string. The whole message is then 4N4 N bits long. What is the probability PP that the entire message is transmitted without error? How many times should I expect to transmit the message until my friend receives it without error?

(b) As an alternative, I use the Hamming code to encode each letter of A\mathcal{A} as a 7-bit binary string. What is the probability that my friend can decode a single 7-bit string correctly? Deduce that the probability QQ that the entire message is correctly decoded is given approximately by

Q(121p2)Nexp(21Np2)Q \simeq\left(1-21 p^{2}\right)^{N} \simeq \exp \left(-21 N p^{2}\right)

Which coding method is better?