an error-correcting coding scheme for alphanumeric data

6
VQIulne 7, aumber 2 INFORMATION P’IWCESSING LETTERS AN ERROR-CORRECTIl+JG COBXNG SCHEME FOR ALPHANUMERIC DATA AS. SETHI, Y. RAJARAhlAN and P.S. KENJALE * Computer Centre, Indian Institute o,f Technology, Kanpw 208016, India Recrived 16 April 1977; revised version received i0 August 1973 Alphanumeric codes, codes, error correction, error-correcting codes, transcription errors, transpositiorr errors illtrodllction &I important pr&~~ in the design of informa- tion systems is ensuring rk integrity of data fed through card readers and terminals. Errors may occur while punching cards, inputting data to keyboards or terminals, or copying data by any means. The two main types of errors that occur during these data transfers [6] are: (i) Transcription errors which may be: Single: only one digit is in error, type a + b, and Muliiple: more than one digit is in error. (ii) Transposition errors: types such as ab + ba, axb -+bxa, axyb + bxya. Many schemes have been suggested for detecting these types of errors [ 1,2,4,5 $1. Generally, a check digit is appended to the information digits to generate a ‘self-checking’ number. The introduced check digit is such that the weighted sum of the digi;s (with respect to a given set of’weights) is zero modulus a given number. Error correction is, however, far more difficult. Most schemes can correct only single tran- sGription errors. A scheme, proposed by Brown [3], using the theory of cyclic codes, can correct other types of errors but it needs 3 check digits. In this paper we propose a scheme that uses 2 check digits to achieve correction of all single tran- scription and adjacent transposition e:rrors. The scheme uses two different weight sequences and is thus an extension of the traditional weighted scheme for error detection. It is paiticularly useful when Presently with Tata Consultan cy Services, Bombay. applied to a modulus-37 system for alphanumeric data used widely in business applications. 2. Weighted code for error correction In general, we shall consider’numbers rgpresented in base p where p is a prime number; thus a digit may be any of the symbols 0, 1, . . .. p - 1. In the scheme proposed here, two check digits, n&l and ,~+a, are appended to the k information digits, Q, na *..., nk, to form a code word of N = k + 2 digits. The check digits are obtained by two different weight se w = WI, w2, .... WN , wp = rv;, w;, ..“) wb , such that +he following equations are saWed: N c winisOrnodp, i= 1 and Given the k information digits, the check dig$ts may be evaluated from the above equations. The cor- rection of all single transcription and adjacent tlrans- pclritiorl errors can be achieved if the weight z;ecluen- ces satisfy the following constraints: Cl.wi<pand&<pfori= 1,2,.,.,X C2.w#w~and~w;fw~fori#j,i,j:~ I,:>, ,,.., N 72

Upload: as-sethi

Post on 22-Aug-2016

236 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: An error-correcting coding scheme for alphanumeric data

VQIulne 7, aumber 2 INFORMATION P’IWCESSING LETTERS

AN ERROR-CORRECTIl+JG COBXNG SCHEME FOR ALPHANUMERIC DATA

AS. SETHI, Y. RAJARAhlAN and P.S. KENJALE * Computer Centre, Indian Institute o,f Technology, Kanpw 208016, India

Recrived 16 April 1977; revised version received i0 August 1973

Alphanumeric codes, codes, error correction, error-correcting codes, transcription errors, transpositiorr errors

illtrodllction

&I important pr&~~ in the design of informa- tion systems is ensuring rk integrity of data fed through card readers and terminals. Errors may occur while punching cards, inputting data to keyboards or terminals, or copying data by any means. The two main types of errors that occur during these data transfers [6] are:

(i) Transcription errors which may be: Single: only one digit is in error, type a + b, and Muliiple: more than one digit is in error.

(ii) Transposition errors: types such as ab + ba, axb -+ bxa, axyb + bxya.

