Majority Logic Decoding of Reed-Muller Codes
Majority Logic Decoding of RM Codes
A key advantage of Reed-Muller codes is their amenability to an efficient, iterative decoding method known as majority logic decoding. This procedure systematically recovers the coefficients of the original message polynomial, starting from the highest degree and working downwards. For an RM(r,m) code, this algorithm can correct up to t=⌊(dmin−1)/2⌋ errors, where the minimum distance dmin is 2m−r.
Throughout this section, we will use the RM(2,4) code as our running example.
- Parameters: m=4,r=2.
- Minimum Distance: dmin=24−2=4.
- Error Correction Capability: t=⌊(4−1)/2⌋=1. The decoder can reliably correct any single-bit error in the received vector.
1. Finding High-Degree Coefficients in a Noiseless Codeword
The decoding process begins by isolating the coefficients of the monomials with the highest degree, r. In a noiseless setting, this can be done with a simple summation. The key idea is to sum specific bits of the codeword in a way that cancels out the influence of all lower-degree monomials.
First, let's define the tools we need:
Monomial Index Set (S): For a monomial M=∏i∈SXi, the set S contains the indices of the variables present in that monomial. For the monomial M=X1X2, the index set is S={1,2}. The set of uninvolved variable indices is its complement, Sc={3,4}.
Check Set (VS(b)): A check set for the coefficient aS is a collection of codeword coordinates. It is defined by fixing the values of the uninvolved variables (those with indices in Sc) to a constant binary vector b.
V_S(b)={v∈F_2m∣the components of v corresponding to indices in Sc are equal to b}
When we sum the evaluations of a polynomial f(X) over a check set, a fundamental property of Boolean algebra ensures that any monomial with degree less than the size of the set (here, degree <r) will evaluate to one an even number of times. Thus, its sum is zero in F2. The only term that may have a non-zero sum is the highest-degree monomial matching the variables of the check set. This allows us to isolate its coefficient.
Example: Finding a12 in a Noiseless RM(2,4) Codeword
Let the message polynomial be f(X)=X1X2+X3. Its noiseless codeword is:
C=(0,0,1,1, 0,0,1,1, 0,0,1,1, 1,1,0,0)
To find the coefficient a12, we can use any check set for this monomial. Let's choose the one where the uninvolved variables (X3,X4) are fixed to b=(0,0). The check set is V12(0,0)={(0000),(0100),(1000),(1100)}. The check sum is:
Sum=C∗(0000)+C∗(0100)+C∗(1000)+C∗(1100)=0+0+0+1=1
This sum directly gives us the coefficient: a12=1.
2. Decoding High-Degree Coefficients from a Noisy Codeword
When the received vector Y contains errors, a single check sum can be misleading. Majority logic overcomes this by using multiple, disjoint check sets to vote on the correct coefficient value. For a monomial of degree r, we can generate 2m−r disjoint check sets. For an RM(r,m) code with minimum distance dmin=2m−r, if the number of errors is at most t=(dmin−1)/2, a majority of the check sums will still yield the correct value.
3. The General Iterative Decoding Algorithm
The full decoding algorithm is an iterative process that decodes coefficients in stages, from the highest degree r down to 0. It uses a "decode and peel" strategy.
Input: A received vector Y of length n=2m.
Output: The decoded message polynomial f^(X).
Initialization:
- Set the current degree to decode: i=r.
- Initialize the working vector: Yr=Y.
- Initialize the final decoded polynomial: f^(X)=0.
Iterative Loop (from i=r down to 0):
Decode Coefficients of Degree i:
- For each of the (im) monomials MS of degree i:
a. Generate all 2m−i disjoint check sets VS(b) by letting b range over all vectors in F2m−i.
b. For each check set, compute a check sum (an estimate) by summing the values of the current working vector Yi over the coordinates in that set.
c. Determine the coefficient a^S by taking the majority vote of the 2m−i estimates.
Form Degree-i Polynomial:
- Construct the polynomial containing all the just-decoded terms of degree i:
f^i(X)=∣S∣=i∑a^_SMS
Update Final Polynomial:
- Add this part to the overall result: f^(X)=f^(X)+f^i(X).
"Peel Off" and Prepare for Next Stage:
- Generate the codeword for the degree-i polynomial: Ci=Eval(f^i).
- Create the working vector for the next lower degree by subtracting this contribution (using XOR):
Y_i−1=Y_i+C_i
Decrement:
- Set i=i−1 and repeat the loop until all degrees down to 0 have been processed.
A Detailed Example: Full Decoding of an RM(2,4) Vector
Let's apply the general algorithm to our example. Suppose a single error flips the first bit of the codeword for f(X)=X1X2+X3. The received vector is:
Y=(1,0,1,1, 0,0,1,1, 0,0,1,1, 1,1,0,0)
Stage 1: Decode Degree 2 (i=2)
We begin with the working vector Y2=Y. We decode all (24)=6 degree-2 coefficients.
- For a^12 (fix X3,X4):
- v3,v4=0,0: Y(0000)+Y(0100)+Y(1000)+Y(1100)=1+0+0+1=0.
- v3,v4=0,1: Y(0001)+Y(0101)+Y(1001)+Y(1101)=0+0+0+1=1.
- v3,v4=1,0: Y(0010)+Y(0110)+Y(1010)+Y(1110)=1+1+1+0=1.
- v3,v4=1,1: Y(0011)+Y(0111)+Y(1011)+Y(1111)=1+1+1+0=1.
- Estimates: (0,1,1,1)⟹ Majority: 1.
- For a^13 (fix X2,X4):
- v2,v4=0,0: Y(0000)+Y(0010)+Y(1000)+Y(1010)=1+1+0+1=1.
- v2,v4=0,1: Y(0001)+Y(0011)+Y(1001)+Y(1011)=0+1+0+1=0.
- v2,v4=1,0: Y(0100)+Y(0110)+Y(1100)+Y(1110)=0+1+1+0=0.
- v2,v4=1,1: Y(0101)+Y(0111)+Y(1101)+Y(1111)=0+1+1+0=0.
- Estimates: (1,0,0,0)⟹ Majority: 0.
- For a^14 (fix X2,X3):
- v2,v3=0,0: Y(0000)+Y(0001)+Y(1000)+Y(1001)=1+0+0+0=1.
- v2,v3=0,1: Y(0010)+Y(0011)+Y(1010)+Y(1011)=1+1+1+1=0.
- v2,v3=1,0: Y(0100)+Y(0101)+Y(1100)+Y(1101)=0+0+1+1=0.
- v2,v3=1,1: Y(0110)+Y(0111)+Y(1110)+Y(1111)=1+1+0+0=0.
- Estimates: (1,0,0,0)⟹ Majority: 0.
- For a^23 (fix X1,X4):
- v1,v4=0,0: Y(0000)+Y(0010)+Y(0100)+Y(0110)=1+1+0+1=1.
- v1,v4=0,1: Y(0001)+Y(0011)+Y(0101)+Y(0111)=0+1+0+1=0.
- v1,v4=1,0: Y(1000)+Y(1010)+Y(1100)+Y(1110)=0+1+1+0=0.
- v1,v4=1,1: Y(1001)+Y(1011)+Y(1101)+Y(1111)=0+1+1+0=0.
- Estimates: (1,0,0,0)⟹ Majority: 0.
- For a^24 (fix X1,X3):
- v1,v3=0,0: Y(0000)+Y(0001)+Y(0100)+Y(0101)=1+0+0+0=1.
- v1,v3=0,1: Y(0010)+Y(0011)+Y(0110)+Y(0111)=1+1+1+1=0.
- v1,v3=1,0: Y(1000)+Y(1001)+Y(1100)+Y(1101)=0+0+1+1=0.
- v1,v3=1,1: Y(1010)+Y(1011)+Y(1110)+Y(1111)=1+1+0+0=0.
- Estimates: (1,0,0,0)⟹ Majority: 0.
- For a^34 (fix X1,X2):
- v1,v2=0,0: Y(0000)+Y(0001)+Y(0010)+Y(0011)=1+0+1+1=1.
- v1,v2=0,1: Y(0100)+Y(0101)+Y(0110)+Y(0111)=0+0+1+1=0.
- v1,v2=1,0: Y(1000)+Y(1001)+Y(1010)+Y(1011)=0+0+1+1=0.
- v1,v2=1,1: Y(1100)+Y(1101)+Y(1110)+Y(1111)=1+1+0+0=0.
- Estimates: (1,0,0,0)⟹ Majority: 0.
Degree-2 Conclusion: The decoded degree-2 polynomial is f^2(X)=X1X2. Now we peel it off.
- Generate its codeword: C2=Eval(X1X2)=(0,0,0,0, 0,0,0,0, 0,0,0,0, 1,1,1,1).
- Update our working vector for the next stage: Y1=Y2+C2=(1,0,1,1, 0,0,1,1, 0,0,1,1, 0,0,1,1).
Stage 2: Decode Degree 1 (i=1)
We now use Y1 to decode degree-1 coefficients. We are targeting an RM(1,4) code (dmin=8), so we get 8 estimates for each coefficient.
- For a^1 (fix X2,X3,X4):
- v2,v3,v4=0,0,0: Y1′(0000)+Y1′(1000)=1+0=1.
- v2,v3,v4=0,0,1: Y1′(0001)+Y1′(1001)=0+0=0.
- v2,v3,v4=0,1,0: Y1′(0010)+Y1′(1010)=1+1=0.
- v2,v3,v4=0,1,1: Y1′(0011)+Y1′(1011)=1+1=0.
- v2,v3,v4=1,0,0: Y1′(0100)+Y1′(1100)=0+0=0.
- v2,v3,v4=1,0,1: Y1′(0101)+Y1′(1101)=0+0=0.
- v2,v3,v4=1,1,0: Y1′(0110)+Y1′(1110)=1+1=0.
- v2,v3,v4=1,1,1: Y1′(0111)+Y1′(1111)=1+1=0.
- Estimates: (1,0,0,0,0,0,0,0)⟹ Majority: 0.
- For a^2 (fix X1,X3,X4):
- v1,v3,v4=0,0,0: Y1′(0000)+Y1′(0100)=1+0=1.
- The other 7 sums will be 0.
- Estimates: (1,0,0,0,0,0,0,0)⟹ Majority: 0.
- For a^3 (fix X1,X2,X4):
- v1,v2,v4=0,0,0: Y1′(0000)+Y1′(0010)=1+1=0.
- The other 7 sums will be 1.
- Estimates: (0,1,1,1,1,1,1,1)⟹ Majority: 1.
- For a^4 (fix X1,X2,X3):
- v1,v2,v3=0,0,0: Y1′(0000)+Y1′(0001)=1+0=1.
- The other 7 sums will be 0.
- Estimates: (1,0,0,0,0,0,0,0)⟹ Majority: 0.
Degree-1 Conclusion: The decoded degree-1 polynomial is f^1(X)=X3. We peel it off.
- Generate its codeword: C1=Eval(X3)=(0,0,1,1, 0,0,1,1, 0,0,1,1, 0,0,1,1).
- Update the vector for the final stage: Y0=Y1+C1=(1,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0).
Stage 3: Decode Degree 0 (i=0)
- To find the constant term a0, we take a majority vote of all 16 bits in Y0. There is one '1' and fifteen '0's.
- The majority is 0, so a^0=0. The decoded degree-0 polynomial is f^0(X)=0.
Final Result:
By summing the polynomials from each stage, we reconstruct the original message:
f^(X)=f^_2(X)+f^_1(X)+f^_0(X)=X1X2+X3+0=X1X2+X3