30.01.2015 Views

THE ORIGINAL VIEW OF REED-SOLOMON CODES THE ORIGINAL ...

THE ORIGINAL VIEW OF REED-SOLOMON CODES THE ORIGINAL ...

THE ORIGINAL VIEW OF REED-SOLOMON CODES THE ORIGINAL ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

L.R.Welch<br />

<strong>THE</strong> <strong>ORIGINAL</strong> <strong>VIEW</strong><br />

<strong>OF</strong><br />

<strong>REED</strong>-<strong>SOLOMON</strong> <strong>CODES</strong><br />

<strong>THE</strong> <strong>ORIGINAL</strong> <strong>VIEW</strong><br />

[Polynomial Codes over Certain Finite Fields,<br />

I.S.Reed and G. Solomon,<br />

Journal of SIAM, June 1960]<br />

Parameters:<br />

Let GF(2 n ) be the eld with 2 n elements.<br />

The number of message symbols encoded into a<br />

codeword is M.<br />

The numberofcodesymbols transmitted is<br />

N=2 n .<br />

Message symbols are elements of GF(2 n ).<br />

Code symbols are elements of GF(2 n ).<br />

1


The original view of Reed and Solomon is that<br />

the codeword symbols are the VALUES of a polynomial<br />

whose COEFFICIENTS are the message<br />

symbols.<br />

2


MA<strong>THE</strong>MATICALLY:<br />

Let (x 1 ;x 2 ;;x N )beanenumeration of the<br />

elements of the eld.<br />

Let (m 1 ;m 2 ;;m M ) be a message where<br />

m i 2 GF (2 n ).<br />

Dene a polynomial by<br />

P (Z) =m 1 +m 2 Z+m 3 Z 2 ++m M Z M,1<br />

Then the codeword is<br />

(P (x 1 );P(x 2 );:::;P(x N ))<br />

The enumeration used by Reed and Solomon was<br />

as follows.<br />

Let be a primitive element in GF(2 n ). Then the<br />

enumeration is<br />

(x 1 ;x 2 ;;x N )=(0;; 2 ;; N,2 ;1)<br />

3


Suppose the received word is<br />

(R(x 1 );R(x 2 );:::;R(x N ))<br />

At the receiver, N equations can be formed, some<br />

of which are wrong if there are transmission errors.<br />

R(0) = m 1<br />

R() = m 1 + m 2 + m 3 2 + +m M M,1<br />

R( 2 ) = m 1 +m 2 +m 3 22 ++m M 2(M,1)<br />

.<br />

R(1) = m 1 + m 2 + m 3 + +m M<br />

Any M of these equations have full rank and can<br />

be solved. By trying many sets of M equations,<br />

the correct answer will appear more often than any<br />

wrong answer provided the number of errors is less<br />

than (2 n , M +1)=2.<br />

Choosing M equations and solving those equations<br />

is equivalent to Lagrange interpolation.<br />

4


<strong>THE</strong> CLASSICAL <strong>VIEW</strong><br />

Reed Solomon Codes<br />

are a sub type of<br />

BCH Codes<br />

I don't know who rst made this observation but<br />

it leads to a practical decoding algorithm developed<br />

by Wes Peterson.<br />

Parameters:<br />

Let GF(2 n ) be the eld with 2 n elements.<br />

Let be a primitive element in GF(2 n ).<br />

The number of message symbols encoded into a<br />

codeword is M.<br />

The numberofcodesymbols transmitted is<br />

N =2 n ,1.<br />

Let G(Z) be the polynomial whose roots are<br />

(; 2 ;; N,M )<br />

Message symbols are elements of GF(2 n ).<br />

The BCH view is that the symbols of a codeword<br />

are the COEFFICIENTS of a polynomial in<br />

Z which is divisible by G.<br />

5


MA<strong>THE</strong>MATICALLY:<br />

Let<br />

G(Z) = N,M Y<br />

i=1<br />

(Z , i )<br />

