0% found this document useful (0 votes)
76 views12 pages

Cyclic Codes. Detailed Solutions To Problems

The document discusses cyclic codes, focusing on the generator polynomial and its ability to generate cyclic codes for various lengths (n=5, 6, 7, 8, 14). It includes calculations for code vectors, minimum distance, and error correction capabilities, along with examples of polynomial division and syndrome calculations. Additionally, it addresses the properties of cyclic codes, including their linearity and the structure of generator matrices.

Uploaded by

Akanksha Mohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views12 pages

Cyclic Codes. Detailed Solutions To Problems

The document discusses cyclic codes, focusing on the generator polynomial and its ability to generate cyclic codes for various lengths (n=5, 6, 7, 8, 14). It includes calculations for code vectors, minimum distance, and error correction capabilities, along with examples of polynomial division and syndrome calculations. Additionally, it addresses the properties of cyclic codes, including their linearity and the structure of generator matrices.

Uploaded by

Akanksha Mohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Cyclic Codes.

Detailed solutions to problems

3.1) The polynomial 1 + X + X 3 + X 4 is a generator polynomial of a binary linear

cyclic block code with code length n ≤ 7 if this polynomial is a factor of X n +1 , with

n = 5 ,6 ,7 . The number of redundant bits is r = 4

n =7

X 7 +1 ! X 4 + X 3 + X +1
X7 + X6 + X4 + X3 X3 + X2 + X
__________________
X 6 + X 4 + X 3 + X +1
X6 + X5 + X3 + X2
___________________
X 5 + X 4 + X 2 +1
X5 + X4 + X2 + X
___________________
X +1

This polynomial can not generate a cyclic code C cyc (7 ,3 )

n =6

X 6 +1 ! X 4 + X 3 + X +1
X6 + X5 + X3 + X2 X 2 + X +1
__________________
X 5 + X 3 + X 2 +1
X5 + X4 + X3 + X
___________________
X 4 + X 3 + X +1
X 4 + X 3 + X +1
___________________
0

This polynomial can generate a cyclic code C cyc ( 6 ,2 )

n =5
Cyclic Codes. Detailed solutions to problems

X 5 +1 ! X 4 + X 3 + X +1
X5 + X4 + X2 + X X +1
__________________
X 4 + X 2 + X +1
X 4 + X 3 + X +1
___________________
X3 + X3

This polynomial can not generate a cyclic code C cyc ( 5 ,1 )

3.2) Cyclic code C cyc ( 8 ,5 )

X 8 +1 ! X 3 + X 2 + X +1
X8 + X7 + X6 + X5 X 5 + X 4 + X +1
__________________
X 7 + X 6 + X 5 +1
X7 + X6 + X5 + X4
___________________
X 4 +1
X4 + X3 + X2 + X
______________
X 3 + X 2 + X +1
X 3 + X 2 + X +1
____________
0

The polynomial g( X ) = 1 + X + X 2 + X 3 is a generator polynomial of a cyclic code

C cyc ( 8 ,5 )

If the message is m = (10101) , that is, m( X ) = 1 + X 2 + X 4

X n − k m( X ) = X 3 m( X ) = X 3 + X 5 + X 7
Cyclic Codes. Detailed solutions to problems

X7 + X 5 + x3 ! X 3 + X 2 + X +1
X7 + X6 + X5 + X4 X4 + X3 + X2 + X
__________________
X6 + X4 + X3
X6 + X5 + X4 + X3
___________________
X5
X5 + X4 + X3 + X2
______________
X4 + X3 + X2
X4 + X3 + X2 + X
____________
p(X) = X

Then

c( X ) = X + X 3 + X 5 + X 7 , c = (01010101)

3.3)

a) Since r = 4 = n − k , ⇒ k = 3

Code rate is equal to R c = 3 / 7 = 0.43

1 0 1 1 1 0 0 
G = 0 1 0 1 1 1 0  ,
0 0 1 0 1 1 1 

1 0 1 1 1 0 0 
rows 1+2 replaces row 2 G´ = 1 1 1 0 0 1 0 
0 0 1 0 1 1 1 

1 0 1 1 1 0 0 
rows 1+2+3 replaces row 3 G" = 1 1 1 0 0 1 0 
0 1 1 1 0 0 1 
Cyclic Codes. Detailed solutions to problems

1 0 0 0
0 1 0 0 

0 0 1 0
 
H = 0
T
0 0 1
1 0 1 1
 
1 1 1 0
0 1 1 1 

Code table:

m c w

0 0 0 0 0 0 0 0 0 0 4

0 0 1 0 1 1 1 0 0 1 4

0 1 0 1 1 1 0 0 1 0 4

0 1 1 1 0 0 1 0 1 1 4

1 0 0 1 0 1 1 1 0 0 4

1 0 1 1 1 0 0 1 0 1 4

1 1 0 0 1 0 1 1 1 0 4

1 1 1 0 0 1 0 1 1 1 4

Minimum distance d min = w min = 4 , then

