= Solution
The relation $g(X)h(X)=X^7-1$ makes this a length-seven binary <cyclic code>. Since $\deg g=3$, the <generator polynomial of a cyclic code> gives
$$
\dim C=7-\deg g=4.
$$
The polynomial $g$ itself is a codeword of <Hamming weight> three, so the <minimum distance> is at most three. A nonzero word of weight one cannot vanish at the nonzero element $\alpha$. If a weight-two word $X^i+X^j$ vanished there, then $\alpha^{i-j}=1$; because $\alpha$ has order seven and $0\leq i,j<7$, this forces $i=j$. Hence there are no nonzero words of weight below three, and
$$
\boxed{\operatorname{rank}C=4,\qquad d(C)=3.}
$$
The equation $g(\alpha)=0$ gives $\alpha^3=\alpha^2+1$ in the <finite field> $\mathbb F_8$, and therefore
$$
\alpha^4=\alpha(\alpha^2+1)=\alpha^3+\alpha
=\alpha^2+\alpha+1=r(\alpha).
$$
By the <root-evaluation syndrome for a cyclic code>, this is the syndrome of the single error $e(X)=X^4$. Since $d(C)=3$, <minimum-distance decoding> uniquely corrects one error. Subtracting and adding agree over $\mathbb F_2$, so the decoded codeword is
$$
\boxed{c(X)=r(X)+X^4=X^4+X^2+X+1=(X+1)g(X).}
$$
Back to article page