Вы находитесь на странице: 1из 35

SANDI CYCLIC

Dr. Risanuri Hidayat

Pendahuluan
Cyclic codes form a class of linear codes that have
two major advantages:
parameters, compared to general linear codes.
memiliki berbagai struktur aljabar yang dapat diolah
dalam berbagai cara
memiliki spesifikasi yang sangat ringkas.
dapat secara efisien diimplementasikan dengan register
geser sederhana.

Sebagian besar sandi kanal yang penting adalah


siklik.

Apa itu Cyclic

A linear [n,k] code C over a field F is called cyclic if every cyclic shift of a
codeword in C is also a codeword

(c c ... c
)C (c
c ... c
) C
0 1
n1
n1 0
n2

Contoh

Kata sandi {000 101 011 110} adalah cyclic.

Polynomial
Ketika f(x) =f0 +f1x + +fmxm
adalah sebuah persamaan
polinomial dengan fm0, maka
mdisebut dengan derajat (degree) f
(x),dinotasikan dengan deg f(x).
Koefisien fm kemudian dinamakan
dengan leading coefficient . Sebuah
polinomial disebut monic jika
leading coefficient-nya sama
dengan 1.

Operasi Polinomial
Polynomials in F [x] can be added.
subtracted and multiplied in the
usual way.
If f (x) . g(x ) F{x], then deg
(f(x)g(x )) = deg f (x) + deg g(x ).

Operasi Polinomial
Polynomial addition:
(x5 + 3x3 + 4)+(6x6 + 4x3)
= 6x6 + x5 + 7x3 + 4

Polynomial subtraction:
(x5 + 3x3 + 4)-(6x6 + 4x3)
= -6x6 + x5 -x3 + 4

x11

Polynomial multiplication:
(x5 + 3x3 + 4) (6x6 + 4x3) =
6x11 + 18x9 + 4x8 + 36x6 + 16x3

Polynomial division:
+ 18x9 + 4x8 + 36x6 + 16x3)
(x5 + 3x3 + 4)
= 6x6 + 4x3

Polynomial division with remainder:


(3x6 + 7x4 + 4x3 + 5) (x4 + 3x3 + 4) =
3x2 - 9x + 34
with remainder -98x3 - 12x2 + 26x -131

Algorithma Pembagian
For every pair of polynomials a(x) and b(x ) 0 , there
exists a unique pair of polynomials q(x) (the quotient) and
r(x) (the remainder) such that
a(x)= q(x)b(x )+r(x )
(3x6 + 7x4 + 4x3 + 5) = (x4 + 3x3 + 4) (3x2 - 9x + 34)
- 98x3 - 12x2 + 26x -131

where deg r(x) < deg b(x)


The polynomials q(x) and r(x) can be obtained by ordinary
long division of polynomials

Polynomials modulo m
Contoh m = 17. Then mod-m-polynomials are
expressions like
10x4 + 14x + 2 or x3 + 2x or x10 + 7
If we are given an expression like
2x4 - 3x3 + 30x2 + 3
that is not really a polynomial modulo 17,
because coefficients that are negative or larger
than 16 are illegal, we may just take all numbers
modulo 17 to obtain a proper mod-17-polynomial:
+
4
3
2
2x + 14x + 13x + 3

Polynomials modulo m
The general format for a mod-m-polynomial is the
following:
cnxn + cn-1xn-1 + + c2x2 + c1x + c0
Here cn c0 are numbers between 0 and m-1
It is interesting to note that if one wants to calculate with
polynomials there is no need to deal with the "x" and its
powers at all. One just stores the numbers c 0, c1 cn e.g.
in an array c[0..n], and has the complete information.

Arithmetic for mod-m-polynomials


Addition
The coefficients are added with modulo m. For
example (m= 17):
(2x4 + 3x3 + 10x + 3) +
(3x5 + 14x3 + 10x + 4)
= 3x5 + 2x4 + 0x3 + 3x + 7
(The summand with x3 disappears, because (3 +
14) mod 17 = 0.)

Arithmetic for mod-mpolynomials


Subtraction:
We proceed in a way very similar to addition. For example (mod
17):

(10x3 + 3x + 2) (x3 + 2x + 13) = 9x3 + x + 6


(10x3 + 3x + 2) + (16x3+ 15x+ 4) = 9x3+x+ 6

Avoid subtraction or the use of negative numbers by first


replacing coefficient c by m - c in the polynomial to be
subtracted, and add the resulting polynomial
(10x3+ 3x+ 2) - (10x3+ 3x+ 2) = (10x3+ 3x+ 2) + (7x3+ 14x+ 15) = 0

Arithmetic for mod-mpolynomials


