18.02.2013 Views

CO 331 Course Notes - Student.math.uwaterloo.ca

CO 331 Course Notes - Student.math.uwaterloo.ca

CO 331 Course Notes - Student.math.uwaterloo.ca

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CO</strong> <strong>331</strong> <strong>Course</strong> <strong>Notes</strong><br />

Ifaz David Gwen<br />

April 4, 2012<br />

Lecture 26 March 9th, Friday<br />

Last Lecture: Let C be an (n, k)-cyclic code over F with gen. poly g (x).<br />

Theorem (Computing Syndromes). Let r (x) be a polynomial with syndrome<br />

s (x) = s0 + s1x + · · · + sn−k−1x n−k−1 . The syndrome of x · r (x) is<br />

�<br />

x · s (x) if sn−k−1 = 0<br />

x · s (x) − sn−k−1g (x) if sn−k−1 �= 0<br />

(H = � In−k| − R T � - the columns of H are x i mod g (x))<br />

0.1 Burst Error Correction<br />

Definition. Let e ∈ Vn (F ). The cyclic burst length of e is the length of the shortest cyclic<br />

block in e which contains all the non-zero coordinates in e.<br />

We say e is a cyclic burst error of length “t” if the cyclic burst length of e is “t”.<br />

−→<br />

−→<br />

� �� � ����<br />

Example. e = 01101 � �� 000 10�<br />

lenght 8<br />

(cyclic block of length 7) is a cyclic burst (error) of length 7.<br />

Definition. A linear code C is a t-cyclic burst error correcting code if all cyclic burst<br />

errors of length ≤ t are in different cosets of C. The largest such t gives the cyclic burst<br />

error correction <strong>ca</strong>pability of C.<br />

Example. (15, 9)-cyclic code C over Z2 with gen. poly. g (x) = 1 + x + x 2 + x 3 + x 6 is a<br />

3-cyclic burst error correcting code.<br />

(We’ll see later that t = 3 is the largest such integer)<br />

Example. g (x) = 1 + x 4 + x 6 + x 7 + x 8 generates a binary (15, 7)-cyclic code C with a<br />

cyclic burst error correcting <strong>ca</strong>pability of 4. (Verify)<br />

1


Theorem. let C be (n, k, d)-code (linear) over GF (q), with cyclic burst error correcting<br />

<strong>ca</strong>pability t. Then � �<br />

d − 1<br />

≤ t ≤ (n − k)<br />

2<br />

Proof. We know that all words of weight ≤ � �<br />

d−1 lie in different cosets of C. So, all cyclic<br />

2<br />

burst errors of length ≤ � �<br />

d−1 are in different cosets<br />

2<br />

=⇒ t ≥ � �<br />

d−1<br />

2<br />

By definition (of “t”) all cyclic burst errors of length≤ t must be in different cosets of C. In<br />

particular, all the words in which all the non zero elements (words) occur in the first t<br />

positions must be in different cosets of C. We have q t such words, and we have q n−k cosets<br />

of C. Hence,<br />

q t ≤ g n−k =⇒ t ≤ (n − k)<br />

Example. Going back to our example of g (x) = 1 + x 4 + x 6 + x 7 + x 8 we get that burst<br />

error correcting <strong>ca</strong>pability t ≤ 6.<br />

Theorem. Under the same setting as the previous theorem we have<br />

t ≤<br />

(n − k)<br />

2<br />

Example. Same example t ≤ 3 and then plug into 15, 9<br />

Proof. C <strong>ca</strong>nnot have a non-zero codeword with cyclic burst error length ≤ 2t. Otherwise,<br />

one <strong>ca</strong>n construct two different words of cyclic burst length ≤ t which are in the same coset<br />

w1 w2<br />

���� ����<br />

of C. (c = 000 · · · / · · · 000 = w1 − w2)<br />

� �� �<br />

2t<br />

So all the words in which all the non-zero components occur in the first 2t positions must<br />

be in different cosets of C.<br />

So � �<br />

d−1<br />

n−k ≤ t ≤ 2<br />

2<br />

0.2 Error Correction<br />

=⇒ q 2t ≤ q n−k =⇒ t ≤<br />

n − k<br />

2<br />

• C is an (n, x, d)-cyclic code with cyclic burst error correction <strong>ca</strong>pability t.<br />

• c ∈ C is being sent, and r = c + e where e is a cyclic burst error of length ≤ t ≤ n − k<br />

2


Re<strong>ca</strong>ll that PCM for C is H = � In−k| − R T � the columns of H are x i mod g (x)<br />

i = 0, . . . , n − 1.<br />

Observation. For some integer i, 0 ≤ i ≤ n − 1, the vector ei corresponding to<br />

ei (x) = x i e (x) will have all its nonzero coordinates in the first (n − k) positions.<br />

Then si = H · e T i = (si, 0)<br />

Lecture 27 March 12th, Monday<br />

0.3 Error Trapping (for cyclic codes)<br />

Last Lecture Let C be a (n, k)-code over GF (q) with generating polynomial g(x).<br />

• C is a t-cyclic burst error correcting code (with t ≤ (n−k)<br />

2 )<br />

• H = � In−k| − R T � is a PCM for C (columns are x i mod g (x), syndrome of r (x) is<br />

r (x) mod g (x))<br />

Senario<br />

• c ∈ C is being sent, r = c + e is received.<br />

• e is a burst error of length ≤ t<br />

Note that we may use the following interchangeably<br />

c ←→ c (x) , e ←→ e (x) , r ←→ r (x) ,<br />

