Standard Generator Matrix for Linear Code/Examples/(4, 2) code in Z3/Example 2
Example of Standard Generator Matrix for Linear Code
Let $G$ be the standard generator matrix:
- $G := \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}$
$G$ generates the linear code $C$:
- $C = \set {0000, 0112, 0221, 1011, 1120, 1202, 2022, 2101, 2210}$
The minimum distance of $C$ is $3$, so $C$ detects $2$ transmission errors and corrects $1$ transmission error.
Proof
Multiplying $G$ by the $9$ vectors $00, 01, 02, 10, 11, 12, 20, 21, 22$ in turn gives:
\(\ds \begin{pmatrix} 0 & 0 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 0 & 0 & 0 & 0 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 0 & 1 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 0 & 1 & 1 & 2 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 0 & 2 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 0 & 2 & 2 & 1 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 1 & 0 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 1 & 0 & 1 & 1 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 1 & 1 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 1 & 1 & 2 & 0 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 1 & 2 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 1 & 2 & 0 & 2 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 2 & 0 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 2 & 0 & 2 & 2 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 2 & 1 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 2 & 1 & 0 & 1 \end{pmatrix}\) | ||||||||||||
\(\ds \begin{pmatrix} 2 & 2 \end{pmatrix} \begin{pmatrix}
1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix}\) |
\(=\) | \(\ds \begin{pmatrix} 2 & 2 & 1 & 0 \end{pmatrix}\) |
all arithmetic being modulo $3$.
As can be seen, all the codewords have weight $3$.
From Minimum Distance of Linear Code is Smallest Weight of Non-Zero Codeword, the minimum distance of $C$ is $3$.
From Error Detection Capability of Linear Code, $C$ can detect $3 - 1 = 2$ transmission errors.
From Error Correction Capability of Linear Code, $C$ can correct $\floor {\dfrac {3 - 1} 2} = 1$ transmission errors.
$\blacksquare$
Sources
- 1996: John F. Humphreys: A Course in Group Theory ... (previous) ... (next): Chapter $6$: Error-correcting codes: Exercise $2 \ \text{(b)}$