
- •List of Symbols
- •Classical Algebra
- •Modern Algebra
- •Binary Operations
- •Algebraic Structures
- •Extending Number Systems
- •Algebra of Sets
- •Number of Elements in a Set
- •Boolean Algebras
- •Propositional Logic
- •Switching Circuits
- •Divisors
- •Posets and Lattices
- •Normal Forms and Simplification of Circuits
- •Transistor Gates
- •Representation Theorem
- •Exercises
- •Groups and Symmetries
- •Subgroups
- •Cyclic Groups and Dihedral Groups
- •Morphisms
- •Permutation Groups
- •Even and Odd Permutations
- •Equivalence Relations
- •Normal Subgroups and Quotient Groups
- •Morphism Theorem
- •Direct Products
- •Groups of Low Order
- •Action of a Group on a Set
- •Exercises
- •Translations and the Euclidean Group
- •Matrix Groups
- •Finite Groups in Two Dimensions
- •Proper Rotations of Regular Solids
- •Finite Rotation Groups in Three Dimensions
- •Necklace Problems
- •Coloring Polyhedra
- •Counting Switching Circuits
- •Exercises
- •Monoids and Semigroups
- •Finite-State Machines
- •Quotient Monoids and the Monoid of a Machine
- •Exercises
- •Rings
- •Integral Domains and Fields
- •Subrings and Morphisms of Rings
- •New Rings From Old
- •Field of Fractions
- •Convolution Fractions
- •Exercises
- •Euclidean Rings
- •Euclidean Algorithm
- •Unique Factorization
- •Factoring Real and Complex Polynomials
- •Factoring Rational and Integral Polynomials
- •Factoring Polynomials over Finite Fields
- •Linear Congruences and the Chinese Remainder Theorem
- •Exercises
- •Ideals and Quotient Rings
- •Computations in Quotient Rings
- •Morphism Theorem
- •Quotient Polynomial Rings that are Fields
- •Exercises
- •Field Extensions
- •Algebraic Numbers
- •Galois Fields
- •Primitive Elements
- •Exercises
- •Latin Squares
- •Orthogonal Latin Squares
- •Finite Geometries
- •Magic Squares
- •Exercises
- •Constructible Numbers
- •Duplicating a Cube
- •Trisecting an Angle
- •Squaring the Circle
- •Constructing Regular Polygons
- •Nonconstructible Number of Degree 4
- •Exercises
- •The Coding Problem
- •Simple Codes
- •Polynomial Representation
- •Matrix Representation
- •Error Correcting and Decoding
- •BCH Codes
- •Exercises
- •Induction
- •Divisors
- •Prime Factorization
- •Proofs in Mathematics
- •Modern Algebra in General
- •History of Modern Algebra
- •Connections to Computer Science and Combinatorics
- •Groups and Symmetry
- •Rings and Fields
- •Convolution Fractions
- •Latin Squares
- •Geometrical Constructions
- •Coding Theory
- •Chapter 2
- •Chapter 3
- •Chapter 4
- •Chapter 5
- •Chapter 6
- •Chapter 7
- •Chapter 8
- •Chapter 9
- •Chapter 10
- •Chapter 11
- •Chapter 12
- •Chapter 13
- •Chapter 14
- •Index
276 |
14 ERROR-CORRECTING CODES |
encoding and detecting can be done by a small shift register using only 11 delay units. The number of different messages of length 1012 is 21012, an enormous figure! When written out in base 10, it would contain 305 digits.
MATRIX REPRESENTATION
Another natural way to represent a word a1a2 . . . an of length n is by the element (a1, a2, . . . , an)T of the vector space Zn2 = Z2 × Z2 × · · · × Z2 of dimension n over Z2. We denote the elements of our vector spaces as column vectors, and (a1, a2, . . . , an)T denotes the transpose of (a1, a2, . . . , an). In an (n, k)-code, the 2k possible messages of length k are all the elements of the vector space Zk2, whereas the 2n possible received words of length n form the vector space Zn2 . An encoder is an injective function
γ : Zk2 → Zn2
that assigns to each k digit message an n-digit code word.
An (n, k)-code is called a linear code if the encoding function is a linear transformation from Zk2 to Zn2. Nearly all block codes in use are linear codes, and in particular, all polynomial codes are linear.
Proposition 14.8. Let p(x) be a polynomial of degree n − k that generates an (n, k)-code. Then this code is linear.
Proof. Let γ : Zk2 → Zn2 be the encoding function defined by the generator polynomial p(x). Let m1(x) and m2(x) be two message polynomials of degree less than k and let m1 and m2 be the same messages considered as vectors in Zk2. The code vector γ (mi ) corresponds to the code polynomial vi (x) = ri (x) + xn−k mi (x), where ri (x) is the remainder when xn−k mi (x) is divided by p(x). Now
v1(x) + v2(x) = r1(x) + r2(x) + xn−k [m1(x) + m2(x)],
and r1(x) + r2(x) has degree less than n − k; therefore, r1(x) + r2(x) is the remainder when xn−k m1(x) + xn−k m2(x) is divided by p(x). Hence v1(x) + v2(x) corresponds to the code vector γ (m1 + m2) and
γ (m1 + m2) = γ (m1) + γ (m2). |
|
Since the only scalars are 0 and 1, this implies that γ |
is a linear trans- |
formation. |
|
Let {e1, e2, . . . , en} be the standard basis of the vector space Zn2 , that is, ei contains a 1 in the ith position and 0’s elsewhere. Let G be the n × k matrix that represents, with respect to the standard basis, the transformation γ : Zk2 → Zn2 , defined by an (n, k) linear code. This matrix G is called the generator matrix or encoding matrix of the code.