where the left side of each correspondence is a vector and the right side is the associated<br />

polynomial.<br />

Observation. There exists an interger 0 ≤ i ≤ n such that ei = x i e has all its non-zero<br />

entries in the first t positions or in the first (n − k)-positions.<br />

The syndrome of ei is si = He T i . Note that<br />

• si has burst length ≤ t<br />

• ei = (si, 0)<br />

So, the syndrome si determines ei which determines the error vector e. Hence, r <strong>ca</strong>n be<br />

corrected to c = r − e.<br />

3


Computing si Note that<br />

r = c + e<br />

=⇒ x i ���� r = x<br />

ri<br />

i ���� c + x<br />

codeword<br />

i ���� e<br />

ei<br />

=⇒ ri − ei ∈ C,<br />

which implies that ri and ei have the same syndrome si.<br />

Error Trapping Algorithm for Cyclic Burst Error Correcting Codes<br />

• r(x) is a received word<br />

• si(x) denote the syndrome of ri(x) := x i r(x)<br />

1. For i from 0 to n − 1 do :<br />

(a) Compute si(x)<br />

(b) If si has burst length ≤ t, let e(x) = x n−1 si(x) and correct r(x) to<br />

c(x) = r(x) − e(x)<br />

2. Reject r(x)<br />

Example. Let C be a (15, 9) cyclic code over Z2 with generator polynomial<br />

g(x) = 1 + x + x 2 + x 3 + x 6 . Re<strong>ca</strong>ll that C is a 3-cyclic burst error correcting code. Decode<br />

r = (11101 11011 00000)<br />

r(x) = 1 + x + x 2 + x 4 + x 5 + x 6 + x 8 + x 9<br />

=⇒ s(x) = r(x) mod g(x) = 1 + x + x 4 + x 5 now with burst length ≤ 3<br />

We compute si(x) until we find one with burst length ≤ 3 (Theorem: Computing<br />

Syndromes).<br />

i si = syndrome of ri(x) = x i r(x)<br />

0 110011<br />

1 100101<br />

2 101110<br />

3 010111<br />

4 110111<br />

5 100111<br />

6 101111<br />

7 101011<br />

8 101001<br />

9 101000<br />

4


Note that s9 is a syndrom with burst length ≤ 3. So we have<br />

s9<br />

� �� �<br />

e9 = ( 101000<br />

0<br />

� �� �<br />

000000000)<br />

=⇒ e = x 15−9 e9 = x 6 e9 = (00000 01010 00000)<br />

=⇒ c = r − e = (11101 10001 00000)<br />

Interleaving Let C be a (n, k) cyclic code with t-cyclic burst error correction <strong>ca</strong>pability.<br />

Consider<br />

v1 = (v11 v12 . . . v1n) ∈ C<br />

v2 = (v21 v22 . . . v2n) ∈ C<br />

. . . . . . . .<br />

vs = (vs1 vs2 . . . vsn) ∈ C<br />

Each vi <strong>ca</strong>n correct burst errors of length ≤ t.<br />

Consider the following word of length ns.<br />

v = (v11v21...vs1v21v22...v2s...v1nv2n...vsn)<br />

Observation. Any cyclic burst error of length ≤ st in V corresponds to individual cyclic<br />

burst errors of length at most t in vi’s (verify!). Therefore, v “<strong>ca</strong>n correct” cyclic burst<br />

errors of length ≤ st.<br />

Definition. Reordering of the coordinates as above is <strong>ca</strong>lled interleaving to a depth s.<br />

Theorem. Let C be an (n, k) code over GF(q) with cyclic burst error correcting <strong>ca</strong>pability<br />

t. Let C ∗ be a the code obtained by interleaving C to a depth s. Then C ∗ is a (ns, ks)-code<br />

over GF(q) with cyclic burst error correcting <strong>ca</strong>pability is st. Furthermore, if C is a cyclic<br />

code with generating polynomial g(x) then C ∗ is a cyclic code with generating polynomial<br />

g(x s ).<br />

Lecture 28 March 14th, Wednesday<br />

Last lecture: (Interleavin)<br />

Theorem. Let C be an (n, k)-code over F with cyclic burst error correcting <strong>ca</strong>pability t.<br />

Let C∗ be the code obtained by interleaving C to a to a depth of S. Then C ∗ is an<br />

(ns, ks)-code over F with cyclic burst error correcting <strong>ca</strong>pability st. Furthermore, if C is<br />

cyclic with generator polynomial g (x) then C∗ is cyclic with generator polynomial g (x s ).<br />

Sketch of the Proof:<br />

• Show that C ∗ is a linear code of length ns and dimension ks.<br />

• Show that the cyclic burst error correcting <strong>ca</strong>pabilitiy is st (Shown in previous<br />

lecture)<br />

• Show that C ∗ is generated by g(x s )<br />

5


BCH Codes: (Base and / ’60 Ray-Chandhur)<br />

Block codes<br />

Linear codes<br />

Perfect Codes<br />

Minimal Polynomials<br />

Cyclic codes<br />

BCH codes<br />

GF (p n ) -vector space over GF (p) of dim = n<br />

|<br />

GF (p)<br />

Figure: Codes<br />

GF (q m ) -vector space over GF (q) of dim = m<br />

|m<br />

GF (q) = GF (p n )<br />

Definition. Let α ∈ GF(q m ). The minimal polynomial of α over GF(q)[x] is defined<br />

to be the non-zero, monic polynomial, mα(x) ∈ GF(q)[x] that is of smallest degree<br />

satisfying mα(α) = 0.<br />