Let (m 1 ;m 2 ;;m M ) be a message where<br />

m i 2 GF (2 n ).<br />

Dene a polynomial by<br />

P (Z) =m 1 +m 2 Z+m 3 Z 2 ++m M Z M,1<br />

and dene<br />

C(Z) = P (Z)G(Z)<br />

X<br />

= N ,1<br />

i=0<br />

c i Z i<br />

Then the codeword is<br />

(c 0 ;c 1 ;;c N,1 )<br />

6


Alternatively, dividing Z N ,M P (Z) byG(Z)to<br />

get<br />

Z N ,M P (Z) =Q(Z)G(Z)+R(Z)<br />

Then<br />

C(Z) =Z N,M P(Z),R(Z)<br />

is divisible by G(Z) and its coecients form a systematic<br />

codeword.<br />

7


DECODING AS PRESENTED<br />

IN<br />

<strong>THE</strong> <strong>REED</strong>-<strong>SOLOMON</strong> PAPER<br />

Reed and Solomon described the following decoding<br />

procedure.<br />

Receive (r 1 ;r 2 ;;r N )<br />

Select M indices in all possible ways<br />

(Lagrange Interpolation)For each selection,<br />

nd P (Z) with deg(P )=M,1<br />

P(x i )=r i at these indices.<br />

The coecients of P form a potential message.<br />

As all possible selections are made, the message<br />

which gives a codeword closest to the received word<br />

occurs more often than any other.<br />

8


An alternative is to form a codeword corresponding<br />

to each potential message and stop when the<br />

result disagrees with the received message in at<br />

most (N , M)=2 places. If none is found, failure<br />

to decode occurs.<br />

These procedures are very inecient.<br />

return to this later.<br />

We will<br />

9


CLASSICAL DECODING<br />

[W.W. Peterson, IRE IT-6 Sept 1960]<br />

Receive (r 1 ;r 2 ;;r N )<br />

and form<br />

R(Z) =<br />

C( i ) = 0<br />

N X<br />

i=1<br />

r i Z i,1<br />

= C(Z)+E(Z)<br />

S i = R( i ) = E( i )<br />

for 1 i N , M<br />

for 1 i N , M<br />

Peterson observed that the S i satisfy a linear recursion.<br />

0= e X<br />

i=0<br />

q i S k+i<br />

for 1 k N , M , e<br />

where Q(Z) = P e<br />

i=0<br />

q i Z i has the error locations as<br />

its roots.<br />

This gives a simple system of linear equations to<br />

nd the error locations. Another system solves for<br />

the error values.<br />

10


Later Berlekamp found a<br />

faster algorithm for nding<br />

the recursion satised by the S i .<br />

11


Let us return to the Reed & Solomon's<br />

Original View and see if there is another<br />

decoding method.<br />

We begin in the same way<br />

Reed and Solomon did<br />

by selecting a set of M indices, S,<br />

and nding P (Z) for which<br />

degree of P is at most M , 1<br />

and P (x i )=r i for i 2 S<br />

The tool is Lagrange interpolation.<br />

We ask what is the eect of errors<br />

at the selected indices.<br />

12


LAGRANGE INTERPOLATION<br />

For each i 2 S we need a polynomial, i (Z), of<br />

degree M , 1 which has the value 1 at x i and the<br />

value 0 at x j for j 2 S; j 6= i<br />

With these, the solution for P is<br />

P (Z) = X<br />

i2S<br />

r i i (Z)<br />

If r i includes an error e i then e i i (Z) is added<br />

to the correct P (Z).<br />

13


SYNDROMES<br />

Let T (Z) be the message polynomial<br />

and e k be the error at position k<br />

Then<br />

r k = T (x k )+e k<br />

Given an index selection, S, the Lagrange Interpolation<br />

polynomial evaluated at x k will be<br />

P (x k ) =<br />

X r i i (x k )<br />

i2S<br />

= X T (x i ) i (x k )+ X e i i (x k )<br />