Multiplication:
Multiply out and then collect terms with
the same power of x. For example (mod
17):
(10x4+ 3x+ 2)(x3+ 2x+ 13)
= (10x7+ 20x5+ 130x4) + (3x4+ 6x2+ 39x) + (2x3+ 4x+
26)
= (10x7+ 3x5+ 11x4) + (3x4+ 6x2+ 5x) + (2x3+ 4x+ 9)
= 10x7+ 3x5+ 14x4+ 2x3+ 6x2+ 9x+ 9

Arithmetic for mod-mpolynomials


Division:
Contoh (modulo-17):
(10x7+ 3x5+ 14x4+ 2x3+ 6x2+ 9x+ 9) : (x3+ 2x+ 13)
= 10x4+ 3x+ 2

Untuk mempermudah pekerjaan, sebagai pembagi,


hanya polinomial dengan pangkat tertinggi yang
koefisiennya bernilai 1 saja yang dipakai. Contoh,
x10+ 5
akan/dapat sebagai pembagi,
10 x2+ 3x+ 1 tidak dipakai sebagai pembagi

Contoh lain
If the coefficients are taken from a field F, then we say it is a
polynomial over F. With polynomials over field GF(p), you can
add and multiply polynomials just like you have always done
but the coefficients need to be reduced modulo p.
For example, compare the above results with polynomials over
GF(11):
(x5 + 3x3 + 4)+(6x6 + 4x3) = 6x6 + x5 + 7x3 + 4
(x5 + 3x3 + 4)-(6x6 + 4x3) = 5x6 + x5 +10x3 + 4
(x5 + 3x3 + 4)*(6x6 + 4x3) = 6x11 + 7x9 + 4x8 + 3x6 + 5x3
(3x6 + 7x4 + 4x3 + 5) (x4 + 3x3 + 4) = 3x2 + 3x + 3 with remainder x3 + 10x2
+ 4x +1

Substitusi, Akar, dan


Faktorisasi
Substitusi, mengganti nilai x dengan angka 0 sd m1 (modulo
m) kemudian menghitung hasilnya
Contoh
f = 3x4 +13x3 +5x2 +2x+1
Substitusikan x=2,
f(2)=(324 +1323 +522 +22+1) mod 17 = 7
x = 14,
f(14)=(3144 +13143 +5142 +214+1)mod 17 = 0,

Akar
If f(r) = 0 we call r a root of f.
Thus, r = 14 is a root of
f = 3x4 + 13x3 + 5x2 +2x+1.

Now we divide f by x14 = x+3


(modulo 17) and note:
(3x4 +13x3 +5x2 +2x+1) = (3x3 +4x2
+10x+6) (x+3)

Sisa Pembagian
Sisa pembagian polinomial adalah
sebuah polinomial dengan x pangkat
tertinggi yang lebih rendah dari
pada pangkat pembagi-nya.
Contoh
2x3 +5x2 +10x+7 = (2x+5)(x2
+4)+ (2x+4)
2x+4 adalah sisa pembagian

Modulo Polinomial
Similar to integers, you can do modular arithmetic with
polynomials over a field. Now the operands and modulus are
polynomials. Let
f(x)= anxn + an-1xn-1 + ... + a0 and
g(x)= bmxm + bm-1xm-1 + ... + b0

be two polynomials over a field F, then there is a unique


polynomial r(x) of degree smaller than m and another unique
polynomial h(x), both over F, such that
f(x) = h(x)*g(x) + r(x)

Modulo Polinomial
f(x) = h(x)*g(x) + r(x).

The polynomial r(x) is called the remainder of f(x) modulo g(x).

Let g(x) be a fixed polynomial in F[x]. Two polynomials f 1(x) and


f2(x) in F[x] are said to be congruent modulo g (x ) , symbolized
by
f1(x) f2(x ) (mod g (x))

A B(modC)
A is congruent to B modul

26 11(mod5)
26mod5=1,
x2+x+1 1 mod (x+1)
11mod5=1
3x4+4x2+2x+2 2x+1 mod (x2+1)
If ( f1(x)- f2(x) ) is divisible by g(x)

Modulo Polinomial
For example (all polynomials are
over GF(3)):
2x2 2 mod (x2-1)
x4 1 mod (x2-1)
x3 x mod (x2-1)
X4 + 2x2 0 mod (x2-1)
2x4 * x2 2 mod (x2-1)
x3 + 2x2 x +2 mod (x2-1)

Modulo Polinomial
Always remember there are two moduli
involved:
a polynomial modulus and
an integer modulus.

You need to reduce the result from the


