Weight distributions and weight enumerators #
For a set of words C on a finite coordinate type ι of size n, the weight distribution
A_w(C) counts the words of Hamming weight w, and the homogeneous weight enumerator is
W_C(X, Y) = ∑_w A_w(C) X^(n-w) Y^w,
which for finite C equals the sum over codewords ∑_{c ∈ C} X^(n - wt c) Y^(wt c). It is
a homogeneous polynomial of degree n with integer coefficients, with the variables 0, 1 of
MvPolynomial (Fin 2) ℤ playing the roles of X, Y. Its one-variable specialization at X = 1
is the weight polynomial ∑_w A_w(C) Y^w, of degree at most n.
These invariants carry the Hamming data of a finite code in the form used by the MacWilliams
identity #C · W_{C⊥}(X, Y) = W_C(X + (q - 1) Y, X - Y): they are unchanged by monomial
equivalence and recover the cardinality and minimum distance of a finite additive code.
Main definitions #
Set.weightDistribution C w: the number of words ofCof Hamming weightw.Set.weightEnumerator C: the homogeneous weight enumeratorW_C(X, Y).Set.weightPolynomial C: the one-variable weight enumeratorW_C(1, Y).
Main statements #
Set.weightEnumerator_eq_sum:W_Cis the sum over codewords ofX^(n - wt c) Y^(wt c).Set.coeff_weightEnumerator,Set.coeff_weightPolynomial: the coefficients are the weight distribution.Set.isHomogeneous_weightEnumerator,Set.eval_one_weightEnumerator:W_Cis homogeneous of degreen, andW_C(1, 1) = #C.Set.hammingMinDist_eq_sInf_weightDistribution: the minimum distance of a finite additive code is its least positive weight with nonzero multiplicity.TauCeti.IsMonomialEquivalent.weightEnumerator_eq: monomially equivalent codes have the same weight enumerator.
References #
W. C. Huffman and V. Pless, Fundamentals of Error-Correcting Codes, Cambridge University Press (2003), §7.2; F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, North-Holland (1977), Chapter 5, §2.
The weight distribution #
The weight distribution of a set of words: the number of words of Hamming weight w.
It is meaningful for finite sets of words; for an infinite fibre Nat.card is zero.
Instances For
For a finite set of words, the weight distribution counts a finite filter.
There are no words of weight greater than the length.
A set of words containing the zero word has exactly one word of weight zero.
In a finite set of words, a weight occurs exactly when some word has that weight.
The weight distribution of a finite set of words sums to its cardinality.
The homogeneous weight enumerator #
The homogeneous Hamming weight enumerator W_C(X, Y) = ∑_w A_w(C) X^(n-w) Y^w, where n
is the length, A_w(C) is the weight distribution, and the variables 0, 1 are X, Y.
Instances For
The weight enumerator of a finite set of words is the sum over its words c of
X^(n - wt c) Y^(wt c).
The monomial form of the weight enumerator.
The coefficients of the weight enumerator are the weight distribution: the coefficient of
X^a Y^b is A_b(C) when a + b is the length, and zero otherwise.
The weight enumerator is homogeneous of degree the length.
The weight enumerator of a finite set of words evaluates to its cardinality at
X = Y = 1.
The one-variable weight enumerator #
The one-variable weight enumerator ∑_w A_w(C) Y^w, the specialization of the homogeneous
weight enumerator at X = 1.
Instances For
The coefficients of the one-variable weight enumerator are the weight distribution.
The one-variable weight enumerator is the homogeneous one evaluated at X = 1.
The one-variable weight enumerator of a finite set of words evaluates to its cardinality at
Y = 1.
The one-variable weight enumerator has degree at most the length.
Recovering the minimum distance #
The minimum distance of a finite additive code is the least positive weight occurring in its weight distribution; both sides are zero for the zero code.
A weight-preserving equivalence preserves the weight distribution of any set of words.
A finite set containing zero whose nonzero words all have weight d has one word of
weight zero and no words of any weight other than zero and d. For d ≠ 0 it has Nat.card C - 1
words of weight d. For d = 0 the set is the singleton {0}, whose one word has weight zero.
Elementary enumerators #
A singleton word has its weight monomial as weight enumerator.
The zero code has just its zero word, of weight zero.
Summing the coordinate factor of a weight monomial, X at a zero letter and Y at a nonzero
one, over an alphabet with q letters gives X + (q - 1) Y.
The whole word space has weight enumerator (X + (q - 1) Y)^n.
On the diagonal, the weight enumerator of a finite set of words is its cardinality times the common argument raised to the length.
Monomial equivalence and direct sums #
Permutation-equivalent codes have the same weight distribution.
Permutation-equivalent codes have the same weight enumerator.
Monomially equivalent codes have the same weight distribution.
Monomially equivalent codes have the same weight enumerator.