i2S<br />

i2S<br />

14


Subtracting the interpolated values from the received<br />

values:<br />

r k , P (x k ) = T (x k ) , X<br />

+e k , X<br />

i2S<br />

i2S<br />

T (x i ) i (x k )<br />

e i i (x k )<br />

Since T has degree at most M , 1,<br />

and we have<br />

T (x k )= X<br />

i2S<br />

T(x i ) i (x k )<br />

k =r k ,P(x k )=e k , X<br />

for k 2 S c<br />

i2S<br />

which is a new family of syndromes.<br />

e i i (x k )<br />

Given k for k 2 S c and assuming the number<br />

of errors is within the R-S bound, we would like to<br />

solve for the e j 's.<br />

15


INTERPOLATION POLYNOMIALS<br />

Given S, the 's are constructed as follows:<br />

Let<br />

G(Z) = Y (Z,x j )<br />

j2S<br />

and let G 0 (Z) be its formal derivative.<br />

Then<br />

i (Z) =<br />

G(Z)<br />

(Z,x i )G 0 (x i )<br />

It is clear that i (x j ) = 0 for i; j 2 S and<br />

j 6= i. That i (x i ) = 1 follows from the rule of<br />

L'Hospital which isvalid for ratios of polynomials<br />

over any eld.<br />

16


The syndromes can now be expressed as:<br />

k = e k , X<br />

i2S<br />

e i<br />

G(x k )<br />

(x k , x i )G 0 (x i )<br />

or<br />

k<br />

G(x k ) =<br />

e k<br />

G(x k ) , X<br />

i2S<br />

e i 1<br />

G 0 (x i ) (x k , x i )<br />

This looks simpler if we dene<br />

k =<br />

k<br />

G(x k )<br />

e k =<br />

e k<br />

G(x k )<br />

for k 2 Sc<br />

and<br />

e i =<br />

e i<br />

G 0 (x i )<br />

then<br />

k = e k , X<br />

i2S<br />

e i<br />

(x k , x i )<br />

17


Not all of the e's are non-zero.<br />

Let E be the set of indices for which e i 6=0<br />

Dene<br />

Q S (Z) =<br />

Y<br />

i2E\S<br />

(Z,x i )<br />

and<br />

Q C (Z) =<br />

Y<br />

i2E\S c (Z,x i )<br />

The roots of Q S (Z) are those x i for which i 2 S<br />

and e i 6= 0 While the roots of Q C (Z) are those x i<br />

for which i 2 S c and e i 6=0<br />

The summation expression in the syndrome equations<br />

can now be put over a common denominator<br />

to give<br />

k = e k , A(x k)<br />

Q S (x k )<br />

where the degree of Q S is the number of errors at<br />

selected indices and the degree of A is less<br />

18


For k 2 S c , either e k =0orQ C (x k ) = 0 so the<br />

product is 0 for k 2 S c . Multiplying the previous<br />

syndrome expression by Q(x k ) Q S (x k )Q C (x k )<br />

gives<br />

Q(x k ) k = Q C(x k )A(x k ) P (x k )<br />

Q(x k ) k = P (x k )<br />

This expression has, as unknowns, the coecients<br />

of Q and P and provides a system of linear<br />

equations for their solution.<br />

At rst glance this looks the same has the Classical<br />

case but is not. The classical equations are<br />

statements about the relationship between COEF-<br />

FICIENTS of polynomials while the above expression<br />

is a relation about the VALUES of polynomials.<br />

19


AFAST ALGORITHM<br />

FOR SOLVING<br />

<strong>THE</strong> WELCH-BERLEKAMP EQUATIONS<br />

This algorithm was developed jointly<br />

by Elwyn Berlekamp<br />

Tze Hua Liu<br />

Po Tong<br />

Lloyd Welch<br />

The Key WB Equations<br />

are<br />

Q(x k ) k = P (x k ) for k 2 S c (1)<br />

These equations will be used sequentially<br />

