Vous êtes sur la page 1sur 49

BCH CODES

F.J. MacWilliams and N.J.A. Sloane, The Theory of Error Correcting Codes, Chapters 7,9.
-1-
Factors of x
n
1
A generator polynomial of a cyclic code of length n over GF(q) divides x
n
1.
The multiplicative order of q modulo n is the smallest integer m s.t. n|q
m
1.
The roots of x
n
1 (the nth roots of unity) are in the extension eld GF(q
m
).
GF(q
m
) is called the splitting eld of x
n
1 since
x
n
1 =
n1

i=0
(x
i
)
where
i
GF(q
m
) and
i
=
j
for i = j.
There is a primitive element GF(q
m
), called the primitive nth root of
unity, such that,
x
n
1 =
n1

i=0
(x
i
)
-2-
Factors of x
n
1 (cont)
A cyclotomic coset mod n over GF(q) which contains s is
C
s
= {s, sq, sq
2
, . . . sq
m
s
1
}
where m
s
is the smallest integer such that sq
m
s
= s mod n.
The integers mod n are partitioned to cyclotomic cosets
{0, 1, 2, . . . , n 1} =
_
s
C
s
.
The minimal polynomial of
s
is M

s
(x) =

iC
s
(x
i
).
Therefore,
x
n
1 = LCM M

i (x) , i = 0, 1, . . . n 1
-3-
The roots of g(x)
Since g(x)|x
n
1, g(x) =

iK
(x
i
), where K is a union of cyclotomic
cosets.
Lemma: c(x) C i. c(
i
) = 0 for all i K.
Example: GF(2
4
) with (x) = x
4
+x + 1 and () = 0.
Let g(x) = M

0(x)M

7(x) = (x + 1)(x
4
+x
3
+ 1) be a generator
polynomial of a binary cyclic code of length 15.
The roots of g are
j
, j K = C
0
C
7
= {0, 7, 14, 13, 11}.
c(x) =

14
i=0
c
i
x
i
C c(
j
) =

14
i=0
c
i

ji
= 0, for all j K.
Equivalently,
_
_
1 1 1 . . . 1
(
7
)
0
(
7
)
1
(
7
)
2
. . . (
7
)
14
_
_
_
_
_
_
_
_
_
_
c
0
c
1
.
.
.
c
14
_
_
_
_
_
_
_
_
=
_
_
0
0
_
_
-4-
The roots of g(x) cont
Lemma: Let GF(q
m
) be any zero of x
n
1. Then,
n1

i=0

i
=
_
_
_
0 = 1
n = 1
Lemma: An inversion formula. The vector c = (c
0
, c
1
, c
n1
) may be recovered
from c(x) = c
0
+c
1
x +. . . c
n1
x
n1
by
c
i
=
1
n
n1

j=0
c(
j
)
ij
.
proof:

n1
j=0
c(
j
)
ij
=

n1
j=0

n1
k=0
c
k

jk

ij
=

n1
k=0
c
k

n1
j=0

j(ki)
= nc
i
.
-5-
Codes based on spectral techniques - revisited
c(x) =

n1
i=0
c
i
x
is the representation of the codeword as a polynomial
c = (c
0
, c
1
, . . . , c
n1
) where c
i
GF(q) is the representation of the codeword
in the time-domain
C = (C
0
, C
1
, . . . , C
n1
) where C
j
= c(
j
) GF(q
m
) is the representation of
the codeword in the frequency-domain
Lemma: Galois-eld Fourier transform
C
j
=
n1

i=0
c
i

ij
c
i
=
1
n
n1

j=0
C
j

ij
.
-6-
Codes based on spectral techniques - cont
Encoding in the time domain by convolution : c(x) = m(x)g(x)
Encoding in the frequency domain : C
j
= M
j
G
j
Encoding in freq. domain:
r components of the spectrum are set to be zero.
The remaining k symbols are chosen from GF(q
m
).
There are only q
k
ways (out of q
mk
) to choose the k information symbols so
that the inverse Fourier transform will have q-ary values.
-7-
Codes based on spectral techniques - cont
Theorem Let V be a vector of length n where n|q
m
1. Then, the inverse
Fourier v is a vector of elements in GF(q) i V
q
j
= V
qj
.
Proof: If
i
v
i
GF(q), then
V
q
j
=
_
n1

i=0
v
i

ij
)
_
q
=
n1

i=0
v
i

ijq
= V
qj
.
If
j
V
q
j
= V
qj
, then
_
_
n1

j=0
v
i

ij
_
_
q
=
n1