t = 1, l = 3

b) Code vector for the all ones message is c = (0010111) in systematic form, obtained

by adding the three rows of the generator matrix G"

c) The syndrome corresponding to an error in the first information symbol corresponds

to an error pattern e = (1000000 ) , or e( X ) = 1 . The corresponding syndrome is

calculated as S( X ) = e( X ) mod g( X ) :
Cyclic Codes. Detailed solutions to problems

1 / X 4 + X 3 + X 2 +1
1 0

This can be also determined multiplying e = (1000000 ) by the transpose of the parity

check matrix H T , which results S = (1000 ) . As an example, the received vector

r = (1111001) is the second code vector in the above table, containing one error in the

first bit. Thus, r ( X ) = 1 + X + X 2 + X 3 + X 6 , and:

X 6 + X 3 + x2 + X +1 ! X 4 + X 3 + X 2 +1
X6 + X5 + X4 + X2 X2 + X
__________________
X 5 + X 4 + X 3 + X +1
X5 + X4 + X3 + X
___________________
S(X) = 1

Since S( X ) = r ( X ) mod g( X ) = 1 , then the error is at the first position. By inspection of

the transpose of the parity check matrix H T , we can see that there are seven different

syndrome vector to be used for correcting any error pattern of size t = 1

3.4) Define what is meant by a cyclic error control code

3.5) A binary linear cyclic block code C cyc ( n , k ) has code length n = 14 and

generator polynomial g ( X ) = 1 + X 3 + X 4 + X 5 :

a) Since r = n − k = 5 , k = 9

For the all ones input vector

m( X ) = 1 + X + X 2 + X 3 + X 4 + X 5 + X 6 + X 7 + X 8

X n − k m( X ) = X 5 m( X ) = X 5 + X 6 + X 7 + X 8 + X 9 + X 10 + X 11 + X 12 + X 13
Cyclic Codes. Detailed solutions to problems

X 13 + X 12 + x 11 + X 10 + X 9 + X 8 + X 7 + X 6 + x 5 ! X 5 + X 4 + X 3 +1
X 13 + X 12 + X 11 + X8 X8 + X5 + X3
__________________
X 10 + X 9 + X 7 + X 6 + X 5
X 10 + X 9 + X 8 + X5
___________________
X8 + X7 + X6
X8 + X7 + X6 + X 3
______________
p(X) = X 3

Then, c( X ) = X 3 + X 5 + X 6 + X 7 + X 8 + X 9 + X 10 + X 11 + X 12 + X 13 , or

c = (00010111111111)

b)

An error in the last bit is represented by the error pattern polynomial e( X ) = X 13 . The

syndrome calculation consists on taking the remainder of the following polynomial

division:
Cyclic Codes. Detailed solutions to problems

X 13 ! X 5 + X 4 + X 3 +1
X 13 + X 12 + X 11 + X 8 X8 + X7 + X5 + X 4 + X 3 + X 2
__________________
X 12 + X 11 + X 8
X 12 + X 11 + X 10 + X 7
___________________
X 10 + X 8 + X 7
X 10 + X 9 + X 8 + X 5
______________
X9 + X7 + X5
X9 + X8 + X7 + X 4
______________
X8 + X5 + X4
X8 + X7 + X6 + X 3
______________
X7 + X6 + X5 + X 4 + X 3
X7 + X6 + X5 + X 2
______________
S(X) = X 4 + X 3 + X 2

This code can correct this error pattern. If for instance we have the received vector

r ( X ) = X 3 + X 5 + X 6 + X 7 + X 8 + X 9 + X 10 + X 11 + X 12 , which is the code vector for

the all ones input message containing an error in the last bit, the calculated syndrome

polynomial is S( X ) = X 4 + X 3 + X 2 .

c) Can cyclic codes be non-linear?

Cyclic codes can be non-linear. This condition is verified when the addition of two code

vectors of the code does not belong to the code. The code however will lose all the

characteristics of a linear block code.

3.6)

a) The code table is obtained by polynomial division


Cyclic Codes. Detailed solutions to problems

m = ( 01 ) , m( X ) = X , X n − k m( X ) = X 4 m( X ) = X 5

X5 ! X 4 + X 3 + X +1
X5 + X4 + X2 + X X +1
__________________
X4 + X2 + X
X 4 + X 3 + X +1
___________________
p(X) = X 3 + X 2 + 1

then , c( X ) = X 5 + X 3 + X 2 + 1 , c = (101101)

m = (10 ) , m( X ) = 1 , X n − k m( X ) = X 4 m( X ) = X 4

X4 ! X 4 + X 3 + X +1
X 4 + X 3 + X +1 1
__________________
p(X) = X 3 + X + 1

then , c( X ) = X 4 + X 3 + X + 1 , c = (110110 )

m = (11 ) , m( X ) = 1 + X , X n − k m( X ) = X 4 m( X ) = X 4 + X 5

