Sunteți pe pagina 1din 18

CYCLIC CODES

Piyush Mittal

NIT Rourkela

Cyclic Codes..

A code C is Cyclic if (i) C is linear code, and, (ii) any cyclic shift of a codeword ,i.e., if the codeword a0 a1. an-1 is in C then an-1 a0. an-2 is also in C In coding theory, cyclic codes are linear block error-correcting codes that have convenient algebraic structures for efficient error detection and correction.

Cont

We use mathematical tools to construct and analyze cyclic codes. -Galois field -polynomials -monic polynomial -ring of polynomials -prime polynomial -division algorithm for polynomial

A method to generate the cyclic codes:Steps:1. Take a polynomial f(x) in Rn. 2. Obtain a set of polynomials by multiplying f(x) by all possible polynomials in Rn. 3. The set of polynomials obtained above corresponds to the set of codewords belonging to a cyclic code.The block length of the codeword is n.

Algebraic structure

Cyclic codes can be linked to ideals in certain rings. Let Rn = F[x] / (xn 1) be a polynomial ring over the finite field F = GF(q). Identify the elements of the cyclic code C with polynomials in R such that (C0,.Cn-1) maps to the polynomial : n-1. thus multiplication C0+C1x+..+Cn-1 x by x corresponds to a cyclic shift. ring. The ideal is generated by the unique monic element in C of minimum degree, the generator polynomial g. This must be a divisor of xn 1.

The idempotent of C is a codeword e such that e2 = e (that is, e is an idempotent element of C) and e is an identity for the code, that is e c = c for every codeword c. Such a word always exists and is unique; it is a generator of the code. An irreducible code is a cyclic code in which the code, as an ideal, is minimal in R, so that its generator is an irreducible polynomial.

Example

Consider a polynomial f1(x)=1+x2 in R3 defined over GF(2).in general a polynomial R3(=F[x]/(x3-1)) All the possible polynomials of R3 defined over GF(2) are 0, 1, x, 1+x, x2, 1+x2, x+x2, 1+x+x2 Now multiply all the possible polynomials with the given f1(x) We can find only three distinct code words i.e {0,1+x,1+x2,x+x2} cyclic code is precisely ((0,0,0),(1,1,0),(1,0,1),(0,1,1)) Note that (1 + x) is an irreducible polynomial in the polynomial ring, and hence the code is an irreducible code. The idempotent of this code is the polynomial x + x2, corresponding to the codeword (0,1,1).

All possible binary cyclic codes of block length 3


To find all the binary codes of block length 3,we first factorize x3-1.for GF(2) 1=-1,hence x3-1=x3+1=(x+1)(x2+x+1)

Table

Generator Polynomial

Code(Polynomial)

Code(Binary)

1
(x+1) X2 + x +1 (X3 + 1)=0

{R3}
{0,x+1, x2 + x, x2 + 1} {0, x2 + x + 1} {0}

{000,001,010,011,100, 101,110,111}
{000,011,110,101} {000,111} {000}

Ternary cyclic code

Here g(x)= x2 + 1for GF(3),n=4,k=n-deg(g(x)).no.of codes can be constructed is qk=9.so (4,2)cyclic code can be constructed.
I(x) 0 1 C(x)= I(x)*g(x) 0 X2 + 1 C 0000 0101

00 01

02
10 11 12

2
x x+1 x+ 2

2x2 + 2
x3 + x x3+ x2 + x +1

0202
1010 1111

x3+2x2 + x +2 1212

20
21 22

2x
2x+1 2x+2

2x3+ 2x
2x3+2 x2 +2x +2

2020
2222

2x3+ x2 +2x+1 2121

Error detection using CRC


Let T=n-bit frame to be transmitted D=k bit msg block F=n-k bit FCS P=the predefined divisor, a pattern of nk+1 bits the code word T can be represented as T=2(n-k) + F

Contd
{2(n-k) x D}/P=Q + R/P T=2(n-k) + R In this case upon divide T by P we obtain T/P=Q Let V is received message V=T+E Where E is the error.

Example
Let the msg D=1010001101 i.e k=10 The pattern P=110101. The number of FCS bit =5 n=15 1st the msg has to be multiplied by 25 25D=101000110100000 Dividing the result by P, Q= 1101010110 R=01110 T=101000110101110

Error Correction
Burst Error:When errors occur at a stretch we termed them as burst error. Cyclic Burst Error:The cyclic burst error of length t is a vector whose non-zero components are among t successive components, the first and the last of which are non-zero

e1=01010110000 is a burst of length 6 e2=00000010001 is a burst of length 5 We describe the burst error as e(x)=xi* b(x) Where e(x) is a polynomial of degree<=t-1 And b(x) is the burst pattern xi marks the starting location of the burst pattern.

Polynomial description

01010110000=e1(x)=x(1+x2+x4+ x5)

00000010001=e2(x)=x6(1+x4) A code is designed for correcting a burst of length t must have unique syndromes for every error pattern.i.e s(x)=Rg(x)[e(x)] is different for each polynomial representing a burst of length t.

Steps
Given Either generator matrix G or Parity check matrix H The received codeword(v) with the possible set of error pattern i.e syndrome. Steps Find the syndrome from the reveived code and H as S=v*HT compare the both syndrome and find out the corresponding coset header. that is the error code(e). Finally P=v-e Where P is the actual msg.

Thank you

S-ar putea să vă placă și