Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2011/ii/paper-3/4g/solution

For a binary linear code , its rank is its dimension of a vector space . Use the weight enumerator convention
where is the Hamming weight. This convention is essential here: counts words of weight , rather than zero words. There are codewords, so .
There is only one binary word of weight , namely . Thus precisely when . If this holds, the linear map is a bijection of and replaces weight by ; hence . Conversely this symmetry gives , because the zero word is the unique word of weight zero.
The repetition code consists of , giving
The single parity-check code consists of all words of even weight. Exactly words have weight , so the binomial theorem gives

New to topics? Read the docs here!