• Aucun résultat trouvé

Meggitt decoding of cyclic codes

Dans le document Fundamentals of Error-Correcting Codes (Page 177-181)

4 Cyclic codes

✲ ✲ Delay element

4.6 Meggitt decoding of cyclic codes

In this section we present a technique for decoding cyclic codes called Meggitt decoding [238, 239]. There are several variations of Meggitt decoding; we will present two of them.

Meggitt decoding is a special case of permutation decoding, which will be explored further in Section 10.2. Permutation decoding itself is a special case of error trapping.

Let C be an [n,k,d] cyclic code over Fq with generator polynomial g(x) of degree nk; C will correct t = (d−1)/2errors. Suppose that c(x)C is transmitted and y(x)=c(x)+e(x) is received, wheree(x)=e0+e1x+ · · · +en−1xn1is the error vector with wt(e(x))≤t. The Meggitt decoder stores syndromes of error patterns with coordinate n−1 in error. The two versions of the Meggitt Decoding Algorithm that we present can briefly be described as follows. In the first version, by shifting y(x) at mostn times, the decoder finds the error vector e(x) from the list and corrects the errors. In the second version, by shiftingy(x) until an error appears in coordinaten−1, the decoder finds the error in that coordinate, corrects only that error, and then corrects errors in coordinates n−2,n−3, . . . ,1,0 in that order by further shifting. As you can see, Meggitt decoding takes advantage of the cyclic nature of the code.

For any vectorv(x)∈Fq[x], let Rg(x)(v(x)) be the unique remainder whenv(x) is div-ided by g(x) according to the Division Algorithm; that is, Rg(x)(v(x))=r(x), where v(x)=g(x)f(x)+r(x) withr(x)=0 or degr(x)<nk. The function Rg(x) satisfies the following properties; the proofs are left as an exercise.

Theorem 4.6.1 With the preceding notation the following hold:

(i) Rg(x)(av(x)+bv(x))=a Rg(x)(v(x))+b Rg(x)(v(x))for allv(x), v(x)∈Fq[x]and all a,b∈Fq.

(ii) Rg(x)(v(x)+a(x)(xn−1))=Rg(x)(v(x)).

(iii) Rg(x)(v(x))=0if and only ifv(x) mod (xn−1)∈C.

(iv) If c(x)C,then Rg(x)(c(x)+e(x))=Rg(x)(e(x)).

(v) If Rg(x)(e(x))=Rg(x)(e(x)),where e(x)and e(x)each have weight at most t,then e(x)=e(x).

(vi) Rg(x)(v(x))=v(x)ifdeg v(x)<nk.

Exercise 274 Prove Theorem 4.6.1.

Part (ii) of this theorem shows that we can applyRg(x)to either elements ofRnor elements ofFq[x] without ambiguity. We now need a theorem due to Meggitt that will simplify our computations withRg(x).

Theorem 4.6.2 Let g(x)be a monic divisor of xn−1of degree nk. If Rg(x)(v(x))=s(x), then

Rg(x)(xv(x) mod (xn−1))=Rg(x)(xs(x))=xs(x)g(x)snk1, where snk1is the coefficient of xnk−1in s(x).

159 4.6 Meggitt decoding of cyclic codes

Proof: By definition v(x)=g(x)f(x)+s(x), where s(x)=nk1

i=0 sixi. So xv(x)= xg(x)f(x)+xs(x)=xg(x)f(x)+g(x)f1(x)+s(x), where s(x)=Rg(x)(xs(x)). Also xv(x) mod (xn−1)=xv(x)−(xn−1)vn1. Thusxv(x) mod (xn−1) = xg(x)f(x)+ g(x)f1(x)+s(x)− (xn−1)vn−1 = (x f(x)+ f1(x)− h(x)vn−1)g(x)+s(x), where g(x)h(x)=xn−1. Therefore Rg(x)(xv(x) mod (xn−1))=s(x)=Rg(x)(xs(x)) because degs(x)<nk. As g(x) is monic of degree nk and xs(x)=nk1

i=0 sixi+1, the remainder whenxs(x) is divided byg(x) isxs(x)g(x)snk−1. We now describe our first version of theMeggitt Decoding Algorithmand use an example to illustrate each step. Define thesyndrome polynomial S(v(x)) of anyv(x) to be

S(v(x))=Rg(x)(xnkv(x)).

By Theorem 4.6.1(iii), ifv(x)Rn, thenS(v(x))=0 if and only ifv(x)C.

Step I:

This is a one-time precomputation. Find all the syndrome polynomials S(e(x)) of error patternse(x)=n−1