X5 + X4 ! X 4 + X 3 + X +1
X5 + X4 + X2 + X X
__________________
p(X) = X 2 + X

then , c( X ) = X 5 + X 4 + X 2 + X , c = ( 011011)

m c w

0 0 0 0 0 0 0 0 0

0 1 1 0 1 1 0 1 4

1 0 1 1 0 1 1 0 4

1 1 0 1 1 0 1 1 4
Cyclic Codes. Detailed solutions to problems

b)

d min = 4 , t = 1, l = 3

3.7)

a)

r =6, n − k = r =6 , k =8

b)

number of code vectors 2 k = 2 8 = 256

c) The generator matrix is

1 0 1 0 0 0 1 0 0 0 0 0 0 0
0 1 0 1 0 0 0 1 0 0 0 0 0 0 

0 0 1 0 1 0 0 0 1 0 0 0 0 0
 
0 0 0 1 0 1 0 0 0 1 0 0 0 0
G=
0 0 0 0 1 0 1 0 0 0 1 0 0 0
 
0 0 0 0 0 1 0 1 0 0 0 1 0 0
0 0 0 0 0 0 1 0 1 0 0 0 1 0
 
0 0 0 0 0 0 0 1 0 1 0 0 0 1 

By using Gaussian elimination, the generator matrix in systematic form is:

1 0 1 0 0 0 1 0 0 0 0 0 0 0
0 1 0 1 0 0 0 1 0 0 0 0 0 0 

0 0 1 0 1 0 0 0 1 0 0 0 0 0
 
0 0 0 1 0 1 0 0 0 1 0 0 0 0
G´ = 
1 0 1 0 1 0 0 0 0 0 1 0 0 0
 
0 1 0 1 0 1 0 0 0 0 0 1 0 0
1 0 0 0 1 0 0 0 0 0 0 0 1 0
 
0 1 0 0 0 1 0 0 0 0 0 0 0 1 
Cyclic Codes. Detailed solutions to problems

1 0 0 0 0 0
0 1 0 0 0 0 

0 0 1 0 0 0
 
0 0 0 1 0 0  (*)
0 0 0 0 1 0
 
0 0 0 0 0 1
1 0 1 0 0 0
HT =  
0 1 0 1 0 0
0 0 1 0 1 0
 
0 0 0 1 0 1
1 0 1 0 1 0
 
0 1 0 1 0 1  (*)
 
1 0 0 0 1 0
0 1 0 0 0 1  (*)

d) Rows of H T indicated with a (*) are three rows that added, results into the all zero

vector, and thus, the minimum Hamming distance of this code is d min = 3

e) For an error pattern of ( n − k ) or less consecutive error positions, e( X ) = X j B( X ) ,

where 1 ≤ X j ≤ X n −1 . Then,

deg ree( B( X )) ≤ n − k − 1

Since deg ree( g( X )) = n − k , then g( X ) can not divide B( X ) .

On the other hand g( X ).α ( X ) = X n + 1 and X is not a factor of g( X ) , so that X j is

neither a factor of g( X ) , and thus X j and g( X ) are co-prime polynomials. Therefore

g( X ) can not divide e( X ) and the corresponding syndrome is zero. This means that

an error pattern of ( n − k ) or less consecutive error positions is correctable. In this

case n − k = 6 .
Cyclic Codes. Detailed solutions to problems

3.8)

a) The code vector in systematic form of the message vector m = (11001101011) is

evaluated as follows:

m( X ) = 1 + X + X 4 + X 5 + X 7 + X 9 + X 10

X n − k m( X ) = X 4 m( X ) = X 4 + X 5 + X 8 + X 9 + X 11 + X 13 + X 14

X 14 + X 13 + x 11 + X 9 + X 8 + X 5 + X 4 ! X 4 + X +1
X 14 + X 11 + X 10 X 10 + X 9 + X 4
__________________
X 13 + X 10 + X 9 + X 8 + X 5 + X 4
X 13 + X 10 + X 9
___________________
X8 + X5 + X4
X8 + X5 + X4
______________
p(X) = 0

c( X ) = X 4 + X 5 + X 8 + X 9 + X 11 + X 13 + X 14

b) The received vector r = (000010001101011) is the code vector of item a) affected

by an error in the fifth position

r ( X ) = X 4 + X 8 + X 9 + X 11 + X 13 + X 14

We calculate the syndrome as:


Cyclic Codes. Detailed solutions to problems

X 14 + X 13 + x 11 + X 9 + X 8 + X 4 ! X 4 + X +1
X 14 + X 11 + X 10 X 10 + X 9 + X 4 + X
__________________
X 13 + X 10 + X 9 + X 8 + X 4
X 13 + X 10 + X 9
___________________
X8 + X4
X8 + X5 + X4
______________
X5
X5 + X2 + X
___________
S(X) = X 2 + X

And the syndrome polynomial S( X ) = X 2 + X is the same as that corresponding to the

error pattern e( X ) = X 5 , which identifies an error at the fifth position.

You might also like