i=0
v
i

ijq
Let k = qj, since gcd(q, q
m
1) = 1,
n1

k=0
v
q
i

ik
=
n1

k=0
v
i

ik
.
From the uniqueness of the Fourier transform,v
q
i
= v
i
. Hence, v
i
GF(q).
-8-
Codes based on spectral techniques - cont
Proposition 1 If the the spectral element C
j
is specied, then every spectral
element in its conjugacy class is determined.
Proposition 2 If the conjugacy class has r elements, then C
j
must satisfy
C
q
r
j
= C
j
, equivalently, C
j
GF(q
r
).
Encoding procedure:
Break the integers 0, 1, . . . n 1 into conjugacy classes.
Select one representative from each class. These representatives specify the
uniquely assignable symbols
The roots of g(x) determine which parity frequencies are set to 0.
The remaining assignable symbols are information symbols, arbitrary
except the restriction on the order.
All other symbols from the same conjugacy class are not free, they are
obligatory frequencies.
-9-
Example: Hamming code [7, 4, 3] with g(x) = x
3
+x + 1.
Representatives C
0
, C
1
, C
3
.
C
1
= 0, C
0
GF(2), C
3
GF(2
3
) 2
1
2
3
information words.
C
0
C
1
C
2
C
3
C
4
C
5
C
6
c
0
c
1
c
2
c
3
c
4
c
5
c
6
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0
0
0
0

0
1 1 1 0 1 0 0
0 0 0
1
0
4

2
0 0 1 1 1 0 1
0 0 0
2
0
1

4
0 1 0 0 1 1 1
0 0 0
3
0
5

6
1 1 0 1 0 0 1
0 0 0
4
0
2

1
0 1 1 1 0 1 0
0 0 0
5
0
6

3
1 0 0 1 1 1 0
0 0 0
6
0
3

5
1 0 1 0 0 1 1
1 0 0 0 0 0 0 1 1 1 1 1 1 1
1 0 0
0
0
0

0
0 0 0 1 0 1 1
1 0 0
1
0
4

2
1 1 0 0 0 1 0
1 0 0
2
0
1

4
1 0 1 1 0 0 0
1 0 0
3
0
5

6
0 0 1 0 1 1 0
1 0 0
4
0
2

1
1 0 0 0 1 0 1
1 0 0
5
0
6

3
0 1 1 0 0 0 1
1 0 0
6
0
3

5
0 1 0 1 1 0 0
-10-
Fast Fourier transforms
The Fourier transform V
j
=

n1
i=0
v
i

ij
The Fourier transform as written requires n
2
multiplications and n
2
additions.
Cooley-Tukey FFT algorithm (1965). The alg. requires n(n
1
+ n
2
) + n
multiplications (n = n
1
n
2
).
i = n
1
i
2
+ i
1
i
1
= 0, . . . n
1
1 i
2
= 0, . . . n
2
1
j = n
2
j
1
+ j
2
j
1
= 0, . . . n
1
1 j
2
= 0, . . . n
2
1
Then,
V
j
=
n
1
1

i
1
=0
n
2
1

i
2
=0
v
i

(n
1
i
2
+i
1
)(n
2
j
1
+j
2
)
Let
n
1
= and
n
2
= . Since
n
1
n
2
= 1 we have,
V
j
=
n
1
1

i
1
=0

i
1
j
1
_

i
1
j
2
n
2
1

i
2
=0
v
i

i
2
j
2
_
Complexity: Right FFT: n
2
2
, multiplication by
i
1
j
2
: n
1
n
2
, left FFT: n
1
n
2
-11-
Fast Fourier transforms (cont)
Good-Thomas FFT algorithm (1960-63).
Complexity: n(n
1
+n
2
) multiplications where n = n
1
n
2
and n
1
, n
2
are relatively prime.
Scramble input indices
i
1
= i mod (n
1
)
i
2
= i mod (n
2
)
_
_
_

i = i
1
N
2
n
2
+ i
2
N
1
n
1
where
N
1
n
1
+ N
2
n
2
= 1
Scramble output indices
j
1
= N
2
j mod (n
1
)
j
2
= N
2
j mod (n
2
)
_
_
_
j = j
1
n
2
+ j
2
n
1
Let
N
1
n
2
1
= and
N
2
n
2
2
= . Since
n
1
n
2
= 1 we have,
V
j
=
n
1
1

i
1
=0
n
2
1

i
2
=0
v
i

(i
1
N
2
n
2
+i
2
N
1
n
1
)(j
1
n
2
+j
2
n
1
)
=
n
1
1

