Identification numbers Wong Wai Ling Lam Pui Ki
Identification numbers Wong Wai Ling, Lam Pui Ki 2011 -3 -22 1
Introduction Identification number Ø clearly identify a person or a thing Check digit Ø an extra digit for the purpose of error detection 2
U. S. Postal Service Money Order 11 -digit Ø sum of the first 10 digits is divided by 9 Ø remainder = check digit Disadvantages Ø can’t detect mistake 1) replace 0 by 9 2) numbers interchange 3
Euro bank-notes 4
Euro bank-notes First letter Ø identify the country that issues the note Ø add up the numbers, add each single digit in the sum until a single digit remains Ø sum = 4+7+9+5 = 25, 2+5 = 7 5
Euro bank-notes Checksum Ø single digit obtained previously Ø refer to the particular country 6
UPC (Universal Product Code) 12 -digit 1 st: category 2 nd-6 th: manufacturer 7 th-11 th: identify the product 12 th: check digit Ø sum = 3(1 st)+1(2 nd)+3(3 rd)+ … +3(11 th)+1(12 th) Ø sum should end with a 0. (e. g. 10, 20, 30, …) Ø can detect all single position error and about 89% of other kinds of errors 7
The U. S. banking system Ø use a variation of the UPC scheme Ø append check digits to the numbers assigned to banks Each bank has a 8 -digit routing number Ø sum = 7(1 st)+3(2 nd)+9(3 rd)+ … +7(7 th)+3(8 th) Ø an extra 9 th digit (check digit) = last digit of the sum i. e. sum = 53 → check digit = 3 Ø numbers 7, 3, 9 are called weights Ø can detect most transposition errors 8
EAN (Europe Article Number) 13 -digit Ø become worldwide standard Ø existing UPC numbers are converted to EAN by adding an extra “ 0” at the beginning Ø sum = 1(1 st)+3(2 nd)+1(3 rd)+ … +1(11 th)+3(12 th)+1(13 th) Ø does not affect the check digit compared with UPC 9
Codabar Credit cards, libraries, blood banks, etc Ø Computation 1) add the digits in odd positions 2) double the result 3) add the numbers in odd positions that exceed 4 4) add the remaining digits (even positions) Ø check digit = the number needed to bring the total result to end with 0 10
Example – Credit Card Ø detect 100% single position error and 98% common error 11
ISBN (International Standard Book Number) 10 -digit e. g. a 1 - a 2 a 3 a 4 a 5 - a 6 a 7 a 8 a 9 - a 10 ↑ published publisher country identification check digit number Ø sum = 10 a 1+9 a 2+8 a 3+7 a 4+6 a 5+5 a 6+4 a 7+3 a 8+2 a 9+1 a 10 is divisible by 11 Ø however, the 10 th digit (check digit) could be 10 Ø solution: use “X” instead of “ 10” Ø detect 100% single position error and transposition error Ø another type: 13 -digit, same as EAN 12
Activity Ø The ISBN 0 -669 -03925 -4 is the result of a transposition of two adjacent digits not involving the first or last digit. Ø Determine the correct ISBN. 13
Bar Code Ø A series of dark and light spaces that represents characters Binary code Ø A system for representing data with two symbols Bar coding Ø Method for automated data collection 14
Decode Information Ø A beam of light passes through the bars and spaces by scanning device Ø The differences in reflection intensities Ø Dark bars reflect less; light spaces reflect more 15
UPC Bar Code Ø most often encountered, first used on grocery items in 1973 Ø translate 12 -digit number into bars 12 -digit number Ø two five-digit numbers in between two single-digit 16
UPC Bar Code (Example) 12 -digit: 0 -12345 -67890 -5 Ø 1 st number (0) : kinds of product Ø next 5 digits (12345): manufacturer number Ø next 5 digits (67890): product number Ø last digit (5) : check digit 17
UPC Code Ø digits are represented by a space divided into 7 modules of equal width Ø 2 long bars with one-module thickness in each end Ø separated by a light space of one-module thickness Ø the modules are named as guard bar patterns 18
UPC Code-Center bar pattern Ø separate the manufacturer’s number and the product number Ø not a part of identification number Ø 5 modules: a light space, a long dark bar, a light space, a long dark bar, a light space 19
UPC Code Ø one-module-thickness light space 0 Ø one-module-thickness dark bar 1 Ø code in the product number can be obtained from the code in the manufacturer’s number, vice versa 20
UPC Code Ø replace 1 by 0, 0 by 1 Example Ø 0111011 for manufacture’s number = 1000100 for the product number Ø manufacture’s number : odd number of 1’s product number : even number of 1’s Determine whether the barcode is scanned from LHS or RHS Ø scanning can be done correctly 21
Homework 1. Prove that the ISBN detects 100% of the single position errors. 2. The following is an actual identification number and bar code from a roll of wallpaper. What appears to be wrong with them? Speculate on the reason for the apparent violation of the UPC format. (write at least two) 22
Homework(Extra) Extra : Compare the advantages and the disadvantages of the algorithm methods stated in class. Give examples on the purpose of each method. 23
Thank you! 24
- Slides: 24