Berlekamp–Welch algorithm
The Berlekamp–Welch algorithm, also known as the Welch–Berlekamp algorithm, is named for Elwyn R. Berlekamp and Lloyd R. Welch. The algorithm efficiently corrects errors in BCH codes and Reed–Solomon codes (which are a subset of BCH codes). Unlike many other decoding algorithms, and in correspondence with the code-domain Berlekamp–Massey algorithm that uses syndrome decoding and the dual of the codes, the Berlekamp–Welch decoding algorithm provides a method for decoding Reed–Solomon codes using just the generator matrix and not syndromes.
History on decoding Reed–Solomon codes
- In 1960, Peterson came up with an algorithm for decoding BCH codes.[1][2] His algorithm solves the important second stage of the generalized BCH decoding procedure and is used to calculate the error locator polynomial coefficients that in turn provide the error locator polynomial. This is crucial to the decoding of BCH codes.
- In 1963, Gorenstein–Zierler saw that BCH codes and Reed–Solomon codes have a common generalization and that the decoding algorithm extends to more general situation.
- In 1968 / 69, Elwyn Berlekamp invented an algorithm for decoding BCH codes. James Massey recognized its application to linear feedback shift registers and simplified the algorithm.[3][4] Massey termed the algorithm the LFSR Synthesis Algorithm (Berlekamp Iterative Algorithm) but it is now known as the Berlekamp–Massey algorithm.
- 	In 1986, The Welch–Berlekamp algorithm was developed to solve the decoding equation of Reed–Solomon codes, using a fast method to solve a certain polynomial equation. The Berlekamp – Welch algorithm has a running time complexity of  . We will in the following sections look at the Gemmel and Sudan’s exposition of the Berlekamp Welch Algorithm.[5] . We will in the following sections look at the Gemmel and Sudan’s exposition of the Berlekamp Welch Algorithm.[5]
Error locator polynomial of Reed–Solomon codes
In the problem of decoding Reed–Solomon codes, the inputs are pair wise distinct evaluation points  where
 where  with dimension
 with dimension  and distance
 and distance  and a codeword
 and a codeword  Our goal is to describe an algorithm that can correct
 Our goal is to describe an algorithm that can correct  many errors in polynomial time. To do so we have to find
 many errors in polynomial time. To do so we have to find ![P \in \mathbb{F}[X]](../I/m/8f7c57d82bcc2d492855bd481fc45197.png) such that
 such that  and the number of indices for which
 and the number of indices for which  is less than or equal to
 is less than or equal to  We can assume that there exists a polynomial
 We can assume that there exists a polynomial  such that
 such that
Note that the coefficients of  are the encoded information. To solve this, we use an indicator for those indices where an error may have occurred. Thus we define an error locator polynomial,
 are the encoded information. To solve this, we use an indicator for those indices where an error may have occurred. Thus we define an error locator polynomial, ![E \in \mathbb{F}[X],](../I/m/182e8769d67e95287dcbe2c3a4a3c94d.png) by:
 by:
Note that  We can also claim that
 We can also claim that  holds for all
 holds for all  . This fact holds true because in the event of
. This fact holds true because in the event of  , both sides of the above equation vanish because
, both sides of the above equation vanish because  .
.
However, since  and
 and  are both unknown, the main task of the decoding algorithm would be to find
 are both unknown, the main task of the decoding algorithm would be to find  . To do this we use a seemingly useless yet very powerful method and define another polynomial
. To do this we use a seemingly useless yet very powerful method and define another polynomial  This is because the
 This is because the  equations with
 equations with  we need to solve are quadratic in nature. Thus by defining a product of two variables that gives rise to a quadratic term as one unknown variable, we increase the number of unknowns but make the equations linear in nature. This method is called linearization[6] and is a very powerful tool.
 we need to solve are quadratic in nature. Thus by defining a product of two variables that gives rise to a quadratic term as one unknown variable, we increase the number of unknowns but make the equations linear in nature. This method is called linearization[6] and is a very powerful tool.
Thus ![Q \in \mathbb{F}[X]](../I/m/d87035b4b12731e3fa93770d93ef696f.png) having the properties:
 having the properties:
This helps because if we now manage to find  and
 and  , we can easily find
, we can easily find  using
 using  .  The main purpose of the Berlekamp Welch algorithm is to find out