i
1
=0

i
1
j
1
_
n
2
1

i
2
=0
v
i

i
2
j
2
_
Example n = 8 5 i = 2 8i
1
+ 3 5i
2
, j = 5j
1
+ 8j
2
mod (40)
-12-
Bose-Chaudhuri-Hocquenghem (BCH) codes
Theorem: (The BCH bound) Let C be a cyclic code with generator polynomial
g(x) such that for some integers b 0, 1, and the nth root of unity,
g(
b
) = g(
b+1
) = = g(
b+2
) = 0.
I.e. the code has a string of 1 consecutive powers of as zeros. Then the
minimum distance of the code is at least .
Proof: If c C, then Hc
T
= 0, where
H =
_
_
_
_
_
_
_
_
1
b

2b
. . .
(n1)b
1
b+1

2(b+1)
. . .
(n1)(b+1)
.
.
.
.
.
.
.
.
. . . .
.
.
.
1
b+2

2(b+2)
. . .
(n1)(b+2)
_
_
_
_
_
_
_
_
.
We now show that every 1 columns or less are linearly independent.
-13-
BCH bound - Proof (cont)
Let i
1
, i
2
, . . . , i
1
be the positions of 1 columns of H. Dene B,
B =
_
_
_
_
_
_
_
_

i
1
b

i
2
b
. . .
i
1
b

i
1
(b+1)

i
2
(b+1)
. . .
i
1
(b+1)
.
.
.
.
.
. . . .
.
.
.

i
1
(b+2)

i
2
(b+2)
. . .
i
1
(b+2)
_
_
_
_
_
_
_
_
=
_
_
_
_
_
_
_
_
1 1 . . . 1

i
1

i
2
. . .
i
1
.
.
.
.
.
. . . .
.
.
.

i
1
(2)

i
2
(2)
. . .
i
1
(2)
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_

i
1
b
0 . . . 0

i
2
b
. . . 0
.
.
.
.
.
. . . .
.
.
.
0 0 . . .
i
1
b
_
_
_
_
_
_
_
_
= V D
The matrix V is a Vandermonde matrix, therefore,
det(B) = det(V ) det(D) =
_
_

i
k
,i
j
,k>j
(
i
k

i
j
)
_
_
_

i
k
b
_
= 0.
-14-
Bose Chaudhuri - Hocquenghem (BCH) codes
BCH Codes form a large class of multiple random error-correcting codes.
First discovered by A. Hocquenghem in 1959 and independently by R. C. Bose
and D. K. Ray-Chaudhuri in 1960.
BCH codes are cyclic codes. Only the codes, not the decoding algorithms,
were discovered by these early writers.
The original applications of BCH codes were restricted to binary codes of
length 2
m
1 for some integer m.
Extended to the nonbinary codes with symbols from Galois eld GF(q) by
Gorenstein and Zieler (1961).
The rst decoding algorithm for binary BCH codes was devised by Peterson in
1960.
Since then, Petersons algorithm has been rened by Berlekamp, Massey,
Chien, Forney, and many others.
-15-
BCH codes - denition
A cyclic code of length n over GF(q) is a BCH code of designed distance if
for some integer b 0
g(x) = LCM{M

b (x), M

b+1(x), . . . , M

b+2(x)}.
Theorem: A BCH code over GF(q) of length n and designed distance has a
minimum, distance d and dimension k n m( 1).
If b = 1, the code is called narrow sense BCH coed or simple BCH code.
If n = q
m
1, the code is called primitive.
If b is xed, the the BCH codes are nested. I.e. a code of designed distance
1
contains the code of designed distance
2
i
1

2
.
If b = 1 and q = 2, the dimension of the BCH code is r
1
2
m.
If m = 1 the code is called Reed- Solomon code. A RS code is an MDS code
d = r + 1.
-16-
Examples
In GF(2
4
) :
x
15
1 = M

0M

1M

3M

5M

7
= (x + 1)(x
4
+x + 1)(x
4
+x
3
+x
2
+x + 1)(x
2
+x + 1)(x
4
+x
3
+ 1)
In GF(4
2
) :
x
15
1 = (x 1)(x 2)(x 3)(x
2
+x + 2)(x
2
+x + 3)
(x
2
+ 2x + 2)(x
2
+ 2x + 1)(x
2
+ 3x + 1)(x
2
+ 3x + 3)
In GF(16
1
) :
x
15
1 = (x 1)(x )(x
2
)(x
3
)(x
4
)(x
5
)
(x
6
)(x
7
)(x
8
)(x
9
)(x
10
)
(x
11
)(x
12
)(x
13
)(x
14
)
-17-
Examples (cont)
Binary primitive simple BCH code n = 15, b = 1, q = 2, t = 2
The roots of g(x) are {
1
,
2
,
3
,
4
} and their conjugates. Equivalently, the
roots of g(x) are {
i
| i C
1
C
3
} GF(2
4
).
g(x) = M