polynomial operations by modulo the
polynomial modulus and then reduce the
coefficients modulo the integer modulus. One
examples from above ( GF(3) ):
x4 + 2x2, you reduce this result by dividing by x 2-1:

Modulo Polinomial
( x4 + 2x2 ): (x2-1) =

( x4 + 2x2 ) = (x3 + 3)(x2 - 1) + 0


( x4 + 2x2 ) 0 mod (x2-1).

GF(3) = 0

The remainder 3 is then reduced modulo 3: 3 0 mod 3.


So the final result is 2x2+x4 0 mod (x2-1).

GF(2m)
Finite fields of order 2m are called binary fields or
characteristic-two finite fields.
The elements of GF(2m) are binary polynomials, i.e.
polynomials whose coefficients are either 0 or 1.
There are 2m such polynomials in the field and the degree
of each polynomial is no more than m-1. The elements
can be represented as m-bit strings. Each bit in the bit
string corresponding to the coefficient in the polynomial
at the same position. For example, GF(23) contains 8
element{0, 1, x, x+1, x2, x2+1, x2+x, x2+x+1}.
x+1 = 0x2+1x+1, represented as

011

x2+x = 1x2+1x+0, represented as

110.

GF(2m)
In modulo 2 arithmetics, 1+1 0 mod 2, 1+0 1 mod 2 and
0+0 0 mod 2, which coincide with bit-XOR, i.e. 11=0,
10=1 00=0. For example:
(x2+x+1) + (x+1)
= x2

= x2+2x+2, since 2 0 mod 2

It can also be computed as 111 011 = 100, that is the bit


string representation of x2.
In modulo 2 arithmetics, -1 1 mod 2, so the result of
subtraction of elements is the same as addition
(x2+x+1) -(x+1) =x2

GF(2m)
Multiplication of binary polynomials can be
implemented as simple bit-shift and XOR. For
example:
(x2+x+1)*(x2+1) = x4+x3+2x2+x+1 = x4+x3+x+1
(modulo 2).
It can also be computed as
111*101=11100111=11011,
x4 + x 3 + x + 1

GF(2m)
When the degree of the result is more than m-1, it needs to be reduced
modulo a irreducible polynomial. For example,

x3+x+1 is an irreducible polynomial and x4+x3+x+1 x2+x mod


(x3+x+1).
x4+x3+x+1 11011 (degree = 4)
x3+x+1 1011 (degree = 3)
the reduction starts by shifting the irreducible polynomial 1011 one bit
left, you get 10110, then 1101110110 = 1101.
The degree of 1101 is 3 which is still greater than m-1=2, so you need
another XOR. But you don't need to shift the irreducible polynomial this
time. 11011011 =0110, which is the bit-string representation of x 2+x.

Reducible
A polynomial f (x ) in F[x] is said to be reducible
if
f(x) = a(x) b(x)
where a(x), b(x) F[x] and
both ( deg a(x) and deg b(x) ) < deg f (x).
If f (x ) is not reducible, it is called irreducible.

Cyclic dan Polinomial


When considering cyclic codes we
number the coordinate positions 0, 1
., n-1, vector
a0 a1 an-1
correspond to the polynomial
a0+ a1x + a2x2 + + an-1xn-1

Beberapa Definisi
Katakanlah a(x) dan b(x) merupakan polinomial
di dalam F [x] sehingga derajat poli a(x) = m
0.
Dituliskan dengan b(x) MOD a(x), bahwa Fmod[x]
diperoleh ketika b(x) dibagi dengan a(x)
(pembagian sisa)
Codeword c = (c0 c1 . . . cn1) di dalam Fn juga
merupakan pernyataan bahwa
c(x) = c0 + c1x + c2x2 + . . . + cn1xn1 di dalam
Fn[x]

EXAMPLE of a CYCLIC CODE


The code with the generator matrix

1 0 1 1 1 0 0

G 0 1 0 1 1 1 0
0 0 1 0 1 1 1

has codewords

c = 1011100c2 = 0101110c3 =0010111

c1 + c2 = 1110010

c1 + c3 = 1001011 c2 + c3 = 0111001

c1 + c2 + c3 = 1100101

and it is cyclic because the right shifts have the following impacts

c1 c2,

c2 c3,

c3 c1 + c3

c1 + c2 c2 + c3,c1 + c3 c1 + c2 + c3,

c2 + c3 c1

c1 + c2 + c3 c1 + c2

Cyclic codes

34

Dari
c(x) = c0 + c1x + c2x2 + . . . +
cn1xn1
Pergeseran Cyclic c(x) menjadi
cn1 +c0x+...+cn2xn1 = xc(x) cn1
(xn 1)
= xc(x) MOD (xn1)

Вам также может понравиться