Finite Fields and Error-Correcting Codes: Lecture Notes in Mathematics
Finite Fields and Error-Correcting Codes: Lecture Notes in Mathematics
1
CHAPTER 1
Finite Fields
(A1) a + (b + c) = (a + b) + c
(A2) a+b=b+a
a + 0 = a for all a ∈ A
a + (−a) = 0.
(M1) a · (b · c) = (a · b) · c
(M2) a·b=b·a
1 · a = a · 1 = a for all a ∈ A
3
4 1. FINITE FIELDS
say that two integers a and b are congruent modulo n if their difference
a − b is divisible by n. For this we simply write a ≡ b (mod n). For
example we have 13 ≡ 4 (mod 3). Denote by [a] the class of integers
that are congruent to a modulo n. We can then define an addition and
a multiplication of such congruence classes by
[a] + [b] = [a + b] and [a] · [b] = [a · b].
Here we must verify that these definitions do not depend on the choice
of representatives for each congruent class. So assume that a ≡ a1
(mod n) and b ≡ b1 (mod n). Then a1 = a + kn and b1 = b + ln for
some integers k and l. This implies that
a1 + b1 = a + b + (k + l)n and a1 b1 = ab + (al + bk + kln)n,
hence a1 +b1 is congruent with a+b and a1 b1 with ab modulo n. Denote
by Zn the set of congruence classes modulo n i.e.
Zn = {[0], [1], [2], . . . , [n − 1]}.
It is easily checked that the above defined addition and multiplication
turn Zn into a commutative ring.
Example 1.6. In the ring Z11 we have
[5] + [9] = [14] = [3] and [5] · [9] = [45] = [1]
and in Z12 the following equalities hold
[4] + [9] = [13] = [1] and [4] · [9] = [36] = [0].
As a direct consequence of the example we see that [5] is the mul-
tiplicative inverse of [9] in the ring Z11 . The following result gives a
criteria for an element of Zn to have a multiplicative inverse.
Theorem 1.7. Let [a] in Zn be different from [0]. Then there exists
an element [b] in Zn such that [a][b] = [1] if and only if a and n are
relatively prime i.e. they do not have a non-trivial common divisor.
Proof. Let us first assume that a and n have a common divisor
d ≥ 2. Then a = kd and n = ld for some integers k and l with
0 < l < n. This implies that [l][a] = [lkd] = [kn] = [0]. Hence there
does not exist a multiplicative inverse [b] to [a], because in that case
[l] = [l][1] = [l][a][b] = [0][b] = [0].
On the other hand, if a and n are relatively prime then it is a con-
sequence of the Euclidean algorithm that there exist integers b and c
such that 1 = ab + nc. This gives [1] = [a][b].
6 1. FINITE FIELDS
Exercises
Exercise 1.1. Show that the following rules are valid in any ring:
(1) 0 · a = a · 0 = 0, (Hint: 0 · a + 0 · a = 0 · a.)
(2) (−a)b = a(−b) = −ab,
(3) (−a)(−b) = ab.
Exercise 1.2. Show that a field does not have any zero divisors.
Exercise 1.3. Show that if a is not a zero divisor in the ring A
then the following cancelation law applies
ax = ay ⇒ x = y
for all x and y in A.
Exercise 1.4. Let M be the set of all matrices
a 2b
,
−b a
where a and b are integers. Show that, with the standard matrix addi-
tion and multiplication, M forms a commutative ring with unity. Does
M have any zero divisors?
√
Exercise
√ 1.5. Let Q[ 2] be the set of all numbers of the form
a + b 2, where a and b are rational. Show
√ that the usual addition and
multiplication of real numbers turn Q[ 2] into a field.
Exercise 1.6. Let Z[i] be the set of Gaussian integers a + ib, where
a and b are integers. Show that Z[i], with the usual addition and
multiplication of complex numbers, is a commutative ring with unity.
For which elements u ∈ Z[i] does there exist a multiplicative inverse v
i.e. an element v such that uv = 1?
Exercise 1.7. Show that a ring A is commutative if and only if
(a + b)2 = a2 + 2ab + b2
for all a and b in A.
Exercise 1.8. Find out if the determinant
325 131 340
142 177 875
214 122 961
8 1. FINITE FIELDS
By collecting a from
Qq−1each of the different factors on the left-hand side
q−1
and dividing by i=1 xi , we obtain a = 1 and have thereby proven
the following result.
Theorem 2.1. Let F be a finite field with q elements and a 6= 0 be
an element of F . Then
aq−1 = 1.
Specializing to the case when F = Zp , for some prime p, we obtain
the following result due to Pierre de Fermat in 1640:
Theorem 2.2 (Fermat’s little theorem). If p is a prime number
and a is an integer not divisible by p, then
ap−1 ≡ 1 (mod p).
Example 2.3. We now want to calculate the least positive remain-
der when dividing 3350 by 17. Since 17 is a prime, Fermat’s theorem
tells us that 316 ≡ 1 (mod 17). Hence
3350 = 321·16+14 ≡ 314 (mod 17).
A continued calculation modulo 17 gives
314 = 97 = 9 · 813 ≡ 9 · (−4)3 = 9 · (−4) · 16 ≡ 9 · (−4) · (−1) = 36 ≡ 2.
The remainder that we are looking for is therefore 2.
Alternatively, one can show that 314 ≡ 2 by observing that 314 ·32 =
3 ≡ 1. This implies that [314 ] = [9]−1 = [2], since 2 · 9 = 18 ≡ 1.
16
Then the numbers Ni and ni are relatively prime for each i. Hence
there exist integers si and ti such that
si Ni + ti ni = 1.
Set
k
X
x= aj sj Nj = a1 s1 N1 + · · · + ak sk Nk .
j=1
Exercises
3. Vector Spaces
Definition 3.1. A vector space (or a linear space) over a field F is
a set V , containing an element denoted by 0, and for each pair u, v ∈ V
and each α ∈ F having a well-defined sum u + v ∈ V and a product
αu ∈ V such that the following rules are satisfied
(i) u + (v + w) = (u + v) + w
(ii) u+v =v+u
(iii) α(βu) = (αβ)u
(iv) 1u = u
(v) 0u = 0
(vi) α(u + v) = αu + αv
(vii) (α + β)u = αu + βu .
Remark 3.2. It follows from these rules that all the axioms for
addition, (A1)–(A4) from Section 1, are satisfied in a vector space.
From (iv) , (v) and (vii) we get
u + 0 = 1u + 0u = (1 + 0)u = 1u = u
so (A3) applies. The axiom (A4) can be verified as follows
u + (−1)u = 1u + (−1)u = (1 + (−1))u = 0u = 0 .
Remark 3.3. The elements of a vector space are often called vec-
tors. In (v) we underlined the zero on the right-hand side to emphasize
that it is a vector. In what follows, we will simply denote also the zero
vector by 0.
The basic theory for vector spaces over a general field F is the same
as for the special case when F = R. A number of vectors u1 , . . . , ul in
3. VECTOR SPACES 15
Exercises
4. Polynomial Rings
According to Theorem 3.6, any finite field must have pn elements,
where p is a prime number and n is some positive integer. So far,
we have only dealt with the fields Zp for which n = 1. To be able
to construct fields with n > 1, we need to discuss polynomials with
coefficients in finite fields.
A polynomial with coefficients in a field F is an expression of the
form
(1) f (x) = an xn + an−1 xn−1 + · · · + a1 x + a0 ,
where ai ∈ F . Strictly speaking, a polynomial is just a finite sequence
a0 , a1 , . . . , an of elements in F and the letter x should be seen as a
formal symbol. The value f (α) of the polynomial f at α ∈ F is
an αn + an−1 αn−1 + · · · + a1 α + a0 ∈ F.
18 1. FINITE FIELDS
In the same way as for the integers, one can check that these definitions
are independent of the choice of the representatives for the congruence
classes. Denote by
F [x]/(s(x))
the set of congruence classes modulo s(x). It is easily checked that
F [x]/(s(x)), equipped with this addition and this multiplication, is a
commutative ring.
Example 4.7. For the ring Z5 [x]/(x3 + 1) we have
[x2 + 2x + 1] · [x2 + x + 2] = [x4 + 3x3 + 5x2 + 5x + 2]
= [x4 + 3x3 + 2] = [(x + 3)(x3 + 1 − 1) + 2]
= [(x + 3)(−1) + 2] = [−x − 1] = [4x + 4].
Observe that x3 can always be substituted by −1, since we are calcu-
lating modulo x3 + 1.
In analogy with the rings Zn one can show that F [x]/(s(x)) is a
field if and only if s(x) is a prime polynomial. If s(x) is not a prime
polynomial, then s(x) = s1 (x)s2 (x) for some polynomials s1 and s2
of positive degree. Then [s1 (x)][s2 (x)] = 0, so F [x]/(s(x)) has zero
divisors and hence is not a field. If s(x) is a prime polynomial, then
(f, s) = 1 for every non-zero polynomial f (x) of degree less than s.
By the Euclidean algorithm there exist polynomials c(x) and d(x) such
that
1 = c(x)f (x) + d(x)s(x).
This implies that [1] = [c(x)][f (x)], so [c(x)] is the inverse of [f (x)]. Ac-
cording to the division algorithm, every congruence class in F [x]/(s(x))
is represented by a polynomial of degree less than s(x). This means
that every non-zero element has an inverse, so F [x]/(s(x)) is a field.
Example 4.8. The polynomial x2 +1 is irreducible in the ring R[x]
of polynomials with real coefficients. This means that
R[x]/(x2 + 1)
is a field. Every congruence class is represented by a polynomial of
degree one and if we apply [x2 + 1] = 0, then we easily get
[a + bx][c + dx] = [(ac − bd) + (ad + bc)x]
With this we easily see that R[x]/(x2 + 1) is isomorphic to the field C
of complex numbers.
Exercises
22 1. FINITE FIELDS
5. Finite Fields
Example 5.1. We shall here determine all irreducible polynomi-
als in Z2 [x] of degree less than or equal to 4. There exist only two
polynomials of degree 1, namely
x and x + 1.
These are trivially irreducible. A polynomial of degree 2 or 3 is irre-
ducible if and only if it has no zeros in Z2 . It is easily checked that
such a polynomial has no zeros exactly when it has an odd number
of terms and the constant term is 1. This shows that the irreducible
polynomials of degree 2 and 3 are exactly the following:
x2 + x + 1
x3 + x2 + 1 and x3 + x + 1.
If a polynomial of degree 4 is irreducible, then necessarily it does not
have a factor of degree 1, i.e. it does not have a zero in Z2 , and it is not
a product of two irreducible factors of degree 2. The second condition
only excludes (x2 + x + 1)2 = x4 + x2 + 1, since there only exists one
prime polynomial of degree 2. The other polynomials in Z2 of degree
4 that do not have a zero are
x4 + x3 + 1 , x4 + x + 1 and x4 + x3 + x2 + x + 1.
These are all the prime polynomials in Z2 [x] of degree 4.
If s(x) is any of the irreducible polynomials of degree 4 mentioned
above, then Z2 [x]/(s(x)) is a field with 24 = 16 elements. This follows
from the fact that every congruence class is represented by a unique
polynomial of degree 3 and for this each coefficient can be chosen in
exactly two ways, namely as 0 or 1. Any irreducible polynomial of
degree 2 or 3 induces a field with 22 = 4 or 23 = 8 elements, respectively.
In the next section, we will show that for every prime number p and
every positive integer n there exists an irreducible polynomial in Zp [x]
of degree n. As a direct consequence of this, there exists for each such
p and n a field with pn elements. We shall also show that any two finite
fields with the same number of elements are isomorphic. This means
that up to isomorphism there exists, for each prime p and each positive
integer n, exactly one finite field with pn elements. These fields are
denoted by GF (pn ) and called the Galois field of order pn in honour of
the French mathematician Évariste Galois (1811-1832). In this section
we shall give examples of how to do calculations in finite fields.
24 1. FINITE FIELDS
than n. This means that any non-zero element of F must satisfy the
equation
xn = 1.
The polynomial xn − 1 has therefore q − 1 different zeros. Following
the factor theorem we therefore have n ≥ q − 1. On the other hand
Theorem 2.1 tells us that the order never can be greater than q − 1.
Hence n = q − 1 so we have proven the result.
Definition 5.10. Let F be a field with q elements. An element of
order q − 1 in F is said to be a primitive element.
Example 5.11. We shall show that [3] is a primitive element for
Z101 . Since the order of [3] must divide 100 = 22 · 52 , it is enough to
check the powers 2, 4, 5, 10, 20, 25 and 50:
32 = 9
34 = 81 ≡ −20
35 ≡ −60
310 ≡ 3600 ≡ −36
320 ≡ 1296 ≡ −17
325 ≡ 1020 ≡ 10
350 ≡ 100 ≡ −1
The least positive integer m for which 3m ≡ 1 is therefore 100.
For a primitive element a in a field F with q element the powers
a0 , a1 , a2 , . . . , aq−2
are all different. Otherwise we would have aj = ak for some integers
j < k between 0 and q − 2. Then ak−j = 1, which contradicts the fact
that the order of a is q − 1. For every non-zero b in F there exists a
uniquely determined j with 0 ≤ j ≤ q − 2 such that b = aj . We call
j the index of b and write j = ind(b). The index is also called the
discrete logarithm of b with respect to the primitive element a. The
index can be used to simplify calculations of products and quotients in
finite fields. If the field has q elements then we have
ind(b1 · b2 ) ≡ ind(b1 ) + ind(b2 ) (mod q − 1)
ind(b1 · b−1
2 ) ≡ ind(b1 ) − ind(b2 ) (mod q − 1) .
Example 5.12. We have seen in Example 5.1 that the polynomial
x4 + x3 + 1 is irreducible Z2 [x]. The field
F = Z2 [x]/(x4 + x3 + 1)
5. FINITE FIELDS 27
index 0 1 2 3 4 5 6 7
element 0001 0010 0100 1000 1001 1011 1111 0111
index 8 9 10 11 12 13 14
element 1110 0101 1010 1101 0011 0110 1100
Exercises
Exercise 5.7. Use the table in Example 5.12 to calculate the fol-
lowing
(1) (1001) · ((1011)2 + (0011)−2 ),
(2) ((1010)2 + (0101)3 ) · ((0001) + (1101)2 )−1 .
t2 t3 t4 t6 t6 t9
+ + · · · ) + I2 (t2 + + + · · · ) + I3 (t3 + + + · · · ) + · · ·
I1 (t +
2 3 2 3 2 3
p2 t2 p3 t3
= pt + + + ··· .
2 3
Comparing coefficients of each side for tn gives
X d pn
Id · = .
n n
d|n
Observe that on the left-hand side we only have terms where d divides
n. Multiplying by n gives the following result:
Theorem 6.1. If Id is the number of monic irreducible polynomials
of degree d in Zp [x], then
X
dId = pn .
d|n
Theorem 6.3. For each prime number p and each positive integer
n there exists an irreducible polynomial of degree n in Zp [x].
It is a direct consequence of Theorem 6.3 that there exists a field
with pn elements. We shall now focus our attention on proving that,
up to isomorphisms, there exists only one such field.
Let F be an arbitrary finite field of characteristic p. Then F con-
tains the subfield
f = { 0 , 1 , . . . , (p − 1)1 }
which is isomorphic to Zp . If m1 ∈ f and β ∈ F , then (m1) · β = mβ .
We can therefore consider F as a vector space over Zp . Since F is
finite, this vector space is finite dimensional. This implies that for
every α ∈ F there exists a positive integer d such that the powers
α0 , α1 , α2 , . . . , αd
are linearly dependent, i.e. there exist a0 , a1 , . . . , ad ∈ Zp not all zero
such that
a0 1 + a1 α + a2 α 2 + · · · + ad α d = 0 .
Let d be the smallest such integer and set s(x) = a0 + a1 x + · · · + ad xd .
Then s(x) has the lowest degree amongst the non-trivial polynomials in
Zp [x] having α as a zero. We can always choose ad = 1, and then s(x)
is uniquely determined and called the minimal polynomial to α. The
minimal polynomial is irreducible in Zp [x] because if s(x) was a product
s1 (x)s2 (x) of factors of lower degree than d, then s1 or s2 would have
α as zero and this would contradict the fact that s(x) is the minimal
polynomial of α.
Theorem 6.4. Let F be a finite field of charateristic p and let α be
an element of F . If L is the smallest subfield of F containing α and if
s(x) is the minimal polynomial to α, then L is isomorphic to the field
Zp [x]/(s(x)).
Proof. Set
L = {f (α) ; f ∈ Zp [x]}.
Every subfield of F containing α must include L, since such a field
contains all powers of α and all linear combinations of such powers.
We shall show that L is isomorphic to the field Zp [x]/(s(x)). It follows
from this that L itself is a field and hence the smallest subfield of F
containing α. Consider the map
Zp [x]/(s(x)) 3 [f (x)] 7→ f (α) ∈ L.
6. THE EXISTENCE AND UNIQUENESS OF GF (pn ) 31
= 0.
The binomial coefficients kr tell us how many different numbers d are
products of k prime factors chosen amongst p1 , . . . , pr .
Theorem 7.2 (Möbius inversion formula). Let f (n) and g(n) be
defined for positive integers n and assume that
X
f (n) = g(d)
d|n
that
X n X X X X
µ(d)f = µ(d) g(d0 ) = g(d0 ) µ(d) = g(n).
d
d|n d|n d0 | n
d
d0 |n d| dn0
For the last equality we have used Lemma 7.1, which gives
(
X 1 if d0 = n
µ(d) =
d| n
0 if d0 < n .
d0
CHAPTER 2
Error-Correcting Codes
1. Introduction
When transferring or storing information there is always a risk of
errors occurring in the process. To increase the possibility of detecting
and possibly correcting such errors, one can add a certain redundance
to the text carrying the information, for example, in form of control
digits. We shall now give two simple examples.
Example 1.2. If the receiver in Example 1.1 does not have the
opportunity to ask for a repetition, the sender can proceed in a different
way. Instead of adding the seventh digit he can send every six digit
word three times in a row. If the three words are not identical when
they reach the receiver, he will know that an error has occurred and
could try to correct it at each place by choosing a digit that occurs
at the corresponding places in at least two of the received words. He
can of course not be completely sure that the erroneous word has been
corrected, but if the probability for more than one error to occur is
low, then the chances are good.
Exercises
Exercise 1.1. In Examples 1.1 and 1.2 we defined two coding func-
tions from Z62 to Z72 and Z18
2 , respectively. Determine the separation
for the corresponding codes. Compare the result with Theorem 1.11.
Exercise 1.2. Let σ > 0 be an odd integer and C be a code in
Zn2with M words and separation σ. Show that there exists a code C
b
n+1
in Z2 with M words and separation σ + 1. (Hint: Compare with
Example 1.1)
Exercise 1.3. Construct a code in Z82 with 4 words and separation
5.
Exercise 1.4. Show that there does not exist a code in Z12
2 with
7
2 words and separation 5.
Exercises
Example 3.8. The binary [5, 2] code which has the generator ma-
trix
1 0 1 0 1
G=
0 1 0 1 1
has as control matrix
1 0 1 0 0
H = 0 1 0 1 0 .
1 1 0 0 1
We shall now describe how a receiver can apply a control matrix
H of a linear code C to correct errors that possibly have occurred
during the transfer of information when using the code C. We start by
checking if the received word x ∈ F n satisfies the condition xH t = 0.
If that is the case then x is orthogonal to all the rows of H and hence
a code word. We then assume that no error has occurred and that x
is the code word sent. On the other hand, if xH t 6= 0 then an error
has occurred. In order to correct it, we consider the set of all words y
in F n such that yH t = xH t . We call this set the coset corresponding
to the syndrome xH t . In the coset corresponding to xH t we choose
the word ȳ with least weight i.e. the least Hamming distance from the
origin. The fact that ȳH t = xH t means that the difference x − ȳ is
a code word and there does not exist any other code word closer to x
since ȳ is of minimal weight. For this reason it is reasonable to correct
x to x − ȳ . The word ȳ is called a coset leader corresponding to the
syndrome xH t .
Example 3.9. For the code in Example 3.8 we have the following
table of coset leaders of the listed syndromes
coset leader 00000 10000 01000 00100 00010 00001 11000 10010
syndrome 000 101 011 100 010 001 110 111
The syndrome 000 corresponds to the coset of code words. The five
following syndromes correspond to cosets consisting of words different
from a code word at only one place. For those the coset leaders are
uniquely determined since different words of weight one have different
syndromes. This is a consequence of the fact that the columns of the
control matrix H are all different. The syndrome of a word that has
1 at place j and 0 elsewhere is the j-th row in H t . The two last coset
leaders are not uniquely determined by their syndromes. For example,
also 01100 gives the syndrome 111. Here the receiver can act in several
ways. One possibility is that he decides to pick one of the coset leaders
44 2. ERROR-CORRECTING CODES
and uses that one for error-correcting. Other alternatives are that he
asks the sender to repeat the message or simply ignores the word.
Let us now apply the above table to the three received words 11111,
01110 and 01101. The first word has the syndrome 001. The corre-
sponding coset leader is 00001 and the corrected word becomes 11110.
For 01110 the syndrome is 101 with coset leader 10000. Even in this
case the corrected word is 01110 − 10000 = 11110. For the word 01101
the syndrome is 110 so at least two letters must be wrong. If the re-
ceiver picks the coset leader in the list above, then the corrected word
becomes 10101.
We conclude this section with a theorem telling us how we can
determine the separation of a code from its control matrix.
Theorem 3.10. A linear code C with the control matrix H has
separation σ if and only if there exist σ columns in H that are linearly
dependent and furthermore any σ − 1 of the columns in H are linearly
independent.
Proof. That σ columns in H are linearly dependent means that
there exists a word x of weight at most σ such that xH t = 0. The
weight of such a word can never be less than σ, since σ − 1 columns
in H are always linearly independent. Hence w(C) = σ and the result
follows from Theorem 2.4 of the last section.
Exercises
are generator matrices for two linear codes C1 and C2 in Z52 and Z55 ,
respectively. Construct control matrices for C1 and C2 . What are the
separations for C1 and C2 ?
4. SOME SPECIAL CODES 45
Exercise 3.4. Consider the linear code in Z62 with the generator
matrix
1 0 0 1 1 1
0 1 0 1 0 1 .
0 0 1 0 1 1
(1) Which of the following words are code words ?
111001 , 010100 , 101100 , 110111 , 100001.
(2) Which of the words can be corrected? Correct those!
Exercise 3.5. Let C be a binary code with generator matrix
1 0 0 0 1 0 1
0 1 0 0 1 0 1
.
0 0 1 0 0 1 1
0 0 0 1 0 1 1
Correct the following words in C if possible
1101011 , 0110111 , 0111000 .
Exercise 3.6. Determine the separation for the linear code in Z83
with control matrix
1 1 1 1 1 1 1 1
0 1 0 0 1 2 1 2
.
0 0 1 0 1 1 2 0
0 0 0 1 1 1 0 1
Exercise 3.7. Let C be the code in Z65 with the generator matrix
1 0 0 1 1 1
0 1 0 1 2 3 .
0 0 1 1 3 4
Show that d(C) = 4.
Theorem 4.6 to C10 and C20 we get a [16,5] code with separation 8. Call
this C100 and take C200 to be the code in Z16
2 consisting of the two words
with all digits equal. If we then yet again employ Theorem 4.6 we yield
a [32,6] code with separation 16. This is the code that was used by
Mariner 9. Since the separation is 16, Theorem 1.7 tells us that up to
15 errors are detected and that up to 7 errors can be corrected in each
word consisting of 32 letters. For this 32 − 6 = 26 control digits are
needed. The Mariner code belongs to a general class called Reed-Muller
codes.
The last example of this section is a classical code constructed by
M. J. E. Golay in 1949.
Example 4.8. Let C be the [12,6] code over Z3 with generator
matrix
1 0 0 0 0 0 0 1 1 1 1 1
0 1 0 0 0 0 1 0 1 2 2 1
0 0 1 0 0 0 1 1 0 1 2 2
G = [I6 | A] = .
0 0 0 1 0 0 1 2 1 0 1 2
0 0 0 0 1 0 1 2 2 1 0 1
0 0 0 0 0 1 1 1 2 2 1 0
The five last digits in the five last rows are obtained by a cyclic permu-
tation of the vector 01221. It is easily checked that the scalar products
of the rows of G are zero (note that 2 = −1 in Z3 ). The code C is
therefore self-dual. In particular, we have < x, x >= 0 for every word
x in C.
Since the letters in x are 0 or ±1, this implies that the weight w(x)
must be divisible by 3. We will show that there does not exist a word
in C of weight 3. Such a word must be of the type (3 | 0), (2 | 1), (1 | 2)
or (0 | 3), where the digits to the left and to the right of | tell us how
many of the first six and last six digits in the word are different from
0, respectively. Since the code is self-dual, the scalar product of any
code word and any row of the generator matrix G must be zero. This
is impossible for the words of the type (3 | 0) and (2 | 1). On the other
hand, every code word is a linear combination of the rows of G. This is
impossible for the types (1 | 2) and (0 | 3). This means that the lowest
weight of a non-zero word in C is 6, which therefore is the separation
of the code. If we now remove the first column of A in the generator
matrix we obtain a [11,6] code called the Golay code over Z3 and is
denoted by G11 . By removing a letter from a word its weight is reduced
by at most 1, so G11 has the separation 5 and can therefore correct up
to 2 errors.
4. SOME SPECIAL CODES 49
This shows that G11 is a perfect code. In order to check this one
has to show that equality holds in (6) of Theorem 1.11. For G11 we
have M = 36 , n = 11, k = 2 and q = 3, so we must verify
6 11 11 11
3 · + ·2+ · 2 = 311 .
2
0 1 2
This is left to the reader.
Remark 4.9. In 1949 Golay also constructed a perfect binary
[23,12] code with separation 7 denoted by G23 . One can show that
Golay’s codes are the only perfect codes over a finite field containing
more that two words and correcting more than one error. To be more
precise, every such code must be equivalent to either G11 or G23 .
Exercises
Example 4.5.
The code in Example 5.1 is a so called Reed-Solomon code. In
general this name is given to every code over a finite field F with a
control matrix of the form (9) where α0 , α1 , . . . , αn are all the non-zero
elements of F . If F has q elements then n = q − 2. Usually, we then
list the elements α0 , α1 , . . . , αn by choosing a primitive element α ∈ F
and put αi = αi . Then the control matrix (9) takes the form
1 1 1 ... 1
1 α α2 . . . αq−2
. . .. ..
.. .. . .
1 αd α2d . . . α(q−2)d
52 2. ERROR-CORRECTING CODES
Exercises
Exercise 5.1. Construct a linear [8,4] code over Z17 with separa-
tion 5.
Exercise 5.2. Construct a control matrix for a Reed-Solomon code
over F = GF (23 ) that corrects 2 errors in F .