Documente Academic
Documente Profesional
Documente Cultură
DP
Status of DP ?
Number Theory
Feedback
Fill Feedback on tinyurl.com/FeedbackNikB
Extra Lecture on
MATLAB for DP
Nikesh Bajaj
nikesh.14730@lpu.co.in
j
Asst. Prof., ECE Dept.
Lovely Professional University 2 By Nikesh Bajaj
ja
Ba
Overview Divisibility
Divisor
Divisibility b divides a if a = mb for some m, where a, b, and m are integers
Division Algorithm b divides a b|a if not divisible b/|a
b|a then b|ca for c=int
sh
b|a & a|c then b|c
If a|b and b|a, then a = b & If a|1, then a = 1
b|a a > 0 and b >0 so a <= b
Any b 0 , divides 0 b|0
If b|g and b|h, then b|(mg + nh) for arbitrary integers m and n
if a 0 (mod n), then n|a
If a(x) , b(x)F[x] : b(x) | a(x) if a(x) =b(x)c(x)
ke
1
11/29/2013
j
7 By Nikesh Bajaj 8 By Nikesh Bajaj
ja
Ba
Euclidean Algorithm Theorems
To find the gcd or to check the relative prime
If g =(a,b) then there exist s and t such that
Example: 1970 1066, gcd(966,851)=? g =(a,b) = as+bt
To find gcd(1970, 1066)
1970 = 1 x 1066 + 904 gcd(1066, 904)
For any integer n, (a,b) = (a, b+na)
sh
1066 = 1 x 904 + 162 gcd(904, 162)
904 = 5 x 162 + 94 gcd(162, 94)
162 = 1 x 94 + 68 gcd(94, 68)
94 = 1 x 68 + 26 gcd(68, 26)
68 = 2 x 26 + 16 gcd(26, 16)
26 = 1 x 16 + 10 gcd(16, 10)
16 = 1 x 10 + 6 gcd(10, 6)
10 = 1 x 6 + 4 gcd(6, 4)
ke
6 =1x4+2 gcd(4, 2)
4 =2x2+0 gcd(2, 0)
Therefore, gcd(1970, 1066) = 2
9 By Nikesh Bajaj 10 By Nikesh Bajaj
Ni
Congruence Congruence
a b (mod m) iff m|(a-b)
if (a mod n) = (b mod n) b a 0 mod m
Then a b (mod n) If a b (mod m)
73 4 (mod 23); and b c (mod m) then a c (mod m)
21 -9 (mod 10) and c d (mod m) then ax+cy bx+dy (mod m )
and c d (mod m) then ac bd (mod m )
a(x) b(x) mod(m(x)) a b (mod m)
n n
2
11/29/2013
j
13 By Nikesh Bajaj 14 By Nikesh Bajaj
ja
Ba
Euler Totient Function Fermats Little Theorem
if n and a are integer st (a,n) =1 then
sh
3
11/29/2013
j
19 By Nikesh Bajaj 20 By Nikesh Bajaj
ja
Ba
TRY Theorem: Factoring xn -1
Construct Theorem: for 1 q-1 as non-zero element of
GF(8) from GF(2) see example in book GF(q)
GF(9) from GF(3) xq-1-1 =(x-1) (x-2) (x-3) (x-q-1)
sh
Example for GF(5)
GF(16) from GF(2) 4
x -1 =(x-1) (x-2) (x-3) (x-4)
x7 -1 =(x-1)(x3+x+1)(x3+x2+1)
(x3+x+1) - z, z2 z2+z 1, 2, 4
(x3+x2+1) - z+1, z2+z+1, z2 +1 3, 6, 5
4
11/29/2013
Concludes
Every fj(x) can be repr in GF(qm ) as product of some term
Every j is a zero of exactly one fj(x)
fj(x) = Minimal Polynomial
Smallest degree poly. With co-efficient in GF(q) and zeros in
j
GF(qm) is called a minimal poly of j
ja
Ba
Practice Sheets You should know
Generate GF(8) from GF(2) and find all the Remember
Minimal Polynomial of each element Primitive Polynomial of GF(2) upto 5 degree
Generate GF(9) from GF(3) and find all the 2nd Degree
sh
Minimal Polynomial of each element [2 1]
3rd Degree Trick to
Generate GF(16) from GF(4) and find all the
remember
[3 1] [3 2]
Minimal Polynomial of each element Taps, These
4th Degree are power
Generate GF(25) from GF(5) and find all the [4 1] [4 3] [4 3 2 1]
Minimal Polynomial of each element 5th Degree
ke
[5 2] [5 3] [5 4 32] [ 5 4 2 1] [ 5 3 2 1] [5 4 3 1]
Nikesh Bajaj
nikesh.14730@lpu.co.in
Asst. Prof., ECE Dept.
29 By Nikesh Bajaj Lovely Professional University
5
11/29/2013
BCH-Introduction BCH
Raj Chandra Bose (19 June 1901 31 October 1987) One of the most powerful class of linear cyclic block
Indian American mathematician and statistician
codes
j
31 By Nikesh Bajaj 32 By Nikesh Bajaj
ja
Ba
Mathematical Background Mathematical Background
Primitive Element Theorem: for 1 q-1 as non-zero element of GF(q)
Primitive Polynomial xq-1-1 =(x-1) (x-2) (x-3) (x-q-1)
Minimal Polynomial Example for GF(5)
sh
6
11/29/2013
j
37 By Nikesh Bajaj 38 By Nikesh Bajaj
ja
Ba
Set of Conjugates: Example BCH codes: Designing
GF(256) GF(2) Primitive Block Length n = qm -1
primitive elements BCH codes defined over GF(q) with block-length of
qm -1 are called Primitive BCH Codes
Then set of conjugates
sh
7
11/29/2013
For t=4
j
43 By Nikesh Bajaj 44 By Nikesh Bajaj
ja
Ba
Questions Other Example
Design BCH Code for Block length n=7 :GF(8) <- GF(2)
Block length n=15 :GF(16)<- GF(4)
n = 8 to correct t =1 bit error, t= 2 and t=3
8
11/29/2013
Example
S1 S 2 S 3 det(M)
M S 2 S 3 S 4
v=v-1
S 3 S 4 S 5
Received vector is det(M)
S1 S 2
v(x) = x5 + x3 M
S1()= v() S 2 S 3
S1 = 5 + 3 = 11
M 1
S2 = 10 + 6 = 7
S3= 15 + 9 = 7 2 8 1 11
2 1 S 3 2
S4= 20 + 12 = 14 1 M S 4 1 ( x) 8 x 2 11x 1
S5= 25 + 15 = 5
( 5 x 1)( 3 x 1)
j
S6= 30 + 18 = 14
ja
Gorenstein-Zierler
Ba
Algorithm Lets Think
Generator Poly g(x) of BCH code
Has element of base field and zeros in
Extension field
sh
9
11/29/2013
Example:
RS-Code Q: Reed Solomon Codes
For block length n =15 Construct Single error correcting code for
And t = 2 block length =7
g(x)= (x-) (x-2 ) (x-3)(x-4)
=x4 + 13 x3 + 6 x2 + 3x +10
k=?
Code(15,?)
k- symbols to n-symbols
j
55 By Nikesh Bajaj 56 By Nikesh Bajaj
ja
Ba
Performance Encoding
g(x)= (x-) (x-2 )
= x2 + 4x +3
i=[ 1 0 5 2]
sh
i(x) = x4 + x2 + 5x +2
x2 i(x) =
x2 i(x)/g(x)
Reminder = x +2
c(x) = x6 + x4 + 5 x3 +2 x2 +x +2
c=[1 0 5 2 12]
ke
10
11/29/2013
RS Code RS Code
RS is MDS Table 5.7 in RB
Design distance d = 2t+1 Code t d* r
Singleton bound d* <= n - k +1 (3 , 1) 1
RS : 2t = n-k so d* = n k + 1 (7, 5) 1
(7, 1) 3
(15, 13) 1
Hardware
(15, 1) 7
(255, 245) 5
Software (on 1.6GHz Pentium PC) (255, 223) 16
RS(255,251) ~ 120Mbps t=2 (255, 155) 50
RS(255,239) ~ 30Mbps 8
j
RS(255, 223) ~10Mbps 16
61 By Nikesh Bajaj 62 By Nikesh Bajaj
ja
Ba
Next
Convolutional Codes
Turbo/TCM
Bounds
sh
ke
11
11/29/2013
j
67 By Nikesh Bajaj 68 By Nikesh Bajaj
ja
Ba
Cyclic Code
Cyclic Code
Linear and
cyclic shift
sh
Ring
Polynomial in GF(q)
Deg, monic, + , * mod
Exp GF(3)
ke
12