Standard Generator Matrix for Linear Code/Examples/(5, 3) code in Z2
Example of Standard Generator Matrix for Linear Code
Let $G$ be the standard generator matrix:
- $G := \begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}$
$G$ generates the linear code $C$:
- $C = \set {00000, 00111, 01010, 01101, 10001, 10110, 11011, 11100}$
The minimum distance of $C$ is $3$, so $C$ detects $1$ transmission error and corrects $0$ transmission errors.
Proof
Multiplying $G$ by the $8$ vectors $000, 001, 010, 011, 100, 101, 110, 111$ in turn gives:
\(\ds \begin{pmatrix} 0 & 0 & 0 \end{pmatrix} \begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 0 & 0 & 0 & 0 & 0 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 0 & 0 & 1 \end{pmatrix} \begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 0 & 1 & 0 \end{pmatrix} \begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 0 & 1 & 0 & 1 & 0 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 0 & 1 & 1 \end{pmatrix} \begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 0 & 1 & 1 & 0 & 1 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 1 & 0 & 0 \end{pmatrix} \begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 1 & 0 & 0 & 0 & 1 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 1 & 0 & 1 \end{pmatrix} \begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 1 & 0 & 1 & 1 & 0 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 1 & 1 & 0 \end{pmatrix} \begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 1 & 1 & 0 & 1 & 1 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 1 & 1 & 1 \end{pmatrix}\begin{pmatrix}
1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 1 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 1 & 1 & 1 & 0 & 0 \end{pmatrix}\) |
all arithmetic being modulo $2$.
As can be seen, $2$ of the codewords have weight $2$, and $5$ have weight $3$.
From Minimum Distance of Linear Code is Smallest Weight of Non-Zero Codeword, the minimum distance of $C$ is $2$.
From Error Detection Capability of Linear Code, $C$ can detect $3 - 1 = 0$ transmission error.
From Error Correction Capability of Linear Code, $C$ can correct $\floor {\dfrac {2 - 1} 2} = 0$ transmission errors.
$\blacksquare$
Sources
- 1996: John F. Humphreys: A Course in Group Theory ... (previous) ... (next): Chapter $6$: Error-correcting codes: Exercise $2 \ \text{(a)}$