codes - math.tamu.eduroquesol/math167_summer... · identification numbers sometimes encode...

16
Chapter 16 Identification Numbers Identification Numbers Modern identification numbers serve at least two functions: The number should unambiguously identify the person or thing with which it is associated . The number should have a “self-checking” aspect. Codes A group of symbols that represent information. Codes have been invented for storing, securing, and transmitting information. Examples: Hieroglyphics, the Greek alphabet, Roman numerals, Morse code, and the “genetic code” used to describe DNA Check Digits A digit included in an identification number for the purpose of error detection. Mathematical calculations or schemes are used on the digits of the identification number to assign the check digit. Computers use the check digit to help detect typing errors during data entry to prevent and detect fraud and to find other errors.

Upload: others

Post on 01-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

Chapter 16 Identification Numbers

Identification Numbers

Modern identification numbers serve at least two functions:

The number should unambiguously identify the person or thing with which it is associated .

The number should have a “self-checking” aspect.

Codes

A group of symbols that represent information.

Codes have been invented for storing, securing, and transmitting information.

Examples: Hieroglyphics, the Greek alphabet, Roman numerals, Morse code, and the “genetic code” used to describe DNA

Check Digits

A digit included in an identification number for the purpose of error detection.

Mathematical calculations or schemes are used on the digits of the identification number to assign the check digit.

Computers use the check digit to help detect typing errors during data entry to prevent and detect fraud and to find other errors.

Page 2: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

U.S. Postal Service money order with identification number 5025978014 and check digit 5.

Universal Product Code (UPC)

A bar code and identification

number that are used on most retail items.

By using weighted schemes in the

calculation of the check digit, the UPCcode can achieve greater error detection—up to 100% of all single-digit errors andmost other types of errors.

Example: Consider the number 6 54954 20117 6 found on the bottom of

a bag of juice.

The first digit identifies a broad category of goods.

The next five digits identify the manufacturer.

The next five digits identify the product.

The last is a check digit.

Page 3: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

Thus in general we have

Bank Identification Number

Here is what the string of numbers at the bottom of a check mean

0113 Bank’s Federal Reserve District, office, and state or special collectionarrangement

0014 Bank’s ID number

2 Check digit ( error detection )

12345678 Customer's check account

0101 Customer's check number

Page 4: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

International Standard Book Number (ISBN)

A ten-digit (or thirteen) identification number ( ISBN-10 or ISBN-13) used on books throughout the world that contains a check digit for error detection.

This scheme can detect 100% of single errors and 100% of transposition errors.

A correctly coded ten-digit ISBN a1 a2 …a10 has the property that 10a1 + 9a2 + 8a3 + 7a4 + 6a5 + 5a6 + 4a7 + 3a8 + 2a9 + a10 is evenly divisible by 11.

VIN System – Vehicle Identification Number

The manufacturer gives each automobile andtruck a unique VIN. A typical VIN has 17alphanumeric characters that code informationsuch as country where the vehicle was built,manufacturer, make, body style, engine type,plant where the vehicle was built, model year,model, type of restraint, a check digit, and aproduction sequence number.

Page 5: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

The Zip Code

The ZIP Code

Identification numbers sometimes encode geographic data.

In 1963, the U.S. Postal Service numbered every American post office with a five-digit ZIP code—numbers begin with 0 at the points farthest east, and work up to 9 at the points farthest west.

In 1983, the U.S. Postal Service added four digits to the ZIP code, ZIP + 4 code.

Bar Codes

ZIP Code Bar Code

The simplest bar code is the Postnet code used by the U.S. Postal Service and commonly found on business reply forms.

Page 6: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

UPC Bar Code

The UPC bar code was first used on grocery items in 1973 and has since spread to most retail products.

Encoding Personal Data

Encoding – Translating data into code.

Coding License Numbers

Some states assign driver’s license numbers with personal data encoded into the number.

Personal data that may be encoded are name, sex, and date of birth.

Coding license numbers solely from personal data enables automobile insurers, government entities, and law enforcement agencies to determine

the number from the personal data.

Social Security Numbers

There is no personal data encoded in the Social Security number.

The Social Security numbering scheme predates computers.

The only personal information that can be deduced from the Social Security number is where the holder obtained it. The first three digits show (the state usually) where the applicant applied, with a few exceptions.

Page 7: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

Mathematical Model

As we know in every identification number there is a check digit and there are different mathematical schemes to do it. For example we have that:

1) The US postal service the first ten digits of the 11-digit identification number 63024383845 simply identify the money order and the last number, 5, is the check digit which is the reminder of the sum of the first ten digits divided by 9:

6 + 3 + 0 + 2 + 4 + 3 + 8 + 3 + 8 + 4 = 41

=> 41= 9*4 + 5

remainder

2) The scheme used on airlines tickets, UPS packages, and National rental cars assigns the remainder after division by 7 of the number itself as the check digit. Thus the identification number 540047 has the check digit 4 because

540047 = 77149 * 7 + 4

remainder

3) The UPC scheme is more complicated. Given an identification number of the form

a1a2a3a4a5a6a7a8a9a10 a11a12

Page 8: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

the last digit is a check digit, chosen in such a way that the following calculation

3a1+a2+3a3+a4+3 a5+a6+3a7+a8+3a9+a10+3a11+a12

results in a number evenly divided by 10. Thus the UPC identificationnumber 0 38000 00127 7 has as a check digit 7 because