(x)M

3(x) deg(g(x)) = 4 + 4 = 8 [15, 15 8, d 5]


2
.
Primitive simple BCH code n = 15, b = 1, q = 4, t = 2
The roots of g(x) are {
1
,
2
,
3
,
4
} and their conjugates. Equivalently, the
roots of g(x) are {
i
| i C
1
C
2
C
3
} GF(4
2
).
g(x) = M

(x)M

2(x)M

3(x) deg(g(x)) = 2+2+2 = 6 [15, 156, d 5]


4
.
Reed Solomon code n = 15, b = 1, q = 16, t = 2
The roots of g(x) are {
1
,
2
,
3
,
4
}. Equivalently, the roots of g(x) are
{
i
| i C
1
C
2
C
3
C4} GF(16
1
).
g(x) = (x)(x
2
)(x
3
)(x
4
) deg(g(x)) = 4 [15, 154, d = 5]
16
.
-18-
Binary BCH code
Construct a binary BCH code of length 15 and error correcting capability of two
errors. Which b gives the best code ?

10

11

12

13

14
-19-
Another example
Q: Construct a simple BCH code of length 31 with q = 5 and error correcting
capability of two errors.
A: The splitting eld of x
31
1 of the code is GF(5
3
) since 3 is the smallest
integer for which 31|5
m
1.
the roots of the generator polynomial are in the union of the cyclotomic cosets
C
1
, C
2
, C
3
, C
4
,
K = {1, 5, 25} {2, 10, 50} {3, 15, 75} {4, 20, 100}
The code parameters are [31, 31 12, 5]
5
.
-20-
Binary primitive BCH codes of length 31
C
1
= {1, 2, 4, 8, 16} C
3
= {3, 6, 12, 17, 24}
C
5
= {5, 9, 10, 18, 20} C
7
= {7, 14, 19, 25, 28}
C
11
= {11, 13, 21, 22, 26} C
15
= {15, 23, 27, 29, 30}
designed generator polynomial g(x) dimension actual
distance distance
1 1 31 1
3 M

(x) 26 3
5 M

(x)M

3(x) 21 5
7 M

(x)M

3(x)M

5(x) 16 7
9 or 11 M

(x)M

3(x)M

5(x)M

7(x) 11 11
13 or 15 M

(x)M

3(x)M

5(x)M

7(x)M

11(x) 6 15
17,19,...,31 M

(x)M

3(x)M

5(x)M

7(x)M

11(x)M

15(x) 1 31
-21-
Binary non-primitive BCH codes of length 23
The cyclotomic cosets for n = 23 are
C
0
= {0},
C
1
= {1, 2, 4, 8, 16, 9, 18, 13, 3, 6, 12},
C
5
= {5, 10, 20, 17, 11, 22, 21, 19, 15, 7, 14},
Since |C
1
| = |C
5
| = 11, the multiplicative order of 23 mod 2 is 11. Thus, x
23
1
splits into linear factors over GF(2
11
).
Let GF(2
11
) a primitive 23
rd
root of unity.
x
23
1 = (x + 1)M

(x)M

5(x).
designed distance generator polynomial g(x) dimension actual distance
1 1 23 1
3 or 5 M

(x) 12 7
7,9,...23 M

(x)M

5(x) 1 23
-22-
Single error correcting binary BCH code
Consider a single error correcting binary BCH code of length n.
Let be the nth root of unity, GF(2
m
) where n|2
m
1.
The code parameters are [n, n m, 3]
The generator polynomial is g(x) = M

(x) and the check matrix is of the form


H =
_
_
1
2
. . .
n1
1
2

4
. . .
2(n1)
_
_
Equivalently,
H =
_
1
2
. . .
n1
_
If n = 2
m
1 Hamming code.
Straight forward decoding: for e(x) = x
i
we have s = Hy
T
= e() =
i
.
-23-
Double error correcting binary BCH code
Consider a double error correcting binary BCH code of length n.
Let be the nth root of unity, GF(2
m
) where n|2
m
1.
The code parameters are [n, n 2m, 5]
The check matrix is of the form
H =
_
_
_
_
_
_
_
1
2
. . .
n1
1
2

