All published worksheets from http://sagenb.org
Image: ubuntu2004
Decoding BCH Codes
We assume is a narrow-sense BCH code of length and designed distance .
As usual:
- is the codeword sent
- is the error polynomial with weight
- is the recieved word
- is the generator polynomial of .
- The seed, , is a primitive root of unity, with . (the order of is )
- are the roots of
- are the minimal polynomials of
- Parity check matrix obtained as in BCH code worksheet.
Syndromes
Consider the generating roots of . ()
Define .
By the division algorithm:
Hence, .
The Syndrome Polynomial is defined as .
Reconstructing the error
Representing the error as a polynomial:
,
First we want to find the 's, the error location numbers, or error positions.
We can do this by finding the values of . These are called the error locators.
Second, we want to find the error magnitudes at each error location.
For simpliciy of notation let . in the case of binary codes, these are all 1.
Error Locator Polynomial
We find the error locators by finding the roots of a polymonial called the error locator polynomial. The error locators will be the inverses of the roots of this polynomial. ().
There are several algorithms to find the error locator poynomial. A popular one is the Berlekamp-Massey Algorithm. Here we use a very clever and beautiful algorithm developed by Sugiyama.
Define the error evaluator polynomial:
is a polynomial of degree . Expanding as a power series:
Key Equation
This gives us the key equation to solve:
With deg and deg
The roots of are , but .
Thus and are relatively prime polynomials.
The solution to the key equation is unique up to scalar (in ) multiple (see Theorem 8.1.21)
To solve the key equation means to find such pair .
Solving the Key Equation
(Truncated) Extended Euclidean Algorithm:
Proceed with the steps of the Euclidean Algorithm for the polynomials , , but stop when
the remainder has degree . You can the use the Extended Euclidean Algorithm to track back and express this "last" remainder as a linear combinaion of and
, obtaining:
.
satisfying the degree condtitions of the key equation. By the uniqueness property such that
and
Finding the Error Polynomial
The roots of will be the roots of , from which we can deduce the error locations.
Once we find the error locations, we can determine the error magnitudes by solving a linear system of equations over .
simple use of Cramer's Rule gives us:
where is the error evalutator polynomial and is the error locator polynomial.
Example 1
defines a primitive BCH code of length 15 and designed distance 7.
The seed is a root of which we will use to construct .
We want to decode the received word .
.
The generating roots are .
First we compute the syndrome polynomial.
Recall that .
So .
Now we apply the (truncated) extended Euclidean Algorithm.
Working Backwords now:
Before we find the roots of let me give you an idea of how to do the first step of the euclidean algorithm in SAGE.
So we see that .
Now to find the roots of ...
Thus the roots of are
The error locators are the reciprocals. Since , , and .
Since this is a binary code, all of the error magnitutdes are 1.
Thus .
Example 2
defines a ternary, non-primitive, , BCH code of length 13 and designed distance 5.
The seed, , where is a root of which was used to construct .
Decode the received word
The generating roots are with minimal polynomials
, , , .
We compute the syndrome polynomial:
Thus .
Now apply the (truncated) extended Euclidean Algorithm:
Working backwards:
The roots of are
Error locators are the reciprocals: , .
Thus .
Now we need to compute the error magnitudes.
We need to solve a linear system of equations in .
In general, use matrices. Here try values 0,1,2. Soution is .
Thus the error polynomial is
The received word decodes as
Homework #9
Problem 1.
Exercise 8.7 from the text
Problem 2.
Exercise 8.8 from the text
Problem 3.
Exercise 8.19 from the text
Problem 4.
Exercise 8.21 from the text
Problem 5.
Consider a code over .
a) Obtain the generator polynomial of the code.
b) Suppose that the received polynomial is . Determine the most likely word sent.