Many schemes have been suggested for detecting these types of errors [ 1,2,4,5 $1. Generally, a check digit is appended to the information digits to generate a ‘self-checking’ number. The introduced check digit is such that the weighted sum of the digi;s (with respect to a given set of’weights) is zero modulus a given number. Error correction is, however, far more difficult. Most schemes can correct only single tran- sGription errors. A scheme, proposed by Brown [3], using the theory of cyclic codes, can correct other types of errors but it needs 3 check digits.

In this paper we propose a scheme that uses 2 check digits to achieve correction of all single tran- scription and adjacent transposition e:rrors. The scheme uses two different weight sequences and is thus an extension of the traditional weighted scheme for error detection. It is paiticularly useful when

Presently with Tata Consultan cy Services, Bombay.

applied to a modulus-37 system for alphanumeric data used widely in business applications.

2. Weighted code for error correction

In general, we shall consider’numbers rgpresented in base p where p is a prime number; thus a digit may be any of the symbols 0, 1, . . . . p - 1. In the scheme proposed here, two check digits, n&l and ,~+a, are appended to the k information digits, Q, na *..., nk, to form a code word of N = k + 2 digits. The check digits are obtained by two different weight se

w = WI, w2, . . . . WN ,

wp = rv;, w;, ..“) wb ,

such that +he following equations are saWed:

N

c winisOrnodp, i= 1

and

Given the k information digits, the check dig$ts may be evaluated from the above equations. The cor- rection of all single transcription and adjacent tlrans- pclritiorl errors can be achieved if the weight z;ecluen- ces satisfy the following constraints:

Cl.wi<pand&<pfori= 1,2,.,.,X C2.w#w~and~w;fw~fori#j,i,j:~ I,:>, ,,.., N

72

Page 2: An error-correcting coding scheme for alphanumeric data

Volume 7, number 2 IKFORMATION I’R’WESSING LEITER3 F’ebruary 1978

C~.W;W~$ w&modpforj#j, i,j= 1,‘~~. , ‘

C4* ($+I -- w;)@Jj+r - Wj) f (wt+r - w,)(w;+r - $modpfori#j,i,j= 1,2,...,N- 1.

C5 * (WI - ~++l) W; * (wi - wi+ 1) WI mod p for i = - ‘) 1, k, . . ..N- l,j= 1,2, . . . . N.

Constraints Cl and C2 are sufficient for the detec- tion of all single transcription and adjacent transposi- tion errors [6]. We shall now show that Constraints C3, C4 and C5, together with C 1 and C2, are suffi- cient for the correction of these errors. Let

S,=5 n;w, mod p I=1

and

S,=Z njw; mod p . t=1

It is clear that if there is no error, then & 2 0 mod p and&= 0 mod p. If an error of types a + E or ab + ba occurs, then Sr f 0 mod p and Ss f 0 mod p

because of Conditions Cl and C2 [6]. Suppose a single transcription error occurs so that

digit n J gets changed to n;. Then Si s (n; - n J) wJ mod p and & z (n; - n J) w> mod p. Multiplying the two equations and cancelling (n; - n J), we get

sl* W;=&* WJmOdp.

Then for any j # J, the equation

(2.1)

Sr* w;ESs* wimodp (2.2)

will not hold, because, if it did, then on multiplying (2.1) and (2.2) and cancelling Sr&, we get, wiw; z wJw; mod p which is not true if the weights satisfy Constraint C3. Hence there is a unique value of j(= J) which satisfies equation (2.2). Thus, by solving equa- tion (2.2), it is possible to locate the digit in error.

Once the error position has been located, correc- tion can be effected by solving the equation Sr 5 (rt; - n J) WJ mod p which gives (n; - nJ) z

-’ SPJ mod p where wJ-’ denotes the multiplica- ti ve inverse of WJ in the field @F@), i.e., ;YJWJ-~ z 1 mod p.

Suppose an ad_iacent transposition error occurs so tf?at digits EJ and nJ+l get interchanged. Then

& =, (nJ - n J+l)(WJ+l - WJ) rod 8’

and