mα(x) exists for all α ∈ GF(q m ) since<br />

• α = 0 =⇒ mα(x) = x<br />

• α �= 0, ord(α) = t (that is α t = 1), then f(x) = x t − 1 is such that f(α) = 0 and is<br />

monic.<br />

Example. GF (4) =<br />

• m0 (x) = x<br />

• m1 (x) = x + 1<br />

Z2<br />

(x 2 +x+1)<br />

• mx (x) = x 2 + x + 1<br />

• mx+1 (x) = x 2 + x + 1<br />

f (x) = x − α<br />

Theorem. Basic Properties of minimum polynomials:<br />

Let α ∈ GF(q m ).<br />

6


1. The minimum polynomial mα(x) of α over GF(q) is unique<br />

2. mα(x) is irreducible over GF(q)<br />

3. deg(mα) ≤ m<br />

4. If f(x) ∈ GF(q)[x], then f(α) = 0 ⇔ mα(x)|f(x)<br />

Proof.<br />

1. Let m1 (x) and m2 (x) be two minimal polynomials of α over GF (q). Then<br />

m(x) := m1 (x) − m2 (x) has degree less than �= deg m1 = deg m2. Moreover,<br />

m (α) = 0.<br />

=⇒ m (x) = 0 (zero as a poly)<br />

=⇒ m1 (x) = m2 (x) (zero as a polynomials)<br />

2. If mα is reducible over GF(q) then mα(x) = s(x)t(x) with deg(s) ≥ 1, deg(t) ≥ 1 and<br />

deg(s), deg(t) < deg(mα) (s and t may be assumed to be monic). Since mα(α) = 0,<br />

we have that s(α) = 0 or t(α) = 0. This is a contradiction with mα being α’s minimal<br />

polynomial. Hence , mα is irreducible.<br />

3. Re<strong>ca</strong>ll that GF (q m ) is a vector space over GF (q) with dimension = m. Consider<br />

(m + 1)-elements in GF (q m )<br />

1 = α 0 , α 1 , α 2 , α 3 , . . . , α m<br />

which must be linearly dependent over GF (q). That is, ∃a0, a1, . . . , am ∈ GF (q)<br />

(some ai �= 0) such that<br />

a0 + aiα + a2α 2 + · · · + amα m = 0<br />

=⇒ f (x) = a0 + a1x + · · · + amx m ∈ GF (q) [x], f (α) = 0.<br />

deg (f) ≤ m, f is non-zero<br />

=⇒ deg mα ≤ m<br />

4. We write f(x) = q(x)mα(x) + r(x) where deg(r) < deg(mα). If f(α) = 0, we have<br />

that r(α) = 0 so r(x) = 0 (as a polynomial) which implies that mα|f. If we have<br />

mα|f then f(α) = 0 trivially follows. Hence, f(α) = 0 ⇔ mα(x)|f(x).<br />

Corollary. Let α ∈ GF (q m ). If f(x) ∈ GF (q)[x] is a monic irreducible polynomial that has<br />

α as a root then f(x) = mα(x).<br />

7


Proof. From the previous theorem, part 4, we have<br />

mα(x)|f(x)<br />

But f(x) is irreducible and monic, which implies that mα = f(x)<br />

Lecture 29 March 16th, Friday<br />

Last Lecture:<br />

Corollary. Let α ∈ GF (q m ). If f(x) ∈ GF (q)[x] is a monic irreducible polynomial having<br />

α as a root then f(x) is the minimal polynomial of α over GF (q)<br />

Proposition. Let α ∈ GF (q m ). α ∈ GF (q) ⇐⇒ α q = α<br />

Proof. Consider f(x) = x q − x ∈ GF (q)[x]. Re<strong>ca</strong>ll that, for all α ∈ GF (q) we have α q = α.<br />

So all the elements in GF (q) are roots of f(x) and f(x) <strong>ca</strong>nnot have any other root<br />

be<strong>ca</strong>use deg(f) = q. So α ∈ GF (q) ⇐⇒ α q = α<br />

Definition. Let α ∈ GF (q m ) and t be tha smallest positive interger such that α qt = α.<br />

(note: t ≤ m be<strong>ca</strong>use α qm = α). Then the conjugates of α with respect to GF (q) is the set<br />

C(α) = {α, α q , α q2 , ... , α qt−1 }<br />

(Note that the elements of the set are pairwise disjoint)<br />

Theorem. Let α ∈ GF (qm ). The minimal polynomial of α over GF (q) is<br />

mα(x) = �<br />

β∈C(α)<br />

(x − β) = (x − α)(x − α q ) ... (x − α qt−1 )<br />

Proof. Clearly mα(x) is monic, mα(α) = 0, and mα is not the zero polynomial.<br />

We have to show that mα ∈ GF (q)[x].<br />

We have<br />

(mα) q ⎛<br />

= ⎝ �<br />

β∈C(α)<br />

⎞<br />

(x − β) ⎠<br />

q<br />

= �<br />

β∈C(α)<br />

(x − β) q = �<br />

β∈C(α)<br />

(x q − β q ) = �<br />

β∈C(α)<br />

(x q − β) = mα(x q ).<br />

Therfore, if mα(x) = � t<br />

i=0 mix i , then mi = m q<br />

i which implies that mi ∈ GF (q) for all<br />

0 ≤ i ≤ t so mα ∈ GF (q)[x].<br />

We now have to show that mα is minimal.<br />

8


Let f(x) ∈ GF (x)[q] with f(α) = 0 and f �= 0 (as a polynomial). We have to show that<br />

