Syndrome Decoding

Theorem
Let $C$ be a linear $\tuple {n, k}$-code whose master code is $\map V {n, p}$

To decode a given vector $v$ of $\map V {n, p}$, the syndrome of $v$ can be used as follows.

Create an array $T$ of $2$ column consisting of the following:


 * The top row contains:
 * in column $1$: the zero of $C$
 * in column $2$: its syndrome.


 * The $r$th row subsequent contains:
 * in column $1$: any element of $\map V {n, p}$ of minimum weight which is not already included in the first $r - 1$ rows
 * in column $2$: its syndrome.

To decode a given vector $v$ of $\map V {n, p}$:
 * Calculate its syndrome
 * Find it in column $2$ of $T$
 * See what is in column $1$ of $T$, and call it $u$, say
 * Subtract $u$ from $v$.