s2 z (nJ - nJ+d(W& - W;) mod p .

Multiplying and cancelling (n J - n J+f), we get,

sl(W;+l - W;>=&(wJ+1- W,r)mOdp.

For my j #J, the equation

(2.3)

Sr (w;+I - wi) s S2 (wj+r - WI) mod p

will not hold, because, if it did, then

(2.4)

(u&+1 - W>)(Wj+l - Wj)s I

E (WJ+~ - WJ)(W)+1 - W$ mod p , %. r

which is not true if the weights satisfy Constraint C4. Thus, by solving equation (2.4), J can be located uniquely and the correction is achieved by inter- changing the Jth and (J + 1)t.h digits.

It is also necessary that a transposition error should not be wrongly diagnosed as a transcription error and vice versa. Thus, if any one of equations (2.2) or (2.4) is tr lie for some value of j, *hen the other equation must not be true for any value of j. It can easily be seen that Constraint C5 is necessary to ensure this.

3. Generation of weight sequences

We have seen in the previous Section that all single transcription and adjacent transposition errors can be corrected if the weight sequences satisfy the CCAY straints Cl-U. The problem now lies in finding sets of weights which satisfy these conditions. In this Se:- tion we present two difLrent methods of systema- tically generating such Seth of weights. The weight sequences generated by these methods have some 1

nice properties which make the solution of equations (2.2) and (2.4) very straightforward.

The weight sequences may be represented as func- tions of i in the following way:

wi = f(i) and wi = g(i) for i = IL, 2, . . ..N.

We would like to find the functions f and g and the maximum value of N for a given prime p such that Conditions C 1 -CS are satisfied.

Page 3: An error-correcting coding scheme for alphanumeric data

Volume 7, number 2 IINFORMA’XM PROCESSING LETTERS Bbruwy 1978

Method 1

ltet~~~=-(i+a)andg(i)=(i+a)(i+b)fori= 1, 2, . . . . N, where a and b are integers such that 0 *G a <p, OGb <p, aqd 1 <N<p -II,

Since arithmetic is module p, f(i) < p and g(f) ( p

for all i. Thus Condition Cl is satisfied. To satisfy C2, wi # Wj, i.e.,

i+a#j+a fori#j,

which is true, and w; f wi, i.e.

(i +a)(i+b)f fj+a)(j+b)modp.

Simplifying, we get,

(i-/I)(i+j+a+b)$Omodp.

5+.x i # j and Ii - jI < p, this condition will be satis-

fiedifitjtatb<pforalli,j,i.e.if

2iV+a+b<p+l. (3J)

Prom C3, we have, w& +.wiwi mod p which can be simplified to (i + a)(i +a)(i - j) $0 mod p which is true for i # j. Condition C4 can also be shown to be true by a similar simplification.

Condition C5 reduces to (i + a)(2i - j + a + 1) f Omodp. Sincej+afOmodp,henceO<2i-j+ a + 1 < p for all possible values of i and j. Hence, 2(N-l)-l+a+l<porLV+a<p+2,whichis satisfied because of equation (3.1). Also, 2 - N + a + 1 >O or,a >N- 3. Choose

a=N-2. (3.2)

Then equation (3.1) gives N f (@ + 2 -- b)j3. Choose

N=L@+2-b)/3J, (3.3)

where Lx) denotes the largest integer smaller than or equal to x.

Thus, for a given p and any choice of b, equations (3.2) and (3.3) give the values of a and N from which the weight sequences may be easily computed.

In the correction of errors, it is necessary to solve equations (2.2) and (2.4). With the present choice of weights, the solutions of these equations can be shown to be res,pectively

j = (SzSi’ - b:) mod p

and

j = (&Sir -(a+b tl))/l.

74

We can now write down the correction algorithm for Method 1 as fozlows:

Step 1. Evaluate

N N

&= Fl nlwi mod p =

and 82 = E n& mod p. =

Step 2. If Sr = 82 = 0, there is no error. Exit. If either Sr = 0 or SQ = 0 (but not both), then go to Step 7. If Sr # 0 and S, # 0, then go to Step 3.

Step 3, Calculate J = (&SF’ - b) mod p. Step 4. If ; <J <N, then a single transcription

error has occurred in the Jth position. EvaIuate e = &(. + a)-’ mod p and replace ti J by (a J -- e)

mod p to corrxt the error. Exit. Otherwise, go to Step 5. Step 5. Calculate J’ = (J - a - 1)]2. Step 6. If 1 <J’ <N - 1, and J’ is an integer,

then an adjacent transposition error has occurred. Interchange digits n J’ and n J’+l. Exit.

Otherwise, go to Step 7. Step 7. The error is neither single transcription

nor adjacent transposition. Report ‘uncorrectable error detected’. Exit.

An example illustrating the use of this Method will be given in the next Section.

Method 2

Consider the field GF(p) where p is ? prime greater than 2. Let 01 be 3 primitive element of this field. Then&‘= 1.

Let us chooo; the weight sequences to be wi =: opi+c ) w; = at , i = 1, 2, . ..). N. Without loss of generality, we may choose 0 6 a, b, c, d < p - 1. Let

us also assume that IV = Cp - 1)/2. It is obvious that Condition Cl of Section 2 is

