Download presentation
Presentation is loading. Please wait.
Published byPrudence Gardner Modified over 9 years ago
1
Check Digit Schemes Jerzy Wojdyło Southeast Missouri State University May 13, 2002
2
Common Error Patterns Type of ErrorFormFrequency Single Error a b 60 – 90 % Omitting/Adding a Digit …xa …x 10 – 20 % Adjacent Transposition ab ba 10 – 20 % Twin Errors aa bb 0.5 – 1.5 % Jump Transposition acb bca 0.5 – 1.5 % Jump Twin Errors aca bcb < 1 % Phonetic Errors 1a a01a a0 0.5 – 1.5 % J. Verhoeff, “Error Detecting Decimal Codes”, Mathematical Centre Tract 29, The Mathematical Centre, Amsterdam, 1969.
3
POSTNET Bar coded digits, 3 short, 2 long, weights 7 4 2 1 0 www.usps.com www.framed.usps.com/cpim/ftp/pubs/pub32.pdf Check equation (for n = 5, 9, 11) 1234567890* d 1 + d 2 + d 3 + d 4 +… + d n + d n+1 ≡ 0 (mod 10)
4
POSTNET 637013 20 637014710130
5
POSTNET ?63701471001030
6
POSTNET Advantages Detects all single errors, Corrects single error (if corrupted digit is known) Works for arbitrary length Disadvantages Transposition errors are undetected
7
UPC Bars and 12 digits UPC = [d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 8 d 9 d 10 d 11 d 12 ] w = [3 1 3 1 3 1 3 1 3 1 3 1 ] Check equation www.uc-council.com/checkdig.htm www.upcdatabase.com UPC · w ≡ 0 (mod 10)
8
UPC 088698004272 313131313131 0824627800122212110
9
UPC Advantages Detects all single errors Corrects single error (if corrupted digit is known) Works for arbitrary length Disadvantages (does not detect) Jump transpositions Adjacent transpositions ab ba if |a - b| = 5
10
EAN Bars and 13 digits EAN=[d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 8 d 9 d 10 d 11 d 12 d 13 ] w =[ 1 3 1 3 1 3 1 3 1 3 1 3 1 ] Check equation Advantages/disadvantages same as UPC www.ean-int.org EAN · w ≡ 0 (mod 10)
11
EAN 5900056000564 1313131313131 527000156000518480
12
Credit Cards Card TypePrefixLength AMEX 34 37 15 VISA 4 13, 16 MASTER CARD 51 - 55 16 DICOVER 6011 16 Diners Club/ Carte Blanche 300 – 305 36 38 14 JCB 3 2131 1800 16 15 15
13
Credit Cards Check digit algorithm(s) MOD 10 Luhn Formula IBM Check Permutation Check All do the same Hans Peter Luhn (1896-1964) Worked for IBM since 1941 Example (Excel)
15
Credit Cards Position123456789101112131415Sum Digit 371561234571008 Weight 121212121212121 Product31411062264 72008 Sum of Digits 35116226417200848 Invalid number, sum not divisible by 10.Sum mod 108
16
Credit Cards Position12345678910111213141516Sum Digit 5309001234567890 Weight2121212121212121 σi(d)σi(d) 130900226416589056 Invalid number, sum not divisible by 10.Sum mod 106 id, i = 1 σ i (d) = (0)(124875)(36)(9), i = 2
17
Credit Cards Advantages Detects all single errors Corrects single error (if corrupted digit is known) Works for arbitrary length Disadvantages (does not detect) Jump transpositions Adjacent transpositions 09 90 and 90 09
18
Credit Cards Position12345678910111213141516Sum Digit 5309001234567894 Weight2121212121212121 σi(d)σi(d) 130900226416589460 Valid number Sum mod 100 Position12345678910111213141516Sum Digit 5300901234567894 Weight2121212121212121 σi(d)σi(d) 130090226416589460 Valid number Sum mod 100
19
ISBN www.ISBN.org Ten “digits” and three dashes (-) d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 8 d 9 d 10 d 1,…, d 9 = {0, 1, …, 9}; d 10 ={0, …, 9, X=10} Check equation 10 ∑ i∙d i 0 (mod 11) i = 1
20
ISBN 038797993X 12345678910 0624284542637227100407 407=11·37
21
ISBN Advantages Detects all single errors Corrects single error (if corrupted digit is known) Detects all transposition errors (!!) Disadvantages Works for bounded length (≤ 10) Additional symbol X
22
Other US Postal Money Orders MOD 9 arithmetic Airline Tickets MOD 7 arithmetic Electronic Funds Transfer MOD 10, weights [3 7 1 3 7 1 3 7 1] Verhoeff’s Check Digit Scheme German DM Dihedral Group D 5 multiplication
23
The End If you blinked and missed it, go to www2.semo.edu/jwojdylo/research.htm
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.