4
. . .
2(n1)
1
3

6
. . .
3(n1)
1
4

8
. . .
4(n1)
_
_
_
_
_
_
_
Equivalently,
H =
_
_
1
2
. . .
n1
1
3

6
. . .
3(n1)
_
_
-24-
Double error correcting binary BCH code (cont)
Let y = c +e and e(x) = x
i
+x
j
.
The syndrome is
Hy
T
= He
T
=
_
_
s
0
s
1
_
_
where
s
0
= y() =
i
+
j
s
1
= y(
3
) =
3i
+
3j
= (
i
+
j
)(
2i
+
i+j
+
2j
) = s
0
(
i+j
+s
2
0
)
The position of the erroneous bits is dened by the roots of the error locator
polynomial
(x) = (x
i
)(x
j
) = x
2
+s
0
x +
_
s
1
s
0
+s
2
0
_
.
-25-
Double error correcting binary BCH code (cont)
Decoding scheme:
Calculate the syndrome S = Hy
T
.
If s
0
= s
1
= 0, no errors occurred.
If s
0
=
i
= 0 and s
1
= s
3
0
, then correct a single error at position i.
If s
0
= 0 and s
1
= s
3
0
, check the error locator polynomial (x). If it has two
distinct roots,
i
,
j
, correct the errors a positions i, j.
If (x) has no two distinct roots, at least three errors occurred.
-26-
Double error correcting binary BCH code - Example
Consider a simple binary BCH code of length n and t = 2.
The generator polynomial is g(x) = M

(x)M

3(x), GF(2
4
),
Let c(x) = (x
2
+ 1)(x
4
+x + 1)(x
4
+x
3
+x
2
+x + 1)
Assume, y(x) = c(x) +x
5
+x.
y() =
5
+ =
2
y(
2
) =
10
+
2
=
4
= y()
2
y(
3
) =
15
+
3
=
14
y(
4
) =
20
+
4
=
8
= y()
4
The syndrome is S = Hy
T
=
_
_
s
0
s
1
_
_
=
_
_

14
_
_
The error locator polynomial is (x) = x
2
+
2
x +
6
.
The error locator polynomial has two roots and
5
.
-27-
The binary Golay code
Theory and practice of error control codes, R.E. Blahut
Notice that 2
12
__
23
0
_
+
_
23
1
_
+
_
23
2
_
+
_
23
3
__
= 2
23
The Golay code [23, 12, 7] satises the Hamming bound
The generator polynomial g(x) = M

(x) = x
11
+x
10
+x
6
+x
5
+x
4
+x
2
+ 1.
The reciprocal polynomial g(x) = M

1(x) = x
11
+x
9
+x
7
+x
6
+x
5
+x + 1.
(x 1)g(x) g(x) = x
23
1
Lemma: The Golay code has no nonzero codeword of weight 4.
Lemma: The weight of any codeword of even weight is divisible by 4.
Theorem The Golay code is a perfect triple-error correcting code.
weight 0 7 8 11 12 15 16 23
No. of codewords 1 253 506 1288 1288 506 253 1
-28-
BCH Codes as Industry Standards
[511, 493, 5] BCH code in ITU-T. Rec. H.261 video codec for audiovisual
service at kbit/s a video coding a standard used for video conferencing and
video phone.
[40, 32, 3] BCH code in ATM (Asynchronous Transfer Mode) This is shortened
cyclic code that can correct 1-bit error and detect 2-bit errors.
-29-
Decoding BCH Codes - denitions
Consider a t-error correcting BCH code of length n over GF(q) dened by a
generator polynomial g(x) and
g(
b
) = g(
b+1
) = = g(
b+2
) = 0,
where GF(q
m
) is an nth root of unity.
Transmitted word c = (c
0
, c
1
, . . . , c
n1
).
Received word y = (y
0
, y
1
, . . . , y
n1
).
Error vector e = (e
0
, e
1
, . . . , e
n1
).
Assume that , ( t) errors occurred at positions i
1
, i
2
, . . . i

corresponding
to columns 0 i
1
< i
2
< < i

n 1 of H.
Let e
i
1
, e
i
2
, . . . , e
i

be the error values at these positions e


i
j
GF(q).
The error polynomial e(x) =

j=1
e
i
j
x
i
j
.
-30-
Decoding BCH Codes - the syndrome
Let b = 1.
The syndrome vector s = (s
0
, s
1
, . . . s
2
) is calculated as S = Hy
T
= He
T
.
The syndrome polynomial is S(x) = s
0
+s
1
x + +s
2
x
2
.
The coecient s
w
, 0 w 2 is
s
w
= y(
w+1
) = e(
w+1
) =

