# weight enumerator

Let $A$ be an alphabet and $C$ a finite subset of $A^{*}$. Then the complete weight enumerator of $C$, denoted by $\operatorname{cwe}_{C}$, is the polynomial in $|A|$ indeterminates $X_{a}$ labeled by the letters of $a\in A$ with integer coefficients defined by

 $\operatorname{cwe}_{C}((X_{a})_{a\in A}):=\sum\limits_{c\in C}\prod\limits_{a% \in A}X_{a}^{\operatorname{wt}_{a}(c)},$

where $\operatorname{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 $\operatorname{we}_{C}$, as a polynomial in only two indeterminates $X$ and $Y$:

 $\operatorname{we}_{C}(X,Y):=\operatorname{cwe}_{C}((X_{a})_{a\in A})|_{\begin{% array}[]{l}\scriptstyle X_{0}=X\\ \scriptstyle X_{a}=Y\text{ if }a\neq 0\end{array}},$

that is one distinguishes only between zero and the non-zero letters of the strings in $C$.

If $C$ is a code of block length $n$, then both $\operatorname{cwe}_{C}$ and $\operatorname{we}_{C}$ are http://planetmath.org/node/6577homogeneous of degree $n$. Therefore, one can set $Y=1$ in $\operatorname{we}_{C}$ in this case without losing information. The resulting polynomial can be uniquely rewritten in the form

 $\operatorname{we}_{C}(X,1)=\sum\limits_{i=0}^{n}A_{i}X^{n-i},$

the sequence $A_{0},\ldots A_{n}$ defining the Hamming weight distribution. Analogously, one can define more general weight distributions by setting all but one indeterminate in $\operatorname{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

 $\operatorname{cwe}_{C}(X_{0},X_{1},X_{2})=X_{0}^{4}+4X_{0}^{2}X_{1}^{2}+4X_{0}% ^{2}X_{1}X_{2}+4X_{0}^{2}X_{2}^{2}+4X_{0}X_{1}^{2}X_{2}+4X_{0}X_{1}X_{2}^{2}+X% _{1}^{4}+4X_{1}^{2}X_{2}^{2}+X_{2}^{4}$

and

 $\operatorname{we}_{C}(X,Y)=X^{4}+12X^{2}Y^{2}+8XY^{3}+6Y^{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 $\operatorname{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 2013-03-22 15:13:23 Last modified on 2013-03-22 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