Presentation is loading. Please wait.

Presentation is loading. Please wait.

Check Digits Tanli Su. Introduction -identification numbers are used to easily identify people, products, books, accounts, credit cards, driver's licenses,

Similar presentations


Presentation on theme: "Check Digits Tanli Su. Introduction -identification numbers are used to easily identify people, products, books, accounts, credit cards, driver's licenses,"— Presentation transcript:

1 Check Digits Tanli Su

2 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

3 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%

4 Transmission Errors Error TypeDescriptionFormFrequency twin two identical consecutive digits change to a different pair of identical digits aa → bb0.5% phonetic two digits in a number are presented orally and incorrectly a0 → 1a or 1a → a0 (ex. 50 → 15) 0.5% jump twin two identical digits, separated by a third digit between them, change to a different pair of identical digits aca → bcb0.3% — J. Kirtland, Identification Numbers and Check Digit Schemes

5 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

6 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 1 1.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 sum 1.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) ≡ 910 - 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.

7 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

8 Luhn Algorithm Example: 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 1 1.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 = 6 2 ・ 8 = 16 → 1 + 6 = 7 2 ・ 1 = 2 9 + 4 + 6 + 7 + 2 = 28 ← sum 2 1.Add the two sums from steps 1 and 2 to make a weighted sum. 42 + 28 = 70 ← weighted sum If 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.

9 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

10 Works Cited Bartlett, 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.

11 Thank you for listening!


Download ppt "Check Digits Tanli Su. Introduction -identification numbers are used to easily identify people, products, books, accounts, credit cards, driver's licenses,"

Similar presentations


Ads by Google