j=1
e
i
j
(
w+1
)
i
j
.
In matrix notation
_
_
_
_
_
_
_
_

i
1

i
2
. . .
i

2i
1

2i
2
. . .
2i

.
.
.
.
.
.
.
.
.
.
.
.

i
1

i
2
. . .
i

_
_
_
_
_
_
_
_
. .
L
_
_
_
_
_
_
_
_
e
i
1
e
i
2
.
.
.
e
i

_
_
_
_
_
_
_
_
=
_
_
_
_
_
_
_
_
s
0
s
1
.
.
.
s
1
_
_
_
_
_
_
_
_
-31-
Decoding BCH Codes - the error locator polynomial
Dene the error locator polynomial as
(x) =

j=1
(x
i
j
) =
0
+
1
x +. . .

.
Consider the sum

w=0
s
w

w
:

w=0
s
w

w
=

w=0

j=1
e
i
j
(
w+1
)
i
j

w
=

j=1
e
i
j

i
j

w=0

w
(
i
j
)
w
=

j=1
e
i
j

i
j
(
i
j
) = 0
Therefore, s

1
w=0
s
w

w
In general, for m+ < 1

w=0
s
w+m

w
=

w=0

j=1
e
i
j
(
w+1+m
)
i
j

w
=

j=1
e
i
j
(
i
j
)
m+1
(
i
j
) = 0
and s
+m
=

1
w=0
s
w+m

w
-32-
Decoding BCH Codes - the error locator polynomial (cont)
In matrix notation:
_
_
_
_
_
_
_
_
_
_
s
0
s
1
s
2
. . . s
1
s
1
s
2
s
3
. . . s

s
2
s
3
s
4
. . . s
+1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
s
1
s

s
+1
. . . s
22
_
_
_
_
_
_
_
_
_
_
. .
M
_
_
_
_
_
_
_
_
_
_

2
.
.
.

1
_
_
_
_
_
_
_
_
_
_
=
_
_
_
_
_
_
_
_
_
_
s

s
+1
s
+2
.
.
.
s
21
_
_
_
_
_
_
_
_
_
_
-33-
Peterson -Gorenstein -Zierler decoding procedure
Decoding scheme for b = 1 :
1. Are there errors ? Calculate the syndrome s = Hy
T
. If s = 0 then c = y.
2. How many errors ? Find the largest integer for which the matrix M is
non-singular. If there exist no such , declare a decoding error ( more than t
errors occurred in y)
3. Where are the errors ? Find the error locator polynomial (x)
(
0
,
1
, . . .
1
)
T
= M
1
(s

, s
+1
, . . . s
21
)
T
4. Find the roots of (x), the roots indicate the error position. In case, (x) has
no roots in GF(q
m
), declare a decoding error.
5. What are the errors ? Calculate the errors values,
(e
i
1
, e
i
2
, . . . e
i

)
T
= L
1
(s
0
, s
1
, . . . s
1
)
T
6. Correct the errors c = y e.
-34-
Peterson -Gorenstein -Zierler decoding procedure
If b > 1 then, calculate the syndrome, nd , and calculate the error positions
following steps 1-4. The error values are e
i
j
= e
i
j

i
j
(b1)
where e
i
j
is the
solution of L e
T
= (s
0
, s
1
, . . . s
1
)
T
.
-35-
Example - decoding [15, 7, 5]
2
simple BCH code
Received word y(x) = x
2
g(x) + x
2
+ x
13
Calculate the syndrome
s
0
= y() =
14
, s
1
= y(
2
) =
13
, s
2
= y(
3
) =
5
, s
3
= y(
4
) =
11
How many errors?
M =
_
_

14

13

13

5
_
_
det(M) =
19

26
= 0 = 2
Error locator polynomial
M
_
_

1
_
_
=
_
_
s
2
s
3
_
_

_
_

1
_
_
=
_
_

7
1
1
_
_
_
_

11
_
_
=
_
_
1

14
_
_
The roots of (x) = x
2
+
14
x + 1 are
2
,
13
-36-
The error values
L =
_
_

13

26
_
_

_
_
e
1
e
2
_
_
= L
1
_
_
s
0
s
1
_
_
=
_
_

12

14

3
_
_
_
_

14