deg(f) ≥ deg(mα) = t. Let f(x) = � d<br />

i=0 fix i . We have<br />

f(α) = 0 =⇒ f0 + f1α + f2α 2 + ... + fdα d = 0<br />

=⇒ (f0 + f1α + f2α 2 + ... + fdα d ) q = 0<br />

=⇒ f0 + f1α q + f2α 2q + ... + fdα dq = 0 (since fi = f q<br />

i )<br />

=⇒ α q is a root of f.<br />

Similarly, we <strong>ca</strong>n show that α, α q , ... , α qt−1 are all roots of f. Therefore, deg(f) ≥ t.<br />

This complete the proof.<br />

Example. Let GF (16) = Z2[x]/(x 4 + x + 1). Find the minimal polynomial of<br />

α = x 2 + x 3 ∈ GF (16) over GF (2).<br />

Check that x is a generator for GF (16) and write all powers of x.<br />

x 0 = 1 x 1 = x x 2 = x 2 x 3 = x 3 x 4 = x + 1<br />

x 5 = x + x 2 x 6 = x 2 + x 3 x 7 = 1 + x + x 3 x 8 = 1 + x 2 x 9 = x + x 3<br />

x 10 = 1 + x + x 2 x 11 = x + x 2 + x 3 x 12 = 1 + x + x 2 + x 3 x 13 = 1 + x 2 + x 3 x 14 = 1 + x 3<br />

So we have that C(α) = {α = x 6 , x 12 , x 24 = x 9 , x 48 = x 3 }<br />

=⇒ mα(X) = (X − x 6 )(X − x 12 )(X − x 9 )(X − x 3 ) = X 4 + X 3 + X 2 + X + 1.<br />

Lecture 30 March 19th, Monday<br />

0.4 Factoring x n − 1 over GF (q)<br />

Let the characteristic of GF (q) be p, where q = pl . We will assume that gcd(n, q) = 1. If<br />

not, then n = npl =⇒ xn − 1 = xnpl − 1 = (xn − 1) pl over GF (q) =⇒ gcd(n, q) = 1.<br />

Factorization of x n − 1 over GF (q): Let m be the smallest positive interger such that<br />

q m = 1 (mod n). Since gcd(n, q) = 1, such an interger exists (why?).<br />

Construct GF (q m ) and assume that α is a generator of GF (q m ) ∗ . We set β = α qm −1<br />

n and<br />

order of β is n. Note that β 0 , β, β 2 , β 3 , . . . , β n−1 are pairwise distinct and (β i ) n = 1.<br />

This gives us<br />

� i<br />

β �n − 1<br />

� �� �<br />

Roots of xn−1 are βi =<br />

, 0≤i≤n−1<br />

⎛<br />

⎝ β n<br />

����<br />

1<br />

⎞<br />

⎠<br />

i<br />

− 1 = 1 − 1<br />

Since βi is a root of xn − 1, we have that mβi|xn − 1. The roots of mβi are<br />

C(bi ) = {βi , βiq , βiq2, ... , βiqt−1}, where t is the smallest interger for which βiqt = βi . Since<br />

ord(β) = n, we have that βiqt = β i if and only if iq t ≡ i (mod n) .<br />

Therefore, the value of t <strong>ca</strong>n be <strong>ca</strong>lculated from i,q, and n, without using β.<br />

9


Definition. The cyclotomic coset of q mod n containing i is defined to be the set<br />

Ci = {i, iq, . . . , iq t−1 } ⊂ Zn where t is the smallest integer such that iq t = i mod n. The set<br />

C = {Ci : 0 ≤ i ≤ n − 1} is <strong>ca</strong>lled cyclotomic cosets of q mod n<br />

Example. Let q = 2, n = 15. We have<br />

C0 = {0} C1 = {1, 2, 4, 8} C3 = {3, 6, 12, 9} C5 = {5, 10} C7 = {7, 14, 13, 11}<br />

Proposition. If j ∈ Ci, Ci = Cj<br />

Proof. Left as an exercise.<br />

mβi (x) = (x − βi ) (x − βiq �<br />

) x − βiq2 � �<br />

. . . x − βiqt−1 �<br />

= �<br />

j∈Ci (x − βj ) and this<br />

polynomial is an irreducible factor of xn − 1.<br />

Note that the elements of C from a partition of the set {0, 1, . . . , n − 1}. The degree of<br />

m β i(x) is |Ci|, and the number of irreducible factors of x n − 1 over GF (q) is |C|. This<br />

proves the following<br />

Theorem. Suppose that gcd(n, q) = 1. Let p ∈ GF (q m ) have order n, where m is the<br />

smallest positive interger with q m ≡ 1 (mod n). Then the irreducible factors of x n − 1 over<br />

GF (q) are {m β i(x) : 0 ≤ i ≤ n − 1} where m β i(x) = �<br />

j∈Ci (x − βj ).<br />

The number of irreducible factors of x n − 1 is equal to the number of (distinct) cyclotomic<br />

cosets of q (mod n), and the number of irreducible factors of degree d is equal to the<br />

number of (distinct) cyclotomic cosets of q (mod n) of size d.<br />

Example. Factor x 1 5 − 1 over GF (2).<br />

Find m such that 2 m ≡ 1 (mod 15). m = 4 works. Assume α is a generator of GF (2 4 ) ∗ .<br />

� where GF (2 4 ) = Z2[x]/〈x 4 + x + 1〉 �<br />

β = α 24 −1<br />

15 = α, so α 0 , α 1 , ... , α 14 are roots of x 15 − 1 and m α i(x)|(x 15 − 1)<br />

