errordetectionmethods · have made the appendage of a check digit to identification numbers a...

14
Error Detection Methods JOSEPH A. GALLIAN University of Minnesota, Duluth The use of check digits with identification numbers for error detection is now standard practice. Notable exceptions such as social security numbers, telephone numbers and serial numbers on currency predate computers. Despite their ubiquity and utility, few people are knowledgeable about the myriad of check digit schemes in use by businesses. In this article we survey many of these schemes. Among them are three that have not been described in journal articles previously. Categories and Subject Descriptors: A.1 [Introductory and Survey]; E.4 [Error Control Codes]; G.2 [Discrete Mathematics] General Terms: Check digits, error correction, error detection Additional Key Words and Phrases: Codes 1. INTRODUCTION The availability of inexpensive, fast, re- liable scanning devices and computers have made the appendage of a check digit to identification numbers a stan- dard practice. Indeed, one finds check digits appended to identification num- bers on airline tickets, credit cards, money orders, bank accounts, checking accounts, library books, grocery items, travelers checks, driver’s licenses, pass- ports, rental cars, chemicals, automo- biles, blood bank items, photofinishing envelopes, UPS packages, express mail, bar coded mail and books. The presence of a check digit enables a computer to detect errors in numbers. Dozens of de- tection schemes have been devised. In this article we discuss many of the methods being used around the world. Information about proposed methods that have not been put into practice is contained in the references. Many of the proposed methods described in the ref- erences are superior to those in use. 2. THE UPC SCHEMES The identification number code people most frequently encounter is the Uni- versal Product Code found on grocery items [Blocksma 1989, p. 7–11; UPC Manual 1986]. A UPC identification number consists of twelve digits, each of which can be from 0 to 9. The first digit identifies a broad category of product type (for example, 3 signifies a health product), the next five digits identify the manufacturer, the next five the product, and the last is the check digit. (For many items, the check digit is not printed, but it is always bar coded.) The Author’s address: Dept. of Mathematics and Statistics, University of Minnesota, Duluth, Minnesota 55812. This article was written while the author was supported by the National Science Foundation (DMS- 9225045) and the National Security Agency (MDA 904-91-H-0036). Permission to make digital / hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and / or a fee. © 1996 ACM 0360-0300/96/0900–0504 $03.50 ACM Computing Surveys, Vol. 28, No. 3, September 1996

Upload: others

Post on 01-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

Error Detection MethodsJOSEPH A. GALLIAN

University of Minnesota, Duluth

The use of check digits with identification numbers for error detection is nowstandard practice. Notable exceptions such as social security numbers, telephonenumbers and serial numbers on currency predate computers. Despite their ubiquityand utility, few people are knowledgeable about the myriad of check digit schemesin use by businesses. In this article we survey many of these schemes. Among themare three that have not been described in journal articles previously.

Categories and Subject Descriptors: A.1 [Introductory and Survey]; E.4 [ErrorControl Codes]; G.2 [Discrete Mathematics]

General Terms: Check digits, error correction, error detection

Additional Key Words and Phrases: Codes

1. INTRODUCTION

The availability of inexpensive, fast, re-liable scanning devices and computershave made the appendage of a checkdigit to identification numbers a stan-dard practice. Indeed, one finds checkdigits appended to identification num-bers on airline tickets, credit cards,money orders, bank accounts, checkingaccounts, library books, grocery items,travelers checks, driver’s licenses, pass-ports, rental cars, chemicals, automo-biles, blood bank items, photofinishingenvelopes, UPS packages, express mail,bar coded mail and books. The presenceof a check digit enables a computer todetect errors in numbers. Dozens of de-tection schemes have been devised. Inthis article we discuss many of themethods being used around the world.Information about proposed methods

that have not been put into practice iscontained in the references. Many of theproposed methods described in the ref-erences are superior to those in use.

2. THE UPC SCHEMES

The identification number code peoplemost frequently encounter is the Uni-versal Product Code found on groceryitems [Blocksma 1989, p. 7–11; UPCManual 1986]. A UPC identificationnumber consists of twelve digits, each ofwhich can be from 0 to 9. The first digitidentifies a broad category of producttype (for example, 3 signifies a healthproduct), the next five digits identifythe manufacturer, the next five theproduct, and the last is the check digit.(For many items, the check digit is notprinted, but it is always bar coded.) The

Author’s address: Dept. of Mathematics and Statistics, University of Minnesota, Duluth, Minnesota55812.This article was written while the author was supported by the National Science Foundation (DMS-9225045) and the National Security Agency (MDA 904-91-H-0036).Permission to make digital /hard copy of part or all of this work for personal or classroom use is grantedwithout fee provided that the copies are not made or distributed for profit or commercial advantage, thecopyright notice, the title of the publication, and its date appear, and notice is given that copying is bypermission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute tolists, requires prior specific permission and / or a fee.© 1996 ACM 0360-0300/96/0900–0504 $03.50

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 2: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

check digit a12 for the UPC numbera1a2. . . a11 is chosen to satisfy the con-dition

~a1, a2, . . . , a12!

z ~3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1!

5 3a1 1 a2 1 3a3 1 · · · 1 3a11

1 a12 ; 0 ~mod 10!.

In Figure 1, the check digit is 5 because

3 z 0 1 3 1 3 z 8 1 0 1 3 z 0 1 0 1 3 z 1

1 3 1 3 z 7 1 1 1 3 z 0 5 55 and 55 1 5

5 60 ; 0 ~mod 10!.

Notice that any single error, say a1a2. . . ai . . . a123a1a2 . . . a9i . . . a12, isdetectable since (a1, a2, . . . , a9i, . . . ,a12) z (3, 1, 3, 1, . . . , 3, 1) Ó 0 (mod10) if ai Þ a9i. To see this observe that ifboth

~a1, a2, . . . , ai, . . . , a12!

z ~3, 1, 3, 1, . . . , 3, 1! ; 0 ~mod 10!

and

~a1, a2, . . . , a9i, . . . , a12!