13
_
_
=
_
_
1
1
_
_
The error polynomial is e(x) = x
2
+ x
13
.
-37-
Berlekamp-Massey and Forney algorithms
G. David Forney (1965) Elwyn Berlekamp (1968) and James Massey (1969).
(x) = S(x)(x) mod x
2t
t - error correction capability
S(x) - the syndrome polynomial
(x) - the error locator polynomial
(x) - the error value polynomial
-38-
Berlekamp Massey algorithm - Denitions
Syndrome polynomial
S(x) =
2t1

j=0
s
j
x
j
=
2t1

j=0

w=1
e
i
w
(
b+j
)
i
w
x
j
=

w=1
e
i
w

bi
w
(1
i
w
x)
mod x
2t
deg(S(x)) 2t 1
Error locator polynomial (x) =

u=1
(1
i
u
x)
deg((x)) = t
Error value polynomial (x)
(x) = S(x)(x) =

w=1
e
i
w

bi
w

u=w
(1
i
u
x) mod x
2t
(
i
m
) = e
i
m

bi
m

u=m
(1
i
u
i
m
)
deg((x)) < deg((x)) t
-39-
Berlekamp Massey decoding algorithm
1. Calculate the syndrome S(x). If it equals zero no error occurred.
2. Find (x) and (x) such that deg (x) < deg (x) t by using the Euclidean
algorithm. If there exists no such a solution - more than t errors occurred.
3. Find the deg (x) = roots of the error locator polynomial. If there exist no
roots - more than t errors occurred.
4. [Forney65] Calculate the error value e
i
m
=
(b1)i
m
(
i
m
)

(
i
m
)
-40-
How to nd (x) and (x) ?
(x) = S(x)(x) mod x
2t
The Euclidean algorithm:
g
0
= x
2t
g
1
= s(x)
g
2
= g
0
mod g
1
= v
2
g
0
+ u
2
g
1
.
.
. =
.
.
.
g
i
= g
i2
mod g
i1
= g
i2
a(x)g
i1
= (v
i2
a(x)v
i1
)g
0
+ (u
i2
a(x)u
i1
)g
1
= v
i
g
0
+ u
i
g
1
(1)
In other words, let v
0
= 1, u
0
= 0, v
1
= 0, u
1
= 1, then,
_
v
i
u
i
_
=
_
1 a(x)
_
_
_
v
i2
u
i2
v
i1
u
i1
_
_
-41-
How to nd (x) and (x) ?
The degree of g
i
is decreasing as i grows.
The degree of u
i
is increasing as i grows.
For all i we have g
i
= u
i
s(x) mod x
2t
.
Let w the minimal integer for which that deg g
w
< deg u
w
t, and
u
w
(x) = u
w,
x

+ +u
w,1
x +u
w,0
then,
(x) =
u
w
(x)
u
w,0
, (x) =
g
w
(x)
u
w,0
.
If there exists no such w - more than t errors occurred.
-42-
Decoding Reed-Solomon code over GF(7) by using BM algorithm
Code parameters [6, 2, 5]
7
, with b = 0 and = 3.
3
0
= 1, 3
1
= 3, 3
2
= 2, 3
3
= 6, 3
4
= 4, 3
5
= 5.
Received word y(x) = 4(x + 2)(x 1)(x 3)(x 2)(x 6) + 4x
3
+ 2
The syndrome polynomial is
s(x) = y(3
0
) + y(3
1
)x + y(3
2
)x
2
+ y(3
3
)x
3
= 6 + 5x + 6x
2
+ 5x
3
.
The Euclidean algorithm:
g
0
= x
4
g
1
= 6 + 5x + 6x
2
+ 5x
3
g
2
= x
2
+ 2 = 1g
0
(3x + 2)g
1
g
3
= 2x + 1 = g
1
(5x + 6)g
2
= (5x + 6)g
0
+ (x
2
+ 6)g
1
Therefore, = 2, (x) =
u
3
6
= 6x
2
+ 1 and (x) =
g
3
6
= 5x + 6
The roots of (x) are 1 = 3
0
and 6 = 3
3
i
1
= 0, i
2
= 3 = 3.
The error value is e
i
1
= 3
i
1
(3
i
1
)

(3
i
1
)
=
51+6
51
= 2 and e
i
2
= 6
56+6
56
= 4
-43-
Example - decoding [15, 7, 5]
2
simple BCH code
Received word y(x) = x
2
g(x) + x
2
Calculate the syndrome
S(x) =
8
x
3
+
6
x
2
+
4
x +
2
The Euclidean algorithm:
g
0
= x
4
(v
0
, u
0
) = (1, 0)
g
1
=
8
x
3
+
6
x
2
+
4
x +
2
(v
1
, u
1
) = (0, 1)
g
2
=
7
(v
2
, u
2
) = (1,
7
x +
5
)
Therefore, = 1, (x) =
u
2