m α 0(x) = x − 1 = x + 1 in GF (2) that divides x 15 − 1.<br />

mα(x) = (x − α)(x − α 2 )(x − α 4 )(x − α 8 ) = (x 4 + x + 1)|x 15 − 1<br />

m α 3(x) = (x − α 3 )(x − α 6 )(x − α 12 )(x − α 9 ) = (x 4 + x 3 + x 2 + x + 1)|x 15 − 1<br />

m α 5(x) = (x − α 5 )(x − α 10 ) = (x 2 + x + 1)|x 15 − 1<br />

m α 7(x) = (x − α 7 )(x − α 14 )(x − α 13 )(x − α 11 ) = (x 4 + x 3 + 1)|x 15 − 1<br />

Lecture 31 March 21th, Wednesday<br />

BCH Codes (Bose-Chaudhuri ’60 & Hocquenghem ’59) A special class of cyclic<br />

codes with a lower bound on the distance (⌊ d−1⌋<br />

≤ t ≤ n − k where t is the cyclic burst<br />

2<br />

error correction <strong>ca</strong>pability.)<br />

We’ll proove the “BCH bound”.<br />

10


Setting GF (q), n ∈ Z ; m is the smallest integer such that gcd (n, q) = 1, q m ≡ 1 (mod n)<br />

• α ∈ GF (q m ) ∗ and α is a generator.<br />

• β = α qm −1<br />

n ∈ GF (q m ) ∗ , β is an element of order “n”.<br />

• m β i (x) denotes the minimal polynomial of β i over GF (q)<br />

Definition. A BCH code, of block length n, over GF (q) with a designed destance δ, is a<br />

cyclic code generated by<br />

for some a ∈ Z<br />

Remark.<br />

g(x) = lcm{m β i(x) : a ≤ i ≤ a + δ − 2}<br />

1. g (x) is indeed a generator poly. for a cyclic code of block length n, defined over<br />

GF (q) be<strong>ca</strong>use m β i (x) |x n − 1 for all a ≤ i ≤ a + δ − 2 and m β i (x) is monic,<br />

m β i (x) ∈ GF (q) [x]<br />

2. (δ − 1)-consecutive powers of β are roots of g(x) (# of consecutive powers of β which<br />

are roots of g(x) will determine the lower bound (BCH-bound) for the distance)<br />

3. The cyclic code C (as in the previous definition) has distance at least δ (proof is on<br />

next lecture)<br />

Example. Let q = 3, n = 13 =⇒ m = 3 (q m ≡ 1 mod n)<br />

GF (q m ) = GF (3 3 ) = Z3[x]/(x 3 +2x 2 +1)<br />

• α = x is agenerator in GF (3 3 ) ∗<br />

• β = α qm −1<br />

n = x 2 is an element of order n = 13<br />

0.4.1 CYCLOTOMIC <strong>CO</strong>SETS OF q mod n<br />

minimum polynomial of βi over GF (q) : mβi(X) = (X − βi )(X − βiq )...(X − βiqt−1) β i → β iq → ... → β iqt−1<br />

→ β i ⇔ i → iq → iq 2 → ... → iq t−1 → i<br />

so t is the smallest interger such that i ≡ iq t (mod n)<br />

11


The Cyclotomic cosets of q mod n (q = 3, n = 13)<br />

The minimal polynomials<br />

C0 = {0}<br />

C1 = {1, 3, 9} = C3<br />

C2 {2, 6, 5} = C5 = C6<br />

C4 = {4, 12, 10}<br />

C7 = {7, 8, 11}<br />

m β 0(X) = X − 1 = X + 2<br />

m β 1(X) = (X − β)(X − β 3 )(X − β 9 ) = 2 + 2X + 2X 2 + X 3<br />

m β 2(X) = (X − β 2 )(X − β 6 )(X − β 5 ) = 2 + 2X + X 3<br />

m β 4(X) = (X − β 4 )(X − β 12 )(X − β 10 ) = 2 + X + X 2 + X 3<br />

m β 7(X) = (X − β 7 )(X − β 8 )(X − β 11 ) = 1 + 2X + X 3<br />

Re<strong>ca</strong>ll. GF (33 ) = Z3[x]/(x 3 +2x2 +1), α = x is a generator, β = α2 = x2 . It helps to write<br />

α = x α 8 = 2 + x + x 2<br />

α 14 = · · ·<br />

some powers of α<br />

α 2 = x 2<br />

α 9 = 2 + 2x + 2x 2 .<br />

α 3 = x 3 = x 2 + 2 α 10 = 1 + 2x + x 2 .<br />

α 4 = 2 + 2x + x 2 α 11 = 2 + x α 26 = 1<br />

α 5 = 2 + 2x α 12 = 2x + x 2<br />

α 6 = 2x + 2x 2<br />

α 7 = 1 + x 2 .<br />

α 13<br />

m β 2(X) = (X − α 4 )(X − α 12 )(X − α 10 ) = (X 2 − (α 4 + α 12 )X + α 16 )(X − α 10 ) = X 3 + 2X + 2<br />

We may set (a = 0, δ = 4, a = 0 ≤ i ≤ a + δ − 2 = 2)<br />

g (x) = lcm (m β 0 (x) , m β 1 (x) , m β 2 (x))<br />

=⇒ g (x) = m β 0 (x) m β 1 (x) m β 2 (x)<br />

= 2 + 2x + x 4 + 2x 7 + x 6 + x 7 and note that<br />

