Reed-Muller Codes
8911635 Lee, Yelin 8911613 Hou, Xin-Anne National Chiao Tung University
1. Original of Reed-Muller Codes
Discovered by Muller, 1954 Decoding algorithm by Reed Flexibility in multiple errors Application: Mariner and Viking exploration to mars
2. Construction of RM Codes
Use Boolean truth table as vector, for codeword of order 2
f = v3 + v1v2 + v1v3 + v2v3
Where v means vector and f is the codeword
Function f 0 0 0 1 1 0 0 0
m i =1
m vectors, m = 3 v3 v2 v1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
m i , j= 1 , j>1
2
m
Use linear combination of each m vectors 1vector 2vectors v 0 = (1 1 . 1) Linear independent vectors Order = maximum multiplies
f = m 0 v 0 + m i vi + m i , jvi v j + .... + m 1, 2 , 3 ,... m v 1v 2 ... v m
m vectors
Only one unique combination of mi
Generator matrix of r(r,m)
R( r , m) = v0 v1 . . . vm v1v2 v1v3 . . . vm1vm . . .
Dimension:
Example
m m m k = 1+ 1 + 2 + .... + r
R(2,4)
1 0 0 4 0 3 2 0 0 1 R ( 2, 4 ) = 4 3 = 0 4 2 0 4 1 0 3 2 3 1 0 2 1 0 0
v v v v v v v v v v v
v v v v v v
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
Dimensions:
4 4 1 + + = 1 + 4 + 6 = 11 1 2
3. Encoding and Decoding of RM Codes
3.1Encoder for RM(1,3) using digital counter
m m m
m
t
Digital counter
Clock
c = (c0, c1,.....c15)
= m0 | m1 | m 2 G1 G2
1 0 0 0 0 2 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0
3.2 Decoding using Reed algorithm for GR(2,4)
= m0 v 0 + m 4v 4+ ... + m1v1 + m43v 4v 3 + ... + m 21v 2v1 G0
= m0 | m1 | m
1 0 0 1 0 0 0 0 0 0 0
1 0 0 1 1 0 0 0 0 0 1
1 0 1 0 0 0 0 0 0 0 0
1 0 1 0 1 0 0 0 0 1 0
4
1 0 1 1 0 0 0 0 1 0 0
1 0 1 1 1 0 0 0 1 1 1
1 1 0 0 0 0 0 0 0 0 0
1 1 0 0 1 0 0 1 0 0 0
1 1 0 1 0 0 1 0 0 0 0
1 1 0 1 1 0 1 1 0 0 1
1 1 1 0 0 1 0 0 0 0 0
1 1 1 0 1 1 0 1 0 1 0
1 1 1 1 0 1 1 0 1 0 0
1 1 1 1 1 1 1 1 1 1 1
G0 G1
G2
First, calculate the vector m2 in order by the following equations. r0 = m0 + e0 r1 = m0 + m1 + e1 r2 = m0 + m2 + e2 r3 = m0 + m2 + m1 + m21 + e3 r4 = m0 + m3 + e4 r5 = m0 + m3 + m1 + m31 + e5 r6 = m0 + m3 + m2 + m32 + e6 r7 = m0 + m3 + m2 + m1 + m32 + m31 + m21 + m0 + e7 r8 = m0 + m4 + e8 r9 = m0 + m4 + m1 + m41 + e9 r10 = m0 + m4 + m2 + m42 + e10 r11 = m0 + m4 + m2 + m1 + m42 + m41 + m21 + e11 r12 = m0 + m4 + m3 + m43 + e12 r13 = m0 + m4 + m3 + m1 + m43 + m41 + m31 + e13 r14 = m0 + m4 + m3 + m2 + m43 + m42 + m32 + e14
r15 = m0 + m4 + m3 + m2 + m1 + m43 + m42 + m41 + m32 + m31 + m21 + e15
If no error, m2 can be recovered from solving above equations by voting : m21 = r0 + r1 + r2 + r3 = r 4 + r5 + r6 + r7 = r8 + r9 + r10 + r11 = r12 + r13 + r14 + r15 m32 = r0 + r2 + r4 + r6 = r 1 + r3 + r5 + r7 = r8 + r10 + r12 + r14 = r9 + r11 + r13 + r15 m42 = r0 + r2 + r9 + r10 = r1 + r3 + r9 + r11 = r4 + r6 + r12 + r14 = r5 + r7 + r13 + r15 m31 = r0 + r1 + r4 + r5 = r 2 + r3 + r6 + r7 = r8 + r9 + r11 + r12 = r10 + r11 + r14 + r15 m41 = r0 + r2 + r9 + r10
5
= r1 + r3 + r9 + r11 = r4 + r6 + r12 + r14 = r5 + r7 + r13 + r15 m43 = r0 + r1 + r4 + r5 = r 2 + r3 + r6 + r7 = r8 + r9 + r11 + r12 = r10 + r11 + r14 + r15 Then we may consider the code without 2-nd order message bit with (1) r = r ( m43v 4 v 3 + .... + m 21v 2 v1)
As the same, we can get first order equations .
r0(1) = m0 , r2 (1) = m0 + m2 , r4 (1) = m0 + m3 , r6 (1) = m0 + m3 + m2 , r8 (1) = m0 + m4 , r10 (1) = m0 + m4 + m2 , r12 (1) = m0 + m4 + m3 r14 (1) = m0 + m4 + m3 + m2 , r1 (1) = m0 + m1 , r3 (1) = m0 + m2 + m1 r5 (1) = m0 + m3 + m1 r7 (1) = m0 + m3 + m2 + m1 r9 (1) = m0 + m4 + m1 r11 (1) = m0 + m4 + m2 + m1 r13 (1) = m0 + m4 + m3 + m1 r15 (1) = m0 + m4 + m3 + m2 + m1
Then we may derive the following equations about first order message bits. (1) (1) (1) (1) (1) (1) (1) (1) = r 4 + r5 = r6 + r 7 m1 = r0 + r1 = r2 + r3 (1) (1) (1) (1) (1) (1) (1) (1) =r8 + r9 = r10 + r11 = r12 + r13 = r14 + r15 m2 = r 2 + r8 = r3 + r 7 = r 0 + r 4 = r1 + r 5 (1) (1) (1) (1) (1) (1) (1) (1) = r10 + r14 = r11 + r15 = r8 + r12 = r9 + r13 = r 4 + r6 = r5 + r 7 = r 0 + r 2 = r1 + r 3 (1) (1) (1) (1) (1) (1) (1) (1) = r12 + r14 = r13 + r15 = r8 + r10 = r9 + r11
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
m3
m4
= r2 + r10 = r3 + r11 = r 0 + r 8 = r1 + r 9 (1) (1) (1) (1) (1) (1) (1) (1) = r6 + r14 = r7 + r15 = r4 + r12 = r5 + r13 Then finally we have the codeword decoded.
( 2)
=r
(1)
( m4 v 4 + m 3v 3 + m 2v 2 + m1v1), r
6
(2)
= m0
3.3 Decoding using Hadmard Transform
A generalized Fourier transform in abelian groups defined as
where
H 2 i 1 H 2i = H 2 i 1
H 2 i 1 H 2 i 1
1 1 H2 = 1 1
Hadmard algorithm for RM(1,m) Step1: Compute -> 1
* * y from received word r
by taking 1 -> -1, 0
Step2: Compute Hadmard transform Step3: Find coordinate
* y = yH 2 m
of component
u = (umy,uum1 ,, u0 )
yu
of
which has maximum
^
Step 4.
Codeword is decoded
^ u1v 1 + u 2v 2 + .......um vm , c= 1 + u1v 1 + u 2v 2 + .......um v
Example :
if y u > 0 if y u < 0
^
r = (01000011) for RM(1,3) * Step1: Compute y = (1,-1,1,1,1,1,-1,-1)
Step2: Compute Hadmard transform
* y = yH 2 m
= (2,2,2,2,2,-6,2)
Step3: Component u6 has maximum value, sixth coordinate (110) Step 4. Codeword is decoded
c = 1 + 1v 3 + 1v 2 + 0v1, = (11000011)
y6 < 0
4. SRM codes & GRM codes
4.1 Features
The study of shortened RM(SRM) codes yields additional insight into certain BCH codes to which these RM codes are closely related The low-rate SRM codes of short to moderate block lengths have rates only slightly less than comparable BCH codes And these SRM codes are somewhat easier to decode
4.2 Construction of SRM Codes
Define SRM codes by
j = ji q i
i =0
m 1
where
j {j j N,0 j q m 1} 0 ji q 1 ,
Define weight function of j by
w( j ) = ji
i =0
m 1
SRM(m,r) over GF(q) is a cyclic code In GF(qm), i.e. module
q m 1
Roots are
0 wq ( j ) < (q 1)m r
Example of SRM Codes Take q=2, m=4,and r=1 By definition, we have roots are 1, , , , , , , , , , GF l 0 1 2 3 4 5 6 t
7 8 9 14 2 3 4 5 6
Binary 0000 0001 0010 0100 1000 0011 0110 1100 t ti
GF l 7 8 9 10 11 12 13 14
Binary t 1011 0101 1010 0111 1110 1111 1101 1001 t ti
The table of GF(24) with generated by p(x)=x4+x+1
4.3 Construction of GRM Codes
Shorten generalized Reed-Muller Code (rth-order, length N=qm-1) generator polynomial g(x):
g (x ) =
j j 0 w ( j )< ( q 1)m r , 0 j < q m 1
(x )
j
Where W(j) is the sum of the digits of the q-ary expansion of j is a primitive element in GF(qm)
integer
The dual code of the rth-order GRM code is equivalent to [(q-1)m-r-1]th-order GRM code GRM Codes Properties The rth-order SRM code & the rth-order GRM code are subcodes of the extended BCH code of designated distance respectively. dSRM=qm-r & dGRM=(q-R)q(m-Q-1)
The zeroth-order GRM code is repetition code The first-order GRM code is an extended maximal-length-shift-register code The [(q-1)m-2]th-order GRM code is an extended single-error-correcting BCH code The number of information symbols is given by
m k = i =0 i
r
GRM Codes Encoding The rth-order GRM code is obtain by annexing the all-one vector of length N=qm-1 to generator matrix of shorten code, that is
ones (1, n ) g0 (x ) = g (x ) G ( x ) = g1 ( x ) = xg ( x ) g ( x ) = x k 2 g ( x ) k 2 10
5. Threshold decoding
Utilize parity-check sets to decode or correct received digits Each parity check set is orthogonal to the others The necessary conditions for threshold decoding A t-error-correcting linear code is said to be 1 step-orthogonalizable iff for each i=0, 1, 2,, n-1, the code satisfies a set of 2t parity checks which are orthogonal on position i A code is said to be L-step-orthogonalizable iff the code contains sets of positions P(1), P(2),such that For all i, the code contains 2t parity checks orthogonal on P(1) The subcode of the original code which satisfies these additional parity checks C = 0 for all i is (L-1)-step-orthogonalizable
jP ( i ) i
The Key to Decode GRM Codes Theorem: every RM code of length N=2m is invariant under any permutation which permutes all affine subspaces of GF(2m) over GF(2) into affine subspaces. The group of all such permutations is triply transitive, and its order is
1 : A0 + A1 + A2 2 + A3 3 A3 + ( A0 + A3 ) + A1 2 + A2 3 ( )(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14) 2 : A0 + A1 + A2 2 + A3 3 A0 + A3 + ( A1 + A3 ) 2 + A2 3 ( )(1,2,3,5,6,11,9 )(4,8,14,10,13,12,7 ) 3 : A0 + A1 + A2 2 + A3 3 A0 + A1 + A3 2 + ( A2 + A3 ) 3 ( )(0)(1)(4 )(2,3,6)(5,9,11)(7,10,12)(8,14,13)
(Meaning
, 0 1 2 m 14 0 )
4 : A0 + A1 + A2 2 + A3 3 A0 + A1 + A2 2 + ( A3 + 1) 3 (,3)(0,14 )(1,9 )(2,6)(4,7 )(5,11)(8,13)(10,12 )
11
5.1 Zeroth-order GRM Code Decoding
Count the number of ones among the codes n=2m-1 received digital (channel error <= n/2) More than n/2 received ones -> decide all-one codeword was sent Less than n/2 received ones -> decide all-zero codeword was sent Parity check equations 0 = C0 + C1
0 = C0 0 = C0
C0 is determined by
+ C2 + C3
R1 if E1 = 0 R if E = 0 2 C0 = 2 R3 if E3 = 0
The m-stage primitive FSR is used to reset the counter & issue a signal to switch data sink to read decision of m-bit counter Decoding process The highest bit of the counter is a one iff the received digits include 2m-1 or more ones The highest bit of the counter is emitted as output, and the counter is reset to zero
12
5.2 First-order GRM Code Decoding
Channel error <= 3 The code contains a parity check set of weight 3 including two position(n-1)/2 parity checks of weight 3 which are orthogonal on any given position Ex: m=4 , p(x)=x4+x+1. The seven parity-check sets are 2:{0,1,4},{0,2,8},{0,5,10},{0,6,13},{0,7,9},{0,11,12} C0 is determined by
R3 + R14 R + R 10 C0 = 5 R6 + R13 R7 + R9 if if if if E3 + E14 = 0 R6 + R13 if E6 + E13 = 0 E5 + E10 = 0 R7 + R9 if E7 + E9 = 0 ; E6 + E13 = 0 R11 + R12 if E11 + E12 = 0 R0 if E0 = 0 E7 + E9 = 0
Over BSC with error probability 0<P<1/2 Pr(E0=0)=1-P Pr(Ei+Ej=0)=(1-P)2+P2=>Pr(Ei+Ej=0) < Pr(E0=0) So estimate C0=R0 is more likely to correct Give the estimate C0=R0 an additional vote break four-fourtie
13
5.2.1 Permutation Threshold Decoder
a. 2R0 is added into an initially zero counter b. R1+R4 is computed and added into the counter c. Move to the next positions in order of 2 and repeat bAfter all eight estimates have been computed, C0 is determined as the majority decision e. The codeword is then permuted by cyclic shift, reset the counter, and the process is repeated to determined C1, C2, , Cn-1
5.2.2 Fast Threshold Decoder
Compute all eight estimates simultaneously This is memoryless circuit whose instantaneous output is one iff more than T of its inputs are ones
14
5.2.3 Syndrome Threshold Decoder
The threshold element output is a 1 iff more than T of its inputs are 1 The output of the threshold element is E0,, so the output feedbacks to correct the R0 Syndrome digits R0+R1+R4, R0+R2+R8,, R0+R11+R12 is equal to E0+E1+E4, E0+E2+E8,, E0+E11+E12 respectively
5.3 Summary
Disadvantage: In Most codes cannot to be easily orthogonalized In Most codes minimum distances are inferior to the minimum distances of comparable BCH codes Advantage: Easy to implementation Correct many patterns of more than t errors as well as all patterns of <= t errors In many situations, the disadvantage are outweighed by the advantage
15
6. Appendix : Two-step Threshold Decoding of the RM (31,16) code (1/3)
Channel error <=3 3-error-correcting second order RM code of length 31 E0 is obtained as the output of the final six-input threshold element Each input to the final carries an estimate of binary sum of the binary sum of four error value. {E0+E4+E12+E15}, {E0+E8+E24+E30}, {E0+E16+E17+E29}, {E0+E18+E7+E28}, {E0+E20+E21+E22}, {E0+E9+E11+E13}. Each preliminary threshold decision element can compute by its six parity-check sets as shown before {0,4,12,15,1,17,8,13}, {0,4,12,15,2,22,27,9}, . , and so on Under the assumption of channel error <=3, the output of final threshold element is the correct value of E0 If there are four or more channel error, the decoding method may or may not decode correctly
16
7. References
A. M. Kerdock, A class of low rate nonlinear binary codes, Info. and Control, N0.20, pp.182-197,1972 Elwyn R. Berlekamp, Algebra coding theory, Aegean Park Press,1984. Irving S. Reed and Xuemin Chen, Error control coding for data network, Kluwer Academic Publishers, 1999. Alain Poli and Llorenc Huguet, Error correcting codes theory and application, Prentice Hall Masson,1992.
17