5
=
2
x + 1 and (x) =
g
2

5
=
2
The root of (x) is
2
i
1
= (2) = 2.
The error value is e
i
1
=
11
(
2
)

(
2
)
=

2

2
= 1
-44-
More on the distance of codes
Vera Pless, Introduction to the Theory of Error Correcting Codes, Wiley-Interscience pub.
1998 , Chapter 7.5
Denition: Let F be a nite eld, and S a subset of F. We say that a set I
s
of
subsets of F is independent with respect to S if the following holds:
1. The empty set is in I
s
.
2. If A is in I
s
, A S, F, / S, then A {} is in I
s
.
3. If A I
s
, then A I
s
for any = 0 in F.
The three axioms allows us to build such an I
s
element by element
-45-
More on the distance of codes (cont)
Example: Let GF(2
m
) an element of order 17. Let
S = {,
2
,
4
,
8
,
9
,
13
,
15
,
16
}
Let us start with the empty set and let =
3
/ S we will add sets one by one
_
{
3
}
_

_
{
3
}, {
4
}
_

11

_
{
3
}, {
4
}, {
4
,
11
}
_

_
{
3
}, {
4
}, {
4
,
11
}, {
2
,
9
}
_

_
{
3
}, {
4
}, {
4
,
11
}, {
2
,
9
}, {
2
,
9
,
10
}
_

_
{
3
}, {
4
}, {
4
,
11
}, {
2
,
9
}, {
2
,
9
,
10
}, {,
8
,
9
}
_

_
{
3
}, {
4
}, {
4
,
11
}, {
2
,
9
}, {
2
,
9
,
10
}, {,
8
,
9
}, {,
6
,
8
,
9
}
_

_
{
3
}, {
4
}, {
4
,
11
}, {
2
,
9
}, {
2
,
9
,
10
}, {,
8
,
9
}, {,
6
,
8
,
9
},
{
8
,
13
,
15
,
16
}
_

_
{
3
}, {
4
}, {
4
,
11
}, {
2
,
9
}, {
2
,
9
,
10
}, {,
8
,
9
}, {,
6
,
8
,
9
},
{
8
,
13
,
15
,
16
}, {
8
,
13
,
14
,
15
,
16
}
_
I
s
-46-
More on the distance of codes (cont)
Let f(x) a polynomial over GF(q) and let S be the set of its roots in F = GF(q
m
)
If the weight of f(x) = r then f(x) = a
1
x
i
1
+ + a
r
x
i
r
If S then f() = a
1

i
1
+ + a
r

i
r
= 0
For any subset A F, denote by V (A) the vector space over F generated by all the
vectors {
i
1
, . . . ,
i
r
}, A
Clearly, dimV (A) r = weight of f(x)
Theorem [van Lint and Wilson 1986]: The weight of f(x) is the size of any set A I
s
.
Proof:
We show by induction that |A| dimV (A).
It is true for |A| = 1. Suppose that it is true for all sets in I
s
of size n. Let A a set of size
n + 1 then A = A

, A

S, / S. Since f() = 0 for all A

and f() = 0, then


dimV (A) = dimV (A

) + 1. Clearly, dimV (A) = dimV (A) for = 0. Hence


|A| dimV (A).
-47-
More on the distance of codes (cont)
Example: Consider a [17, 9] BCH code with g(x) that has the roots
S = {,
2
,
4
,
8
,
9
,
13
,
15
,
16
}
From BCH bound we know that = 3
However, since
A = {
8
,
13
,
14
,
15
,
16
} I
s
we have weight g(x) |A| = 5.
Since c(x) = a(x)g(x) if c(x) has S as the set of its roots, then the weight of c(x) 5. If
c(x) has a toot that is not in S than it must contain
3
and all its powers. That is, the
weight of c(x) is either 0 or 17.
-48-
More on the distance of codes (cont)
Corollary [The BCH bound] If C is a cyclic code over F whose generator polynomial g(x)
has roots ,
2
, . . . ,
1
in some extension eld of F, then the minimum weight of C is
.
Proof: Let S be the set of roots of g(x). We assume that

/ S, otherwise, we get a
larger estimate for the minimum distance. Since g(x)|c(x) the elements in S are roots of
c(x). We build I
s
as follows:
{

} {
1
,

} {
2
,
1
,

} {,
2
, . . . ,

}
By the theorem, the weight of c is .
-49-

Vous aimerez peut-être aussi