Professional Documents
Culture Documents
ch5 20211021
ch5 20211021
1
DEFINITION 5.1 An (n, k) linear code C is called a cyclic code if every cyclic
shift of a code vector in C is also a code vector in C.
2
THEOREM 5.1 The nonzero code polynomial of minimum degree in a binary
cyclic code C is unique.
Proof. Suppose that g(X) and g ′ (X) are both codewords of C and both have min-
imum degree r. Since g(X) + g ′ (X) ∈ C and is of degree less than r, then
g(X) + g ′ (X) = 0. This implies g(X) = g ′ (X).
3
THEOREM 5.3 Let g(X) = g0 + g1 X + · · · + gr−1 X r−1 + X r be the nonzero
code polynomial of minimum degree in an (n, k) cyclic code C. A binary polyno-
mial of degree n−1 or less is a code polynomial if and only if it is a multiple of g(X).
Proof.
(⇐) Let v(X) = a(X)g(X), where a(X) is a polynomial of degree less than n − r.
Then, deg(v(X)) < n. Write a(X) = a0 + a1 X + · · · + an−r−1 X n−r−1 . Then
v(X) = a0 g(X) + a1 Xg(X) + · · · + an−r−1 X n−r−1 g(X). Hence, v(X) ∈ C.
(⇒) Let v(X) ∈ C. Then, v(X) = a(X)g(X) + b(X), deg(b(X)) < deg(g(X)).
Since a(X)g(X) ∈ C, then b(X) ∈ C. Hence, b(X) = 0.
4
THEOREM 5.4 In an (n, k) cyclic code C, there exists one and only one code
polynomial of degree n − k, i.e.,
g(X) = 1 + g1 X + · · · + X n−k .
Every code polynomial is a multiple of g(X), and every binary polynomial of degree
n − 1 or less that is a multiple of g(X) is a code polynomial.
• u(X) is the message polynomial and g(X) is called the generator polynomial
of C.
5
THEOREM 5.5 The generator polynomial g(X) of an (n, k) cyclic code is a factor
of X n + 1.
Proof. Write X k g(X) = (X n + 1) + g ′ (X). Note that g ′ (X) is in C. Hence,
g ′ (X) = a(X)g(X). Thus, X n + 1 = {X k + a(X)}g(X).
6
EXAMPLE 5.1
The polynomial X 7 + 1 can be factored as
X 7 + 1 = (1 + X)(1 + X + X 3 )(1 + X 2 + X 3 ).
7
⋆⋆ Procedure of systematic encoding:
Step 1. Multiply u(X) = u0 + u1 X + · · · + uk−1 X k−1 by X n−k to obtain
X n−k u(X) = u0 X n−k + u1 X n−k+1 + · · · + uk−1 X n−1 .
Step 2. Divide X n−k u(X) by g(X) such that X n−k u(X) = a(X)g(X)+b(X),
where deg(b(X)) < n − k.
8
• Let C be an (n, k) cyclic code with generator polynomial g(X) = g0 + g1 X +
· · · + gn−k X n−k . Then,
g0 g1 g2 ... gn−k 0 ... 0
0 g0 g1 ... gn−k−1 gn−k ... 0
..
G=
0 0 g0 ... .
. ..
.. .
0 0 0 ... g0 . . . gn−k
9
• Write X n + 1 = g(X)h(X), where h(X) = h0 + h1 X + · · · + hk X k ,
h0 = hk = 1. Let v(X) = a(X)g(X). Then,
Since deg(a(X)) < k, then X k , · · · , X n−1 are not in a(X) + X n a(X). This
implies
∑k
i=0 hi vn−i−j = 0 for 1 ≤ j ≤ n − k
∑k or
i=0 hi vm−i = 0 for m = k, k + 1, · · · , n − 1.
10
Note that X k h(X −1 ) = hk +hk−1 X+· · ·+h0 X k is a factor of X n +1. Hence,
X k h(X −1 ) generates an (n, n − k) cyclic code Cd with generator matrix
hk hk−1 hk−2 . . . h0 0 . . . 0
0 hk hk−1 . . . h1 h0 . . . 0
H= .
.. ..
.
0 ... ... hk . . . . . . . . . h0
which is an (n − k) × n matrix .
THEOREM 5.7 Let C be an (n, k) cyclic code with generator polynomial g(X).
Let h(X) = (X n +1)/g(X). Then, Cd is also cyclic and is generated by X k h(X −1 ).
11
Circuits for Polynomials Multiplication
∑n i
∑m j
Let f (X) = i=0 fi X and g(X) = j=0 gj X .
Then,
∑
n ∑
m
f (X)g(X) = fi gj X i+j
i=0 j=0
∑n ∑ m
= fk−j gj X k (where k = i + j)
i=0 j=0
∑ ∑
m+n k
= fk−j gj X k
k=0 j=0
12
Consider the multiplication of a(X) = ak X k + ak−1 X k−1 + · · · + a1 x + a0 and
b(X) = hr X r + · · · + h1 X + h0 .
For the following two circuits, using ak , ak−1 , · · · , a0 as input, the output will be the
result of multiplication.
13
Circuits for Dividing Polynomials
Let a(X) = an X n + · · · + a1 X + a0 and
g(X) = gr X r + · · · + g1 X + g0
be the dividend and divisor respectively.
14
• The division can also be implemented by autoregressive form.Write
R(x) = a(x) − Q(x)g(x)
where Q(x) is the quotient and R(x) is the remainder.We have
deg(a(x)) ≤ n − 1, deg(Q(x)) ≤ k − 1,
deg(g(x)) = n − k, deg(R(x)) ≤ n − k − 1,
and
∑
n−k
Rn−ℓ = an−ℓ − gi Qn−ℓ−i , 1 ≤ ℓ ≤ n
i=0
15
Then, we have the following division circuit.
16
Systematic Encoding
The systematic encoding of a circuit code can be realized by either using g(X) or
using h(X).
17
• Encoder using h(X):
In this chapter, we already have
∑k−1
vn−k−j = i=0 hi vn−i−j for 1 ≤ j ≤ n − k
18
Syndrome Decoding for Cyclic Codes
Let r(X) be the received vector in polynomial form. Divide r(X) by g(X), We have
r(X) = a(X)g(X) + s(X) , deg(s(X)) < n − k,
where s(X) is the syndrome polynomial.
• Note that all the polynomials in the same coset have the same syndrome, since
r(X) + v(X) = [a(X) + u(X)]g(X) + s(X).
• The Syndrome calculation can be realized by the following circuit.
19
Theorem 5.8 Let s(X) be the syndrome of the received polynomial r(X) = r0 +
r1 X+· · ·+rn−1 X n−1 . Then, the remainder s(1) (X) resulting from dividing Xs(X)
by the generator polynomial g(X) is the syndrome of r(1) (X), which is a cyclic shift
of r(X).
Proof.
– Write Xr(X) = rn−1 (X n + 1) + r(1) (X). Thus
r(1) (X) = rn−1 (X n + 1) + Xr(X)
Suppose that r(X) = a(X)g(X) + s(X) and r(1) (X) = c(X)g(X) + ρ(X).
Then, c(X)g(X) + ρ(X) = rn−1 g(X)h(X) + X[a(X)g(X) + s(X)]. Hence,
Xs(X) = [c(X)+rn−1 h(X)+Xa(X)]g(X)+ρ(X). Thus, ρ(X) = s(1) (X)
• The polynomial s(1) (x) is the syndrome of r(1) (x) and is not a cyclic shift of
s(x) .
20
Meggitt Decoder
For a large n − k value , the problem of syndrome decoding is that a look-up table of
size 2n−k is needed. Meggitt decoder employs the cyclic properties of cyclic code to
reduce the size of look-up table by sacrificing decoding time. The Meggitt decoder
consists of three major parts:
1. a syndrome register,
2. an error-pattern detector
21
22
EXAMPLE 5.9
• Consider the error pattern with an error at location X 6 . The associated syn-
drome is 1 + X 2 .
23
24
Cases for t = 2.
(0 0 0 ... 0 0 0)
(1 0 0 ... 0 0 0)
(0 1 0 ... 0 0 0)
(0 0 0 ... 0 0 1)
(1 1 0 ... 0 0 0)
(0 1 1 ... 0 0 0)
(0 0 0 ... 0 1 1)
(1 0 1 ... 0 0 0)
(0 1 0 ... 0 0 0)
(1 0 1 ... 0 0 0)
.. .. .. .. ... ..
(. . . ... . .)
.
25
Error-Trapping Decoding
• Suppose that the errors of the error pattern are confined within n − k con-
secutive positions. Then an efficient decoding algorithm called error-trapping
decoding can be employed.
• Suppose errors are confined to the first n − k digits of a block codeword, i.e.,
e(X) = ek X k + · · · + en−1 X n−1 . Then, e(n−k) (X) = ek + ek+1 X + · · · +
en−1 X n−k−1 . Thus, s(n−k) (X) = e(n−k) (X) and X k s(n−k) (X) = e(X) =
ek X k + · · · + en−1 X n−1
26
THEOREM 5.9 Consider a t-error-correcting code. If the number of errors in
r(X) is t or less and if they are confined to n − k consecutive positions, the errors
are trapped in the syndrome register only when the weight of the syndrome in the
register becomes t or less.
Proof.
- Let s(X) be the syndrome of e(X), where w(s(X)) ≤ t, deg(e(X)) ≥ n − k
and w(e(X)) ≤ t. Let ê(X) = s(X). Clearly, deg(ê(X)) < n − k. The
syndrome of ê(X) is also s(X).
Both e(X) and ê(X) are in the same coset and have weight at most t. This
contradicts to the fact that this code is t-error-correcting.
27
EXAMPLE 5.11
Consider the (15,7) cyclic code generated by g(X) = 1 + X 4 + X 6 + X 7 + X 8 .
This code has minimum distance dmin = 5 and error-correcting capability t = 2. It
can be checked that every single error or double errors are confined to n − k = 8
consecutive positions. Here, the following error-trapping decoder can be used.
28
29