x n − 1 = m β 0 (x) m β 1 (x) m β 2 (x) m β 4 (x) m β 7 (x)<br />

Remark. 1. β 0 , β 1 , β 2 , β 3 , β 5 , β 6 , β 9 are roots of g(X) (In fact the designed distance is<br />

δ = 5 as we have 4 consecutive powers of β which are roots of g(X))<br />

2. g(X) generates a BCH-code (13,6) cyclic code over GF (3) with “distance at least 5”.<br />

Lecture 33 March 23th, Friday<br />

12


Last Lecture: BCH Codes - Definition<br />

• q - a prime power; 1 ≤ n ∈ Z, gcd(q, n) = 1<br />

• m - the smallest positve integer such that q m ≡ 1 (mod n)<br />

• α ∈ GF (q m ) ∗ a generator<br />

• β = α (qm −1)<br />

n ∈ GF (q m ) ∗ an elementof order n.<br />

• m β i(X) - minimal polynomial of βi over GF (q)<br />

A BCH cod C over GF (q) with block length n, and with designed distance δ is a cyclic<br />

code generated by<br />

g (x) = lcm � m β i (x) : 0 ≤ i ≤ a + δ − 2 �<br />

for some a ∈ Z.<br />

1. g (x) |x n − 1<br />

2. β a , β a+1 , β a+2 , . . . , β a+δ−2<br />

roots of g<br />

� �� �<br />

(δ−1)−consecutive powers of β<br />

3. d (C) ≤ δ<br />

Definition. A Vandermonde matrix over a field F is an (n × n) matrix of the following<br />

form<br />

⎡<br />

⎤<br />

where xi ∈ F .<br />

⎢<br />

A = A(x1, x2, ..., xn) = ⎢<br />

⎣.<br />

Theorem. det (A (x1, x2, . . . , xn)) = �<br />

i≤j≤n (xj − xi)<br />

Proof. Exercise<br />

1 x1 x2 1 ... x n−1<br />

1<br />

1 x2 x2 2 ... x n−1<br />

2<br />

.<br />

.<br />

. ..<br />

1 xn x 2 n ... x n−1<br />

n<br />

Corollary. A (x1, x2, . . . , xn) in non-singular ⇐⇒ x1, x2, . . . , xn are pairwise distinct.<br />

Theorem. Let C be a BCH-code over GF (q) with block length n, and with designed<br />

distance δ. Then the distance of C is at least δ. (d(C) ≥ δ)<br />

Proof. Let a,n, and m be as before. Let β ∈ GF (q m ) ∗ wiht order n, and<br />

g(x) = lcm{m β i(X) : a ≤ i ≤ a + δ − 2} be the generator polynomial for C. Let<br />

r ∈ Vn(GF (a))<br />

13<br />

.<br />

⎥<br />


Note.<br />

Consider the matrix<br />

⎡<br />

⎢<br />

H = ⎢<br />

⎣.<br />

r ∈ C ⇐⇒ g (x) |r (x)<br />

⇐⇒ m β i (x) |r (x) ∀a ≤ i ≤ a + δ − 2<br />

⇐⇒ r (β i ) = 0 ∀a ≤ i ≤ a + δ − 2 (†)<br />

1 βa (βa ) 2 (βa ) 3 ... (βa ) n−1<br />

1 βa+1 (βa+1 ) 2 (βa+1 ) 3 ... (βa+1 ) n−1<br />

1 βa+2 (βa+2 ) 2 (βa+2 ) 3 ... (βa+2 ) n−1<br />

.<br />

.<br />

.<br />

. .. · · ·<br />

1 β a+δ−2 (β a+δ−2 ) 2 (β a+δ−2 ) 3 ... (β a+δ−2 ) n−1<br />

H is a (δ − 1) × n matrix over GF (q m ).<br />

Observe that H · r T = 0 ⇐⇒ r ∈ C (follows from †)<br />

⎤<br />

⎥<br />

⎦<br />

(δ−1)×n<br />

Now we prove that any t = (δ − 1) columns of H are linearly independent over GF (q m );<br />

and hence they are linearly independent over GF (q) ∈ GF (q m ).<br />

We construct the matrix H ′ (based an any t columns of H) and prove that H ′ is<br />

non-singular<br />

⎡<br />

H ′ ⎢<br />

= ⎢<br />

⎣<br />

(βa ) l1 (βa ) l2 ... (βa ) lt<br />

(βa+1 ) l1 (βa+1 ) l2 ... (βa+1 ) lt<br />

.<br />

.<br />

. ..<br />

(β a+δ−2 ) l1 (β a+δ−2 ) l2 ... (β a+δ−2 ) lt<br />

where 0 ≤ li ≤ (n − 1) and pairwise distinct.<br />

det (H ′ ) = (β a ) l1 (β a ) l2 · · · (β a ) lt<br />

=<br />

�<br />

t�<br />

(β a ) li<br />

�<br />

i=1<br />

� �� �<br />

�=0 as β∈GF (qm ) ∗<br />

(be<strong>ca</strong>use β has order n and 0 ≤ li ≤ n − 1)<br />

.<br />

⎤<br />

⎥<br />

⎦<br />

t×t=(δ−1)×(δ−1)<br />

�<br />

�<br />

�<br />

1 1 · · · 1<br />

�<br />

�<br />

�<br />

� �<br />

l1<br />

2 � �<br />

l2<br />

2 �<br />

lt<br />

� β β · · · β<br />

�<br />

�<br />

�<br />

. . . .<br />

�<br />

� �<br />

l2<br />

t−1 � �<br />

l2<br />

