2 Coding
2 Coding
Modulo 2 Modulo 3
+ 0 1 · 0 1 + 0 1 2 · 0 1 2
0 0 1 0 0 0 0 0 1 2 0 0 0 0
1 1 0 1 0 1 1 1 2 0 1 0 1 2
2 2 0 1 2 0 2 1
Modulo 4
+ 0 1 2 3 · 0 1 2 3
0 0 1 2 3 0 0 0 0 0
1 1 2 3 0 1 0 1 2 3
2 2 3 0 1 2 0 2 0 2
3 3 0 1 2 3 0 3 2 1
F4
+ 0 1 ω ω2 · 0 1 ω ω2
0 0 1 ω ω2 0 0 0 0 0
1 1 0 ω2 ω 1 0 1 ω ω2
ω ω ω2 0 1 ω 0 ω ω2 1
ω2 ω2 ω 1 0 ω2 0 ω2 1 ω
Discrete Alphabets
Finite fields
a11 a1,n−k
(x1 , . . . , xk ) Ik .. ..
= (x1 , . . . , xk , ck+1 , . . . , cn )
| {z } . . | {z }
information data | ak,1 ak,n−k codeword
{z }
generator matrix G
Linear Codes
Generator matrices
• Dimension: k = 1.
• Length: n.
• Encoding: (x1 ) 7→ (x1 , . . . , x1 ) ∈ Fnq .
Linear Codes
Generator matrices
• Dimension: k = 1.
• Length: n.
• Encoding: (x1 ) 7→ (x1 , . . . , x1 ) ∈ Fnq .
(x1 )[1, . . . , 1] = (x1 . . . , x1 ).
Linear Codes
Generator matrices
• Dimension: k = n − 1.
• Length: n
Pk
• Encoding: (x1 , . . . , xk ) 7→ (x1 , . . . , xk , i=1 xi ) ∈ Fnq
Linear Codes
Generator matrices
• Dimension: k = n − 1.
• Length: n
• Encoding: (x1 , . . . , xk ) 7→ (x1 , . . . , xk , ki=1 xi ) ∈ Fnq
P
1
(x1 , . . . , xk ) I ... = (x1 . . . , xk , x1 + . . . + xk ).
k
1
Linear Codes
Generator matrices
The code is linear. The first three coefficients run through every
possible vectors in F32 , namely (0, 0, 0),(1, 0, 0), (0, 1, 0), (1, 1, 0),
(0, 0, 1), (1, 0, 1), (0, 1, 1), (1, 1, 1).
Linear Codes
Generator matrices
The code is linear. The first three coefficients run through every
possible vectors in F32 , namely (0, 0, 0),(1, 0, 0), (0, 1, 0), (1, 1, 0),
(0, 0, 1), (1, 0, 1), (0, 1, 1), (1, 1, 1). We next show that there is a
generator matrix (which is enough to conclude the code is
linear):
1 0 0 a11 a12
(x1 , x2 , x3 ) 0 1 0 a21 a22 .
0 0 1 a31 a32
Linear Codes
Generator matrices
1 0 0 a11 a12
(1, 0, 0) 0 1 0 a21
a22 = (1, 0, 0, a11 , a12 )
0 0 1 a31 a32
1 0 0 1 0
(x1 , x2 , x3 ) 0 1 0 1 1 .
0 0 1 0 1
Linear (n, k) codes
Linear algebra
We have
I
G = kT
T
A
and
HGT = −AT + AT = 0.
If G = [Ik |A] is a If c ∈ C, c = xG and
generator matrix for the HcT = HGT xT .
(n, k) code C, then Thus C is contained in the
H = [−AT |In−k ]. kernel of the linear map
v 7→ HvT . As H has rank
We have n − k, this map has a kernel of
dimension k, which is the
I
G = kT
T dimension of C.
A
and
HGT = −AT + AT = 0.
Linear Codes
Parity check matrices