Presentation is loading. Please wait.

Presentation is loading. Please wait.

MAT 105 Spring 2008. The check digit systems we will study are used for: US Postal Service money orders Airline tickets UPC (Universal Product Code) US.

Similar presentations


Presentation on theme: "MAT 105 Spring 2008. The check digit systems we will study are used for: US Postal Service money orders Airline tickets UPC (Universal Product Code) US."— Presentation transcript:

1 MAT 105 Spring 2008

2 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 The ID number is listed here The ID number is also listed here in machine-readable numbers (magnetic ink)

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

5 In our sample money order, the ID number is 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:

6 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 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 Suppose we receive a suspicious money order with ID number 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 Look at what happened: Valid ID number Invalid ID number 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 Lets look at another example Correct ID number Incorrect number 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 Since we just add up the first 10 digits, this system is also unable to detect transposition errors Correct ID number Incorrect number Once again, the incorrect number is still valid

12 This is the ticket ID number. The last digit (colored in yellow) is the check digit.

13 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 Is the airline ticket ID number valid? Remember, is the ID number, and 2 is the check digit On our calculators, we divide by 7 and get remainder 2

15 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 detected not detected detected not detected

16 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


Download ppt "MAT 105 Spring 2008. The check digit systems we will study are used for: US Postal Service money orders Airline tickets UPC (Universal Product Code) US."

Similar presentations


Ads by Google