= Solution
Take the <parity-check matrix>
$$
H=\begin{pmatrix}0&0&0&1&1&1&1\\0&1&1&0&0&1&1\\1&0&1&0&1&0&1\end{pmatrix}
$$
over $\mathbb F_2$. Its columns are all the nonzero vectors of $\mathbb F_2^3$. The <Hamming code> is $C=\ker H$. Since $H$ has rank three, $C$ is a binary <linear code> of length seven and dimension four. No nonzero <codeword> has weight one or two, since no column is zero and no two columns coincide. Columns $u,v,u+v$ give a <codeword> of weight three, so \b[$C$ has parameters $[7,4,3]$.]
For a received vector $w=c+e$, its <syndrome> is $Hw=He$. A single error in position $j$ gives exactly column $j$ of $H$, so the <syndrome> identifies that position uniquely; zero <syndrome> means no error under the one-error assumption. The radius-one <Hamming balls> around the $16$ <codewords> are disjoint and have total size $16(1+7)=128=2^7$, so this is also a <perfect code>.
There are $\binom72/3=7$ weight-three <codewords>: every pair of columns determines the third, and each triple is counted three times. The all-ones vector is a <codeword> because the column sum is zero, so complementation gives seven weight-four <codewords>. Together with zero and the all-ones vector these account for all sixteen. The <weight enumerator> is therefore
$$
\boxed{W_C(z)=1+7z^3+7z^4+z^7}.
$$
Back to article page