satisfied by these weights. To satisfy C2, wt # wj for i*j i.e c@+~ # op/+‘, or a(i - j) $0 mod (p - 1). Since! i -y j # 0, this will be satisfied if a * 0 and if a(i - j) ia not a multiple of (p - 1). But ((i - j)/ a< N = f@ - 1)/2 Hence this condition is satisfied if @CD(a, p - 1) < 2. Similarly, b f 0 and GCD(b, p- 1)<2.

From Carxlition C3, we get

for i+js

Page 4: An error-correcting coding scheme for alphanumeric data

or@ -@(ii-j)* Ornod@- l)&xe (i-f&Q, itfollowsthat(b-a)CO,orafb. Also&-fl<N= @ - 1)/2, hence GCD(b - a, p - 1) < 2.

Condition C4 also reduces to

$i+d , &+E # dJ+c . api+” fori#j,

which is the same as the expression obtained from Conditio?r. C3.

Condition CS may be simplified to

equations are really ‘equivalent because a and b are interchangeable. Thus we get

8”-#=2, (3.6)

where a # 0, b 5f 0, a + b, a is even, b is odd, GCD(a,p- 1)~<2,GCD(b,p- l)G2,and GCD(b-a,p- l)=l.Inthiscasetoo,canddmay be chosen arbitlarily.

l--OF _ if a@-4V-f) . Lab

We know from Condition C3 that GCD(b - g, p- 1)<2.Weshallnowassumethat(b-a)and (p - 1) are relatively prime. (The other case, when they have 2 as a common factor, makes equation (3.4) very diMcult to solve.)

Since (b - a) is relatively prime to (p - l), &@-‘) takes a distinct value for every distinct value of k in therangeO<k<@- -i).Now(f-j~maytakeany vaiueintherange-QV- l)G i-ji<w- l).It

h can then be seen that a@-‘)@- takes values equai to all non-zero elements of the field except ,(P_O@-Crll2 and &-3)@-a)l2_ Hence from equation

(3.4), (1 - &)I(1 - d) may take either of these two values.

(&e I, (1 - &)j( 1 - d) = &-1)(b-a)/2 = &:1, be-

cause af~-l)(bmu) = 1. If (1 - oP)/(l - Op) = 1, then a = b which violates Condition C3. Hence (1 - iP)/(l - aP) = -1 or,

ap+clp=2. (3-9

Tshis equation can be easily solved for Q and b. These values will give us the weight sequences for the co Lb provided a # 0, b # 0, a # b, GCD(a, p - 1) G 2, GCD(b, p - 1) G 2, and GCD(b - a, p - 1) = 1. It should be noted that c and d may be chosen arbi- trarily.

&se 11, (1 _ aajl(l _ $I= a@-3)@-a)12=~bff where /3 = OL(~-~)~~. Hence p” - (orp)o = fib - (Gb. But alp = a(p-1112 = + 1. Since 0#3 = 1 - xq$ies Q = b, this is ruled out. Hence o$ = -1 and $ - (--1)’ = pb - (-l)*. Clearly, a and b can.lot be both even or both odd. If 4 is even and b is odd, then fl- /? = 2. If d is odd and b is even, then p - p = 2. These two

With the weights as assumed in Method 2, equa- tion (2.2) reduces to S,S;’ = ol(b-u~~+(d-c? Let

s,Sl -‘=ak.Then(b-a)jE(k+c-d)modCp- 1). Since @ - a) and @ - 1) are relativeIy prime, there exist integers r and s such that r@ - a) + S@J - 1) = I or,r(b-a)Elmod@-l).Then(b-a)*r(k+c-d) s(ktc-d)mod@- l),provided(k+c -d)f Ornod@- l).(If(k+c-&EOmod@- l),then l@ j = 0 is the solution we are looking for.) Hence j = r(k + c - d) is a solution to equation (2.2). We

. shall call I the inverse of (b - a) moduio (p - I). In the special case when c and d are zero, we get simply j=r* k.

In a similar way, equation (2.4) reduces to

s,Sl Ll = a@-all+W-4 . (ap _ l)/(~p - 1).

Let S2Si’ = 8 and a(‘-“* (cyb - l)/(oP -1 ) = CY-“. Then

@-a)jsk+t’mod@-1),

wXch solution is j 3 r(k + t’) mod (p - 1). Rutting t = n’, we get j” (rk + t) mod @ - 1,).

The correction algorithm for Method 2 may now be written as:

Step 1. Evaluate

s1=E

N

niwi mod p and S2= X niwi mod p . i=l i= 1

Step 2. If S1 = S2 = 0, there is no error. Exit. If either S1 = 0 or S2 = 0 (but not both), then