MATRIX REPRESENTATION |
277 |
If m is a message vector, its code word is v = Gm. The code vectors are the vectors in the image of γ , and they form a vector subspace of Zn2 of dimension k. The columns of G are a basis for this subspace, and therefore, a vector is a code vector if and only if it is a linear combination of the columns of the generator matrix G.
(Most coding theorists write the elements of their vector spaces as row vectors instead of column vectors, as used here. In this case, their generator matrix is the transpose of ours, and it operates on the right of the message vector.)
In the (3,2) parity check code, a vector m = (m1, m2)T is encoded as v = (c, m1, m2)T , where the parity check c = m1 + m2. Hence the generator matrix is
G |
|
1 |
0 |
|
because |
|
1 |
0 |
|
m1 |
|
m1 |
. |
|
|
1 |
1 |
|
|
|
1 |
1 |
|
|
|
c |
|
|
= 0 |
1 |
|
0 |
1 |
m2 |
= m2 |
||||||
|
|
|
|
If the code word is to contain the message digits in its last k positions, the
generator matrix must be of the form G = |
P |
, where P is an (n − k) × k |
|
||
Ik |
||
matrix and Ik is the k × k identity matrix. |
|
|
Example 14.9. Find the generator matrix for the (6,3)-code of Example 14.3 that is generated by the polynomial 1 + x + x3.
Solution. The columns of the generator matrix G are the code vectors corresponding to messages consisting of basis elements e1 = (1, 0, 0)T , e2 = (0, 1, 0)T , and e3 = (0, 0, 1)T . We see from Table 14.6 that the generator matrix is
|
|
|
1 |
0 |
1 |
|
|
|
|
1 |
1 |
1 |
|
||
G |
= |
|
0 |
1 |
1 |
. |
|
|
|
1 |
0 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
0 |
1 |
|
|
Any message vector, m, in the (6,3)-code of Example 14.9 can be encoded by calculating Gm. However, given any received vector u it is not easy to determine from the generator matrix G whether or not u is a code vector. The code vectors form a subspace, Im γ , of dimension k in Zn2 , generated by the columns of G. We now find a linear transformation η: Zn2 → Zn2−k , represented by a matrix H , whose kernel is precisely Im γ . Hence a vector u will be a code vector if and only if H u = 0. This proves (ii) in the following theorem.
Theorem 14.10. Let γ : Zk2 → Zn2 be the encoding function for a linear (n, k)-
P
code with generator matrix G = , where P is an (n − k) × k matrix and Ik
Ik
is the k × k identity matrix. Then the linear transformation
η: Zn2 → Zn2−k
278 |
14 ERROR-CORRECTING CODES |
defined by the (n − k) × n matrix H = (In−k |P ) has the following properties:
(i)Ker η = Im γ .
(ii)A received vector u is a code vector if and only if H u = 0.
Proof. The composition η |
Ž |
γ : Zk |
→ |
Zn−k is the zero transformation because |
|
|
|
2 |
2 |
||
HG = (In−k |P ) |
Ik |
= (In−k P + P Ik ) = P + P = 0 |
|||
|
|
P |
|
|
|
using block multiplication of matrices over the field Z2. Hence Im γ Ker η.
Since the first n |
− |
k columns of H consist of the standard basis vectors in |
|||||||||||
|
|||||||||||||
n |
k |
|
n |
k |
and contains 2n−k |
elements. By the morphism theorem |
|||||||
Z2− |
|
, Im η spans Z2− |
|
||||||||||
for groups, |
|
|
|
|
|
|Z2n| |
|
|
2n |
|
|
||
|
|
|
|
|
|
Ker η |
|
|
|
2k . |
|||
|
|
|
|
|
| |
| = |Im η| |
= 2n−k = |
||||||
|
|
|
|
|
|
|
But Im γ also contains 2k elements, and therefore Im γ must equal Ker η.
The (n − k) × n matrix H in Theorem 14.10 is called the parity check matrix of the (n, k)-code.
The parity check matrix of the (3, 2) parity checkT code is the 1 × 3 matrix |
|||||||||||
only |
|
|
|
|
|
|
|
|
|
|
is a code vector if and |
H = |
1 1 |
1 . A received vector u = (u1, u2, u3) |
|||||||||
|
if |
H u |
|
1 1 1 |
u2 |
|
u1 |
u2 |
u3 0. |
||
|
|
|
= |
|
|
u1 |
|
= |
+ |
+ |
= |
|
|
|
|
u3 |
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
The parity |
check matrix of |
the |
(3, 1)-code that repeats the message three |
||||||||
times is the 2 × 3 matrix |
H = |
1 |
0 |
1 |
|
|
|
|
|||
0 |
1 |
1 . A received vector u = (u1, u2, u3)T |
is a code vector if and only if H u = 0, that is, if and only if u1 + u3 = 0 and u2 + u3 = 0. In Z2, this is equivalent to u1 = u2 = u3.
The parity check matrix for the (6, 3)-code of Examples 14.3 and 14.9 is
H |
|
0 |
1 |
0 |
1 |
1 |
1 |
. |
|
= |
1 |
0 |
0 |
1 |
0 |
1 |
|
|
0 |
0 |
1 |
0 |
1 |
1 |
|
The received vector u = (u1, . . . , u6)T is a code vector if and only if
u1 |
+ |
u4 |
+ |
|
+ |
u6 |
= |
0 |
u2 |
+ |
u4 |
u5 |
+ u6 |
= 0 |
|||
u3 |
|
|
+ |
u5 |
+ |
u6 |
= |
0. |
MATRIX REPRESENTATION |
|
|
|
|
279 |
That is, if and only if |
|
|
|
|
|
u1 |
= |
u4 |
+ u5 |
+ |
u6 |
u2 |
= u4 |
+ u6 |
|||
u3 |
= |
|
u5 |
+ |
u6. |
In this code, the three digits on the right, u4, u5, and u6, are the message digits, whereas u1, u2, and u3 are the check digits. For each code vector u, the equation H u = 0 expresses each check digit in terms of the message digits. This is why H is called the parity check matrix.
Example 14.11. Find the generator matrix and parity check matrix for the
(9, 4)-code generated by p(x) = (1 + x)(1 + x + x4) = 1 + x2 + x4 + x5. Then use the parity check matrix to determine whether the word 110110111 is a code word.
Solution. The check digits attached to a message polynomial m(x) are the coefficients of the remainder when x5m(x) is divided by p(x). The message polynomials are linear combinations of 1, x, x2, and x3. We can calculate the remainders when x5, x6, x7, and x8 are divided by p(x) as follows. [This is just like the action of a shift register that divides by p(x).]
x5 ≡ 1 + x2 + x4 mod p(x)
x6 ≡ x + x3 + x5 ≡ 1 + x + x2 + x3 + x4 mod p(x)
x7 ≡ x + x2 + x3 + x4 + x5 ≡ 1 + x + x3 mod p(x)
x8 ≡ x + x2 + x4 mod p(x).
Therefore, every code polynomial is a linear combination of the following basis polynomials:
1 + |
x2 |
+ |
x4 |
+ |
x5 |
+ x6 |
|
1 + x |
+ x2 |
+ x3 |
+ x4 |
||||
1 + |
x |
+ |
x3 |
+ |
x7 |
|
|
x |
+ x2 |
+ x4 |
+ x8. |
|
The generator matrix G is obtained from the coefficients of the polynomials above, and the parity check matrix H is obtained from G. Hence
|
|
|
1 |
1 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
1 |
1 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
1 |
1 |
0 |
1 |
|
|
|
|
1 |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
|
|
|
|
0 |
1 |
1 |
0 |
|
|
|
0 |
1 |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
G |
= |
|
1 |
1 |
0 |
1 |
|
and H |
= |
|
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
1 . |
|
|
|
1 |
0 |
0 |
0 |
|
|
0 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
|
|||
|
|
|
|
|
|
|
|
|||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
1 |
0 |
0 |
|
|
|
|
0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
0 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|