Identification Numbers and Error Detection Meredith Wachs.

Slides:



Advertisements
Similar presentations
Chapter 16: Check Digit Systems, Continued
Advertisements

Math for Liberal Studies. An identification number is a sequence of letters and/or numbers that identifies an object, person, place, or concept The number.
Identification Numbers
Numbers in Our Pockets GCNU 1025 Numbers Save the Day.
Math for Liberal Studies.  Many of the ID numbers we have studied need to be represented in a way that is readable by machines  While computers can.
Math for Liberal Studies.  None of the methods we have investigated so far can detect transposition errors  In this section we will investigate new.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.
Chapter 2 Parity checks Simple codes Modular arithmetic.
MAT 1000 Mathematics in Today's World Winter 2015.
Identification Numbers
Bar codes: The little symbol that could Nikki Candelore Discrete Math: Summer ’08 Professor Langston.
MAT 105 Spring  We’re probably most familiar with seeing bar codes on the products we buy in the grocery store  However, machine-readable codes.
Mathematics in Management Science
Chapter 16: Identification Numbers Lesson Plan
Codebreaking in Everyday Life John D Barrow. 10 x 10 x 10 x 10 seconds  2.75 hours.
MAT 1000 Mathematics in Today's World Winter 2015.
BAR CODE SCANNER A.ANUSHA (06N61A0402). What is bar code? A barcode is a machine readable representation of information. Barcode stores data in widths.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
What is it? It is an applications driven course that is based upon the study of events that occur in small, or discrete, chunks. Discrete concepts are.
Wong Wai Ling, Lam Pui Ki Identification number  clearly identify a person or a thing Check digit  an extra digit for the purpose of error.
Encoding, Validation and Verification Chapter 1. Introduction This presentation covers the following: – Data encoding – Data validation – Data verification.
It is physically impossible for any data recording or transmission medium to be 100% perfect 100% of the time over its entire expected useful life. As.
Modular Arithmetic.
Modular Arithmetic, The Codabar System, and applications Tomás Cometto and Daniel Stokley Linear Systems 5/1/06.
Fault Tolerance CDA 5140 Spring 06 Everyday FT. Background Use of check digits for error detection on everyday applications used extensively but most.
Check Digit Schemes Jerzy Wojdyło Southeast Missouri State University May 13, 2002.
Lecture 12.  The ISBN 10-digit uses a reverse weighting system: multiply the first digit by 10, the second by 9, the third by 8 and so on until the check.
Chapters 16 & 17 Sarah Cameron 18 March  Review of Modular Arithmetic  Identification Numbers ZIP Codes Bar Codes  Binary Codes  Encryption.
Multi-digit Numerical Long Division 1 © 2013 Meredith S. Moody.
Spring 2015 Mathematics in Management Science Identification Numbers Data Security Check Digits UPCs, Routing Nos, Bar Codes Personal Data.
Cracking the Code: The Barcode Computer barcodes Thirty years ago marked the launch of the Universal Product Code. Requires cooperation between food.
Analyzing Numerical Data: Validating Identification Numbers
Lecture Delete all occurrences of h and w. 2. Assign numbers to the remaining letters as follows: a) Vowels, including y, have value 0. b) B, f,
MAT 105 Spring  An identification number is a sequence of letters and/or numbers that identifies an object, person, place, or concept  The number.
Barcodes! Felipe Voloch These notes and the barcode program are available at /barcode.html.
Chapter 3: Classes and Objects Java Programming FROM THE BEGINNING Copyright © 2000 W. W. Norton & Company. All rights reserved Java’s String Class.
Verification & Validation. Batch processing In a batch processing system, documents such as sales orders are collected into batches of typically 50 documents.
Ways to Check for Divisibility Dividing By 1 All numbers are divisible by 1.
Math for Liberal Studies. What is an identification number?  An identification number is a sequence of digits and/or numbers that identifies an object,
Check Digits Tanli Su. Introduction -identification numbers are used to easily identify people, products, books, accounts, credit cards, driver's licenses,
Discrete Mathematics 4. NUMBER THEORY Lecture 7 Dr.-Ing. Erwin Sitompul
My Book of Divisibility. THE 2’s Example: 30, 42, 24, 76, 98, Must be an even number Number must end in a 0, 2, 4, 6, or 8.
Coding Seven’s and Nine’s Sol: DM.11 Classwork: Students will take turns reading the “Coding Introduction” Worksheet aloud Homework (day 46): Worksheet.
Weighted Codes, Codabar, ISBN & Code 39 Sol: DM.11 Classwork: worksheet Homework (day 47): worksheet.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Week 1 Real Numbers and Their Properties (Section 1.6, 1.7, 1.8)
MAT199: Math Alive Error corretcing and compression Ian Griffiths Mathematical Institute, University of Oxford, Department of Mathematics, Princeton University.
Copyright © Cengage Learning. All rights reserved. 7 Rational Functions.
Barcode Vartika Agarwal Accurate institute of management and technology Computer science(3 rd year)
2.8 Error Detection and Correction
Analyzing Numerical Data: Validating Identification Numbers
Chapter 16: Identification Numbers Lesson Plan
Error Detection and Correction
Keeper 8: UPC Codes S.A.S. #12 1 – 3 Credit Cards S.A.S. #
Modular Arithmetic 7th Grade Lesson Plan
Modular Arithmetic II Lecture 10: Oct 6.
Chapter 16: Introduction
The Digital Revolution
MAT 105 Fall 2008 Bar Codes.
Credit Cards UPC Codes.
UPC, Bar codes, Zip + 4 (Post Net) Sol: DM.11
Fundamentals of Data Representation
How Credit Card Numbers are Generated
Computing in COBOL: The Arithmetic Verbs and Intrinsic Functions
Chapter 16: Check Digit Systems, Continued
Communicating Efficiently
Chapter 16: Identification Numbers Lesson Plan
2.8 Error Detection and Correction
Presentation transcript:

