examples of linear block codes
play

Examples of Linear Block Codes Saravanan Vijayakumaran - PowerPoint PPT Presentation

Examples of Linear Block Codes Saravanan Vijayakumaran sarva@ee.iitb.ac.in Department of Electrical Engineering Indian Institute of Technology Bombay August 18, 2014 1 / 17 Hamming Code Hamming Code For any integer m 3, the code with


  1. Examples of Linear Block Codes Saravanan Vijayakumaran sarva@ee.iitb.ac.in Department of Electrical Engineering Indian Institute of Technology Bombay August 18, 2014 1 / 17

  2. Hamming Code

  3. Hamming Code • For any integer m ≥ 3, the code with parity check matrix consisting of all nonzero columns of length m is a Hamming code • For m = 3   1 0 0 1 0 1 1 H = 0 1 0 1 1 0 1   0 0 1 0 1 1 1 • For m = 4   1 0 0 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1   H =   0 0 1 0 0 1 0 1 0 1 1 0 1 1 1   0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 • Length of the code n = 2 m − 1 • Dimension of the code k = 2 m − m − 1 • Minimum distance of the code d min = 3 3 / 17

  4. Hamming’s Approach • Observes that a single parity check can detect a single error • In a block of n bits, m locations are information bits and the remaining n − m bits are check bits • The check bits enforce even parity on subsets of the information bits • In the received block of n bits the check bits are recalculated • If the observed and recalculated values agree write a 0. Otherwise write a 1 • The sequence of n − m 1’s and 0’s is called the checking number and gives the location of the single error • To be able to locate all single bit error locations 2 n 2 n − m ≥ n + 1 = ⇒ 2 m ≤ n + 1 4 / 17

  5. Hamming’s Approach • The LSB of the checking number should enforce even parity on locations 1 , 3 , 5 , 7 , 9 , . . . • The next significant bit should enforce even parity on locations 2 , 3 , 6 , 7 , 10 , . . . • The third significant bit should enforce even parity on locations 4 , 5 , 6 , 7 , 12 , . . . • For n = 7, the bound on m is 2 7 2 m ≤ 7 + 1 = 2 4 • Choose 1 , 2 , 4 as parity check locations and 3 , 5 , 6 , 7 as information bit locations 5 / 17

  6. Exercises Let H be a parity check matrix for a Hamming code. • What happens if we add a row of all ones to H ?   1 0 0 1 0 1 1 0 1 0 1 1 0 1 H ′ =     0 0 1 0 1 1 1   1 1 1 1 1 1 1 • What happens if we delete all columns of even weight from H ?  1 0 0 1  ′′ = H 0 1 0 1   0 0 1 1 6 / 17

  7. Reed-Muller Code

  8. Reed-Muller Code • Let f ( X 1 , X 2 , . . . , X m ) be a Boolean function of m variables • For the 2 m inputs the values of f form a vector v ( f ) ∈ F 2 m 2 • Example: m = 3 and f ( X 1 , X 2 , X 3 ) = X 1 X 2 + X 3 � � v ( f ) = 0 1 0 1 0 1 1 0 • Let P ( r , m ) be the set of all Boolean functions of m variables having degree r or less • The r th order binary Reed-Muller code RM ( r , m ) is given by the vectors � � � � v ( f ) � f ∈ P ( r , m ) � • Is RM ( r , m ) linear? • Length of the code n = 2 m � m � m � � • Dimension of the code k = 1 + + · · · + 1 r 8 / 17

  9. Basis for RM ( 2 , 4 ) � � � � RM ( 2 , 4 ) = v ( f ) � f ∈ P ( 2 , 4 ) � P ( 2 , 4 ) = � 1 , X 1 , X 2 , X 3 , X 4 , X 1 X 2 , X 1 X 3 , X 1 X 4 , X 2 X 3 , X 2 X 4 , X 3 X 4 �   1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1     0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1     0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1     0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1     G = 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1     0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1     0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1      0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1     0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1    0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 9 / 17

  10. Minimum Distance of RM ( r , m ) � � � � • RM ( r , m ) = v ( f ) � f ∈ P ( r , m ) � ⇒ d min ≤ 2 m − r • X 1 X 2 · · · X r ∈ P ( r , m ) = • Let f ( X 1 , . . . , X m ) be a non-zero polynomial of degree at most r f ( X 1 , . . . , X m ) = X 1 X 2 · · · X s + g ( X 1 , . . . , X m ) where X 1 X 2 · · · X s is a maximum degree term in f and s ≤ r • For any assignment of values to variables X s + 1 , . . . , X m in f the result is a non-zero polynomial • For every assignment of values to X s + 1 , . . . , X m , there is an assignment of values to X 1 , . . . , X s where f is non-zero ⇒ d min ≥ 2 m − s ≥ 2 m − r = d min = 2 m − r 10 / 17

  11. Example f 1 ( X 1 , X 2 , X 3 , X 4 ) = X 1 X 2 , f 2 ( X 1 , X 2 , X 3 , X 4 ) = X 1 X 2 + X 2 X 3 + X 3 X 4 + X 1 + X 3 X 1 X 2 X 3 X 4 f 1 ( X 1 , X 2 , X 3 , X 4 ) f 2 ( X 1 , X 2 , X 3 , X 4 ) 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 1 11 / 17

  12. Decoding the RM ( 2 , 4 ) Code  g 0   1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  g 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1         g 2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1         g 3 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1         g 4 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1         G = g 5 = 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1         g 6 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1         0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 g 7         0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 g 8         0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 g 9     g 10 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 A codeword v can be expressed as a linear combination of rows of G 10 � v = � v 0 v 1 v 14 v 15 � = u i g i · · · i = 0 where u i ’s represent message bits 12 / 17

  13. Decoding u 10 u 10 = v 0 + v 1 + v 2 + v 3 u 10 = v 4 + v 5 + v 6 + v 7 u 10 = v 8 + v 9 + v 10 + v 11 u 10 = v 12 + v 13 + v 14 + v 15 Let r = v + e be the received vector. If wt ( e ) = 1, then the following sums have majority equal to u 10 A 1 = r 0 + r 1 + r 2 + r 3 A 2 = r 4 + r 5 + r 6 + r 7 A 3 = r 8 + r 9 + r 10 + r 11 A 4 = r 12 + r 13 + r 14 + r 15 13 / 17

  14. Decoding u 9 u 9 = v 0 + v 1 + v 4 + v 5 u 9 = v 2 + v 3 + v 6 + v 7 u 9 = v 8 + v 9 + v 12 + v 13 u 9 = v 10 + v 11 + v 14 + v 15 If wt ( e ) = 1, then the following sums have majority equal to u 9 A 1 = r 0 + r 1 + r 4 + r 5 A 2 = r 2 + r 3 + r 6 + r 7 A 3 = r 8 + r 9 + r 12 + r 13 A 4 = r 10 + r 11 + r 14 + r 15 14 / 17

  15. Decoding u 4 After decoding u 10 , u 9 , u 8 , u 7 , u 6 , u 5 remove the corresponding basis vectors from r 10 4 r ( 1 ) = r + � � u i g i = u i g i + e i = 5 i = 0 If wt ( e ) = 1, then the following sums have majority equal to u 4 A 1 = r ( 1 ) + r ( 1 ) A 5 = r ( 1 ) + r ( 1 ) 0 1 , 8 9 A 2 = r ( 1 ) + r ( 1 ) A 6 = r ( 1 ) 10 + r ( 1 ) 2 3 , 11 A 3 = r ( 1 ) + r ( 1 ) A 7 = r ( 1 ) 12 + r ( 1 ) 4 5 , 13 A 4 = r ( 1 ) + r ( 1 ) A 8 = r ( 1 ) 14 + r ( 1 ) 6 7 , 15 u 1 , u 2 , u 3 can also be decoded using eight sums 15 / 17

  16. Decoding u 0 After decoding u 1 , . . . , u 10 remove the corresponding basis vectors from r 10 r ( 2 ) = r + � u i g i = u 0 g 0 + e i = 1 There are 16 noisy versions of u 0 whose majority is u 0 if wt ( e ) = 1. This technique is called majority-logic decoding. 16 / 17

  17. Questions? Takeaways? 17 / 17

Recommend


More recommend