t−1 �<br />

lt<br />

β β · · · β<br />

βl1 βl2 · · · βlt �2 · det � A � β l1 , β l2 , . . . , β lt ��<br />

� �� �<br />

�=0 ⇐⇒ β l i’s are pairwise distinct<br />

This implies that H ′ is non-singular which implies that any t = (δ − 1) columns of H are<br />

linearly independent over GF (q m ) (over GF (q))<br />

14<br />

� t−1<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />


Claim: ∀c ∈ C with c �= 0, we have w(c) ≥ δ. ( =⇒ d(C) ≥ δ)<br />

Proof. If c ∈ C, c �= 0, and w(c) < δ, then Hc T = 0 and so there exist (δ − 1) or fewer<br />

columns of H which are linearly dependent over GF (q). Contradiction! Hence ∀c ∈ C with<br />

c �= 0, we have w(c) ≥ δ.<br />

Remark. H is NOT a P.C.M. for C be<strong>ca</strong>use the entries are in GF (q m ) not in GF (q).<br />

However, H behaves very much like a P.C.M.<br />

Lecture 34 March 26th, Monday<br />

0.5 Decoding BCH-codes: A decoding algorithm for C15<br />

Setting. q = 2, n = 15, m = 4 (m is the smallest positive integer qm = q mod r).<br />

Represent GF (24 ) as Z2[x]/(x4 + x + 1). α = x ∈ GF (24 ) ∗ is a generator.<br />

β = α qn−1 ” 15<br />

n = α 15 = α = x is anelement of order n = 15 in GF (24 ) ∗ .<br />

Definition. C15 is defined to be the (15, 7)-BCH code over GF (2) with the generator<br />

polynomial<br />

g (x) = mβ (x) · m β 3 (x) = � x 4 + x + 1 � · � x 4 + x 3 + x 2 + x + 1 �<br />

= x 8 + x 7 + x 6 + x 4 + 1<br />

Note. • mβ (x) , m β 3 (x) |x 15 − 1, g (x) | (x 15 − 1)<br />

• mβ(X) = (X − β)(X − β 2 )(X − β 4 )(X − β 8 )<br />

• m β 2(X) = (X − β 3 )(X − β 6 )(X − β 12 )(X − β 9 )<br />

• 4 consecutive powers of β: β, β 2 , β 3 , β 4 are roots of g(x)<br />

=⇒ C15 has designed distance δ = 5 and d(C15) ≥ δ = 5. In fact, d(C15) = 5 (be<strong>ca</strong>use<br />

w(g(x)) = 5 =⇒ d(C15) ≤ 5) C15 has error correcting <strong>ca</strong>pability ⌊ d−1⌋<br />

= 2.<br />

2<br />

r ∈ V15(GF (2)), r ∈ C15 ⇐⇒ r(βi ) = 0, ∀i = 1, 2, 3, 4. ( ⇐⇒ : proved in the last lecture)<br />

⇐⇒ r(β) = 0 and r(β3 ) = 0.<br />

Therefore, if we set<br />

⎡<br />

1 β β<br />

H = ⎣<br />

2 β3 · · · β14 1 β3 β6 β9 · · · β 42<br />

⎤<br />

⎦<br />

15<br />

����<br />

β 12<br />

2×15