i=0 eixi such that wt(e(x))≤tanden1=0.

Example 4.6.3 Let C be the [15,7,5] binary cyclic code with defining set T = {1,2,3,4,6,8,9,12}. Let α be a 15th root of unity in F16. Then g(x)=1+x4+ x6+x7+x8 is the generator polynomial ofC and the syndrome polynomial ofe(x) is S(e(x))=Rg(x)(x8e(x)). Step I produces the following syndrome polynomials:

e(x) S(e(x)) e(x) S(e(x))

x14 x7 x6+x14 x3+x5+x6 x13+x14 x6+x7 x5+x14 x2+x4+x5+x6+x7 x12+x14 x5+x7 x4+x14 x+x3+x4+x5+x7 x11+x14 x4+x7 x3+x14 1+x2+x3+x4+x7 x10+x14 x3+x7 x2+x14 x+x2+x5+x6

x9+x14 x2+x7 x+x14 1+x+x4+x5+x6+x7 x8+x14 x+x7 1+x14 1+x4+x6 x7+x14 1+x7

The computations of these syndrome polynomials were aided by Theorems 4.6.1 and 4.6.2. For example, in computing the syndrome polynomial ofx12+x14, we haveS(x12+ x14)=Rg(x)(x8(x12+x14))=Rg(x)(x5+x7)=x5+x7 using Theorem 4.6.1(vi). In computing the syndrome polynomial for 1+x14, first observe that Rg(x)(x8)=1+x4+ x6+x7; then S(1+x14)=Rg(x)(x8(1+x14))=Rg(x)(x8)+Rg(x)(x7)=1+x4+x6. We see by Theorem 4.6.2 that Rg(x)(x9)=Rg(x)(x x8)=Rg(x)(x(1+x4+x6+x7))= Rg(x)(x+x5+x7)+Rg(x)(x8)=x+x5+x7+1+x4+x6+x7=1+x+x4+x5+ x6. Therefore in computing the syndrome polynomial forx+x14, we haveS(x+x14)= Rg(x)(x8(x+x14))=Rg(x)(x9)+Rg(x)(x7)=1+x+x4+x5+x6+x7. The others

follow similarly.

Exercise 275 Verify the syndrome polynomials found in Example 4.6.3.

Step II:

Suppose that y(x) is the received vector. Compute the syndrome polynomialS(y(x))= Rg(x)(xnky(x)). By Theorem 4.6.1(iv),S(y(x))=S(e(x)), wherey(x)=c(x)+e(x) with c(x)C.

Example 4.6.4 Continuing with Example 4.6.3, suppose thaty(x)=1+x4+x7+x9+ x10+x12is received. ThenS(y(x))=x+x2+x6+x7. Exercise 276 Verify thatS(y(x))=x+x2+x6+x7in Example 4.6.4.

Step III:

IfS(y(x)) is in the list computed in Step I, then you know the error polynomiale(x) and this can be subtracted fromy(x) to obtain the codewordc(x). IfS(y(x)) is not in the list, go on to Step IV.

Example 4.6.5 S(y(x)) from Example 4.6.4 is not in the list of syndrome polynomials

given in Example 4.6.3.

Step IV:

Compute the syndrome polynomial ofx y(x),x2y(x), . . . in succession until the syndrome polynomial is in the list from Step I. IfS(xiy(x)) is in this list and is associated with the error polynomiale(x), then the received vector is decoded asy(x)xnie(x).

The computation in Step IV is most easily carried out using Theorem 4.6.2. As Rg(x)(xnky(x))=S(y(x))=nk1

i=0 sixi,

S(x y(x))=Rg(x)(xnkx y(x))=Rg(x)(x(xnky(x)))=Rg(x)(x S(y(x)))

=x S(y(x))snk1g(x). (4.8)

We proceed in the same fashion to get the syndrome ofx2y(x) from that ofx y(x).

Example 4.6.6 Continuing with Example 4.6.4, we have, using (4.8) and S(y(x))=x+ x2+x6+x7, thatS(x y(x))=x(x+x2+x6+x7)−1·g(x)=1+x2+x3+x4+x6, which is not in the list in Example 4.6.3. Using (4.8),S(x2y(x))=x(1+x2+x3+x4+ x6)−0·g(x)=x+x3+x4+x5+x7, which corresponds to the errorx4+x14implying that y(x) is decoded asy(x)−(x2+x12)=1+x2+x4+x7+x9+x10. Note that this

is the codeword (1+x2)g(x).