Identification Numbers and Error Detection Meredith Wachs

Where do you find identification numbers? Checks Credit cards Driver’s licenses VIN Numbers Zip Codes SSN ISBN Numbers Bar Codes/UPC’s (Universal Product Codes)

Check Digits Used to reduce error “Grocery items, credit cards, overnight mail, magazines, personal checks, traveler’s checks, soft drink cans, and automobiles” have check digits (COMAP)

Congruence mod n “a is congruent to b, mod n, if n divides a-b” (Stillwell, Elements of Number Theory) For example, 27 is congruent to 6 mod 3 because 27-6=21, which is divisible by three. Similarly, a number is congruent (mod n) to its remainder after being divided by n; for example, 20/3=6 R2, so 20=2 (mod 3)

Money Order COMAP example- The identification number on a money order is The last digit is the check digit, so the first 10 digits should be 5 mod 9. How do we divide such a large number by 9? How do we know this?

Calculating Divisibility Rules Take a number z=abcdefg This could also be written as z = g*10^0 + f*10^1 + e*10^2 + d*10^3 + c*10^4 + b*10^5 + a*10^6 Let’s replace each 10^n by its congruence mod 9

Divisibility by 9 continued 10^0=1=1 (mod 9) 10^1=10=1 (mod 9) 10^2=1*1=1 (mod 9) By analogy, we see that every place will have a weight of 1, so a(1)+b(1)+c(1)+d(1)+e(1)+f(1)+g(1) leaves the same remainder (mod 9) as abcdefg, so this is our divisibility rule.

Divisibility by 11 We’ll proceed in the same way: 10^0=1 mod 11 10^1=-1 mod 11 10^2= -1*-1=1 mod 11 10^3= 10^2*10^1=1*-1=-1 mod 11 In this way, we see that abcdefg=(g+e+c+a)- (f+d+b) (mod 11) Ex =( )-(7+8+4)=4 (mod 11), so is not divisible by 11.

Money Order Revisited If the check digit only checks the divisibility of the sum, what can be overlooked?

Potential Problems with the Check Digit Any number can be replaced with its congruence mod n (so 0 can be replaced with 9 in this example) Also, any digits can be easily transposed.

