check digits tanli su. introduction -identification numbers are used to easily identify people,...
DESCRIPTION
Transmission Errors Error TypeDescriptionFormFrequency single digitone digit changesa → b79.1% adjacent transposition two different consecutive digits switch places ab → ba10.2% omitting or adding a digit a digit is omitted or an extra digit is added ab → a or a → ab 10% jump transposition two different digits separated by a third digit between them switch places acb → bca0.8%TRANSCRIPT
Check DigitsTanli Su
Introduction- identification numbers are used to easily identify people, products, books,
accounts, credit cards, driver's licenses, and more
- millions of times a day, these numbers are transmitted by humans and
computers in various ways, making errors likely to occur
- to ensure that an identification number has been transmitted correctly, a check
digit is calculated and assigned as the last digit of the identification number
- if the check digit does not match what it is expected to be, then a transmission
error must have occurred and can be manually corrected
- check digit schemes: methods to calculate check digits using modular arithmetic
Transmission ErrorsError Type Description Form Frequency
single digit one digit changes a → b 79.1%
adjacent transposition
two different consecutive digits switch places
ab → ba 10.2%
omitting or adding a digit
a digit is omitted or an extra digit is added
ab → a ora → ab
10%
jump transposition
two different digits separated by a third digit between them switch places
acb → bca 0.8%
Transmission ErrorsError Type Description Form Frequency
twintwo identical consecutive digits change to a different pair of identical digits
aa → bb 0.5%
phonetictwo digits in a number are presented orally and incorrectly
a0 → 1a or1a → a0
(ex. 50 → 15)0.5%
jump twintwo identical digits, separated by a third digit between them, change to a different pair of identical digits
aca → bcb 0.3%
— J. Kirtland, Identification Numbers and Check Digit
Schemes
US Postal Money Order- identification number for a US postal money order is 11 digits long
- uses a mod 9 check digit scheme
- check digit = remainder when the sum of the other 10 digits is divided by 9
- calculation for the check digit of 2791400953x:
(2 + 7 + 9 + 1 + 4 + 0 + 0 + 9 + 5 + 3) (mod 9) ≡ 40 (mod 9) ≡ 4
So the complete US postal money order number is 27914009534.
- since this check digit scheme uses mod 9, it catches all single digit errors except
when a 9 is changed to a 0, or vice versa
UPC (Universal Product Code)- UPC numbers appear on almost every single retail product in the U.S.
- calculation for the check digit of UPC 5-02003-91562-x:1. Sum the digits in the odd-numbered positions.
5 + 2 + 0 + 9 + 5 + 2 = 23 ← sum 12. Multiply sum 1 by 3 and add it to the sum of the digits in the even-numbered positions
to get a weighted sum.
3・ (sum 1) + (0 + 0 + 3 + 1 + 6) = 69 + 10 = 79 ← weighted sum3. Find the remainder when the weighted sum is divided by 10. Subtract the remainder
from 10, and the resulting number is the check digit.
79 (mod 10) ≡ 9 10 - 9 = 1
So the complete UPC number is 5-02003-91562-1.- the UPC scheme catches all single digit errors and adjacent transposition errors except
when ab is changed to ba when | a-b | = 5.
Luhn Algorithm- more advanced check digit scheme designed by IBM computer scientist Hans Peter
Luhn in 1954 to accurately verify identification numbers
- used by most credit card companies
- detects all single digit errors and adjacent transposition errors except when 09 is
changed to 90, or vice versa
- can also catch most twin errors
Luhn AlgorithmExample: validation of the identification number 49927398716
1. Starting with the last digit, which is the check digit, sum up every other digit.
4 + 9 + 7 + 9 + 7 + 6 = 42 ← sum 12. Starting with the second to last digit, double every other digit. If a number is greater
than 9 after it is doubled, add up its two digits to create a new single digit. Add all the doubled digits/new single digits to make a second sum.2・ 9 = 18 → 1 + 8 = 9 2・ 2 = 4 2・ 3 = 62・ 8 = 16 → 1 + 6 = 7 2・ 1 = 2
9 + 4 + 6 + 7 + 2 = 28 ← sum 23. Add the two sums from steps 1 and 2 to make a weighted sum.
42 + 28 = 70 ← weighted sumIf the weighted sum is divisible by 10, then it is a valid identification number according to the Luhn algorithm. In this case, 70 is divisible by 10, so the number 49927398716 is valid.
Concluding Remarks- other more complex check digit algorithms: the Verhoeff algorithm and the
Damm algorithm
- can detect most of the transmission errors mentioned in the table
- while they can detect many transmission errors, they are still unable to identify
more complex errors
- to do this, necessary to either use both letters and numbers for the check digit or
to use multiple check digits
- check digits are only intended to catch accidental transmission errors and are
not actually meant to help prevent forgeries
Works CitedBartlett, Sandra L. "Credit Card Validation - Check Digits." Credit Card Check Digit Validation. University of
Michigan, 5 Sept. 2007. Web. 27 July 2015.
Gallian, Joseph A. Contemporary Abstract Algebra. 6th ed. Boston, MA: Houghton Mifflin, 2006. Print.
Kirtland, Joseph. Identification Numbers and Check Digit Schemes. Washington, DC: Mathematical Association of
America, 2001. Print.
Mohr, Jonathan. "Check Digits." Check Digits. University of Alberta, 1999. Web. 23 July 2015.
Salomon, David. Coding for Data and Computer Communications. New York, NY: Springer, 2005. Print.
Thank you for listening!