The Meggitt decoder can be implemented with shift-register circuits, and a second version of theMeggitt Decoding Algorithmis often employed in order to simplify this circuit. In this second implementation, the circuitry only corrects coordinaten−1 of the vector in the shift-register. The vector in the shift-register starts out as the received vector y(x); if there is an error in positionn−1, it is corrected. Then the shiftx y(x) is moved into the shift-register. If there is an error in coordinaten−1, it is corrected; this in effect corrects coordinaten−2 of y(x). This continues untily(x) and itsn−1 shifts have been moved into the shift-register and have been examined. At each stage only the error at the end of the shift-register is corrected. This process corrects the original received vectory(x) since

161 4.6 Meggitt decoding of cyclic codes

a correction in coordinaten−1 ofxiy(x) produces a correction in coordinaten−1−i ofy(x). This version of Meggitt decoding allows the use of shift-registers whose internal stages do not need to be directly accessed and modified and allows for fewer wires in the circuit. For those interested in the circuit designs, consult [21]. We illustrate this in the binary case by continuing with Example 4.6.6.

Example 4.6.7 After computing the syndrome polynomials of y(x), x y(x), and x2y(x), we conclude there is an error in coordinate 14 of x2y(x), that is, coordinate 12 of y(x). Thus we modifyx2y(x) in coordinate 14 to obtainx2y(x)=x2+x6+x9+x11+ x12 (where y(x)=1+x4+x7+x9+x10 is y(x) corrected in coordinate 12). This changes the syndrome as well. Fortunately, the change is simple to deal with as fol-lows.S(x2y(x))=Rg(x)(x8(x2y(x)))=Rg(x)(x8(x2y(x)))Rg(x)(x8x14)=S(x2y(x))Rg(x)(x22) becausex2y(x)=x2y(x)x14since we changed only coordinate 14 ofx2y(x).

ButS(x2y(x))Rg(x)(x22)=x+x3+x4+x5+x7x7=x+x3+x4+x5from Ex-ample 4.6.6 asRg(x)(x22)=Rg(x)(x7)=x7. Thus to get the new syndrome forx2y(x), we takeS(x2y(x)) and subtractx7. This holds in general: namely, to obtain the new syndrome polynomial after an error has been corrected, take the old syndrome and subtractx7. This simple modification in the syndrome polynomial is precisely why the definition of syn-dromeS(v(x)) as Rg(x)(xnkv(x)) was given; had we used the more naturalRg(x)(v(x)) as the definition of the syndrome polynomial ofv(x), we would have had a more complicated modification of the syndrome at this juncture. So we compute and obtain the following table:

Syndrome of Syndrome Syndrome of Syndrome

x3y(x) x2+x4+x5+x6 x8y(x) x3 x4y(x) x3+x5+x6+x7 x9y(x) x4

x5y(x) 1 x10y(x) x5

x6v(x) x x11y(x) x6

x7y(x) x2 x12y(x) x7

We see that none of our syndromes is in the list from Step I until that ofx12y(x). Hence we change coordinate 14 ofx12y(x)=x+x4+x6+x7+x12to obtainx12y(x)=x+ x4+x6+x7+x12+x14(where y(x)=1+x2+x4+x7+x9+x10is y(x) changed in coordinate 2). As above, the syndrome ofx12y(x) isx7x7=0. We could stop here, if our circuit is designed to check for the zero syndrome polynomial. Otherwise we compute the syndromes ofx13y(x) andx14y(x), which are both 0 and not on the list, indicating that the procedure should halt as we have considered all cyclic shifts of our received vector.

So the correct vector isy(x) and in fact turns out to be the vector output of the shift-register

circuit used in this version of Meggitt decoding.

Exercise 277 Verify the results in Example 4.6.7.

In the binary case where we correct only the high-order errors one at a time, it is un-necessary to store the error polynomial corresponding to each syndrome. Obviously the speed of our decoding algorithm depends on the size of the list and the speed of the pattern

recognition of the circuit. There are further variations of Meggitt decoding for which we again refer the reader to [21].

Exercise 278 With the same code as in Example 4.6.3, find the codeword sent if two or fewer errors have occurred andy(x)=1+x+x6+x9+x11+x12+x13is received. Do this in two ways:

(a) Carry out Steps I–IV (that is, the first version of the Meggitt Decoding Algorithm).

(b) Carry out Meggitt decoding by correcting only the high-order bits and shifting as in Example 4.6.7 (that is, the second version of the Meggitt Decoding Algorithm).

Dans le document Fundamentals of Error-Correcting Codes (Page 177-181)