Incoding theory, the weight enumerator polynomial of a binary linear code specifies the number of words of each possible Hamming weight.
Let be a binary linear code length . The weight distribution is the sequence of numbers
giving the number of codewords cinC having weight tast ranges from 0 to n. The weight enumerator is the bivariate polynomial
Denote the dual codeofby
(where denotes the vector dot product and which is taken over ).
The MacWilliams identity states that
The identity is named after Jessie MacWilliams.
The distance distributionorinner distribution of a code C of size M and length n is the sequence of numbers
where i ranges from 0 to n. The distance enumerator polynomialis
and when C is linear this is equal to the weight enumerator.
The outer distributionofC is the 2n-by-n+1 matrix B with rows indexed by elements of GF(2)n and columns indexed by integers 0...n, and entries
The sum of the rows of BisM times the inner distribution vector (A0,...,An).
A code Cisregular if the rows of B corresponding to the codewords of C are all equal.