1 / 16

Chapter 16: Check Digit Systems

MAT 105 Spring 2008. Chapter 16: Check Digit Systems. Examples of Check Digit Systems. The check digit systems we will study are used for: US Postal Service money orders Airline tickets UPC (Universal Product Code) US Bank routing numbers Credit card numbers

bibiana
Download Presentation

Chapter 16: Check Digit Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MAT 105 Spring 2008 Chapter 16: Check Digit Systems

  2. Examples of Check Digit Systems • The check digit systems we will study are used for: • US Postal Service money orders • Airline tickets • UPC (Universal Product Code) • US Bank routing numbers • Credit card numbers • ISBN (International Standard Book Number)

  3. US Postal Service Money Orders The ID number is listed here The ID number is also listed here in machine-readable numbers (magnetic ink)

  4. USPS Money Order Check Digit System • The ID number on a USPS money order is an 11-digit number, and the 11th digit is the check digit • The 11th digit is the remainder when the sum of the first 10 digits is divided by 9

  5. Examples • In our sample money order, the ID number is 02543750594 • If we add up the first 10 digits, we get 40, and the remainder when 40 is divided by 9 is 4, so the check digit is correct • Another example: 63024383845

  6. Finding Remainders on the Calculator • Since many of the check digit systems involve finding remainders, it is useful to know how to find them on your calculator • There are many different methods, but this one is simple • For example, suppose you need to know the remainder when 59 is divided by 7

  7. Finding Remainders on the Calculator • To find the remainder when 59 is divided by 7, just type 59 divided by 7 in your calculator • Take the digits appearing after the decimal and multiply them by 7 (the number you divided by) • The result will be the remainder • In this example, the remainder is 3

  8. Detecting Errors • Suppose we receive a suspicious money order with ID number 63054383845 • If we add up the first 10 digits and divide by 9, we get remainder 8, which does not match the check digit • So we know this ID number is invalid

  9. Types of Errors • Look at what happened: • Valid ID number 63024383845 • Invalid ID number 63054383845 • This is a substitution error: an incorrect digit was substituted for the correct one • This error was detected because we were able to tell that the new number is invalid

  10. Undetected Errors • Let’s look at another example • Correct ID number 63024383845 • Incorrect number 63924383845 • Notice that the incorrect number is actually still a valid ID number, so this error goes undetected by the check digit system • In fact, this system can never detect a substitution of a 0 for a 9 (or vice versa)

  11. More Undetected Errors • Since we just add up the first 10 digits, this system is also unable to detect transposition errors • Correct ID number 63024383845 • Incorrect number 63023483845 • Once again, the incorrect number is still valid

  12. Another System: Airline Tickets This is the ticket ID number. The last digit (colored in yellow) is the check digit.

  13. Computing the Check Digit • The check digit is the remainder when the ID number (without the check digit) is divided by 7 • It is difficult for us to find these remainders on our calculators when the ID numbers are very large, like they are on airline tickets • For our examples, we will use ID numbers that are shorter than normal, just to illustrate how the process works

  14. An Example • Is the airline ticket ID number 5208162 valid? • Remember, 520816 is the ID number, and 2 is the check digit • On our calculators, we divide 520816 by 7 and get remainder 2

  15. Detecting Errors • This method detects all single substitution errors except 0  7, 1  8, and 2  9 • In addition, this system can detect transpositions as long as the two digits are not 0 & 7, 1 & 8, or 2 & 9 • Examples • 5208162  5204162 detected • 5208162  5201162 not detected • 5208162  5280162 detected • 5208162  5201862 not detected

  16. Reminder • Remember how error detection works: • If we change the ID number and now the check digit is wrong, the error is detected • If we change the ID number and the check digit is still correct, the error is not detected • Make sure you understand the difference between “incorrect” and “invalid”

More Related