From: rwhutch@nr.infi.net (R.W. Hutchinson) Subject: Re: How generate check character to thwart human error? Date: 16 Sep 1999 08:35:26 GMT Newsgroups: sci.math.num-analysis Keywords: Error-correcting tuned for human errors >I have an application involving 4-digit identifiers that are manually >written down by people for later entry into a computer application. The >identifiers are sequentially generated, and we can assume the ones to be >entered are randomly distributed over the range. > >I'd like to generate a check character to append to existing >identifiers. I want the check digit drawn from an alphabet consisting of >all the characters found on normal (American) keyboards that are not >visually confusable with each other. That should be at least 50. > >Assuming 50, my problem reduces to designing a function f(x) that takes >a 4-digit x and yields a number 0 to 49. I could simply use the >remainder when dividing by 50 but I suspect it's sub-optimal. Could >someone advise on a better function than this? > >Ideally the design should take into account the types of errors that >typically happen most often when people copy down numbers. I believe there is a booklet, published in English but in Holland [Amsterdam?] with the title "Error Detecting Decimal Codes" which SPECIFICALLY covers the errors which "typically happen when humans are involved" quoting results from errors on Dutch social-security numbers and postal-codes. It was a BEAUTIFUL piece of work. A over a score of different code-designs were evaluated. Special consideration was given both to errors which each code was designed to catch "without error" [e.g. transpositions and single digit errors] and overall error rates. The "audio" aspect of remembering and writing numbers was also mentioned, and the error rates in languages where "-teen" sounds similar to "-ty" have a slightly different pattern. By the time you have your undetected errors down to where THAT is a noticeable component of the remainder, you are doing VERY well indeed. [Actually, you can catch quite a few of your errors by simply noticing whether you have: 3, 4, or 5 digits!] -------------------------------------------------------------- "I would predict that there are far greater mistakes waiting to be made by someone with your obvious talent for it." Orac to Vila. [City at the Edge of the World.] ----------------------------------------------- R.W. Hutchinson. | rwhutch@nr.infi.net ============================================================================== From: rnh@gmrc.gecm.com (Richard Herring) Subject: Re: How generate check character to thwart human error? Date: 16 Sep 1999 12:53:42 GMT Newsgroups: sci.math.num-analysis In article <37E0039D.B8770C58@urielw.com>, Uriel Wittenberg (uw@urielw.com) wrote: > I have an application involving 4-digit identifiers that are manually > written down by people for later entry into a computer application. The > identifiers are sequentially generated, and we can assume the ones to be > entered are randomly distributed over the range. > I'd like to generate a check character to append to existing > identifiers. I want the check digit drawn from an alphabet consisting of > all the characters found on normal (American) keyboards that are not > visually confusable with each other. That should be at least 50. > Assuming 50, my problem reduces to designing a function f(x) that takes > a 4-digit x and yields a number 0 to 49. I could simply use the > remainder when dividing by 50 but I suspect it's sub-optimal. Definitely - it's independent of the first two digits, for a start ;-) For a simple solution, remainder modulo a prime (47 or 53?) would be better. > Could someone advise on a better function than this? A search for "error-correcting codes" should yield plenty of suggestions. > Ideally the design should take into account the types of errors that > typically happen most often when people copy down numbers. I'd guess the commonest error is transposition of adjacent digits, followed by errors with doubled digits "aab" <-> "abb". -- Richard Herring |