glr to Step 8. If S1 # 0 and S2 # 0, then go to Step 3.

Step 3. Uculate $$?I’ and find k such that d” = S2Si1.

Step 4. Calculate J z r(k + c - $) mod (p - 1). Step 5, If 1 G J G N, then a single transcription

error has occurred in the Jth position. Evaluate

Page 5: An error-correcting coding scheme for alphanumeric data

Vchne7,namber2 L INFORMATION PRCXXSSING LXTTERS F&wiry 1978

e = &t~~(~+~) and replace nJ by (nJ - e) mod p to correct the error. Exit.

Otherwise to tq Step 6. step 6. &l&ate J’ E (rrk + t) mod (p - 1). Step 7. If 1 <J’ <.Ar - 1, then an adjacent trans-

position error has occurred. Interchange digits ns and n J’41. Exit.

Otherwise, go to Step 8. L&q 8. The error is neither single transcription

nor adjacent transposition. Report ‘uncorrectable error detected’. Exit.

4. Examples

We now illustrate both methods of generating weight sequences by examples. We shall consider alphanumeric data ti which there are 36 symbols. The smallest prime number greater than 36 is 37. Thus a modulus-37 check digit scheme will be appro- priate @ = 37). It would, however, be necessary to introduce in the symbol set 37 symbols. The 10 numerics, the 26 alphabets and one more symbol such as $ may be used for coding data. We wii use decimal numbers to represent the alphabets as fol- lows: A - b PO, 8 + 11, C-+ 12, . . . . 2 + 35, and use * for 36.

When Method 1 is used, the length IV of the code is given by equation (3.3). This is maximum when 21 = 0. In such a case,N= 13 for p = 37. Hence, from equ.ation (3.2), a = 11. The weight sequences then are: w*=ita,wf=i(i+a)fori=1,2 ,..., N&e., .

W:= 12, 13, 14, 1516, 17, 18, 19,20,21,22, 23,24

IV’= 12,26,5,23,6,28, 15,4,32,25,20, 17, 16. When Method 2 is used,N= 18 for p = 37. Since 2

