MacWilliams identity 2026-10-05
For a binary linear code of dimension and its dual code, the weight enumerator convention givesTo prove it, insert into the enumerator sum. Summing independently over each coordinate of yields a factor if and if .
Past exam of the mathematics course of the University of Cambridge 2005 ii Paper 3 12J Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 2 12H Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 1 10G i Solution Created 2026-09-24 Updated 2026-10-05
A linear code of length and rank is a -dimensional linear subspace of . The Hamming weight of a vector counts its nonzero coordinates. Thus the sum of the coefficients of the weight enumerator is the number of codewords:Since the zero vector is the unique word of weight zero, . Symmetry of the enumerator therefore implies . Conversely means that the all-one vector belongs to . Translation is then a bijection of which replaces weight by , proving the polynomial symmetry. For length zero the same conclusion holds with the unique empty vector.
The dual code is , using the standard bilinear form over . If , each summand of the character sum equals one. Otherwise choose with ; replacing by permutes the summands and reverses their sign. The sum equals its own negative and must be zero. ConsequentlyThis is character orthogonality for the additive group of the code.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 2 3G Solution Created 2026-09-24 Updated 2026-10-03
Let and let be the parity-check matrix whose columns are the distinct nonzero vectors of the finite field vector space . The binary Hamming code isA perfect code has Hamming balls of radius about its codewords partitioning the whole ambient space, where is its minimum Hamming distance of a linear code.
No column of is zero and no two columns agree, so has no word of Hamming weight one or two. Three suitable columns sum to zero, so . For any received word , its syndrome is either zero or is the unique column of equal to that syndrome. In the first case ; in the second,so is at Hamming distance one from a codeword. Uniqueness follows from . Thus the radius-one balls partition , and the code is perfect.
For , the dual code is the binary simplex code of length seven. Every nonzero dual word evaluates a nonzero linear functional on the seven nonzero vectors of , and exactly four of those evaluations are one. Hence every nonzero word of has weight
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 3 3I Solution Created 2026-09-23 Updated 2026-09-25
Write for the all-one column vector. The parity-check extension of a linear code isThe defining map is linear, so is a binary linear code. If is a generator matrix and a parity-check matrix for , then one may take
The punctured code in, say, the last coordinate isCoordinate deletion is a linear map, so is linear. Its generator matrix is obtained by deleting the last column of . If the minimum distance is at least two, deletion is injective on , and hence has the same dimension as .
For its parity-check matrix, first use invertible row operations on to make its nonzero last column a coordinate vector. The last column is nonzero because otherwise the weight-one word supported there would belong to , contrary to . Delete the pivot row and the last column; the resulting matrix is a parity-check matrix for . Equivalently, is obtained by shortening the dual code at the deleted coordinate.
Finally, the shortened code in the last coordinate isIt is linear whenever is linear, because it is the puncture of the subspace .
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 4 3I a Solution Created 2026-09-24 Updated 2026-09-25
For the standard dot product on , the dual code isIt is an intersection of kernels of linear functions, and is therefore a linear code.
Let denote cyclic right shift. If and , thenA cyclic code is closed under both and , so and the right-hand side vanishes. Hence , proving directly that the dual of a cyclic code is cyclic.
Identify words with polynomials in . If the generator polynomial of a cyclic code is the monic divisor andthen the generator polynomial of is the monic reciprocalEquivalently, the parity-check polynomial of one code becomes, after reversal, the generator polynomial of its dual.