1 / 42

Reed-Muller and Preparata Codes

Reed-Muller and Preparata Codes. OUTLINE. [1] Reed-Muller codes [2] Decoding Reed-Muller codes [3] Extended Preparata Codes [4] Encoding Extended Preparata Codes [5] Decoding Extended Preparata Codes. Chap 3 Perfect and Related Codes. Recall [3.8]. Reed-Muller codes

neil
Download Presentation

Reed-Muller and Preparata Codes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reed-Muller and Preparata Codes

  2. OUTLINE • [1] Reed-Muller codes • [2] Decoding Reed-Muller codes • [3] Extended Preparata Codes • [4] Encoding Extended Preparata Codes • [5] Decoding Extended Preparata Codes

  3. Chap 3 Perfect and Related Codes • Recall [3.8]. Reed-Muller codes • 1. r-th order, length 2m, 0≦r≦m, RM(r, m) • RM(0, m)={00…0, 11…1}, RM(m, m)= • RM(r, m) = • 2. Eg 3.8.1

  4. Perfect and Related Codes • 3. Generator matrix G of RM(r, m) • 4. Eg 3.8.4 Find G(1,3)

  5. Perfect and Related Codes • 5. The properties of RM(r,m)

  6. Reed-Muller Codes • [1] Reed-Muller codes • RM(r,m)  linear (n, k, d) code with • n = 2m • Dimension k = • Min. distance d = 2m-r • Standard ording of Km • Label position i with binary representation ui Km in reverse order (low order digit first) • Eg. 9.1.1 • Standard ordering for K2= (00, 10, 01, 11) • Standard ordering for K3= (000, 100, 010, 110, 001, 101, 011, 111) 0 1 2 3 0 1 2 3 4 5 6 7

  7. Reed-Muller Codes • Any function f: Km {0, 1} has a unique vector v = (f(u0), f(u1), …, f(u2m-1))  Kn , n=2m where ui  Km and follows standard ordering • Consider fI: Km {0, 1} as follow • Given I  {0, 1, …, m-1} • <def> vI is the corresponding vector form of fI f  v

  8. Reed-Muller Codes • Eg. 9.1.2 Let m = 3, so n = 23 (a) If I = {1, 2} then fI(x0, x1, x2) = (x1+1) (x2+1) under standard ordering f{1,2}(0,0,0) = 1 f{1,2}(0,0,1) = 0 f{1,2}(1,0,0) = 1 f{1,2}(1,0,1) = 0 f{1,2}(0,1,0) = 0 f{1,2}(0,1,1) = 0 f{1,2}(1,1,0) = 0 f{1,2}(1,1,1) = 0 so vI = 11000000 (b) If I = {0} then fI(x0, x1, x2) = (x0+1) so vI = 10101010 (c) If I =  then fI(x0, x1, x2) = 1 so vI = 11111111 x0x1x2 (a) (b) (c) 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 1 1 1 1 1 0 0 1

  9. Reed-Muller Codes • I={1,2} • I={0} • I= • I={1,2}{0} • I={1,2} • Two facts about fI • fI(x0, x1,…, xm-1) = 1 iff xi=0 for all iI • wt(vI)=2m-|I| • For each ui  Km fI(ui)fJ(ui) = fIJ(ui) and x0x1x2 (a) (b) (c) (d) (e) 0 0 0 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0

  10. Reed-Muller Codes • The Reed-Muller code RM(r,m) can be defined as the linear code<{vI | I  Zm, |I| r}> • S = {vI | I  Zm, |I| r} : linearly indep. and thus a basis for RM(r,m) • Generating matrix Gr,m in canonical form • Eg. 9.1.8 The generating matrix for RM(4,4) in canonical form (see next page) • Encoding

  11. Canonical form vI comes before vJ if (1) |I|<|J| or (2) |I|=|J|,  j such that fI(uj)<fJ(uj) and fI(ui)=fJ(ui)  i > j • Eg. 9.1.11 Encoding the following m using G2,4 • (a) If m = 1 0000 001000 (so m = m0,3 = 1) then c = v + v0,3 = 0101010111111111 • (b) If m = 0 0101 001001 (so m2 = m0 = m0,3 = m0,1 = 1) then c = v2 + v0 + v0,3 + v0,1 = 0111100011010010

  12. Reed-Muller Codes • [2] Decoding Reed-Muller codes • <Def> • IC = Zm\I : the complement of I in Zm Eg. I = {1, 3, 5}  Zm , then IC = {0, 2, 4, 6, 7} • HI = {uKm | fI(u)=1} Eg. If I = {1, 2} then fI(x0, x1, x2) = (x1+1) (x2+1) f{1,2}(0,0,0) = 1 f{1,2}(0,0,1) = 0 f{1,2}(1,0,0) = 1 f{1,2}(1,0,1) = 0 f{1,2}(0,1,0) = 0 f{1,2}(0,1,1) = 0 f{1,2}(1,1,0) = 0 f{1,2}(1,1,1) = 0 so HI = {000, 100} fI(x0, x1,…, xm-1) = 1 iff xi=0 for all iI HI is a subspace of Km pf: x, y  HI  xi=yi=0  xi+yi=0  x+y HI

  13. Reed-Muller Codes • For u = (x0, x1, …, xm-1)  Km, t = (t0, t1, …, tm-1)  Km Define fI,t(x0, x1, …, xm-1) = fI(x0+t0, x1+t1, …, xm-1+tm-1) = fI(x+t) Eg. If I = {1, 2} then fI(x0, x1, x2) = (x1+1) (x2+1) Assume t = 010 fI,t(0,0,0) = fI(0+0, 0+1, 0+0) = 0 fI,t(1,0,0) = fI(1+0, 0+1, 0+0) = 0 fI,t(0,1,0) = fI(0+0, 1+1, 0+0) = 1 fI,t(1,1,0) = fI(1+0, 1+1, 0+0) = 1 fI,t(0,0,1) = fI(0+0, 0+1, 1+0) = 0 fI,t(1,0,1) = fI(1+0, 0+1, 1+0) = 0 fI,t(0,1,1) = fI(0+0, 1+1, 1+0) = 0 fI,t(1,1,1) = fI(1+0, 1+1, 1+0) = 0 so vI,t = 00110000

  14. I={1} s=010 J={0,1} Jc={2} t=001 x0x1x2 f{1},010 f{2},001 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 Reed-Muller Codes • Lemma 9.2.1 Let I, J  Zm and |I||J|, for any sHIC and tHJ vI,s  vJC,t = 1 iff I = J pf: is even unless IJc=Zm I={1} s=010 J={1} Jc={0,2} t=101 x0x1x2 f{1},010 f{0,2},101 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1

  15. Reed-Muller Codes • Corollary 9.2.2 If c is a codeword in RM(r,m) and if |J| = r , then mJ = c  vJC,t ,  tHJ pf: ( In above, we choose s = (0,0,…,0) since (0,0,…,0) HJC for any J, |J| = r )

  16. Reed-Muller Codes J={0,1} HJ={00xx} HJc={xx00} • Lemma 9.2.3 Let J  Zm, for any word e (of length 2m) e  vJC,t = 1 forat most wt(e)values of tHJ pf: if t1,t2HJ , t1t2 then (HJc + t1)  (HJc + t2)= so vJc,t1 and vJc,t2 have no position where both digits are 1 Thus each 1 in e affects at most one of the values of e  vJC,t x0x1x2x3 v{2,3},0010 v{2,3},0001 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0

  17. Reed-Muller Codes • Idea of decoding algorithm Let w=c+e where c is a codeword in RM(r,m) Let |J|=r by lemma 9.2.3, e  vJC,t = 0 for at least |HJ|-wt(e) values of tHJ for such t we have w  vJC,t = c  vJC,t + e  vJC,t = c  vJC,t = mJ (by cor. 9.2.2) So if 2wt(e) < |HJ|, more than half of the w  vJC,t will be mJ (i.e. more than |HJ|/2 will be mJ and less than |HJ|/2 will be mJ +1) Now we can partially decode w by w(r-1) = w + |J|=rmJvJ and apply similar method to w(r-1)

  18. Reed-Muller Codes • Lemma 9.2.4 The minimum distance of RM(r,m) is 2m-r pf: The decoding algorithm can correct error patterns of weight < |HJ|/2 where |J|  r Thus RM(r,m) has min. distance at least 2m-r ( |HJ| = wt(vJ) = 2m-|J| ) We know vI with |I|=r is a codeword in RM(r,m) and wt(vI) = 2m-r So min. distance of RM(r,m) is 2m-r

  19. Reed-Muller Codes • Algorithm 9.2.5 (Majority logic decoding) Goal : decode a received word w encoded by RM(r,m) • 1. i  r, w(r)  w • 2.  J  Zm with |J|= i compute w(i)  vJC,t for each tHJ determine the majority mJ • 3. If i > 0 then w(i-1)  w(i) +  mJvJ , where |J|=i if wt(w(i-1))  2m-r-1-1 then set mJ=0 for all J with |J| r OUTPUT message m else i  i-1 goto step 2 If i = 0 then OUTPUT message m

  20. Reed-Muller Codes • Eg. 9.2.6 Decode w = 0101011110100000 that was encoded using G2,4 • 1. i = r = 2 , w(2) = w m2,3 = 0 m1,3 = 0 m0,3 = 0 m1,2 = 0 m0,2 = 1 m0,1 = 0 Then w(1) = w(2) + v0,2 = 1111011100000000 • 2. i = 1 m3 = 1 m2 = 0 m1 = 0 m0 = 0 Then w(0) = w(1) + v3 = 0000100000000000 • 3. Since wt(w(0)) = 1  2m-r-1-1, so m = 0OUTPUT 0 1000 000010

  21. x0x1x2x3 v{2,3},0000 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 0

  22. w(1)=1111011100000000

  23. Preparata Codes • [3] Extended Preparata Codes • U  GF(2r),  is a primitive element of GF(2r) Define • Eg. 9.3.1  is a primitive element of GF(23) ({0})=00000001 ({2, 5, 6})=00100110 ()=00000000 GF(23) using 1+x+x3 word power of  000 0 100 0 010 1 001 2 110 3 011 4 111 5 101 6

  24. Preparata Codes GF(23) using 1+x+x3 word power of  000 0 100 0 010 1 001 2 110 3 011 4 111 5 101 6 • U  GF(2r) ,  GF(2r) (1) U +  = {u+|u  U} (2) U = {u| u U} (3) UV = {x| x UV but xUV } (U) + (V) = (UV) • Eg.9.3.2 U={2, 5, 6} , V={5, 0} Then U+ 2 = {2 + 2 , 5 + 2 , 6 + 2} = {0, 3, 0} 2 U = {22, 25, 2 6}={4, 0, 1} (U) + (V) = 00100110 + 00000101 = 00100011 = ({2, 6, 0}) = (UV)

  25. Preparata Codes • Def.9.3.3 The extended Preparata code P(r) is the set of codewords of the form [(U), (V)], where U and V  GF(2r) satisfy • Eg.9.3.4 Construct GF(23) using 1+x+x3 U = {1, 2, 5, 0} , V = {0, 1, 2, 3, 6, 0} [(U), (V)] = 01100101 11110011 is a codeword in P(3) GF(23) using 1+x+x3 word power of  000 0 100 0 010 1 001 2 110 3 011 4 111 5 101 6

  26. Preparata Codes • Lemma 9.3.5 Suppose [(U), (V)] and [(A), (B)] are codewords in P(r). Let . Then [(UA + ), (VB)] is also a codeword Pf: check (i)(ii)(iii) of Def.9.3.3 (i) |U|, |V|,|A|,|B| are even |UA + | = |UA| = |U|+|A|-2|UA| is even |VB| = |V|+|B|-2 |VB| is even (ii)

  27. Preparata Codes (iii)

  28. Preparata Codes • Def A code is distance invariant if for any pair of codeword c1 and c2, the number of codewords distance i from c1 equals the number of codewords distance i from c2 for 1<=i<n. • Coro.9.3.7 P(r) is distance invariant Pf: Let [(U), (V)] and [(A), (B)] be codewords that are distance i apart. By Lemma 9.3.5 [(UU + ), (VV)] and [(UA + ), (VB)] are both codewords and also distance i apart. Since [(UU + ), (VV)] is the zero word and [(UA + ), (VB)] has weight i

  29. Preparata Codes • Lemma 9.3.8 Suppose [(U), (V)] is a codeword in P(r) Then P(r) also contains the following codewords: (i) [(V), (U)] (ii) [(U + ), (V + )] (iii) [(U), (V)] , 0 Pf: Check (i)(ii)(iii) of Def.9.3.3 similar as the proof of lemma 9.3.5

  30. Preparata Codes • Lemma 9.3.13 If  is a primitive element of GF(2r) then 3 is a primitive element if r is odd and is not primitive if r is even Pf: i is primitive iff gcd(i, 2r-1)=1 and if r is odd then 2r-1 = 1 mod 3 if r is even then 2r-1 = 0 mod 3 • Coro.9.3.14 If r is odd then for each nonzero element x of GF(2r), there is a unique y such that y3=x

  31. Preparata Codes • Thm.9.3.15 P(r) has min. distance 6 Pf: Since P(r) is distance invariant, it contains a codeword [(U), (V)] of weight d d = wt((U)) + wt((V)) = |U| + |V| d is even, so we only need to show that d2,4 and there is a codeword of weight 6 (1) suppose d=2, by lemma 9.3.8(i), assume |U|=2 and |V|=0 By lemma 9.3.8(ii), we can assume U={0, x}, x0 Then Def.9.3.3(ii) does not hold. (2) suppose d=4, by lemma 9.3.8(i), either |U|=4 and |V|=0 or |U|=2 and |V|=2

  32. Preparata Codes (a) |U|=4 and |V|=0, assume U={0, x, y, z}, x,y,z are distinct and non-zero Then Def.9.3.3(iii) gives that 03+x3+y3+z3+(0+x+y+z)3=0 (x+y)(x+z)(y+z)=0 ( impossible !!) (b) |U|=2 and |V|=2, assume U={0, x} and V={y,z} y,z are distinct Then Def.9.3.3(iii) gives that 03+x3+(0+x)3= y3+z3=0 By coro.9.3.14, if y3=z3 then y=z (-><-) (3) Find a codeword of weight 6 Let x,y,z are distinct nonzero element w be the unique element such that w3 = x3+y3+z3 and let u = w+x+y+z

  33. Preparata Codes Then w is not equal to x,y or z (since w=x imply y=z) and u0 (since w3 + (x+y+z)3 = (x+y)(x+z)(y+z)  0, so w  x+y+z) Now let U={0,u} , V={w, x, y, z} Then [(U), (V)] is a word of weight 6 and we can check that it is a codeword.

  34. Preparata Codes • Thm.9.3.18 P(r) is not a linear code Pf: we know that [(U), (V)] + [(A), (B)] = [(UA), (VB)] from the proof of thm.9.3.15, we can construct them with U={0, u1} , V={w1, x1, y1, z1} A={0, u2} , B={w2, x2, y2, z2} Then by lemma 9.3.5, [(UA + u1), (VB)] is a codeword Since |UA + u1|  2, so d ([(UA + u1), (VB)] , [(UA), (VB)])  4 But min. distance is 6. So [(U), (V)] + [(A), (B)] is not a codeword, P(r) is not a linear code.

  35. Preparata Codes • [4] Encoding extended Preparata codes • Parity-check matrix of 2 error-correcting BCH code • Define A : the submatrix of H formed by the last 2r rows H’ : the submatrix of H formed by deleting the last 2r rows from H

  36. GF(23) using 1+x+x3 word power of  000 0 100 0 010 1 001 2 110 3 011 4 111 5 101 6 Preparata Codes • Eg.9.4.1 Construct GF(23) using 1+x+x3, we have

  37. Preparata Codes • Let m = mL,mR be any binary word of length 2r+1- 2r – 2, where mLis of length 2r - 1 mRis of length 2r- 2r – 1 then by using polynomial notation for mLand mR we have [mL(),mL(3)]  mLH [mR(),mR(3)]  mRH’ Define vR = [mL() + mR(), mL(3) + (mL())3+ mR(3)]A-1

  38. Preparata Codes • Thm. 9.4.2 Let r be odd. For any m of length 2r+1- 2r – 2, if (U)=[mL, pL] and (V)=[mR, vR, pR] , where pL and pR are parity check digits. Then [(U), (V)] is a codeword in P(r) Pf: [mR, vR]H = [mR]H’ + [vR]A = [mR(), mR(3)] + [mL() + mR(), mL(3) + (mL())3+ mR(3)] = [mL(), mL(3) + (mL())3] But [mR, vR]H = [vVv, vVv3] Similarly, mL() = uUu and mL(3) + (mL())3 = uUu3 + (uUu)3 Therefore Def.9.3.3(ii)(iii) hold, and clearly (i)(iv) hold.

  39. Preparata Codes • Coro.9.4.3 P(r) has 2^(2r+1- 2r – 2) codewords. • Algo.9.4.4 (Encoding P(r)) Let mL and mR be words of length 2r-1 and 2r-2r-1 resp. Let vR be as defined in Thm 9.4.2. Then [mL, pL, mR, vR, pR] is a codeword of m=[mL, mR]

  40. Preparata Codes • [5] Decoding extended Preparata codes • w = [wL, pL, wR, pR] be a received word where wL and wR are both of length 2r-1 Then we can compute [wL(), wL(3)] = wLH [wR(), wR(3)] = wRH consider 6 cases (1) If error only occurred on parity check digits wL() = wR() wL(3) +(wL())3 = wR(3) and is easily checked

  41. Preparata Codes (2) If there are no errors in wL, one error in position i of wR and at most one error in the parity check digits Then wL() = wR() + i wL(3) +(wL())3 = wR(3) + 3i so (wL() + wR())3 = wL(3) +(wL())3 + wR(3) and i = wL() + wR() (3) If there are no errors in wR, one error in position i of wL and at most one error in the parity check digits By lemma 9.3.8(i) , we can check that (wR() + wL())3 = wR(3) +(wR())3 + wL(3) and i = wL() + wR()

  42. (4) If two errors occur in wR, say in the position i and j wL() = wR() + i + j wL(3) +(wL())3 = wR(3) + 3i + 3j so i + j and 3i + 3j are known. i and j can be found in the same method in BCH decoding (5) If two errors occur in wL, say in the position i and j same as (4) (6) If one error in wL and one in wR, say in position i and j resp. Then wL() + i = wR() + j wL(3) + 3i +(wL() + i )3 = wR(3) + 3j First, Let j = wL() + i + wR() wL(3) + 3i +(wL() + i )3 = wR(3) + (wL() + i + wR())3 so (i + wR())3 = (wL(3) + wR(3)) + (wL() + wR())3 + wL()3 + wR()3 =  Therefore i = wR() + 1/3 j = wL() + 1/3

More Related