3
IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 42, NO. 4, JULY 1996 1269 Some Remarks on an Algorithm of Fitzpatrick S. R. Blackburn and W. G. Chambers Abstruct- Fitzpatrick’s algorithm for solving the classical Reed-Solomon key equation is shown to he related to an algorithm for solving the Welch-Berlekamp key equation. It can he made more efficient when decoding binary BCH codes. Its efficiency is about the same as for the Berlekamp-Massey algorithm. Index Terms-Reed-Solomon decoding algorithms, binary BCH decod- ing algorithms. I. INTRODUCTION The classical “key equation” arises in the decoding of Reed-Solomon and related codes [I]. It is traditionally solved by using the Berlekamp-Massey algorithm [I], [2]. Let F be a field, m a positive integer, and let S(z) E F[z] be a polynomial with coefficients in F. The process of solving the key equation consists of finding polynomials P(r), Q(z) E F[z], not both zero, which satisfy the equation S(z)Q(z) = P(T) modz” (1) while minimizing the quantity max{(degP(z) + l), deg Q(r)}. Recently, Fitzpatrick [3] used the techniques of Grobner basis theory to derive a new algorithm which solves the key equation. This correspondence discusses the efficiency of the Fitzpatrick algorithm and compares it with similar algorithms. Our correspondence points out the close relationship between the Fitzpatrick algorithm and an algorithm due to Chambers, Peile, Tsie, and Zein [4] (referred to here as the CPTZ algorithm) which solves the Welch-Berlekamp key equation [5]. In fact, a version of the Fitzpatrick algorithm and the CPTZ algorithm can both be thought of as special cases of a more general algorithm which solves a rational interpolation problem [6]. The relationship between the Fitzpatrick algorithm and the CPTZ algorithm gives a new justification of the Fitzpatrick algorithm which is independent of Grobner basis theory. This relationship is established in Section 11. When the key equation (1) arises as part of the decoding of binary BCH codes, the polynomial S(z) has a special form. The Berlekamp-Massey algorithm exploits this extra structure so that it becomes more efficient in this case. In Section I11 of this correspon- dence, the Fitzpatrick algorithm is modified so that it too becomes more efficient when used as part of binary BCH decoding. The final section of the correspondence contains an assessment of the Fitzpatrick algorithm’s efficiency (in terms of finite field multipli- cations) when compared with the Berlekamp-Massey algorithm. Both the binary BCH and the general Reed-Solomon cases are considered. We conclude that the Berlekamp-Massey and Fitzpatrick algorithms are of comparable efficiency when used in the decoding of either Reed-Solomon or binary BCH codes. Manuscript received March 9, 1995; revised February 16, 1996. S. R. Blackburn was supported by an E.P.S.R.C. Research Assistantship and is currently an E.P.S.R.C. Advanced Fellow. S. R. Blackbum is with the Department of Mathematics, Royal Holloway, University of London, Egham, Surrey TW20 OEX, United Kingdom. W. G. Chambers is with the Department of Electronic and Electrical Engineering, King’s College London, Strand, London WC2R 2LS, United Kingdom. 11. SOLVING THE KEY EQUATION USING THE CPTZ ALGORITHM It is not difficult to adapt the CPTZ algorithm [4] so that it is able to solve the classical key equation (1). This gives rise to the following algorithm. In what follows J, i, and m are integers, the d, and cz are elements of F, the P,(x), etc., are polynomials in E[z:], and the notation (P, 8) denotes a 2-vector with components in F[z]. for i = O t o m - l J = 0; P-1 = 0; Q-1 = 1; V-1 = 1; W-1 0; { d,-l = coeff of zz in S(z)QL-l(z) - F‘-l(z); if (d,-l # 0) { (Pz,QZ) = X(P~-I,Q~-~); cL-l = coeff of zz in S(z)Wt-l(r) - K-I(~); (K,Wz) = (’;<-I, Wt-1) - (c~-i/d~-~)(P,-i,Q~-l); if (J == 0) swap (14, WC) and (Pt,Q,); else J = J - 1; } { (vz, WC) = .(K-1, wt-1); (pc, QZ) = (Ki, QT-I); J=J+l; } else I* if d == 0 *I } (P> &) = (Pm-1, &“-I). The justification of the algorithm is essentially the same as the justification contained in [4], so we do not include it here.. (In fact, the only changes necessary in the justification of [4] to deal with our case are to first redefine an ‘‘T solution” to be any pair of polynomials (P(z), ~Q(T)) satisfying S(z)Q(z) = P(z) modz-‘ and subsequently to replace the second half of the first sentence of the proof of [4, Theorem 11 by “then the polynomial P(z)Y(.c) - Q(r)X(z) = O m o d d ; however, its degree is less than T, and so it vanishes”). Compared with [4] the index i has been reduced by 1, and so have the labels on the polynomials. We have also altered the initial condition on W, a change which as is easily seen does not affect the derivation of the algorithm. We now modify the algorithm so that it more closely corresponds to the algorithm given b’yFitzpatrick [3]. We note that the first time d is used it is equal to So, i.e., = SO. Rather more subtly the first time c,-1 is used it is equal to -1. This is because degK-1 == i if and only if J = i, and otherwise it is less [4]. Thus in the calculation of c,-1 we find that 1’- appears once either on the very first iteration if SO # 0, or else on the first iteration with S, nonzero. At the same time we find VV,F equal to zero. We also find that degP,-I < i, so that P,-l does not contribute to Ll. So we initialize c and d in this way, and then evaluate d, and c, after the polynomials are updlated. We also note that (P,,QA) = z(PZ-1,Qz-1) gives d, = LJ, and similarly for c. This gives the following algorithm: J=O: P-,=O; Q_,=l; V_,=l; w-1=0; d-1 = so; c-1 = -1; fori = 0 to m - 1 { if (dZ-l # 0) { (V,,W,) = (K-1,w-1) - ((‘8 - 1 /d, - 1 ) (pz - J j 8 L - 1 ) : if(i < m, - 1) cz = coeff of zL+’ in S(z)Wi(z); (PZ, Q L ) = z(Pz-1: Qt-l); d, = Cl-1; if (J == 0) swap (K. W,. cc) and (Pz, QG7 dz); else J = J - I; PGblisher Item Identifier S 0018-9448(96)04478-1. I 0018-9448/96$05.00 0 1996 IEEE

Some remarks on an algorithm of Fitzpatrick

  • Upload
    wg

  • View
    216

  • Download
    1

Embed Size (px)

Citation preview

IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 42, NO. 4, JULY 1996 1269

Some Remarks on an Algorithm of Fitzpatrick

S. R. Blackburn and W. G. Chambers

Abstruct- Fitzpatrick’s algorithm for solving the classical Reed-Solomon key equation is shown to he related to an algorithm for solving the Welch-Berlekamp key equation. It can he made more efficient when decoding binary BCH codes. Its efficiency is about the same as for the Berlekamp-Massey algorithm.

Index Terms-Reed-Solomon decoding algorithms, binary BCH decod- ing algorithms.

I. INTRODUCTION

The classical “key equation” arises in the decoding of Reed-Solomon and related codes [I]. It is traditionally solved by using the Berlekamp-Massey algorithm [I], [2]. Let F be a field, m a positive integer, and let S(z) E F [ z ] be a polynomial with coefficients in F . The process of solving the key equation consists of finding polynomials P ( r ) , Q(z) E F [ z ] , not both zero, which satisfy the equation

S(z)Q(z) = P ( T ) modz” (1)

while minimizing the quantity max{(degP(z) + l), deg Q ( r ) } . Recently, Fitzpatrick [3] used the techniques of Grobner basis theory to derive a new algorithm which solves the key equation. This correspondence discusses the efficiency of the Fitzpatrick algorithm and compares it with similar algorithms.

Our correspondence points out the close relationship between the Fitzpatrick algorithm and an algorithm due to Chambers, Peile, Tsie, and Zein [4] (referred to here as the CPTZ algorithm) which solves the Welch-Berlekamp key equation [5] . In fact, a version of the Fitzpatrick algorithm and the CPTZ algorithm can both be thought of as special cases of a more general algorithm which solves a rational interpolation problem [6]. The relationship between the Fitzpatrick algorithm and the CPTZ algorithm gives a new justification of the Fitzpatrick algorithm which is independent of Grobner basis theory. This relationship is established in Section 11.

When the key equation (1) arises as part of the decoding of binary BCH codes, the polynomial S(z) has a special form. The Berlekamp-Massey algorithm exploits this extra structure so that it becomes more efficient in this case. In Section I11 of this correspon- dence, the Fitzpatrick algorithm is modified so that it too becomes more efficient when used as part of binary BCH decoding.

The final section of the correspondence contains an assessment of the Fitzpatrick algorithm’s efficiency (in terms of finite field multipli- cations) when compared with the Berlekamp-Massey algorithm. Both the binary BCH and the general Reed-Solomon cases are considered. We conclude that the Berlekamp-Massey and Fitzpatrick algorithms are of comparable efficiency when used in the decoding of either Reed-Solomon or binary BCH codes.

Manuscript received March 9, 1995; revised February 16, 1996. S. R. Blackburn was supported by an E.P.S.R.C. Research Assistantship and is currently an E.P.S.R.C. Advanced Fellow.

S. R. Blackbum is with the Department of Mathematics, Royal Holloway, University of London, Egham, Surrey TW20 OEX, United Kingdom.

W. G. Chambers is with the Department of Electronic and Electrical Engineering, King’s College London, Strand, London WC2R 2LS, United Kingdom.

11. SOLVING THE KEY EQUATION USING THE CPTZ ALGORITHM It is not difficult to adapt the CPTZ algorithm [4] so that it is able

to solve the classical key equation (1). This gives rise to the following algorithm. In what follows J , i , and m are integers, the d , and cz are elements of F , the P,(x), etc., are polynomials in E[z:] , and the notation ( P , 8 ) denotes a 2-vector with components in F [ z ] .

for i = O t o m - l J = 0; P-1 = 0; Q-1 = 1; V-1 = 1; W-1 0;

{ d,-l = coeff of zz in S ( z ) Q L - l ( z ) - F‘-l(z); if (d,-l # 0)

{ (Pz,QZ) = X ( P ~ - I , Q ~ - ~ ) ; cL-l = coeff of zz in S(z)Wt-l(r) - K - I ( ~ ) ; (K,Wz) = (’;<-I, Wt-1) - ( c ~ - i / d ~ - ~ ) ( P , - i , Q ~ - l ) ; if ( J == 0) swap (14, W C ) and (Pt ,Q,); else J = J - 1; }

{ (vz, W C ) = .(K-1, wt-1); (pc, Q Z ) = ( K i , QT-I); J = J + l ; }

else I* if d == 0 *I

} (P> &) = (Pm-1, &“-I).

The justification of the algorithm is essentially the same as the justification contained in [4], so we do not include it here.. (In fact, the only changes necessary in the justification of [4] to deal with our case are to first redefine an ‘‘T solution” to be any pair of polynomials ( P ( z ) , ~ Q ( T ) ) satisfying S(z)Q(z) = P ( z ) modz-‘ and subsequently to replace the second half of the first sentence of the proof of [4, Theorem 11 by “then the polynomial P(z)Y(.c) - Q ( r ) X ( z ) = O m o d d ; however, its degree is less than T , and so it vanishes”).

Compared with [4] the index i has been reduced by 1, and so have the labels on the polynomials. We have also altered the initial condition on W , a change which as is easily seen does not affect the derivation of the algorithm.

We now modify the algorithm so that it more closely corresponds to the algorithm given b’y Fitzpatrick [3]. We note that the first time d is used it is equal to So, i.e., = SO. Rather more subtly the first time c,-1 is used it is equal to -1. This is because degK-1 == i if and only if J = i , and otherwise it is less [4]. Thus in the calculation of c,-1 we find that 1’- appears once either on the very first iteration if SO # 0, or else on the first iteration with S , nonzero. At the same time we find VV,F equal to zero. We also find that degP,-I < i , so that P,-l does not contribute to L l . So we initialize c and d in this way, and then evaluate d , and c, after the polynomials are updlated. We also note that (P , ,QA) = z(PZ-1,Qz-1) gives d, = LJ, and similarly for c. This gives the following algorithm: J = O : P- ,=O; Q _ , = l ; V _ , = l ; w-1=0; d-1 = so; c-1 = -1; f o r i = 0 to m - 1

{ if ( d Z - l # 0) { (V,,W,) = (K-1,w-1)

- ((‘8 - 1 / d , - 1 ) (pz - J j 8 L - 1 ) : if(i < m, - 1) cz = coeff of zL+’ in S(z)Wi(z); (PZ, Q L ) = z(Pz-1: Q t - l ) ;

d , = Cl-1;

if ( J == 0) swap (K. W,. c c ) and ( P z , Q G 7 d z ) ; else J = J - I;

PGblisher Item Identifier S 0018-9448(96)04478-1. I

0018-9448/96$05.00 0 1996 IEEE

1270 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 42, NO. 4, JULY 1996

else I* if d,-i == 0 *I { (K> W L ) = x(K-1, Wt-1); c, = c,-l; (Pc, Q A ) = (Pz-1, Q z - 1 ) ;

if ( i < m - 1) d, = coeff of xC3' in S (z )QZ(x) : J = J + I ; 1

1 (P, Q ) = (Pm-1, &m-1).

This algorithm is essentially the same as the one derived in [ 3 ] , and this relationship provides a justification of the Fitzpatrick algorithm which avoids the use of Grobner bases.

111. SPECIALIZATlON TO THE BINARY BCH CASE

Like the Berlekamp-Massey algorithm, the Fitzpatrick algorithm can be made more efficient when it is used to decode syndromes which arise in the decoding of binary BCH codes. In fact, like the Berlekamp-Massey algorithm, one can show that the discrepancies encountered by the Fitzpatrick algorithm are zero in every other step in this situation. This section proves this fact.

We adapt the methods in [ l , pp. 192-1951, In the binary case we have that SO = 1 and that S Z ~ = S; for all positive integers 2 . So putting

CO

S(z) = c s z x z 2=0 N

..

S(2) = CS2t+1z2?+1 L=O

we have S2 = S. We use a similar notation for other polynomials or formal power series.

Theorem I : Let SO,. . . , S,-1 be a sequence of elements in a field of characteristic 2 and suppose that SO = 1 and that SpI = for all integers i such that 1 5 i 5 (m - 1)/2. Suppose the sequence SO, . . . , S,-J is input into the Fitzpatrick algorithm of Section 11. On each pass through its main loop, the algorithm calculates a discrepancy (either cl or d l ) . For all odd integers I , this discrepancy will be zero.

Proof: Define R ( z ) to be the inverse of S ( x ) in the ring of formal power series in z, i.e., S ( z ) R ( x ) = 1. Note that RO = 1. Then considering odd and even coefficients in the equation S R = 1 separately, we find

S R + S R = 1 and S R + S R = O . Multiplying the first _equation by S and the second by S and adding we find that (S2 + S2)R_= S. Hence we find S2R = S2, and so R = 1. Thus R = 1 + R.

Next suppose that i is odd and that P, = oz. Then we multiply

SQ, = P, + dzxZ+l modz"'

through by R to get

4t = (1 + f i ) Q z + dLzZ+l modx"'.

Hence we have

Q L + l?sz = dzzZ+' modx"'

and since the left-hand side consists of odd powers of x only, whereas i + 1 is even, we find d , = 0. Similarly, if with i odd we have I4 = W,, then from

= I;, + c,:zZ+' modx"+'

we obtain c, = 0.

Now we apply this to the Fitzpatrick algorithm as described above. We assume inductively that for some positive odd 2 we have Pi-I = Q I - ~ and K-1 = W-l. Certainly this assumption holds when i = 1, for it is easy to calculate that, since SO = 1, we have PO = 1. Q o = 1, 1'0 = 0, and WO = x. Now we enter the loop with i = I . There are three possible routes to the bottom of the loop

I I1 I11 if di-1 = 0.

if dl-1 # 0, J > 0, if di-1 # 0, d = 0 (giving a swap),

So at the bottom of the loop we find after I: after 11: after 111: Pi = Q i ,

1; = lyl, Pi = Ql, cl = 0, dl # 0; pi = Ql, K = L+l, dr = 0, ci # o (after swap);

= I$(, di = 0, cl =? (Note that multiplying V, W by x takes T'-1 = Gl-1 into K = Wl.) At the bottom of the next loop we have nine possible routes through the two loops, the first loop with i = I , and the second with i = 1 + 1. However, I then 111 is not possible since dl # 0 after I. Similarly I1 then I, 11 then 11, I11 then I, and I11 then I1 are not possible since di = 0 after I1 and after 111. The remaining four possibilities I then I, I then 11, I1 then 111, and I11 then I11 all give

Pl+1 = Q l + l , K+I = L+l+l

so that after two loops the inductive assumption is recovered. Con- sequently, every time we find the coefficient of ,'+' in S(z )W, ( z ) or in S(s)Qz (x) for odd i ( i > 0), we will get 0. Thus the theorem follows.

We remark that in some formulations of binary BCH decoding, the element SO can take the value 0 as well as the value 1. The situation when SO = 0 is slightly more involved than in the case when SO = 1-it is possible to prove the following theorem.

Theorem 2: Let SO,. . . , S,-I be a sequence of elements in a field of characteristic 2 and suppose that SO = 0 and that Szz = S: for all integers i such that 1 5 i 5 (m - 1) /2 . Suppose the sequence SO. . . . S, - 1 is input into the Fitzpatrick algorithm of Section 11. On each pass through its main loop, the algorithm calculates a discrepancy (either cl or d l ) . If the sequence begins with precisely k zeros, then the calculated discrepancy will be zero whenever 1 is odd and 1 # 2 k - I. When I = 2 k - 1 the discrepancy will be equal to SI,.

IV. EFFICIENCY In this section, we compare the Fitzpatrick algorithm to the

Berlekamp-Massey algorithm when it is used in the decoding of Reed-Solomon and binary BCH codes. For a complexity measure we take the number of field multiplications or divisions used when a syndrome taken uniformly at random is input into the algorithm.

Suppose that we wish to decode a Reed-Solomon code and wish to find the error locator polynomial associated with a sequence of syndromes of length n. At each step, the Fitzpatrick algorithm has to calculate the polynomial ( c z - l / d z - l ) Q z - l and then needs to calculate the value of e,. Each of these two calculations takes approx- imately i z field multiplications to carry out and these calculations constitute the bulk of the work of the algorithm at each step. So the Fitzpatrick algorithm takes approximately in2 field multiplications to find the error locator polynomial of a sequence of syndromes of length 1% in the average case. This is comparable to the Berlekamp-Massey algorithm [2]. Both algorithms have been implemented and experi- mental results confirm the above analysis: The Berlekamp-Massey and the Fitzpatrick algorithms use a similar number of field mul- tiplications. In his paper [3] , Fitzpatrick claims that his algorithm uses only half as many multiplications as the Berlekamp-Massey algorithm, quoting the version of the Berlekamp-Massey algorithm found in 171. Unfortunately, the version of the Berlekamp-Massey

IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 42, NO. 4, JULY 1996 1271

algorithm found there is not the most efficient implementation (Blahut phrased the algorithm more inefficiently so that he could justify

1- E

0

1

2

his “recursive Berlekamp-Massey algorithm” more transparently), so Fitzpatrick’s claimed efficiency gains do not follow.

When the Fitzpatrick algorithm is used to decode binary BCH codes, we may analyze the complexity of the algorithm once the modifications of the previous section have been carried out. We again find that the complexities of the Berlekamp-Massey and Fitzpatrick algorithms arc comparable. Tests on implementations of both algorithms confirm the analysis.

To conclude, the Fitzpatrick algorithm seems have no significant disadvantages or advantages when compared to the Berlekamp- Massey algorithm in BCH decoding applications. However, the control structure of the Fitzpatrick algorithm is especially elegant and the justification of the algorithm (phrased in terms of Grobner bases or produced by modifying the justification in [4] as suggested here) is very simple.

Q- 1 1- E

Fig. 1. q-input, q-output symmetric memoryless channel.

REFERENCES 1. INTRODUCTION

[ l ] F R Berlekamp, Algehrnrc Codrng Theory New York. McCraw-Hill, Let q = 2’’L. m > (1 and -Fq be the field of y elements. Kasami 1968 .. ..

[2J J. L. Massey, “Shift register synthesis and BCH decoding,” IEEE Trans. Inform. Theory, vol. IT-15, pp. 122-127, 1969.

131 P. Fitzpatrick, “On the key equation,” IEEE Trans. Inform. Theory, vol. 41, pp. 1290-1302, 1995.

[4] W. G. Chambers, R. E. Peile, K. Y. Tsie, and N. Zein, “An algorithm for solving the Welch-Berlekamp key-equation, with a simplified proof,” Electron. Lett., vol. 29, pp. 1620-1621, Sept. 1993.

[51 L. Welch and E. R. Berlekamp, “Error correction for algebraic block codes,” U S . Patent 4 633 470, Sept. 1983.

[6] S. R. Blackhum, “The Welch-Berlekamp and Berlekamp-Massey al- gorithms,” presented at the IEEE Int. Symp. on Information Theory, Whistler, BC, Canada, Sept. 1995.

171 R. E. Blahut, Fust Algorithms jor Digital Signal Processing. Reading MA: Addison-Wesley, 1984.

On the Undetected Error Probability of Binary Expansions of Reed-Solomon Codes

and Lin [ I ] showed that the probability of undetected error, P U d ( c ) , for Reed-Solomon (RS,) codes over .Fq is monotonically increasing in E , 0 5 F 5 ( q - l ) / q , when used over the q-input, q-output memoryless channel &own in Fig. 1. We shall refer to such codes as proper codes [2]. However, in many applications, the channel input and output alphabets are binary, and a more appropriate model is the binary-symmetric channel (BSC). In these instances, a binary code can be formed by “expanding” a given RS code over .Fq. The results of [ l ] do not apply in these cases.

Let C he an (n: k ) code over Fq. The binary expansion of C is the code, Ca, obtained when in each codeword, each element in .Fq is replaced by its binary representation, for some basis of Fq over FZ [3, p. 2981. Note that C , is linear, and the binary weight distribution of C refers to the weight distribution of Cz.

Using notation similar to [4], let RSb (2” - 1, k ) denote the RS code over .Fq of length ‘rc = 2” - 1; dimension k , with generator polynomial

where 0: is a primitive element of Fq. ER& ( 2 m , k ) will denote the extension of RSb (2” - 1, k ) .

Kaiming Ho and Cyril Leung, Member, ZEEE

Abstruct- It has been shown by Kasami and Lin that ( n , k ) Reed-Solomon codes used over a y-ary symmetric channel are proper. In this correspondence, it is shown that the binary expansions of these codes and their extensions, when used on the binary-symmetric channel, are not necessarily proper. In particular, certain codes of rate less than [l - log, nc + { (111 - l ) /m} log, (7n - l)] where m = log, q are not proper.

Index Terms-Undetected error probability, Reed-Solomon codes, bi- nary expansion.

In this correspondence, it is shown that not all binary expansions of RS codes (and of their extensions) are proper. Specifically, for a given m, it is shown that the binary expansions of all RS1 (2’rz -- 1, k ) and ERSl (2“, I ; ) codes with rates less than a certain value r* arc not proper.

11. PROPERNESS OF BINARY EXPANSIONS OF CERTAIN RS CODES

In this section, the probabilities of undetected error for some RS and extended RS codes arc examined. The k = 1 case is considered first.

Proposition I : For m 2 3, the binary expansions of RSI (2“‘ - 1, I) and ERSl (2%, I) arc not proper.

ERSl (2”, 1) is given by [4]

Manuscript received April 20, 1995; revised February 26, 1996. This work was partially supported through an NSERC Postgraduate Scholarship and by NSERC under Grant OCPOOO173 1.

proof: The binary weight distribution of R S ~ (2m - I,].) and

The authors are with the Department of Electrical Engineering, University

Publisher Item Identifier S 0018-9448(96)04587-7. of British Columbia, Vancouver, B.C., Canada V6T 124.

0018-9448/96$05.00 0 1996 IEEE