is a primitive element of GF@7), we may take Q = 2. All non-ze!:o elements of GF(37) can be expressed as powers oft%: 01= 2,4* = 4,a3 = 8, (v4 = 16, . . . . a35 = 19,ar36= 1.

Let us first consider Case I. Then a and b are solu- tions of equation (3.5) such that a + 0, b # 0, ,tz # b, GCqa, 36) G 2, GCD@, 36) 4 2 and GCD(b - a, 36) = 1. The solutions which satisfy these conditions are (a, 8) = (2, 19) or (17,221.

It should be noted that if (0, b) is a solution, so is (b, a). For the sake of illustration, we take a = 2 and b = 19. Since c and d may be chosen arbitrarily,

76

we choose c = d = 0. Then the weight sequences are: wi = & trq, gle, ats, . . .

= 4, 16,27,34,25,26,30,9,36,33: 21; 1.0,3, 12, 11,7,28,1.

w; = cy 19, $8 = $, Lya+rg = $1, ,..

= 35,4,29, 16,5,27,20,34,6,25,24,26,22, 30,14,9,19,36.

if we choose Case !I, then a and b are the solutions of equation (3.6). Now fl= oi’ =: 18. Then we may find all the powers of fl as follows: fl= ($7 ‘3 18, /‘Ja = (ys4 5: 28, P3 = (11~~ = 23, . . . . @35 =

($9 = 35,036 =: $6 = 1.

. Then the solutions of equatiori (3.6) which satisfy the required conditions may be found to be (a, b) = (14,19) or (34,17). If we choose a = 14, b = 19, : = d = 0, the weight sequences are:

H’i z (yr4p $8, #2 = cy6 , l . .

= 30, 12,27,33,28,26,3, 16,36,7,25, lo:, 4,9, 11,34,21, 1.

I w. = &19, a38 = a2 *2+19 = *21 1

= 35,4,29,16: 5,27,20,3;;6,25,24,26,22, 30,14,9,1~. 36.

We will now ill&rate the method of appending chlzck symbols to a code and correcting errors when they occur. For a code with 6 information symbols an 3 two check symbols, .Y = 8. If we use Case I of Method 2 with a = L, if= 19, c = d = 0, we may assume the following weights: W = 4, ?6,27,34,25,26,30,9. W’= 35,4,29, 16,5,27,20,34. Then r = inverse of [b - a) modu,lo @ - 1) = inverse of 17 modulo 36 = 17. Also, aBr = ddMc) . (d -

l)/(u? - 1) = 36 = ais or, t’ = -18. Hence t = rt’ =

-18. Let ZVI mformr;tion code be:

4H9SC5.

The check digits pre found from the equations Y r=rniwjs 0 mod 3’7 and Z!l&niw;~ 0 mod 37. These reduce to

30~ + 9na + 26 s 0 mod 37

and j

2(h, + 34~2~~ -I 2 E 0 mod 37.

solving these: equations for n7 and ns, we obtain n7 = 35 + %’ and na = 12 -+ c Thus the coded inform

Page 6: An error-correcting coding scheme for alphanumeric data

mation is

4H9SCSZC.

Suppose a single transcription error occurs which changes S to 2. Then the weighted sums & and S, may be computed to be S1 = 16 and S, = 1. Hence S&’ zT 1 X 16” = 1 X 7 = 7 = a32 or, k = 32. Th\is, Jzrrk;=17X32mod36=4.Since lGK8,a single transcription error has occurred in the 4th digit. Its magnitude is e = & l a-“= 16 . am8 = 7. Hence ~24 = nk - e=35-7=28+S. Thustheerror is corrected.

Suppose there is an adjacent ?ransposition error and the coded information becomes 4 H9 S 5 CZ C Then Sl= 7, Sz = 6, S& -’ =22=a3”,ork=31. HenceJ= 17X31 mod36=23.SinceJ>8,the error is not single transcription. Then J’ = 17 X 3 1 - 18 = 5. Since 1 GJ’ < 7, an ad,jacent transposition error hs occurred. The fifth and sixth characters are interchanged to correct the error.

5. Conclusions

We have seen how the familiar weighted scheme for error detection may be extended to provide error correction using two check digits. In Section 3 we discussed two methods of generating weight sequen- ces for this scheme.

It is evident from the correction algorithms that Method 1 is the simpler of the two. However, it can- not be used for very long codes. For a modulus-p scheme, where p is a prime, the maximum length for which Method 1 can be used is L@ + 2)/3 .I, whereas Method 2 can be used for upto 0, - 1)/2 digits. For alphanumeric codes (p = 37), these lengths are 13 and 18 digits respectively. In most cases, a maximum of 13 - 2 = 11 message digits is not an undue restriction and thus Method 1 is eminently suitable for these applications. It is only when messages are longer that Method 2 w2tl. need to be used.

In addition to correction, this scheme also detects a number of errors. If the code is not used to correct errors, then the number of errors which go undetected is 100/p2 Jsercent. For p = 37, this amounts to 8

negligible 3.073 percent. It should be noted that this

figure is independent of the length of the code. If the code is used to correct-errors, then again

100/p’ percent errors go undetected. But more im- portant is the percentage of errors which lead to ‘correction’. This figure is [@ - a j l N + (IV - l)] X 100/p* percent where N is the code length. This is approximately equal to lOOJV/p percent. These errors include those which are rightly conected and those which are wrongly corrected. The whole philosophy of error correction is based on the assumption that the errors which a code is designed to correct arc very frequent compared with the errors not guarded against by it. Thus a large majority of these lOON/p percent errors should be single transcription and adjacent transposition errors, which is the case with punched cards and point-of-sale terminals. Beckley [Z] mentions that 94 percent of all errors during the copying of numbers are of these two types. This scheme has thus a big potential for use in card readers, point-of-sale terminals, keyboards, and business appli- cations where accuracy of the input data is paaticu- larly required.

Acknowledgement

The authors would like to thank an anonymous referee of another publication for suggesting a syste- matic method of finding weights for the error-correct- ing code.

References

A.M. Andrew, Decimal numbers with twc check digits, Comput. Bull. 16 (1972) 156-159. D.F. Beckley, An optimum system with ‘modulus 1 I’, Comput. Bull. 11(1967) 213-215. D.A.H. Brown, Some error correcting codes for certain ‘cansposition and transcription errors in decimal integers, ,‘omput. J. 17 (19’14) 9-42. J.R. Herr, Self-checking number systems, Comput. Das. 13 (1974) 85-91. D.T. Tang and V.Y. Eum, Error control for terminals with human operators, IBM J. Res. Dev. 14 (1970) 409-416. W.G. Wild, Theory of modulus N check digit systems, Comput. Bull. 12 (1968) 309-311.

77