Other Uses of the Check Digit Traveler’s checks and Euro banknotes use the check digit, but the entire number, including the check digit, should be divisible by 9. If you know the divisor rule, you can easily figure out what the check digit should be. For example, if a traveler’s check ID number is and it has a divisor rule of 9, what should the check digit be?

Answer The sum of the digits is 48, and 48+6=54, which is divisible by 9, so the check digit should be 6.

More Sophisticated- UPC’s A 12-digit number that is found along the bottom of a barcode A BBBBB CCCCC D “A” is the type of good, “B” is the manufacturer’s code, “C” is the product code, “D” is the check digit (COMAP)

UPC Error Prevention Take the code A BCDEF GHIJK L. Going from left to right, calculate 3A+B+3C+D+3E+F+3G+H+3I+J+3K+L. If it isn’t divisible by 10, it is an incorrect UPC. This “detects all single-position errors and about 89% of other errors” (COMAP 326). Try this on your own!

The U.S. Banking System To identify a certain bank, it has an identification number (the first string on the bottom of the check). The string is ABCDEFGH, and the check digit is I. “I” must be the last digit of the resulting sum of 7A+3B+9C+7D+3E+9F+7G+3H

Here, we can see that 7(1)+3(2)+9(1) (2)+3(4)= 48. Since 8 is the check digit, this is a valid number.