z ~3, 1, 3, 1, . . . , 3, 1! ; 0 ~mod 10!

then ((a1, a2, . . . , ai, . . . , a12) 2 (a1,a2, . . . , a9i, . . . , a12)) z (3, 1, 3, 1, . . . ,3, 1) [ 0 (mod 10). This reduces toeither ai 2 a9i [ 0 (mod 10) or 3(ai 2a9i) [ 0 (mod 10). But ai Þ a9i impliesai 2 a9i 5 61, 62, 63, 64, 65, 66, 67,68, 69, so we have a contradiction inboth cases.There is an abbreviated 8-digit ver-

sion of the 12-digit UPC code calledVersion E (see Figure 2) that is oftenused in special circumstances, such asround containers (for example, softdrink cans), small items, and maga-zines. The Version E scheme uses fourformulas depending on the last non-check digit of the numbera1a2a3a4a5a6a7 to append a check digit[UPC Manual 1986, p. 8].

(1) If a7 is 0, 1 or 2, the check digit a8 ischosen so that 3a1 1 a2 1 3a3 13a4 1 a5 1 3a6 1 a7 1 a8 [ 0 (mod10).

(2) If a7 is 3, the check digit a8 is cho-sen so that 3a1 1 a2 1 3a3 1 a4 1a5 1 3a6 1 a8 [ 0 (mod 10).

Fig. 1. UPC identification number 03800013710and check digit 5.

Fig. 2. The UPC version E code.

Error Detection Methods • 505

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 3: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

(3) If a7 is 4, the check digit a8 is cho-sen so that 3a1 1 a2 1 3a3 1 a4 13a5 1 3a6 1 a8 [ 0 (mod 10).

(4) If a7 is 5, 6, 7, 8 or 9, the check digita8 is chosen so that 3a1 1 a2 1 3a31 a4 1 3a5 1 a6 1 3a7 1 a8 [ 0(mod 10).

The apparent irregular patterns forthe weights in the four cases are theresult of the way the 12 digit UPC num-bers are converted to 8 digit numbers. AllVersion E numbers correspond to 12 digitnumbers that have 0s in four consecutivepositions that have been suppressed[UPC Manual 1986]. To explain just thefirst of the four cases, consider a companywhose manufacturer’s number is 49100.Since this number ends with two 0s, thiscompany must assign all products thatwill use a Version E code with a 5 digitnumber that begins with two 0s. The 12digit number would then have the form04910000a9a10a11a12. In cases where thethird digit of the manufacturer’s numberis 0, 1 or 2 (the initial 0 is not part of themanufacturer’s number), the third digit isthen moved to position 11 and the four0s are suppressed. Thus the 12 digitnumber 04910000a9a10a11a12 becomes049 a9a10a11 1a12. When the weight 1corresponding to the third digit of themanufacturer’s number is placed in posi-tion 11 and the weights corresponding tothe four suppressed 0s are also sup-pressed we obtain the weight vector (3, 1,3, 3, 1, 3, 1, 1) used in the first formulagive above.There is also a UPC shipping con-

tainer code that employs two check dig-its. One check digit is the standard UPCcheck digit and the second is calculatedusing modulo 103 arithmetic [USS-128Uniform Symbology Specification, p. 5].European countries use a 13 digit an-

alog of the UPC number called the Eu-ropean Article Number (EAN) [Harmanand Adams 1989]. In this case theweight vector is (1, 3, 1, 3, . . . , 1, 3, 1).For EAN numbers the manufacturer’snumber is preceded by two digits thatidentify the country in which the itemwas produced.

3. THE CREDIT CARD SCHEME

A more complicated scheme, developedby IBM, is used by credit card compa-nies, libraries, blood banks, photofinish-ing companies, pharmacies, the motorvehicle divisions of South Dakota andSaskatchewan, and some German banks[Gallian and Winters 1988; Ecker andPoch 1986]. In this case, let s be thepermutation defined by s (0) 5 0, s (1) 52, s (2) 5 4, s (3) 5 6, s (4) 5 8, s (5) 5 1,s (6) 5 3, s (7) 5 5, s (8) 5 7, s (9) 5 9.For any string of digits a1a2 . . . an21we assign the check digit an so thats (a1) 1 a2 1 s (a3) 1 a4 1 . . . 1s (an21) 1 an [ 0 (mod 10). (When n isodd, s is applied to the even numberedpositions instead.) Let us look at anexample. Say we have the number7659214. Then the check digit c satis-fies 5 1 6 1 1 1 9 1 4 1 1 1 8 1 c [ 0(mod 10) so that c 5 6.The credit card shown in Figure 3 is

reproduced from an ad promoting theVISA card. Notice that the check digiton the card is not valid since s (4) 1 4 1s (1) 1 7 1 s(1) 1 2 1 s (3) 1 4 1 s (5) 16 1 s (7) 1 8 1 s (9) 1 1 1 s (1) 1 2 58 1 4 1 2 1 7 1 2 1 2 1 6 1 4 1 1 16 1 5 1 8 1 9 1 1 1 2 1 2 5 69 Ó 0(mod 10). Thus, the check digit does not“check”.We mention in passing that the IBM

check digit method described above isthe basis for a recent story in the NewYork Times [Dunn 1995] about a com-puter program known as Credit Masterfound on many electronic bulletinboards that produces fake credit cardnumbers that have the correct checkdigit.Both the UPC scheme and the IBM

scheme detect 100% of all single digiterrors, while neither detects 100% of allerrors involving the transposition of ad-jacent digits. In particular, an error ofthe form . . . ab . . . 3 . . . ba . . . isundetected by the UPC scheme if ua 2bu 5 5 and it is undetected by the IBMscheme if ua 2 bu 5 9. Thus, of the 90possible transposition errors the UPCscheme detects all except the pairs 05,

506 • J. A. Gallian

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 4: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

16, 27, 38, 49 and their reversals. In thecase of the IBM scheme only the trans-positions of 09 and 90 are undetected.So, the UPC code detects 80 out of 90 or88.9% and the IBM scheme detects 88out of 90 or 97.8%.The state of Wisconsin uses a 14 char-

acter driver’s license number. The firstcharacter of the number is the firstcharacter of the person’s last name (Sfor Smith, J for Jones etc.). This isfollowed by 10 digits that are deter-mined by the person’s last name, firstname, middle initial and date of birth[Gallian 1994, pp. 292–296]. Finally,there is a tie breaking digit to preventthe same number being assigned to dif-ferent people and a check digit. To cal-culate the check digit, the lead letter isconverted to a digit using the assign-ment A 3 1, B 3 2, . . . , I 3 9, J 3 1,K 3 2, . . . , R 3 9, S 3 2, T 3 3, . . . ,Z 3 9. (Notice the aberration at S.) Thecredit card method is then applied to thethirteen digits to obtain the check digit.

4. 3-WEIGHT SCHEMES

After single digit errors and errors in-volving the transposition of adjacentdigits, the next most common errors arethose of the form . . . abc . . . 3 . . . cba

. . . (such errors are called jump trans-position) [Verhoeff 1969]. For example,for a number such as 726-5258 onemight naturally transpose “52” and“58”. This error would be undetected bythe UPC and IBM schemes but would bedetected by the one used by Americanbanks and by the one used on passportsin many Western countries. To a num-ber a1a2 . . . a8 banks assign (a1, a2, a3,a4, a5, a6, a7, a8) z (7, 3, 9, 7, 3, 9, 7, 3)(mod 10) [Gallian and Winters 1988].Similarly, many countries use theweighting vector (7, 3, 1, 7, 3, 1, . . .)and modulo 10 arithmetic to assigncheck digits to numbers appearing onpassports [Connor 1984]. These3-weight schemes detect all the errorsthat the UPC method does but they alsodetect errors of the form . . . abc . . . 3. . . cba . . . as long as ua 2 cu Þ 5.(Clearly, neither the UPC scheme northe IBM scheme detects these errors.)In particular, the 3-weight schemes de-tect 100% of single digit errors, 88.9% oftransposition errors involving adjacentdigits and 88.9% of the jump transposi-tion errors. In the case of errors of theform . . . aca . . . 3 . . . bcb . . . (calledjump twin errors) and those of the form. . . aa . . . 3 . . . bb. . . (called twin

Fig. 3. VISA card with an invalid number.

Error Detection Methods • 507

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 5: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

errors) the detection rates depend onthe length of the number and the choiceof the three weights. For example, fornumbers of length 10 (including thecheck digit) the weight vector (1, 3, 7, 1,3, 7, 1, 3, 7, 1) detects 66.7% of the jumptwin errors whereas the weight vector(7, 3, 1, 7, 3, 1, 7, 3, 1, 7) detects 55.6%of the jump twin errors. For single digiterrors, transposition errors and jumptransposition errors there is nothingspecial about the order in which theweights occur except that any three con-secutive weights must be distinct andrelatively prime to 10 (see Theorem 1below). For example, it is just as well touse 1, 9, 7, 1, 9, 7, . . . or 3, 9, 7, 3, 9, 7,. . . and so on. Analogously, one coulduse four weights such as 1, 3, 7, 9, . . . or1, 3, 9, 7, . . . in a modulus 10 schemealthough I do not know of any instancewhere this has been done in practice. A4-weight scheme detects transpositionerrors involving adjacent digits andjump transposition errors at the rate of88.9%. Interestingly, with regard tojump twin errors and twin errors theorder of the four weights does matter.For example, using the order 1, 3, 9, 7,. . . no jump twin errors are detectedwhereas using the order 1, 3, 7, 9, . . .permits the detection of 88.9% of jumptwin errors. To see why consider, forinstance, and error of the form aca. . .3 bcb. . . . Using the order 1, 3, 9, 7 thedigits aca contribute a z 1 1 c z 3 1a z 9 5 10a 1 3c 5 3c (mod 10)whereas the digits bcb contributeb z 1 1 c z 3 1 b z 9 5 10b 1 3c 5 3c(mod 10). Thus the error is not detected.A similar argument applies no matterwhere the jump twin error occurs. Incontrast, using the weights 1, 3, 7, 9 thedigits aca contribute a z 1 1c z 3 1 a z 7 5 8a 1 3c (mod 10)whereas the digits bcb contributeb z 1 1 c z 3 1 b z 7 5 8b 1 3c (mod10). But when ua 2 bu Þ 5, it followsthat 8a Þ 8b (mod 10) and the error isdetected. Thus this ordering detects88.9% of the jump twin errors.The detection rate for twin errors de-

pends on both the length of the number

and the ordering of the weights. Theweight vector (1, 3, 9, 7, 1, 3, 9, 7, 1, 3)detects 88.9% of the twin errorswhereas the vector (1, 3, 7, 9, 1, 3, 7, 9,1, 3) detects 49.4% of the twin errors.There is a modified generalized IBM

code described by Ecker and Poch [1986]that is an improvement of the IBMmethod that detects 95.6% of jumptransposition errors and twin errors butI do not know of any instances where itis in use.

5. MODULUS 11 SCHEMES

In contrast to the schemes previouslydescribed, the method used to assign acheck digit to the International Stan-dard Book Number (ISBN) employs themodulus 11 [Standard Book Numbering1968]. In particular, the check digit a10is chosen to satisfy the condition (a1, a2,. . . , a10) z (10, 9, 8, 7, 6, 5, 4, 3, 2, 1) [0 (mod 11). This method detects 100% ofall single digit errors and 100% of alltransposition errors (not just those in-volving adjacent digits). The drawbackof this method is that in some cases thecheck digit is required to be 10, which isnot a single digit. To maintain a uni-form ten character format for all booksthe character X is used to represent 10.There are many variations of the

ISBN scheme that are designed to avoidthe introduction of the alphabetic char-acter. Typical of these is an IBM schemeused by the states of Arkansas, NewMexico and Tennessee to assign driver’slicense numbers [Gallian 1991]. To the7-digit number a1a2a3a4a5a6a7 is as-signed the check digit 2(a1, a2, a3, a4,a5, a6, a7) z (2, 7, 6, 5, 4, 3, 2) (mod 11)unless this number is 0 or 1. (Recall23 5 8 (mod 11) and so on.) In thesetwo instances, 1 or 0 is appended re-spectively. This method catches all sin-gle digit errors but not all transpositionerrors. The errors of the form. . . ai . . . aj 3 . . . aj . . . ai . . . that goundetected are those where i 5 1 andj 5 7 (an unlikely error indeed) andsome involving the check digits 0 and 1.

508 • J. A. Gallian

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 6: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

Of course, one could avoid the use of analphabetic character by simply not issu-ing numbers that yield the dot product10. This scheme detects 100% of singledigit errors and 98.2% of transpositionerrors involving adjacent digits. Noth-ing would be lost if the weight vectorbegan with 8 instead of 2 and therewould be a slight gain since errors ofthe form a1a2 . . . a7a8 3 a7a2 . . . a1a8would be detected. Table I gives a cata-log of common “pattern” errors andtheir relative frequency as found in oneempirical study [Verhoeff 1969]. Pho-netic errors are those of the form. . . a0 . . . 7 . . . 1a . . . for a 5 2, 3,. . . , 9. When giving a credit card num-ber over a telephone, for instance, “fifty”might well be interpreted as “fifteen.”Obviously, phonetic errors are languagedependent. The frequency for phoneticerrors in Table I is based on English,Dutch and German. A type of error notlisted in Table I are format errorscaused by the insertion or deletion char-acters. These are quite common and areautomatically detected when the num-bers have a fixed length.A scheme designed to detect many

kinds of errors is a modulo 11 schemeused by some German banks that em-ploys weights that form a geometric pro-gression rather than the arithmetic pro-gression as in the case for the ISBNmethod [Ecker and Poch 1986]. Specifi-cally, an is chosen so that (a1, a2, . . . ,an) z (2, 22, . . . , 2n) [ 0 (mod 11). Asbefore, the situation that an 5 10 mustbe avoided or handled in some special

way. Whereas the ISBN method detects100% of single errors, 100% of transpo-sition errors and 100% of jump twinerrors it does not detect 100% of pho-netic errors or 100% of twin errors. Onthe other hand, for n # 10, the weight-ing vector (2, 2, . . . , 2n) permits 100%detection of all errors listed in Table 1.Of all the methods actually in use the

most exotic I have encountered is theone used on some German bank ac-counts [Ecker and Poch 1986]. Thisscheme, called the P.T.T. scheme, em-ploys three permutations and two mod-uli as follows. For i 5 1, 2 and 3 definesi(a) 5 (i(a 1 1)(mod 11)) (mod 10). Tothe number a1a2 . . . a8, assign

s1~a1! 1 s2~a2! 1 s3~a3! 1 s1~a4!

1 s2~a5! 1 s3~a6! 1 s1~a7!

1 s2~a8! ~mod 10!.

As an illustration consider 2191-06-70. Here the check digit is

s1~2! 1 s2~1! 1 s3~9! 1 s1~1! 1 s2~0!

1 s3~6! 1 s1~7! 1 s2~0! 5 3 1 4 1 8

1 2 1 2 1 0 1 8 1 2 ; 9 ~mod 10!.

This scheme detects 100% of single digiterrors, 96.3% of transposition errors in-volving adjacent digits and jump trans-positions, 95.6% of twin and jump twinerrors and 95.8% of phonetic errors.

Table 1. Common Pattern Errors.

Error Detection Methods • 509

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 7: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

6. MODULUS 9 AND 7 SCHEMES

Because the most common error is a sin-gle digit error, it is surprising that thereare several error detection schemes inwidespread use that do not detect 100% ofsingle digit errors. Indeed, United StatesPostal Service money orders, VISA travel-ers checks, airline tickets, Federal Ex-press mail and United Parcel Servicepackages are assigned check digits thatuse modulus 9 or modulus 7 schemeswhich are not 100% effective at detectingsingle errors. The U.S. postal money or-ders, for instance, simply divide the iden-tification number by 9. The remainder isthe check digit [Gallian and Winters1988]. For VISA travelers checks, thecheck digit is the digit that must be addedto the identification number so that theresulting number is evenly divisible by 9[Gallian and Winters 1988]. For example,dividing 1002044679091 by 9 gives a re-mainder of 7 so the check digit is 2. Thesemodulus 9 methods detect all single digiterrors except substitution of a 9 for a 0 orvice versa. The only transposition errorsinvolving adjacent digits detected by thismethod are those involving the checkdigit. It follows that single errors are de-tected at the rate of 98.0%. The rate fordetecting errors involving the transposi-tion of adjacent digits depends on thelength of the number but in all practicalsituations it is low. For example, formoney orders it is only 10%.Airline companies, Federal Express

and the United Parcel Service use theremainder upon division by 7 to assigncheck digits [Gallian and Winters 1988].This method is slightly less effectivethan dividing by 9 for detecting singledigit errors but fairly effective for de-tecting transposition errors. In particu-lar, any substitution of b for a in theidentification number where ua 2 bu 5 7will go undetected while any transposi-tion of digits a and b with ua 2 bu 5 7will go undetected. The single error de-tection rate for this method is 94.0%whereas the rate for detecting adjacenttransposition errors is 94.1%.

7. ALPHANUMERIC SCHEMES

Many identification numbers utilizeboth alphabetic and numeric characters.One of the most prevalent of these wasdeveloped in 1975 and is called Code3-out-of-9 (the name derives from themethod of bar coding of the characters),or simply Code 39 [Harmon and Adams1989]. Code 39 permits the 26 uppercase letters A through Z, the digits 0through 9 and the characters -, . and aspace. Because Code 39 has been chosenby the Department of Defense, the auto-motive companies and the health indus-try for use by their suppliers it hasbecome the workhorse of nonretail busi-ness. A typical example of a Code 39number is 210SA32ZBV. The last char-acter is the “check.” The check characteris determined by assigning the letters Athrough Z the numerical values 10through 35 respectively. The values 36,37 and 38 are assigned to -, . and aspace, respectively. The original num-ber comprised of the digits 0 through 9,the letters A through Z and dashes,periods and spaces is now converted to astring a1, a2, . . . , an where the ai’s areintegers between 0 and 38. The checkcharacter is the character correspond-ing to the numerical value

~a1, a2, . . . , an!

z ~n, n 2 1, . . . , 2, 1! ~mod 39!.

Finally, this value is converted to itsalphabetical counterpart, if necessary.Let us examine the Code 39 method forthe number 210SA32ZBV. Here is howwe determine that the check characteris V. First we convert the alphabeticcharacters to their numeric counter-parts: 210SA32ZB 3 2, 1, 0, 28, 10, 3,2, 35, 11. Then we compute

9 z 2 1 8 z 1 1 7 z 0 1 6 z 28 1 5 z 10

1 4 z 3 1 3 z 2 1 2 z 35 1 1 z 11 5 18 1 8

1 0 1 168 1 50 1 12 1 6 1 70 1 11

5 343.

510 • J. A. Gallian

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 8: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

Since 343 divided by 39 has a remain-der of 31 and V has the numerical value31, the check character is V. In manyapplications of Code 39 the special char-acters $, /, 1 and % are permitted.These characters are assigned the nu-merical values 39 through 42, respec-tively. In these applications the checkcharacter is determined by the remain-der upon division by 43 instead of 39.When the modulus 39 is used the singleerror detection rate depends on thenumber of characters in the numberand is less than 100%. Precise informa-tion about which errors are detectable iscontained in Section 9. For the modulus43, 100% of the single digit errors and100% of the transposition errors are de-tected.In some cases where the 43 character

version of Code 39 is used the checkdigit simply corresponds to the modulo43 value of the sum of the values of thecharacters (i.e., weights are not used).For example, to compute the check char-acter for the number E598976987 wecalculate 14 1 5 1 9 1 8 1 9 1 7 16 1 9 1 8 1 7 5 82 [ 39 (mod 43) so thatthe check character is $. This methoddetects 100% of single digit errors but 0%of the transposition errors not involvingthe check digit.The state of Washington and the

province of Manitoba use a check digitscheme on their driver’s license num-bers [Gallian 1991]. The license numberis a blend of 12 alphabetic and numericcharacters. To compute the check digit,alphabetic characters are assigned nu-meric values as follows: p 3 4, A 3 1,B 3 2, . . . , I 3 9, J 3 1, K 3 2, . . . ,R 3 9, S 3 2, T 3 3, . . . Z 3 9.(Notice the aberration at S.) The 12-character license number, after the al-phabetic to numeric conversion, thencorresponds to a string of digits a1a2 . . .a12 with a10 as the check digit calcu-lated as ua1 2 a2 1 a3 2 a4 1 . . . a9 2a11 1 a12u (mod 10). The absolute valuewas introduced to avoid negative num-bers, but since 21 [ 9 (mod 10), insteadof using the absolute value, the weightvector (1, 9, 1, 9, . . . , 1) could have been

used. Interestingly, the use of the abso-lute value rather than the weight vector(1, 9, 1, 9, . . . , 1) actually reduces theerror detection capability of the scheme.Although it is common practice to put

the check digit last, notice that theabove scheme does not do so. There isno mathematical reason why the checkdigit should be last. Besides the state ofWashington, South Dakota does not putthe check digit last on their driver’slicense numbers [Gallian 1991].

8. ERROR CORRECTING SCHEMES

Schemes that incorporate two check dig-its are not uncommon. For instance,Norway employs two check digits mod-ulo 11 to allocate registration numbersto its citizens [Hill 1986]. The last twodigits of these eleven digit numbersa1a2 . . . a10a11 are chosen so that

~a1, a2, . . . , a10!

z ~3, 7, 6, 1, 8, 9, 4, 5, 2, 1! ; 0

~mod 11!

and ~a1, a2, . . . , a11!

z ~5, 4, 3, 2, 7, 6, 5, 4, 3, 2, 1! ; 0

~mod 11!.

This method detects all single digit er-rors and all double errors except thosewhere the difference between the cor-rect number and the incorrect numberhas the form (0, 0, 0, a, 0, 0, 0, 0, 0,11 2 a, 0). Numbers for which a10 or a11is “10” are not assigned.An even more effective two check digit

scheme consists of strings of length 10satisfying (a1, a2, . . . , a10) z (1, 1, . . . ,1, 1) [ 0 (mod 11) and (a1, a2, . . .a10) z (1, 2, 3, . . . , 9, 10) [ 0 (mod 11).Avoiding all strings that require a9 ora10 to be “10” still leaves 82,644,629numbers. This method detects all dou-ble errors and corrects all single errors.The first dot product determines themagnitude of any single error while thesecond one identifies the location of the

Error Detection Methods • 511

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 9: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

error. Let’s see how this works. Say ournumber is 73245018. Then a9 and a10satisfy 8 1 a9 1 a10 [ 0 (mod 11) and10 1 9a9 1 10a10 [ 0 (mod 11) so thata9 5 7 and a10 5 7. Consider the error7324501877 3 7824501877. Since thesum of the digits of the incorrect num-ber is 5 (mod 11), we know that one ofthe digits is 5 too large (assuming onlyone error has been made). But whichone? Suppose the error occurred in theith position. Then the second dot prod-uct is 5i too large. That is, (7, 8, 2, 4,5, 0, 1, 8, 7, 7) z (1, 2, 3, 4, 5, 6, 7, 8, 9,10) [ 5i (mod 11) or 10 [ 5i (mod 11).We conclude that the second digit is 5too large.Single digit errors in reading bar

coded identification numbers are usu-ally correctable in much the same fash-ion. An unintelligible block of bars pin-points the source of the error while thecheck digit condition diagnoses the ex-tent of the error.Two-check-digit schemes that correct

all single digit errors and all transposi-tion errors utilizing modulo 37 or mod-ulo 97 arithmetic have been discovered[Sethi et al. 1978; Briggs 1971]. An in-dustrial bar code scheme called Code 93also uses two check digits [Harmon andAdams 1989, p. 34]. One large mail or-der house has implemented a four-check-digit scheme [Wagner and Putter1989].

9. THEORY

The examples above can be put in anabstract setting as follows. Let Zk bethe set {0, 1, 2, . . . , k 2 1} and let s1,s2, . . . , sn be a sequence of mappingsfrom Zk into itself. For any string ofelements a1a2 . . . an21 from Zk, appendan element an so that s1(a1) 1 s2(a2) 1. . . 1 sn(an) [ 0 (mod k). We call thesequence s1, s2, . . . , sn a check digitscheme for Zk. Typically, sn is chosen tobe the identity or the negative of theidentity. A single digit error ai 3 a9i isdetectable if and only if si(ai) Ó si(a9i)(mod k) while a transposition error. . . aiai11 . . . ajaj11 . . . 3 . . . ajai11

. . . aiaj11 . . . is detectable if and only ifsi(ai) 1 sj(aj) Ó si(aj) 1 sj(ai) (mod k).Of course, the condition for detection of asingle digit error in position i is just thatsi is a permutation on Zk. Since the map-ping from Zk 3 Zk given by x 3 mx forall x is a permutation if and only if gcd(m,k) 5 1, we see that the UPC, the bank,passport and the ISBN schemes detect100% of all single-digit errors, whereas ascheme that assigns a check digit an tothe string a1a2 . . . an21 so that (a1, a2,. . . , an21, an) z (n, . . . , 2, 1) [ 0 (mod10) does not. In particular, notice that asingle error ai 3 a9i for i even is undetec-ted if uai 2 a9iu 5 5. Similarly, a singleerror ai 3 a9i for i that is divisible by 5 isundetected if uai 2 a9iu is even. Despitethis deficiency, the latter method is usedon the Chemical Abstract Service registrynumbers [Gallian and Winters 1988] andon driver’s licenses issued by the state ofUtah and the province of Quebec [Gallian1991]. (Code 39 numbers have the samedeficiency.) Since a Quebec driver’s li-cense number has twelve digits, noticethat all errors in the third position areundetected! On the other hand, thisscheme does detect 100% of transpositionerrors involving adjacent digits, while theUPC, IBM and most other modulo 10schemes do not.For check digits that satisfy a condi-

tion

~a1, a2, . . . , an! z ~w1, w2, . . . , wn! ; 0

~mod k!,

we may readily determine the undetect-able single position errors and the unde-tectable transposition errors. (Actually,there is no compelling reason to use 0 inthe condition. Any value in Zk will do.)

THEOREM 9.1 Suppose an identifica-tion number a1a2 . . . an satisfies

~a1, a2, . . . , an! z ~w1, w2, . . . , wn! ; 0

~mod k!.

Then a single-position error ai 3 a9i isundetectable if and only if (ai 2 a9i)wi [

512 • J. A. Gallian

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 10: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

0 (mod k) and a transposition error thatinterchanges the elements in the ith andjth positions is undetectable if and onlyif (ai 2 aj)(wi 2 wj) [ 0 (mod k).

PROOF. Consider a single error in theith position. Say a9i is substituted for ai.Then the dot product for the correctnumber and the dot product for theincorrect number differ by (ai 2 a9i)wi.Thus the error is undetectable if andonly if (ai 2 a9i)wi [ 0 (mod k).Now consider an error of the form

. . . aiai11 . . . ajaj11 . . .

3 . . . ajai11 . . . aiaj11 . . ..

Then the dot product for the correctnumber and the dot product for theincorrect number differ by

~aiwi 1 ajwj! 2 ~ajwi 1 aiwj!

5 ~ai 2 aj!~wi 2 wj!.

Thus, the error is undetectable if andonly if

~ai 2 aj!~wi 2 wj! ; 0 ~mod k!. e

When a check digit satisfies the condition(a1, a2, . . . , an) z (w1, w2, . . . , wn) [ 0(mod k) and the digits a1, a2, . . . , an arerestricted to 0 to k 2 1 it is straightfor-ward to determine conditions on theweights that ensure all errors of specifictypes are detectable. These are providedin Table 2.To apply the conditions given in Table

2 to methods such as the 3-weightscheme used by banks, notice that spec-

ifying that the check digit a9 for thebank number a1a2a3a4a5a6a7a8 isa1a2a3a4a5a6a7a8 (mod 10) is equiva-lent to the condition (a1, a2, a3, a4,a5, a6, a7, a8, a9) z (7, 3, 9, 7, 3, 9, 7, 3,9) [ 0 (mod 10).The preceding theorem and Table II

reveal the shortcomings of the variousvalues for the modulus. In the case thatthe modulus k is less than 10, all singledigit errors and all transposition errorscannot be detected without restrictingthe digits to range from 0 to k 2 1. Forinstance, serial numbers on airline tick-ets simply use the modulo 7 value of thenumber as the check digit. Since thisscheme does not distinguish between aand a9 when ua 2 a9u 5 7 all such errorsare undetectable. On the other hand, formodulus 11 schemes the conditions ofthe preceding theorem for the detectionof all single errors and all transpositionerrors are simply met by choosing dis-tinct weights between 0 and 10. As pre-viously mentioned the only drawback ofmodulus 11 schemes is the necessity ofintroducing an extra character or theavoiding of certain numbers.Noting that the schemes described

above that utilize modulus 10 are notsimultaneously 100% effective in detect-ing single digit errors and 100% effec-tive in detecting transposition errors in-volving adjacent digits whereas the onesthat use division by 11 are, it is naturalto raise the question of whether it ispossible to devise a one-check-digitscheme that utilizes division by 10 thatdetects all single-digit errors and all

Table 2. Conditions for detection of all errors of various types.

Error Detection Methods • 513

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 11: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

transposition errors involving adjacentdigits. The next theorem says that theanswer is no (see also Ecker and Poch[1986]).

THEOREM 9.2 [Gumm 1985] Supposean error detecting scheme with an evenmodulus detects all single-position er-rors. Then for every i and j there is atransposition error involving positions iand j that cannot be detected.

PROOF. Let the modulus be 2m. Let ussay that the digit x in position i contrib-utes si(x) in the determination of thecheck digit. Obviously, in order to detectall single-position errors it is necessarythat the mappings si be permutations.In order to detect all transpositionerrors involving positions i and j it isnecessary that si(a) 1 sj(b) Þsi(b) 1 sj(a) for all a Þ b in Z2m. Itthen follows that the mapping s (x) 5sj(x) 2 si(x) must be a permutation ofZ2m. But summing the elements of Z2mmodulo 2m we then have

m 5 m 1 0 1 ~1 1 2m 2 1!

1 ~2 1 2m 2 2! 1 · · · 1 ~m 2 1 1 m 1 1!.

Thus,

m 5 O x 5 O s~x! 5 O~sj~x! 2 si~x!!

5 O sj~x! 2 O si~x! 5 m 2 m 5 0.

This contradiction completes theproof. e

9. NONCOMMUTATIVE SCHEMES

In contrast to modulus 10 schemes thatcan not detect all single digit errors andall transposition errors of adjacent dig-its, Verhoeff, in his Ph.D. thesis [1969],devised a method utilizing a noncommu-tative algebraic system on the set {0, 1,. . . , 9} that detects all single-digit er-rors and all transposition errors involv-ing adjacent digits without the neces-sity of introducing a new character as isthe case for the ISBN method. (Interest-ingly, after Verhoeff devised his schemetwo authors published “proofs” that a

scheme that detected all such errorswas not possible (see Verhoeff [1969, p.11]). Consider the permutation s (0) 51, s (1) 5 5, s (2) 5 7, s (3) 5 6, s (4) 52, s (5) 5 8, s (6) 5 3, s (7) 5 0, s (8) 59, s (9) 5 4 and the algebraic systemdefined by Table 3. The algebraic sys-tem defined in Table 3 is called thedihedral group of order 10 and is de-noted by D10.The group D10 is known to chemists,

geologists and physicists as the dihedralpoint group with 10 elements. Scientistsuse it to describe the 5 rotational sym-metries and 5 reflectional symmetries ofa regular pentagon. For example, thesymbol 1 represents a rotation of 72degrees whereas the symbol 5 repre-sents a reflection across one of the fiveaxes of symmetry. Then 1p5 is a 72degree rotation followed by the reflec-tion represented by 5.Verhoeff’s idea is to view the digits 0

to 9 as the elements of the group D10and to replace ordinary addition withcalculations done in D10. In particular,to any string of digits a1a2 . . . an21,we append the check digit an sothat s (a1)ps2(a2)p . . . psn22(an22)psn21

(an21)pan 5 0. (Here si(x) 5 s (si21(x)).Since s has the property that si(a) Þsi(b) if a Þ b all single digit errors aredetected. Also, because

aps~b! Þ bps~a! if a Þ b, (1)

Table 3. Multiplication for D10.

514 • J. A. Gallian

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 12: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

it follows that all transposition errorsinvolving adjacent digits are detected(since (1) implies that si(a)psi11(b) Þsi(b)psi11(a) if a Þ b). This schemedetects 95.6% of twin errors, 94.2% ofjump transposition and jump twin er-rors and 100% of phonetic errors [Ver-hoeff 1969, p. 54].In 1990 the German Bundesbank be-

gan using the Verhoeff check digitscheme to append a check digit to theserial numbers on bank notes [Schulz1991]. Table 4 gives the values of thefunctions s, s2, . . . , s10 needed for thecomputations. (The functional valuesi( j) appears in the row labeled with si

and the column labeled j.) Since theserial numbers on the bank notes arealphanumeric, it is necessary to assignnumerical values to the letters. Thisassignment is shown in Table 5.

To trace through a specific example con-sider the bank note (featuring the mathe-matician Gauss!) shown in Figure 4 withthe number AG8536827U7. To verify that 7is the appropriate check digit we observethat s (0) ps2(2)p s3(8)p s4(5)p s5(3)p s6(6)ps7(8)p s8(2)p s9(7)p s10(7)p 7 5 1p 0p 2p 2p6p 6p 5p 2p 0p 1p 7 5 0 as it should be.(To illustrate how to use the multiplica-tion table for D10 we compute:1p0p2p2 5 (1p0)p2p2 5 1p2p2 5 (1p2)p25 3p2 5 0).A shortcoming of the German bank

note scheme is that it does not distin-guish between a letter and its assignednumerical value. Thus, a substitution of7 for U (or vice versa) and the transpo-sition of 7 and U are not detected by thecheck digit. This shortcoming can beavoided by using D36, the dihedralgroup of order 36, to assign every letterand digit a distinct value together withan appropriate permutation s (see Gal-lian [1991], Gallian and Mullin [1995]and Winters [1990]). Using this methodto append one of the 36 alphanumericcharacters as a check character, all sin-gle position errors and all transpositionerrors involving adjacent alphanumericcharacters will be detected.Although the error detecting schemes

using noncommutative systems are

Table 6. Comparison of detection rates.

Table 4. Table 5.

Error Detection Methods • 515

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 13: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

more effective than the schemes thatuse modular arithmetic, the Germanbank note application is the only one Iknow that uses a noncommutative sys-tem.We conclude with a comparison table

of the error detection rates for the mod-ulo 10 schemes and the scheme basedon the dihedral group. All of theseschemes are 100% effective for detectingsingle digit errors. Recall that the detec-tion rates for twin errors using 3-weightor 4-weight schemes depend on thelength of the number. In the table wehave used length 10. Winters [1990] hasdevised a two check scheme based onthe dihedral group of order 10 that de-tects 100% of all the errors listed inTable 6.

ACKNOWLEDGMENT

I am grateful to the referees for their comments.

REFERENCES

ANDREWS, A. M. 1970. A variant of modulus 11checking. Comput. Bull. 14, 261–265.

ANDREWS, A. M. 1972. Decimal numbers withtwo check digits. Comput. Bull. 16, 156–159.

BECKLEY, D. F. 1967. An optimum system with‘modulus 11. Comput. Bull. 11, 213–215.

BLOCKSMA, M. 1989. Reading the Numbers.Penguin, New York.

BRIGGS, T. 1970. Modulus 11 check digit sys-tems. Comput. Bull. 14, 266–270.

BRIGGS, T. 1971. Weights for modulus 97 sys-tems. Comput. Bull. 15, 79.

BROWN, D. A. H. 1973. Construction of errordetection and correction codes to any base.Electronic Lett. 9, 290.

BROWN, D. A. H. 1974. Biquinary decimal errordetection codes with one, two and three checkdigits. Comput. J. 17, 201–204.

BROWN, D. A. H. 1974. Some error correctingcodes for certain transposition and transcrip-tion errors in decimal integers. Comput. J. 17,9–12.

CAMPBELL, D. V. A. 1970. A modulus 11 checkdigit system for a given system of codes. Com-put. Bull. 14, 12–13.

CHU, C. K. 1981. A note on multiple error de-tection in ASCII numeric data communica-tion. JACM 28, 265–269.

CONNOR, S. 1984. The invisible border guard,New Scientist 5, 9–14.

DUNN, A. 1995. A pirate computer programbuilds credit card numbers. New York Times(Mar. 19), 18.

ECKER, A. AND POCH, G. 1986. Check charactersystems. Comput. 37, 277–301.

FRATINI, S. 1989. Error detection in a class ofdecimal codes. IEEE Trans. Inf. Theor. 35,1095–1098.

FREEMAN, H. 1967. Detection of transpositionerrors in decimal numbers. Proceedings of theIEEE 55, 1500.

GALLIAN, J. A. 1989. Check digit methods. In-ter. J. of Appl. Eng. Ed. 5, 503–505.

GALLIAN, J. A. 1991. Assigning driver’s licensenumbers. Math. Mag. 64, 13–22.

GALLIAN, J. A. 1991. The mathematics of iden-tification numbers. The Coll. Math. J. 22,194–202.

GALLIAN, J. A. 1994. Contemporary Abstract Al-gebra, 3rd ed. D.C. Heath, Lexington.

GALLIAN, J. A. 1994. Coding information. In

Fig. 4. German bank note with serial number AG8536827U and check digit 7.

516 • J. A. Gallian

ACM Computing Surveys, Vol. 28, No. 3, September 1996

Page 14: ErrorDetectionMethods · have made the appendage of a check digit to identification numbers a stan-dard practice. Indeed, one finds check digits appended to identification num-bers

For all Practical Purposes, 3rd ed., Freeman,New York.

GALLIAN, J. A. AND MULLIN, M. 1995. Groupswith anti-symmetric mappings. Archive derMath. 65, 273–280.

GALLIAN, J. A. AND WINTERS, S. 1988. Modulararithmetic in the marketplace. Amer. Math.Monthly 95, 548–551.

GUMM, H. P. 1985. A new class of check digitmethods for arbitrary number systems, IEEETran. Inf. Th. 31, 102–105.

GUMM, H. P. 1986. Encoding of numbers to de-tect typing errors, Inter. J. Applied Eng. Ed.2, 61–65.

HARMON, C. AND ADAMS, R. 1989. Reading Be-tween the Lines. Helmers Publishing, NH.

HILL, R. 1986. A First Course in Coding The-ory. Clarendon Press, Oxford.

KUNERTH, W. 1981. Die EDV-gerechte Ver-schlusselung: Grundlagen und Anwendungenmoderner Nummernsysteme. Forkel, Stuttgart.

LARSEN, H. L. 1983. Generalized double modu-lus 11 check digit error detection. BIT 23,303–307.

PEZZULO, J. 1989. Letter to the editor. Comm.ACM 32, 1131–1132.

SCHECHINGER, H. 1979. Kontrolle mit Hilfe vonPrufziffern. Burotechnische Sammlung, BTSsystemtisch, 171.

SCHULZ, R.-H. 1991. Some check digit systems

over non-abelian groups. Mitt. Math. Ges.Hamburg 12, 819–827.

SCHULZ, R.-H. 1991. Codierungstheorie. EineEinfuhrung. Braunschweig-Wiesbaden.

SELMER, E. S. 1967. Registration numbers inNorway: some applied number theory andpsychology. J. Royal Stat. Soc., Ser A, 130,225–231.

SETHI, A. S., RAJARAMAN, V. AND KENJALE,P. S. 1978. An error correcting scheme for al-phanumeric data. Inform. Process. Lett. 7, 72–77.

SISSON, R. L. 1958. An improved decimal re-dundancy check. Comm. ACM 1, 10–12.

Standard Book Numbering. 1968. The Stan-dard Book Numbering Agency LTD, London.

TANG, D. T. AND LUM, V. Y. 1970. Error controlfor terminals with human operators. IBM J.Res. Develop. 14, 409–416.

UPC Symbol Specification Manual. 1986. UniformCode Council, Dayton, Ohio.

USS-128 Uniform Symbology Specification.1986. Automatic Identification Manufacturers,Pittsburgh, PA.

VERHOEFF, J. 1969. Error Detecting DecimalCodes. Mathematical Centre, Amsterdam.

WAGNER, N. R. AND PUTTER, P. S. 1989. Error de-tecting decimal digits, Comm. ACM 32, 106–110.

WILD, W. G. 1968. The theory of modulus Ncheck digit systems. Comput. Bull. 12, 309–311.

WINTERS, S. 1990. Error detecting codes usingdihedral groups. UMAP J. 11, 299–308.

Received May 1995; revised September 1995; accepted November 1995.

Error Detection Methods • 517

ACM Computing Surveys, Vol. 28, No. 3, September 1996