3∗0+3+3∗8+0+3∗0+0+3∗0+0+3∗1+2+3∗7=53 (+7=60 )

4) The US Banking system uses a variation of the UPC system. In a routing number of the form

a1a2a3a4a5a6a7a8a9

the last digit is the check digit, chosen as the last digit of the sum

7a1+3a2+9 a3+7a4+3a5+9a6+7 a7+3a8

Page 9: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

Thus the routing number 071000013 has as a check digit 3 because

7∗0+3∗7+9∗1+7∗0+3∗0+9∗0+7∗0+3∗1=335) The Postnet code consists of ten digits

a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 C

( ZIP + 4 + C ) where the last one, C, is a check digit chosen in such a way that the following calculation

a1+a2+a3+a4+a5+a6+a7+a8+a9+C

results in a number evenly divided by 10. Thus the ZIP + 4 code number 605159968 has a check digit the number 1 because

6 + 0 + 5 + 1 + 5 + 9 + 9 + 6 + 8 = 49 ( + 1 = 50 )

Example

1) Given the UPC code 0 69000 00341 6 for some product, after passing through the scanner machine we obtain an error. What is happening in this case ?

OBS

In the UPC code and US banking systems the digits are multiplied by 3 and 1 in the first case, and by 7, 3, and 9 in the second case . These numbers are called the weights.

Page 10: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

Types of error creating identification numbers.

1) Replacing one digit with a different digit ( single digit error )

Example: 32 rather 12

2) Transposing two adjacent digits ( adjacent transposition error )

Example: 21 rather than 12

3) Transposing a sequence of digits ( jump transposition error )

Example: 321 rather than 123 .

Now since we are going to deal with remainder in the calculation of the check digits we will introduce some basic concepts from the branch of mathematics called Number Theory ( modular arithmetic ).

Definition

Let a, b, and m be integers with m > 2. Then a is congruent with b modulo m, written as

a ≡ b mod m

if an only if a – b is evenly divided by m .

Examples

1) 32 ≡ 2 mod 5 b/c (32 – 2) / 5 = 30 / 5 = 6 .

2) 29 ≡ 8 mod 3 b/c (29 – 8) / 3 = 21 / 3 = 7 .

Page 11: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

3) 69 ≡ 5 mod 8 b/c (69 – 5) / 8 = 64 / 8 = 8 .

4) 33 ≢ 3 mod 4 b/c (33 - 3) / 4 = 30 / 4 ≠ not an integer .

Definition

Let x and y be two integers with y ≠ 0 we define x mod y as the remainder of divide x by y.

Examples

1) 67 mod 5 = 2 because 67 = (13)(5) + 2 remainder

2) 39 mod 3 = 3 because 38 = (12)(3) + 3 remainder

3) 21 mod 4 = 1 because 21 = (5)(4) + 1 remainder

4) 58 mod 6 = 4 because 58 = (9)(6) + 4 remainder

5) A code a 1 a 2 a 3 a 4 a 5 uses the last digit ( a 5 ) as the check digit. The check digit is found using the formula

a 1 + a 4 + 2( a 2 + a 3 ) mod 10

a) What is the check digit for the code 6728 ?

Page 12: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

b) For the identification number 324x6. What is the value of x?

c) Assume that instead of the identification number 6728 we type erroneously 7628 . Will the scheme detect the error ? How about typing 6278 ?

6) A code a 1 a 2 a 3 a 4 uses the last last digit, ( a 4 ) as the check digit. The check digit is found using the formula

a 1 + 3 a 2 + 4 a 3 mod 10

The first digit is not readable so the code looks like x922. If the check digit is known to be correct, what is the value of the missing digit ?

Page 13: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

7) A code a 1 a 2 a 3 a 4 uses the last last digit ( a 4 ) as the check digit. The check digit is found using the formula

9a 1 + 4 a 2 + 8 a 3 mod 10

Will this check digit find all transposition errors in the first and second positions?

8)A code a 1 a 2 a 3 a 4 uses the last last digit ( a 4 ) as the check digit. The check digit is found using the formula

2a 1 + 3 a 2 + 5 a 3 mod 9

Will this check digit find all single digit errors in the first position?

Page 14: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

9) In Florida, the last three digits of the driver's license of a female with birth month m and birth day b are 40( m – 1 ) + b + 500. For bothmales and females, the fourth and fifth digits from the end give the year of birth. Determine the last five digits of a Florida driver's licensenumber for a female born on July 18, 1942. Explain why a Florida driver's license number that ends with the five numbers 99718 is not valid ?

10) The last three digits of a man's ID number are the birthday of the year based on each month of the year having 42 days. If the person is a woman, 600 is added to the birth day.

a) What are the last three digits of a man's ID number if he was born on August the 5th ?

Page 15: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

b) What do you know about a person if the last thre digits of the person's ID number are 618.

c) What do you know about a person if the last three digits of the ID number are 502 ?

11) A code is given by a 1 a 2 a 3 a 4 where a 4 is the check digit.

The check digit is given by the formula

7a 1 + 2 a 2 + 5 a 3 mod 9

a) Determine the value of x in the code 2x45 given that the check digitis valid.

Page 16: Codes - math.tamu.eduroquesol/Math167_Summer... · Identification numbers sometimes encode geographic data. ... As we know in every identification number there is a check digit and

b) Determine if the check digit will find all single digit errors in the third position

c) Determine if the check digit will find all transposition errors in the second and third position