.  The main purpose of the Berlekamp Welch algorithm is to find out  using degree bounded polynomials
 using degree bounded polynomials  and
 and  and the properties of
 and the properties of  and
 and  .
.
Computing  is as hard as finding the end solution
 is as hard as finding the end solution  Once
 Once  is computed, using erasure decoding for Reed–Solomon codes, we can easily recover
 is computed, using erasure decoding for Reed–Solomon codes, we can easily recover  . However, in a few cases, even the polynomial
. However, in a few cases, even the polynomial  is as hard to find as
 is as hard to find as  . As an example, given
. As an example, given  and
 and  (such that
 (such that  for
 for  ), by checking positions where
), by checking positions where  , we can find the error locations. Thus the algorithm works on the principle that while each of the polynomials
, we can find the error locations. Thus the algorithm works on the principle that while each of the polynomials  and
 and  are hard to find individually; computing them together is much easier.
 are hard to find individually; computing them together is much easier.
The Berlekamp–Welch decoder and algorithm
The Welch–Berlekamp decoder for Reed–Solomon codes consists of the Welch– Berlekamp algorithm augmented by some additional steps that prepare the received word for the algorithm and interpret the result of the algorithm.
The inputs given to the Berlekamp Welch decoder are the integers denoting Block Length  the number of errors
 the number of errors  such that
 such that  and the received word
 and the received word  satisfying the condition that there exists at most one
 satisfying the condition that there exists at most one  with
 with  with
 with  .
.
The output of the decoder is either the polynomial  , or in some cases, a failure. This decoder functions in two steps as follows:
, or in some cases, a failure. This decoder functions in two steps as follows:
-  This step is called the interpolation step in which the decoder computes a non zero polynomial  of degree of degree (This implies that the coefficient of (This implies that the coefficient of must be 1[7]) and another polynomial must be 1[7]) and another polynomial with with These polynomials are created such that the condition These polynomials are created such that the condition for all for all In the case that polynomials satisfying the above condition cannot be computed, the output of the decoder would be a failure. In the case that polynomials satisfying the above condition cannot be computed, the output of the decoder would be a failure.
-  If  then a then a is defined which equals is defined which equals If If then the decoder outputs then the decoder outputs If the above condition is not satisfied, i.e. if If the above condition is not satisfied, i.e. if then a failure is returned by the decoder. then a failure is returned by the decoder.
According to the algorithm, in the cases where it does not output a failure, it outputs a  that is the correct and desired polynomial. To prove that, the algorithm always outputs the desired polynomial, we need to prove a few claims we have made while describing the algorithm. Let us go ahead and do so now.
 that is the correct and desired polynomial. To prove that, the algorithm always outputs the desired polynomial, we need to prove a few claims we have made while describing the algorithm. Let us go ahead and do so now.
- Claim 1. There exist a pair of polynomials,  that satisfy Step 1 of the BW algorithm and that satisfy Step 1 of the BW algorithm and 
Let  be the error-locating polynomial for
 be the error-locating polynomial for  :
 :
Notice that  has the following properties by definition:
 has the following properties by definition:
Now define  and note that:
 and note that:
We can now claim that  from the first step of the BW algorithm holds. If
 from the first step of the BW algorithm holds. If  then
 then  . For
. For  we have
 we have  and therefore
 and therefore  just as we claimed.
 just as we claimed.
This above claim however just reiterates and proves the fact that there exists a pair of polynomials  and
 and  such that
 such that  It however does not necessarily guarantee the fact that the algorithm we discussed above would indeed output such a pair of polynomials. We therefore move on to look at another claim that helps establish this fact using the above claim and thereby proving the correctness of the algorithm.
 It however does not necessarily guarantee the fact that the algorithm we discussed above would indeed output such a pair of polynomials. We therefore move on to look at another claim that helps establish this fact using the above claim and thereby proving the correctness of the algorithm.
- Claim 2. If  are two distinct solutions that satisfy the first step of the Berlekamp Welch algorithm, then we have are two distinct solutions that satisfy the first step of the Berlekamp Welch algorithm, then we have 
First note that
Then we define:
Note that  From step 1 of the Berlekamp Welch algorithm we also know that
 From step 1 of the Berlekamp Welch algorithm we also know that  and
 and  Now for all
 Now for all  we calculate:
 we calculate:
Thus  has
 has  roots, on the other hand
 roots, on the other hand
Therefore,  is the zero polynomial which means that
 is the zero polynomial which means that  and
 and  are identical. Since
 are identical. Since  are non-zero we can write:
 are non-zero we can write:  as per our initial claim.
 as per our initial claim.
Thus based on the above claims, we can safely state that the output of the Berlekamp Welch algorithm, when outputting the polynomial  is correct.
 is correct.
We can now claim that the algorithm can be implemented such that it has a running time of  . This can be proved as follows: In Step 1 of the algorithm, the polynomials
. This can be proved as follows: In Step 1 of the algorithm, the polynomials  and
 and  have
 have  and
 and  unknown values respectively and the constraints
 unknown values respectively and the constraints  for all
 for all  acts as a linear equation with these unknowns. We therefore get a system of
 acts as a linear equation with these unknowns. We therefore get a system of  linear equations in
 linear equations in  unknowns. Using our first claim, this system of equations has a solution since
 unknowns. Using our first claim, this system of equations has a solution since  This can be solved in
 This can be solved in  time, by say Gaussian elimination. Finally, we can note that Step 2 of the algorithm can also be implemented in time
 time, by say Gaussian elimination. Finally, we can note that Step 2 of the algorithm can also be implemented in time  by "long division" method.  Hence we can state that the Berlekamp Welch algorithm can be used to uniquely decode any
 by "long division" method.  Hence we can state that the Berlekamp Welch algorithm can be used to uniquely decode any ![[n,k]_q](../I/m/0e2e8aa83a5c98cfb23abcec8cb69824.png) Reed–Solomon code in
 Reed–Solomon code in  time for a maximum of
 time for a maximum of  errors.
 errors.
Example
_with_an_Error_Locator_Polynomial.png)
Consider a simple example where a redundant set of points are used to represent the line  , and one of the points is incorrect. The points that the algorithm gets as an input are
, and one of the points is incorrect. The points that the algorithm gets as an input are  , where
, where  is the defective point. The algorithm must solve the following system of equations:
 is the defective point. The algorithm must solve the following system of equations:
Given a solution pair  to this system of equations, it is evident that at any of the points
  to this system of equations, it is evident that at any of the points  one of the following must be true:
 one of the following must be true:
Since  is defined as only having a degree of one, the former can only be true in one point. Therefore,
 is defined as only having a degree of one, the former can only be true in one point. Therefore,  at the three other points.
 at the three other points.
Letting  and
 and  we can rewrite the system:
 we can rewrite the system:
This system can be solved through Gaussian elimination, and gives the values:
Thus:
 fits three of the four points given, so it is the most likely to be the original polynomial.
 fits three of the four points given, so it is the most likely to be the original polynomial.
See also
References
- ↑ Berlekamp, Elwyn R. (1967), Nonbinary BCH decoding, International Symposium on Information Theory, San Remo, Italy
- ↑ Berlekamp, Elwyn R. (1984) [1968], Algebraic Coding Theory (Revised ed.), Laguna Hills, CA: Aegean Park Press, ISBN 0-89412-063-8. Previous publisher McGraw–Hill, New York, NY.
- ↑ Massey, J. L. (1969), "Shift-register synthesis and BCH decoding", IEEE Trans. Information Theory, IT-15 (1): 122–127
- ↑  Ben Atti, Nadia; Diaz-Toca, Gema M.; Lombardi, Henri, The Berlekamp–Massey Algorithm revisited, CiteSeerX: 10.1 .1 .96 .2743 
- ↑ Highly resilient correctors for polynomials – Peter Gemmel and Madhu Sudan's Exposition.
- ↑ A provable example of the linearization method – Dick Lipton
- ↑ Atri, Rudra. "Error Correcting Codes: Combinatorics, Algorithms and Applications" (PDF). CSE_BUFFALO. Retrieved 2014-12-12.
External links
- MIT Lecture Notes on Essential Coding Theory – Dr. Madhu Sudan
- 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
- US 4,633,470, Welch, Lloyd R. & Elwyn R. Berlekamp, "Error Correction for Algebraic Block Codes", published September 27, 1983, issued December 30, 1986 – The patent by Lloyd R. Welch and Elewyn R. Berlekamp















