weight enumerator
Let $A$ be an alphabet and $C$ a finite subset of ${A}^{*}$. Then the complete weight enumerator of $C$, denoted by ${\mathrm{cwe}}_{C}$, is the polynomial^{} in $A$ indeterminates ${X}_{a}$ labeled by the letters of $a\in A$ with integer coefficients defined by
$${\mathrm{cwe}}_{C}({({X}_{a})}_{a\in A}):=\sum _{c\in C}\prod _{a\in A}{X}_{a}^{{\mathrm{wt}}_{a}(c)},$$ 
where ${\mathrm{wt}}_{a}(c)$ is the $a$weight of the string $c$.
If $A$ is an abelian group, one defines the Hamming weight enumerator of $C$, denoted by ${\mathrm{we}}_{C}$, as a polynomial in only two indeterminates $X$ and $Y$:
$${\mathrm{we}}_{C}(X,Y):={{\mathrm{cwe}}_{C}({({X}_{a})}_{a\in A})}_{\begin{array}{c}{X}_{0}=X\hfill \\ {X}_{a}=Y\text{if}a\ne 0\hfill \end{array}},$$ 
that is one distinguishes only between zero and the nonzero letters of the strings in $C$.
If $C$ is a code of block length $n$, then both ${\mathrm{cwe}}_{C}$ and ${\mathrm{we}}_{C}$ are http://planetmath.org/node/6577homogeneous of degree $n$. Therefore, one can set $Y=1$ in ${\mathrm{we}}_{C}$ in this case without losing information. The resulting polynomial can be uniquely rewritten in the form
$${\mathrm{we}}_{C}(X,1)=\sum _{i=0}^{n}{A}_{i}{X}^{ni},$$ 
the sequence ${A}_{0},\mathrm{\dots}{A}_{n}$ defining the Hamming weight distribution. Analogously, one can define more general weight distributions by setting all but one indeterminate in ${\mathrm{cwe}}_{C}({({X}_{a})}_{a\in A})$ equal to one.
Examples

•
Let $C$ be the ternary (that is $A={\mathbb{F}}_{3}=\{0,1,2\}$) linear code^{} of block length $4$ the vectors $(1,1,1,1)$, $(1,1,0,0)$ and $(1,0,1,0)$. Then
$${\mathrm{cwe}}_{C}({X}_{0},{X}_{1},{X}_{2})={X}_{0}^{4}+4{X}_{0}^{2}{X}_{1}^{2}+4{X}_{0}^{2}{X}_{1}{X}_{2}+4{X}_{0}^{2}{X}_{2}^{2}+4{X}_{0}{X}_{1}^{2}{X}_{2}+4{X}_{0}{X}_{1}{X}_{2}^{2}+{X}_{1}^{4}+4{X}_{1}^{2}{X}_{2}^{2}+{X}_{2}^{4}$$ and
$${\mathrm{we}}_{C}(X,Y)={X}^{4}+12{X}^{2}{Y}^{2}+8X{Y}^{3}+6{Y}^{4}$$ and the Hamming weight distribution is $1,0,12,8,6$.

•
The Hamming weight enumerator of the full binary code of length $n$, ${\mathbb{F}}_{2}^{n}$, is simply given by ${\mathrm{we}}_{{\mathbb{F}}_{2}^{n}}(X,Y)={(X+Y)}^{n}$, and the Hamming weight distribution is the $n$th of Pascal’s triangle.
Title  weight enumerator 
Canonical name  WeightEnumerator 
Date of creation  20130322 15:13:23 
Last modified on  20130322 15:13:23 
Owner  GrafZahl (9234) 
Last modified by  GrafZahl (9234) 
Numerical id  4 
Author  GrafZahl (9234) 
Entry type  Definition 
Classification  msc 94A55 
Classification  msc 94B05 
Synonym  Hamming weight enumerator 
Related topic  KleeneStar 
Related topic  LinearCode 
Defines  complete weight enumerator 
Defines  weight distribution 
Defines  Hamming weight distribution 