in some order depending on auxillary<br />

information such assymbol reliability<br />

We will assume that the x k 's are renumbered<br />

so that the equations are<br />

Q(x k ) k = P (x k) for k =1;;N ,M<br />

20


We introduce an auxillary<br />

pair of polynomials,<br />

W (Z);V(Z)<br />

and recursively compute an integer<br />

and four polynomials as follows<br />

J k ;Q k (Z);P k (Z);W k (Z);V k (Z)<br />

The pair<br />

(Q k ;P k )<br />

will constitute a \minimal"<br />

solution to the rst k equations<br />

and the pair<br />

(W k ;V k )<br />

will also solve the rst k<br />

equations but, in a certain sense,<br />

will not be minimal.<br />

21


Initialization:<br />

J 0 =0;<br />

Q 0 (Z)=1;P 0 (Z)=0;W 0 (Z)=1;V 0 (Z)=1<br />

Since k = 0, there are<br />

no equations to verify.<br />

22


When we have generated<br />

Q k ;P k ;W k ;V k<br />

we will have two solutions<br />

to the rst k equations.<br />

(Q k ;P k ) and (W k ;V k )<br />

However the pair (W k ;V k ) will be<br />

"less suitable" than (Q k ;P k )<br />

in a certain sense.<br />

But the pair will be useful<br />

in constructing (Q k+1 ;P k+1 )<br />

23


STEP k<br />

At the beginning of step k we have<br />

J k,1 and<br />

Q k,1 (Z);P k,1 (Z);W k,1 (Z);V k,1 (Z)<br />

We form<br />

d k = Q k,1 (x k ) k , P k,1 (x k )<br />

IF d k =0<br />

J k = J k,1 +1<br />

Q k (Z) = Q k,1 (Z)<br />

P k (Z) = P k,1 (Z)<br />

W k (Z) = (Z,x k )W k,1 (Z)<br />

V k (Z) = (Z,x k )V k,1 (Z)<br />

In this case<br />

(Q k,1 ;P k,1 )<br />

already satisfy the k'th equation<br />

and<br />

multiplication by (Z,x k )<br />

forces the pair<br />

W k (Z);V k (Z)<br />

to satisfy the k'th equation.<br />

24


IF d k 6=0<br />

We form another quantity,<br />

c k = d ,1<br />

k (W k,1 (x k ) k , V k,1(x k ))<br />

and set<br />

Q k (Z) = (Z , x k )Q k,1 (Z)<br />

P k (Z) = (Z , x k )P k,1 (Z)<br />

W k (Z) = W k,1 , c k Q k,1 (Z)<br />

V k (Z) = V k,1 , c k P k,1 (Z)<br />

It is readily veried that the two<br />

pair of polynomials satisfy the rst<br />

k equations.<br />

HOWEVER, we are not done with this case.<br />

IF J k,1 = 0 then<br />

swap the two pair.<br />

Q k (Z) $ W k (Z)<br />

P k (Z) $ V k (Z)<br />

and set J k =0<br />

O<strong>THE</strong>RWISE set J k = J k,1 , 1<br />

and do not swap pairs.<br />

25


AMATRIX DESCRIPTION<br />

The four polynomials can be written<br />

as components of a matrix.<br />

0<br />

B<br />

@ Q k(Z) P k (Z)<br />

W k (Z) V k (Z)<br />

1<br />

C<br />

A<br />

In this form the k'th step can be written<br />

26


IF d k =0<br />

0<br />

B<br />

@ Q k(Z) P k (Z)<br />

W k (Z) V k (Z)<br />

1<br />

C<br />

A=<br />

0<br />

B<br />

@ 1 0<br />

0 (Z,x k )<br />

10<br />

C<br />

A<br />

B<br />

@ Q k,1(Z) P k,1 (Z)<br />

W k,1 (Z) V k,1 (Z)<br />

1<br />

C<br />

A<br />

IF d k 6= 0 and J k,1 6=0<br />