Credit Card Numbers A more effective algorithm, which is used for credit cards, is called Codabar, and is also used by “libraries, blood banks, photofinishing companies, German banks, and the South Dakota driver’s license department” (COMAP 327). Codabar “allows computers to detect 100% of single- position errors and about 98% of other common errors” (COMAP 328). The Codabar algorithm was developed by Hans Peter Luhn ( ) and was patented in 1960 (

The Algorithm Assume a 16-digit card number, with the final number being the check digit. Add every digit in the odd- numbered spaces (going from left to right) and multiply by two. Then add the number of digits in odd-numbered spaces that >4. Finally, add all the digits in the even-numbered spaces (except for the check digit). The check digit will need to be whatever will make the total divisible by 10. Ex. What is the check digit for card number ?

Solution Ex. What is the check digit for card number ? =33*2= = = =110, so the check digit is 6.

ISBN Numbers The 10-digit International Standard Book Number detects “100% of single errors and 100% of transposition errors” (COMAP 328) An ISBN of A-BCDE-FGHI-J, with J as the check digit, is valid if 10A+9B+8C+7D+6E+5F+4G+3H+2I+J is divisible by 11.

ISBN’s continued Example: (0)+9(3)+8(8)+7(7)+6(9)+5(5)+4(5)+3(8) +2(7)+9= is divisible by 11 because (6+2)-8=0, which is divisible by 11.

Why does this work every time? COMAP proof: Let there be an error in the B slot called B’. Then both calculations (with and without errors) must be divisible by 11 in order for B’ to not be detected. Then the difference between the calculations must be divisible by 11.

Proof continued… So (10A+9B+8C+7D+6E+5F+4G+3H+2I+J) – (10A+9B’+8C+7D+6E+5F+4G+3H+2I+J)= 9(B-B’). Since B,B’ <=9, B-B’ cannot be 11, and so 9(B-B’) cannot be divisible by 11 unless B=B’.

Another Example What is the check digit for the ISBN ?

Solution 10(0)+9(7)+8(1)+7(6)+6(7)+5(1)+4(9)+3(1) +2(0)= 199 The next number divisible by 11 is =209. To represent 10, ISBN numbers have an X.

Code 39 This uses the digits 0-9 and letters A-Z (which correspond to 10-35) Code 39 is used by the DoD, automotive companies, and the health industry (COMAP 329). A 15-character string is validated by whether 15a+14b+13c+….1*o is divisible by 36 (with o as the check digit). The VIN system is a more complicated alphanumeric system.

Bar Codes “To decode the information in a bar code, a beam of light is passed over the bars and spaces via a scanning device, such as a handheld wand of a fixed-beam device. The dark bars reflect very little light back to the scanner, whereas the light spaces reflect much light. The differences in reflection intensities are detected by the scanner and converted to strings of 0’s and 1’s that represent specific numbers and letters.” (COMAP 334)

Postnet Codes A bar code for a ZIP+4 code (+1 check digit) There are 52 long or short bars, with one “guard bar” on either side and the remaining 50 bars grouped into 10 groups of 5, with 2 long bars and 3 short bars each. The check digit makes the sum of all ten numbers divisible by 10.

UPC Bar Codes Each digit is made up of seven modules There are guard bars, a center division, and a difference between manufacturer and product numbers to make reading the codes as accurate as possible. Bar codes for UPC’s have been in use since a pack of Wrigley Juicy Fruit gum was scanned on June 26, 1974 in Marsh’s Supermarket in Troy, Ohio. The first barcodes were made by National Cash Register, but smearing ink problems soon made IBM the top contender in the market. (

DigitManufacturerProduct Is the UPC above valid? (3*0+1*3+3*6+…3*5+1*2 = 60 = 0 mod 10, so yes, it is valid.)

Illinois Driver’s License Numbers In contrast to Social Security numbers, an Illinois driver’s license number can help reconstruct a person’s surname (by sound, not by spelling), first and middle initials, date of birth, and gender. These forms of ID numbers are also used in the National Archives, the Library of Congress, and in genealogy research. (COMAP 341-2).

Soundex Coding System for Surnames 1. Delete all occurrences of h and w. (so “Wachs” becomes “acs”) 2. Assign number as follows: a,e,i,o,u,y = 0; b,f,p,v = 1; c,g,j,k,q,s,x,z = 2; d,t = 3; l = 4; m,n = 5; r = 6 (so “acs” = 022) 3. If two or more letters with the same numeric value are adjacent, omit all but the first (so we’re left with “ac”)

Soundex continued… 4. Delete the first character of the original name if still present. 5. Delete all occurrences of a,e,i,o,u,y. (so we’re left with “c”) 6. Retain only the first three digits corresponding to the remaining letters; append trailing 0’s if fewer than three letters remain; precede the three digits with the first letter of the surname (so we have W200) Because of the way this is coded, many errors in spelling are taken into account. *taken directly from COMAP 342

The Middle Digits-First Initial InitialCodeInitialCodeInitialCodeInitialCode A 0 H 320 O 640 V 860 B 60 I 400 P 660 W 880 C 100 J 420 Q 700 X 940 D 160 K 500 R 720 Y 960 E 200 L 520 S 780 Z 980 F 240 M 540 T 800 G 280 N 620 U 840

The Middle Digits-Middle Initial InitialCodeInitialCodeInitialCodeInitialCode A 1 H 8 O 14 V 18 B 2 I 9 P 15 W 19 C 3 J 10 Q 15 X 19 D 4 K 11 R 16 Y 19 E 5 L 12 S 17 Z 19 F 6 M 13 T 18 G 7 N 14 U 18

Calculating the Middle Digits Add the code for the first initial to the code for the middle initial. For my initials, MJ, you have =550. So far, my number is W All middle digits information taken from bers/dl_us_shared.html bers/dl_us_shared.html

The Last Five Digits In Illinois, the last five digits retain the birth date and sex of the person. Each month is assumed to have 31 days (starting with January 1 as 001). My birthday, March 2, is therefore 2*31=62+2=064. If male, you are done. If female, add 600 to this number (so I am 664). Put the last two digits of your birth year before this number. Thus, the last five digits of my Illinois driver’s license is My complete number is W As the website author points out, IL not having overflow numbers makes it likely to have multiple people with the same number printed on their license. *COMAP 343

Conclusions We have seen several ways of identifying objects or people with numbers and the likelihood of error and the ways error is caught with each one. As COMAP points out on p. 329, “Like many practices in the ‘real world,’ historical accident and lack of knowledge about existing methods seem to be the explanation [for having so many means of identification].” We see this especially in the difference between driver’s license numbers and SSN, which were assigned prior to computers and the development of many of the systems used (like Soundex).