error correcting codes for correcting bursts of errors
TRANSCRIPT
J. E. Meggitt
Error Correcting Codesfor Correcting Bursts of Errors
Abstract: It is observed that the codes of Abramson, Melas and others are essentially described by the char
acteristic equation that a certain matrix satisfies. Consequently it is found that transformations of these codes
are possible provided that the characteristic equation is preserved. These transformations may then be
exploited to produce codes that have a simple implementation end, in fact, a general method is indicated
by which any code may be implemented when the charaderistic equation is known.
where T is a matrix such as has just been described, andn is such that Tn= 1. These k linear equations define k ofthe a's in terms of the other n - k, and these are taken tobe the check digits."
To correct such a message, the error vector z is calculated. where
Application to codes
In the class of codes to be considered, data is transmittedin blocks of n binary digits. In each block there are /1." kinformation digits and k check digits and, as each block isreceived, error correction is carried out.
If the digits in the block are al .... (In, then the classof codes to be considered is defined by the equation
In data transmission systems that are subject to noise, itis found that errors do not occur randomly but in bursts.Consequently, much interest has lately centered on theproblem of constructing suitable error correcting codes.
In most of the codes described so far, difficulties haveoccurred with their implementation, because differentcourses of action have to be followed by their decoders,depending on the nature of the error burst that is detected,and this has made them expensive in equipment, Themain purpose of the present paper is to show how someof these codes may be transformed to make their implementation simple.
Fed-back shifting registers, whose logic contains onlymodulo two adders, are conveniently described in termsof matrices.' If the contents of a shifting register arerepresented by the k by 1 vector x, it is convenient todenote the contents after a shift by
(4)
(5)
where T is a k by k matrix, all of whose elements are zeroor one.
The behavior of such a shifting register is determinedby the characteristic equation of degree k, that T satisfies
Tx,
F(T) =0.
(1)
(2)
and where the a' 's are the received digits. The variousmistakes that the code is required to correct are arrangedto produce different error vectors z, so that an examination of z gives sufficient information for the correctionof the message.
Transformation of codes
For a good discussion of these ideas, the reader shouldsee Reference 1.
It happens that codes for correcting bursts of errorsmay be constructed in terms of these matrices T.
By a suitable choice of F(T), it is possible to make thesuccessive contents of the register take 2~-1 differentvalues. Such a characteristic equation will be denoted inthis paper by
When a code of the form (4) has been designed (whichis done by the choice of a suitable matrix T), it may befound that it is a difficult code to implement. It is desirable then to transform the code so that the rules for im~
plernenting it are simpler, and yet to retain its fundamental structure. This may be done as follows:
Let S be a matrix with an inverse. Then from (4),
M(kT) =0. (3)
tl1Sx + a2(STS-l )Sx+a3(STS-l)2 Sx+ ....
+an(STS-l)"-l Sx=O. (6) 329
IBM JOURNAL "JULY 1960
If U is written
U=STS-1,
and
y=Sx,
(7)
(8)
Examples of known error correcting codes and theirassociated characteristic equations
• Example 1
If T is chosen to satisfy
thenM(kT) =0, (13)
F(T) =0. (10)
so SF(T)S-I =0,
Thus the characteristic equation is invariant under thetransformation.
It may be shown that the converse is true under thecondition that the minimal polynomials for U and Tareeach identical with their characteristic polynomials. Thismeans that if U and T are two matrices which have thesame characteristic equation. and which satisfy the condition about minimal polynomials, they are related by
(15)
(14)
Z=T'"-l (1 +T) X
=Tr-ly, where y= (l +T)x.
As before, since the vectors TT-ly are all different, thevalue of r may be found.
In this case the code is based upon a (k+ 1) by (k + 1)matrix
and by definition the vectors Tr-lx are all different forr= 1,2· .... n, so that the value of r may be found andthe mistake rectified.
This gives rise to a set of codes first noted by Abramson." The relevant characteristic equation is simply (13).
• Example 2
If to the k equations defining the codes 1. is added a totalparity check, then it can be seen that double adjacenterror correction is also possible, as was also noted byAbramson.
The idea is that the total parity check equation specifieswhether there has been a single or double error. If therehas been a single error, correction is carried out as inExample 1. If on the other hand there has been a doubleerror in digits a; and a,·+l, then the error vector is
then the codes defined by (4) are such that single-errorcorrection is possible and the block length, n=2"'-1.This follows because if say the r Lh digit is receivedwrongly,
(9)
(11 )
and since F is a polynomial in T ,
F(U) =0.
These k equations define a code with different rules forthe formation of the check digits from the previous one.However, a mistake with the first code that leads to anerror vector z, leads with the new code to an error vectorSz. Since S is non-singular. the distinct vectors z correspond to distinct vectors Sz. Thus the new code with Treplaced by U corrects exactly the same mistakes as theold one.
For any particular code it is possible to search for aconvenient matrix S. However, this is a laborious procedure, so a different approach is adopted. It is observedthat the matrix T has a characteristic equation that Titself must satisfy. Thus
It follows that if these matrices are used to producecodes, the codes produced must have identical properties.It is then possible to assert that the properties oj a codeoj the form (4) are determined essentially by the characteristic equation that T satisfies (provided that the minimal polynomial for T is the same as the characteristicpolynomial, a condition that is usually satisfied by matrices that produce useful codes) .
This has two implications. The first is that whensearching for new codes systematically it is not necessaryto search through the set of all matrices T, but onlythrough the set of possible characteristic equations. Thesecond is that this provides a ready means for simplifyingexisting codes. The procedure is to find the characteristicequation that an existing matrix T satisfies and then tochoose a matrix U which is simpler than T, but whichsatisfies the same equation. It will be explained how thisis done. The result is the same as if T had been transformed explicitly by finding a suitable matrix S.
• Example 3
The codes 2 may in turn be extended as has been done byMelas.t In this case the (k 1 +kz) by (k1+kt ) matrix Tis used, where
where T1 is a k by k matrix satisfying M(kT1 ) =0. Theblock length is n = 27' - 1 while there are now (k + 1)check digits.
The characteristic equation that T satisfies is the product of the two characteristic equations that the two diagonal parts of the matrix T satisfy separately. Thus thecharacteristic equation is
(18)
(16)
(17)(T+ l)M(kT) ~O .
(12)U=STS-l.
330
IBM JOURNAL· JULY 1960
and T 1 satisfies
while T z satisfies
which is to be corrected, while the other k z should definethe position of the burst. Again the reader should seeReference 5 for details. T1 satisfies the characteristicequation
(23)
and k1 and kz are chosen so that 21<,.-1 is a factor of2",-1. The idea is to use two separate sets of checkequations, each of the same form as Example 1. To seeexactly how this works, the reader should see Reference4, but it is clearly not surprising that such a code shouldbe capable of correcting bursts of errors of various kinds.It is seen that there are k=k1 +kz check digits in the code,while the block length is n = 2"',- 1.
The characteristic equation that T satisfies is
(19)
• Example 4
A further group of codes is based on the ik-: +kz) by(k1 +kz) matrix T, where
(20)
and where T z satisfies M(k2Tz) =0, while Tl is the k1 byk1 matrix
Thus T satisfies the characteristic equation
(24)
It will be seen that the characteristic equations whichessentially define a number of important codes may easilybe obtained explicitly. It will be shown now how thesecodes may be simplified by transformations of the typethat have been suggested.
Form of transformed codes
There exists a simple method of implementing any codewhose matrix T satisfies a known characteristic equation(providing the minimal polynomial for T coincides withthe characteristic polynomial) and this will now be described, It is valuable because it provides ways of implementing existing codes such as those of Abramson, Melasand Fire, and because it provides a general way of implementing any other code of the form (4) which may befound.
The general characteristic equation has the form
TI'+Ck_1T k- l +C"_2Tk-2+ ...• +C1T+Co=O , (25)
The code then becomes explicitly
(26)
ooo
Co
1
o
°o
oo
o
o
1
oo
lThis matrix has the property that its minimal poly
nomial is the same as its characteristic polynomial.With this T, the vector x of equation (4) may be
chosen arbitrarily provided it is such that
where the C's are zero or one. A convenient matrix thatsatisfies this equation is the associated matrix
(21)
O. (22)
1
oo
o
000
o 0
o 1 0
000
(27)
x
Codes of this form have been described by Fire," andthese too are good for correcting bursts of errors of various kinds. It is necessary for k1 to be chosen to be prime to2"'.-1. It is then found that k=k1 +k2 and n"=k 1( 2!<. -- l) .
The idea behind these codes is that the first ki equationsshould be capable of detecting the kind of error burst
for any polynomial G of degree less than k. (If this condition is violated, the resulting code is the same as thatproduced by an r by r matrix T* satisfying the characteristic equation of degree r say, (r<k)
G(T*) =0,
and such a code could be constructed using only r checkdigits instead of k). 331
IBM .JOURNAL • JULY 1960
(36)
(37)
By construction
"}; aibi=O.-1.-1
It is observed that each equation has the form of theprevious one, with the digit labels increased by one, andthat each check digit is defined in terms of only the earlierdigits. This is a general property of codes defined by (26)and (28) as may be shown as follows.
Let the first of the k check equations (4) be
Then from the form of T (26), it can be seen that (4)may be written out in full as
Implementation
For brevity too, the encoding and decoding apparatus thatis in general required will be described only for the particular case of the code (33). However, the method isabsolutely general and the extensions will be clear.
When the message is transmitted, digits will be sentserially in order, starting with al. The last four digits (ingeneral the last k) are chosen to be the check digits andfrom (3 3) it is seen that they are defined by
(35)
It will be seen that there is much more symmetry in thenew code (33) and this is exploited in its implementationwhich is considered next. The power of the transformation is best appreciated when the method is applied to amore complicated code. For brevity this is left to thereader.
(31)
(30)
(32)
(28)
(29)
ooo1
1O1o
Using (28) the coding equations then become
(T+ 1)M(3T) =0.
A possible form for M(3T) is
M(31')=T3+T+l.
Thus the characteristic equation for T is
T'+T:l+T2+ 1=0.
Thus from (26) T is taken to have the form
If x is chosen to be
This is just a transformation of Abramson's form forthis code 'which is of course
-Example
Consider the Abramson code for correcting single anddouble adjacent errors, that has block length n = 7.
It has been shown in equation (17) that the appropriate characteristic equation is
then repeated multiplication by the matrix T of (26),shows that the vectors x, Tx .... T'f-I x are linearly independent 80 that with this x, the condition (27) is boundto be satisfied. Consequently x is always taken to havethis form.
332
(34)
r;,: 1r~1b'Ll 0. .
Y~L"~J LJ(38)
IBM JOURNAL -JULY 1960
Thus 1>"_"+2 = b"_k+3 •..• b.; --0, while since the lastvector in (37) cannot be 0, b"_',.+1 = 1.
The first check equation (36) therefore reduces to
n-k
:::s a,b,a"_I"+1 .i;;;;:l
The second becomes
n-k:::s al+1bj=a" ..,,,zi=l
(39)
The k l h becomes
n~?,
:::s ai+l'~lbi=atl ,i~l
is fed back so that its contents are continually changing,while simultaneously information leaves the main register. As this happens the detection circuit C, looks forcoincidences and when coincidences are found, the digitcurrently being output from the end of the main registeris inverted and corrected. Simultaneously register B isaltered to indicate that the burst pattern it is now requiredto correct is a simpler one, since the first digit of it hasalready been corrected.
Theory of decoder
The role of the fed-back shifting register B is to operaterepeatedly on its content z with T-l. The connections to itare in fact determined by the C's in equation (26). Thedetection circuit is arranged to detect the vectors x and( 1+T) x which have the form shown in Fig. 2.
Thus if the rIll digit alone is wrong,
and this proves the assertion. (41)
333
OUTPUTTO LJN E
...~ CORRECT
~_.~
.... If 0
G~'-TE~C-T~:- 0 0 1
001 0
IF DETECTEO, OUTPUT
---------,I-,--l--,--l---.--J~
4j
3l' t.,L--.I_~I...:...1
4,5,6,7
and coincidence will be detected after (r- 1) shifts.However, at this time the r tl1 digit is currently being output and so it is inverted as is required. The detectioncircuit also adds x to the present contents (x in this case)of the register B, so it now contains zero and no furthercorrection will take place.
I, 2,3
I I
4'S'6'7lrl rINFORM~ u ~~r---~~:::-'::---+
Figure I Configuration required for an encoder.
Figure 2 Configuration required for a decoder.
(40)
Encoder
An encoder that imposes the conditions (35) is shown inFig. 1. The squares indicate a shifting register. Information flows into the register at times 1, 2, 3 as shown bythe timing pulses applied to the input gate, while data isfed back at times 4, 5, 6, 7, when the check digits areformed. The configuration is shown at time 4. At time 5the first digit U1 is transmitted, a2 and as move one placeright, while the check digit a..=a1+a2 is placed in theposition occupied by as at time 4. This process continuesas all the check digits arc formed.
An alternative design uses a shifting register that takesvalues Trx(r=O, 1, 2 ... ) in turn, and this is used tosteer information into four check digit stores in a fairlyobvious way.
The general design of the encoder of Fig. 1 imposesthe conditions (39). This is done by using a shiftingregister of length n - k, the feed back connections towhich arc determined by the b's of Eq. 37.
Decoder
A decoder is shown in Fig. 2. The operation of the decoder is first to calculate the error vector.
The values of the z's indicate the nature and positionof errors. The received message is fed into a shifting register and the adder A forms the sums z automatically attimes 4, 5, 6, 7, and they are fed to a second shiftingregister B. The decoder is shown at time 8 (which is thesame as time 1, times being measured from the arrival ofthe first digit) when aU the transmitted digits occupy themain shifting register, while the four z's occupy theshifting register B. Henceforth until time 4, the register B
IBM JOURNAL ~ JULY 1960
For a double adjacent error, when the r t h and (r+ l)th
digits. are both wrong
and to make provision for the correction of all shorterbursts.
The operation then is merely an extension of the operation just described. The only other change it is necessaryto make for a general code, is to alter the lengths of registers and to arrange the correct feed back connections.Simple formulae can be given for these connections interms of the C's of equation (26).
and again coincidence will be detected after (r-1) shiftsand the rt h digit corrected. The detection circuit adds xto the present contents (now (l +T)x) of register B, sothat it now contains Tx. This leads to the detection of xat the next digit time, and the subsequent correction ofthe (r+ 1F" digit, as is required.
When the apparatus is designed for a general code,which corrects amongst other things, bursts of the formqlq2 ••... qp, then it is necessary to detect in register B,
Revised manuscript received January 20,1960
1. B. Elspas, "The Theory of Autonomous Linear Sequential Networks," IRE Trans. on Circuit Theory, CT·6, 45,March 1959.
2. O. E. Sacks, "Multiple Error Correction by Means ofParity Checks," TRE Trans. on Information Theory,IT-4,145, December 1958.
3. N. M. Abramson, "A Class of Systematic Codes for NonIndependent Errors," Technical Report No. 51, December30th, 1958, Stanford Electronics Laboratory, California.
4. C. M. Melas, "A New Group of Codes for Correction ofDependent Errors in Data Transmission," IBM Journal ofResearch and Development, 4, 58-65, January 1960.
5. P. Fire, "A Class of Multiple-Error-Correcting BinaryCodes for Non-Independent Errors," Sylvania ElectronicSystems Report, presented at A.LE.E. Meeting, Chicago,October 1959.
Conclusion
A simple implementation has been given for any codethat is described by a characteristic equation, and it hasbeen observed that many codes can be characterized inthis way. Hence this is a powerful approach to the codingproblem.
References
(42)
(43)
z=rr-1 ( 1 1 T )x ,
334
IBM JOURNAL ·JULY 1960