0<br />

B<br />

@ Q k(Z) P k (Z)<br />

W k (Z) V k (Z)<br />

1<br />

C<br />

A=<br />

0<br />

B<br />

@ (Z,x k) 0<br />

c k 1<br />

10<br />

C<br />

A<br />

B<br />

@ Q k,1(Z) P k,1 (Z)<br />

W k,1 (Z) V k,1 (Z)<br />

1<br />

C<br />

A<br />

IF d k 6= 0 and J k,1 =0<br />

0<br />

B<br />

@ Q k(Z) P k (Z)<br />

W k (Z) V k (Z)<br />

1<br />

C<br />

A=<br />

0<br />

B<br />

@<br />

,c k 1<br />

(Z,x k ) 1<br />

10<br />

C<br />

A<br />

B<br />

@ Q k,1(Z) P k,1 (Z)<br />

W k,1 (Z) V k,1 (Z)<br />

1<br />

C<br />

A<br />

27


The fact that each pair,<br />

(Q k (Z);P k (Z)) and (W k (Z);V k (Z))<br />

satisfy the rst k equations<br />

can be expressed as<br />

0<br />

B<br />

@ Q k(x i ) P k (x i )<br />

W k (x i ) V k (x i )<br />

1 0<br />

C<br />

A<br />

B<br />

@ i<br />

,1<br />

1<br />

C<br />

A =<br />

0<br />

B<br />

@ 0 0<br />

1<br />

C<br />

A<br />

for i k<br />

28


WHAT ABOUT MINIMALITY<br />

This is the dicult part of the theorem<br />

and I will just outline the proof<br />

with a few comments.<br />

I will pattern this proof after that in<br />

Tze Hwa Liu's dissertation ( 1984)<br />

29


First we are going to replace the decision<br />

criterion using J k by something<br />

more intuitive. ( It is equivalent)<br />

Dene the length of an ordered pair<br />

of polynomials by<br />

L(Q(Z);P(Z)) = max(deg(Q),1+deg(P ))<br />

and dene<br />

L k = min L(Q(Z);P(Z))<br />

where the minimum is taken over all<br />

pairs of polynomials satisfying<br />

the rst k equations.<br />

30


<strong>THE</strong>OREM:<br />

The algorithm described above<br />

gives a sequence of pairs, (Q k (Z);P k (Z))<br />

for which<br />

L k = L(Q k (Z);P k (Z))<br />

That is: (Q k (Z);P k (Z)) is minimal.<br />

I will just list the lemmas, with<br />

a comment about some of them.<br />

Lemma 1<br />

L k is monotone increasing.<br />

Lemma 2<br />

If 2L k k then there is<br />

a unique minimum pair satisfying<br />

the rst k equations.<br />

31


Lemma 3<br />

If 2L k k and d k+1 6=0<br />

when computed for a minimal pair at<br />

level k then<br />

L k+1 = L k +1<br />

***<br />

Lemma 4<br />

<br />

Q k (Z) P k (Z)<br />

W k (Z) V k (Z)<br />

= Y k<br />

i=1<br />

(Z , x i )<br />

(determinant of product is product of<br />

determinants)<br />

32


Lemmas 5,6<br />

L(Q k (Z);P k (Z)) + L(W k (Z);V k (Z)) = k +1<br />

<strong>THE</strong> SWAP PAIRS DECISION<br />

The swap pairs decision based on the<br />

value of J k is really the comparison<br />

of L(Q k (Z);P k (Z)) and L(W k (Z);V k (Z))<br />

and picking L(Q k (Z);P k (Z)) to be the smaller.<br />

33


We restate the theorem:<br />

<strong>THE</strong>OREM:<br />

The algorithm described above<br />

gives a sequence of pairs, (Q k (Z);P k (Z))<br />

for which<br />

L k = L(Q k (Z);P k (Z))<br />

That is: (Q k (Z);P k (Z)) is minimal.<br />

34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!