then, r ∈ C15 ⇐⇒ Hr T − 0 ( ⇐⇒ r(β) = r(β 3 ) = 0. In particular, if c ∈ C15 is being<br />

sent, and r = c + e is received, then<br />

(H behaves like a PCM.)<br />

Hr T = H(c + e) T = Hc T + He T =⇒ He T = Hr T<br />

Remark. Computing HrT is easy be<strong>ca</strong>use<br />

Hr t �<br />

r(β)<br />

=<br />

r(β3 �<br />

)<br />

0.6 A decoding algorithm for C15<br />

(No need to store H)<br />

Scenario c ∈ C15 is being sent, r = c + e is received where e is an error vector. (The<br />

algorithm will always make the correct decision whenever w(w) ≤ 2.)<br />

1. Compute<br />

Hr T<br />

�<br />

r(β)<br />

r(β3 �<br />

=<br />

)<br />

2. If s1 = s3 = 0, then accept r, STOP (no errors occured or more than 2 errors have<br />

occured)<br />

3. Justifi<strong>ca</strong>tion/Observation If w(e)f1, say exactly one error has occured, say in<br />

position i 0 ≤ i ≤ 14 then the error polynomial is e(x) = xi , and<br />

HrT � � �<br />

s1 r(β<br />

= =<br />

r(β3 �<br />

= He<br />

)<br />

T �<br />

e(β)<br />

=<br />

e(β3 � �<br />

i β<br />

=<br />

) β3i �<br />

s3<br />

=⇒ s3 = s 3 1 If s3 = s 3 1 and s1 = β i for some 0 ≤ i ≤ 14 then correc r in position i; STOP<br />

(Also verify that if w(e) = 2 then we never have s3 = s 3 1)<br />

4. If s1 = 0 (and s3 �= 0), reject r; STOP<br />

Justifi<strong>ca</strong>tion s3 �= 0 =⇒ r(β 3 ) �= 0 =⇒ e(β 3 ) �= 0 =⇒ e(X) is not the zero polynomial.<br />

s1 = 0 =⇒ e(β) = r(β) = s1 = 0 =⇒ β is a root of e(X). mβ(X) | e)(X) =⇒ e(X) is a<br />

codeword in the codespace generated by mβ(X) which is a BCH code with designed<br />

distance 3 =⇒ w(e) ≥ d(C) ≥ δ = 3.<br />

Lecture 35 March 28th, Wednesday<br />

16<br />

� s1<br />

s3<br />


0.7 A BCH <strong>CO</strong>DE: C15<br />

• GF (2 4 ) = Z2[x]/(x 4 + x + 1)<br />

• α = x is a generator in GF (2 4 ) ∗<br />

• β = α = x is an element of order n = 15<br />

C15 is a (15,7)-BCH code generated by g(x) = mβ(X)m β 3(X) = X 8 + X 7 + X 6 + X 4 + 1<br />

Powers of β in GF (2 4 )<br />

β 0 = 1 β 4 = x + 1 β 8 = x 2 + 1 β 12 = x 3 + x 2 + x + 1<br />

β 1 = x β 5 = x 2 + x β 9 = x 3 + x β 13 = x 3 + x 2 + 1<br />

β 2 = x 2 β 6 = x 3 + x 2 β 10 = x 2 + x + 1 β 14 = x 3 + 1<br />

β 3 = x 3 β 7 = x 3 + x + 1 β 11 = x 3 + x 2 + x<br />

A Decoding algorithm for C15 (c ∈ C15 is being sent; r = c + e is received)<br />

1. Compute s1 = r(β) and s3 = r(β 3 )<br />

2. If s1 = s3 = 0; then accpet r, STOP (no error)<br />

3. If s 3 1 − s3, then correct r in position “i” where si = β i ; STOP (single error)<br />

4. If s1 = 0 and s3 �= 0, then reject r; STOP (more than 2 errors)<br />

5. Observation If there are two errors, then the error polynomial e(x) = x i + x j (two<br />

errors have occurred in positions i and j, 0 ≤ i ≤ j ≤ 14)<br />

Then, s1 = r(β) = e(β) = β i + β j and s3 = r(β 3 ) = β 3i + β 3j .<br />

s3 = β 3i + β 3j = (β i + β j )(β 2i + β i+j + β 2j ) = s1((β i + β j ) 2 + β i+j ) = s1(s 2 1 + β i+j )<br />

=⇒ β i+j = s3<br />

s1 + s2 1<br />

Remark. s1 is never zero! - see step 2 and 4.<br />

Therefore, β i and β j are the roots of the following “error lo<strong>ca</strong>tor polynomial”.<br />

σ(z) = (z − β i )(z − β j ) = z 2 + (β i + β j )z + β i+j =⇒ σ(z) = z 2 + s1z + ( s3<br />

s1 + s2 1)<br />

• From the error lo<strong>ca</strong>tor polynomial, solve for B i and B j (find the “two distinct<br />

non-zero roots” B i and B j of σ(z)) and correct r in positions i and j; STOP.<br />

• σ(z) will indeed have two distinct roots. Be<strong>ca</strong>use otherwise, we would have<br />

si = β i + β j = β i + β i = 0, which is a contradiction.<br />

17


• 0 is not a root of σ be<strong>ca</strong>use otherwise s3<br />

s1 + s2 1 = 0 =⇒ s 3 1 = s3, another contradiction<br />

6. Reject r; STOP<br />

Example. The received word is<br />

Compute<br />

s1 = r(β) = 1 + β 4 + β 7 + β 8<br />

r = (10001 00110 00000)<br />

= 1 + x 4 + x 7 + x 8<br />

= ✁1 + ✘✘ ✘✘<br />

(x + 1) + (✁1 +✚x + x 3 ) + (x 2 + ✁1) = x 2 + x 3 = β 6<br />

s3 = r(β 3 ) = 1 + β 12 + β 21 + β 24 = 1 + β 12 + β 6 + β 9<br />

= 1 + (x 3 + x 2 + x + 1) + (x 3 + x 2 ) + (x 2 + x) = x 3 + β 3<br />

=⇒ s1 = β 6 and s3 = β 3 . s1 �= 0, s3 �= 0, s 3 1 = β 18 = β 3 = s3.<br />

=⇒ correct r in position i = 6 (be<strong>ca</strong>use s1 = β i = β 6 )<br />

=⇒ e = (00000 01000 00000) and c = (1001 01110 00000)<br />

Example. The received word is r = (00111 01110 00000) = x 2 + x 3 + x 4 + x 6 + x 7 + x 8<br />

s1 = r(β) = β 13<br />

s3 = r(β 3 ) = β 10<br />

Construct the error lo<strong>ca</strong>tor polynomial, σ(z)<br />

Note.<br />

s3<br />

s1<br />

s1 �= 0, s 3 1 = β 9 �= β3<br />

+ s 2 1 = β10<br />

β 13 + β26 = β −3 + β 26 = β 12 + β 11 = 1<br />

=⇒ σ(z) = z 2 + s1z + ( s3<br />

s1 + s2 1) = z 2 + β 13 z + 1<br />

Find the two distinct non-zero roots, say β i and beta j , 0 ≤ i ≤ j ≤ 14.<br />

i + j ≡ mod15 =⇒ All possible pairs (i, j), 0 ≤ i ≤ j ≤ 14 with (i + j) = 0 mod 15 are<br />

(1, 14), (2, 13), (3, 12), (4, 11), (5, 10), (6, 9), (7, 8)<br />

We find the correct pair (i, j) by checking if β i + β j = β 13 .<br />

In fact β 4 + β 11 = (x + 1) + (x 3 + x 2 + x) = 1 + x 2 + x 3 = β 13 =⇒ β 4 , β 11 are the roots of<br />

σ(z) and e = (000010000001000).<br />

18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!