Berlekamp–Welch algorithm
{{Short description|Error-correcting algorithm}}
The Berlekamp–Welch algorithm, also known as the Welch–Berlekamp algorithm, is named for Elwyn R. Berlekamp and Lloyd R. Welch. This is a decoder algorithm that efficiently corrects errors in Reed–Solomon codes for an RS(n, k), code based on the Reed Solomon original view where a message is used as coefficients of a polynomial or used with Lagrange interpolation to generate the polynomial of degree < k for inputs and then is applied to to create an encoded codeword .
The goal of the decoder is to recover the original encoding polynomial , using the known inputs and received codeword with possible errors. It also computes an error polynomial where corresponding to errors in the received codeword.
The key equations
Defining e = number of errors, the key set of n equations is
:
Where E(ai) = 0 for the e cases when bi ≠ F(ai), and E(ai) ≠ 0 for the n - e non error cases where bi = F(ai) . These equations can't be solved directly, but by defining Q() as the product of E() and F():
:
and adding the constraint that the most significant coefficient of E(ai) = ee = 1, the result will lead to a set of equations that can be solved with linear algebra.
:
:
:
where q = n - e - 1. Since ee is constrained to be 1, the equations become:
:
resulting in a set of equations which can be solved using linear algebra, with time complexity .
The algorithm begins assuming the maximum number of errors e = ⌊(n-k)/2⌋. If the equations can not be solved (due to redundancy), e is reduced by 1 and the process repeated, until the equations can be solved or e is reduced to 0, indicating no errors. If Q()/E() has remainder = 0, then F() = Q()/E() and the code word values F(ai) are calculated for the locations where E(ai) = 0 to recover the original code word. If the remainder ≠ 0, then an uncorrectable error has been detected.
Example
Consider RS(7,3) (n = 7, k = 3) defined in {{math|GF(7)}} with α = 3 and input values: ai = i-1 : {0,1,2,3,4,5,6}. The message to be systematically encoded is {1,6,3}. Using Lagrange interpolation, F(ai) = 3 x2 + 2 x + 1, and applying F(ai) for a4 = 3 to a7 = 6, results in the code word {1,6,3,6,1,2,2}. Assume errors occur at c2 and c5 resulting in the received code word {1,5,3,6,3,2,2}. Start off with e = 2 and solve the linear equations:
:
b_1 & b_1 a_1 & -1 & -a_1 & -a_1^2 & -a_1^3 & -a_1^4 \\
b_2 & b_2 a_2 & -1 & -a_2 & -a_2^2 & -a_2^3 & -a_2^4 \\
b_3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 q3 \\ q4 \\
\end{bmatrix}
=
\begin{bmatrix}
4\\
2\\
4\\
3\\
3\\
1\\
3\\
\end{bmatrix}
Starting from the bottom of the right matrix, and the constraint e2 = 1:
with remainder = 0.
E(ai) = 0 at a2 = 1 and a5 = 4
Calculate F(a2 = 1) = 6 and F(a5 = 4) = 1 to produce corrected code word {1,6,3,6,1,2,2}.
See also
External links
- [http://people.csail.mit.edu/madhu/FT02/ MIT Lecture Notes on Essential Coding Theory – Dr. Madhu Sudan]
- [https://web.archive.org/web/20110606191907/http://www.cse.buffalo.edu/~atri/courses/coding-theory/fall07.html University at Buffalo Lecture Notes on Coding Theory – Dr. Atri Rudra]
- Algebraic Codes on Lines, Planes and Curves, An Engineering Approach – Richard E. Blahut
- Welch Berlekamp Decoding of Reed–Solomon Codes – L. R. Welch
- {{cite patent
|inventor1-last= Welch
|inventor1-first= Lloyd R.
|inventor1-link=Lloyd R. Welch
|inventor2-last= Berlekamp
|inventor2-first= Elwyn R.
|inventor2-link= Elwyn Berlekamp
|title= Error Correction for Algebraic Block Codes
|country-code= US
|patent-number= 4,633,470
|publication-date= September 27, 1983
|issue-date= December 30, 1986
|doi=}} – The patent by Lloyd R. Welch and Elewyn R. Berlekamp
{{DEFAULTSORT:Berlekamp-Welch algorithm}}