You are on page 1of 10

EEM 465

FUNDAMENTALS of DATA COMMUNICATIONS


Lecture 10

Lecturer

Assist.Prof.Dr. Nuray At
2
Cyclic Codes I
 Cyclic codes are an important class of linear codes
 In general, encoding and decoding can be efficiently implemented using shift
registers and hence they have a great practical importance.
 They are also of considerable interest from an algebraic point of view

Definition:
An (n,k) linear block code C is said to be cyclic if for every codeword
c=(c0, c1, …, cn-1) ∈ C there is also a codeword c’=(cn-1, c0, c1, …, cn-2) ∈ C (right cyclic
shift of the codeword c)

Example:
C={(0000)} is trivially a cyclic code
3

Example:
C={(0000), (1001), (1100), (0110), (0011), (0111), (1011), (1101)}. This is not a
cyclic code since every cyclic shift of (1101) is not present

The key to the underlying structure of cyclic codes lies in the association of a code
polynomial c(x)=c0+c1x+c2x2+…+cn-1xn-1 with every codeword c=(c0, c1, …, cn-1)
Consider c’(x) = x c(x) mod xn-1
= c0x+c1x2+…+cn-1xn mod xn-1
= cn-1+c0x+c1x2+…+cn-2xn-1

 Because codewords have length n, c(x) has degree n-1


 Code polynomials c(x) lie in GF(q)[x]/ xn-1
4
Basic Properties of Cyclic Codes
Theorem: Let C be a q-ary (n,k) linear cyclic code.

1) Within the set of code polynomials in C, there is a unique monic polynomial


g(x) with minimal degree r < n and g(x) is called the generator polynomial
2) For every c(x) ∈ C
c(x) = m(x) g(x) where m(x) has degree k-1 and g(x) has degree n-k = r
3) The generator polynomial g(x) of C is a factor of xn-1 in GF(q)[x]

 Property 3 in the above theorem limits the selection of generator polynomials


for cyclic codes of length n to divisors of xn-1. Hence, it is possible to catalog by
dimension all q-ary cyclic codes of a given length
xn-1=g1(x) g2(x) …. gt(x)
5

Example: Consider the set of binary cyclic codes of length 15.


The generator polynomial for one of these codes must be a divisor of x15-1.
 We need only consider the conjugacy classes
Conjugacy class Degree

It is possible to construct a generator polynomial of any degree between 1 and 15


g(x) with degree 1, yes (x+1)
g(x) with degree 2, yes

There are generators of all degrees 1 to 15


6

Let g(x) be the (n-k)th-degree generator polynomial for an (n,k) q-ary cyclic code C
A k-symbol data block (m0,m1,…,mk-1) can be associated with a message
polynomial m(x) = m0+m1x+…+mk-1xk-1

A generator matrix interpretation:


c(x) = m(x)g(x)
= (m0+m1x+…+mk-1xk-1 )g(x)
= m0g(x)+m1xg(x)+…+ mk-1xk-1g(x)
7

This provides a convenient general form for generator matrices for cyclic codes:

 For every generator polynomial g(x) there exists a parity polynomial h(x) of
degree k such that g(x)h(x)=xn-1
 Since c(x)=m(x)g(x) then c(x)h(x)=m(x)g(x)h(x) mod xn-1 = 0

Let s(x) = c(x)h(x) mod xn-1


=s0+s1x+…+sn-1xn-1
8

If c(x) is a codeword, s(x) = c(x)h(x)=0 mod xn-1


= (c0+c1x+…+cn-1xn-1)(h0+h1x+…+hkxk)

The parity check equations:

The last n-k of these parity-check equations can be expressed in matrix form

s = cHT
If c is a codeword, then cHT = 0
9

Example: Binary cyclic codes of length 7.


Need a generator polynomial that is a factor of x7-1 in GF(2)[x].
 Recall the factorization of in GF(2)[x]:

Let g(x)=(x+1)(x3+x+1)= x4+x3+x2+1 , n=7, n-k = 4, k = 3 (7,3) code


Message Code
10

Example cont’d:

The parity check polynomial

dmin=4
 detects 3 errors, corrects 1 error

You might also like