Week 8 The MacWilliams identity. The Average Weight Equation. Plotkin bound. Simplex codes
Version 2023-11-07. To PDF of this week only Open the whole set of notes in PDF
Synopsis. Remarkably, the weights of codevectors of the dual code
-
Proof for prime
This proof is not examinable.Since
is a prime, the field consists of elements (residues of integers modulo Being able to explicitly list the field elements — not possible for a general prime power — simplifies the proof.Let
be linear. We fix the complex number a primitive th root of We have and We can write if — this complex number is well-defined, even though is only defined moduloGiven
denoteWe will compute
in two different ways.Way 1. If
then for all soIf, however,
there is a codevector such that in Observe that We know that soSince
we haveWe conclude that
Way 2. If
is a symbol, we introduce the “weight of ”, as follows: if and if Surely, for a vector we have We then rewrite We now sum over first: each coordinate of runs over So, for a fixed Let us analyse the first factor in the product on the right-hand side of (*):If
the coefficient of is clearly whereas if the coefficient of is the sum of a geometric progressionsince
Hence the first factor on the right-hand side of (*) isThe same applies to the second, ...,
th factor in (*), hence (*) has factors equal to and factors equal to In other words, (*) evaluates as Therefore,Comparing Way 2 and Way 1, we conclude that
This is the MacWilliams identity for □
Simple examples where the MacWilliams identity is used
Let us obtain a short formula for the weight enumerator of the trivial code
Clearly,
Example: the weight enumerator of the trivial code
We can obtain the same formula for the weight enumerator of the trivial code
The binary (
Example: the weight enumerator of
Using the binomial formula, we can expand this sum as
The Average Weight Equation for linear codes
The proof of the following result involves a surprising use of the MacWilliams identity.
Theorem 8.2: the Average Weight Equation
If
-
Proof. We count codevectors of weight
in the dual code By Theorem 5.1, iff where is a generator matrix of If is of weight with then the th column of is zero. The non-zero can be chosen in ways, so each zero column of gives rise to vectors of weight in and there are such vectors in total.We must get the same number as the coefficient of
in the weight enumerator which by the MacWilliams identity equalsWe put
and work out the coefficient of By the Binomial Theorem, and so the coefficient of in the product of these two expressions isSumming over
then dividing by gives the coefficient of in (8.1) as We thus get the equationhence the average of all weights,
is as claimed. □
A simple example where we verify the Average Weight Equation
The easiest case where we can explicitly verify the Average Weight Equation is
Example: average weight of a codevector of
The average weight of a codevector of
which agrees with the Average Weight Equation.
Simplex codes
What is the weight enumerator of
Recall from the previous chapter that the Hamming codes are defined via an interesting check matrix whose columns form a maximal set of columns where no two columns are proportional. What is the code generated by this matrix? We analyse these codes in the rest of this chapter.
Definition: simplex code
A simplex code
Remark: recall that a regular simplex in an
Theorem 8.3: properties of a simplex code
The simplex code
-
Proof. The length and dimension of
are dictated by the parameters of the Hamming code, see Theorem 7.3. It remains to calculate the distances.Since
is linear, it suffices to show that every non-zero has weightBy linear algebra, there is a basis of
which contains hence is the first row of some generator matrix ofSince
is a check matrix for and by Distance Theorem 7.2 no two columns of are proportional, hence the columns of represent distinct lines in Therefore, the weight of (the first row of is the number of lines where the first entry of a representative vector is not zero.The total number of possible columns of size
with non-zero top entry is (choices for the top entry) (choices for the other entries which are unrestricted). But non-zero columns form a line, hence the number of required lines is Hence as claimed. □
The weight enumerator of a binary Hamming code
By Theorem 8.3, the weight enumerator of the simplex code
where
The weight enumerator of
Example: weight enumerator of the “original” Hamming code
Exercise: explicitly expand the left-hand side in the formula for
Exercise: Use Proposition 8.4 to show that every binary Hamming code contains the vector
The Plotkin Bound
The Plotkin bound was obtained by Morris Plotkin in 1960 for arbitrary (not necessarily linear) binary codes. It applies to codes with very large minimum distance:
Proposition 8.5: The Plotkin bound for binary linear codes
If