Download - CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

Transcript
Page 1: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 1

CHAPTER 16: Identification Numbers

Identification numbers should be ______________. So each number

represents a different person or thing.

List some examples of identification numbers:

Identification number often contain one or more ___________________

to help catch data entry and data transmission errors.

Modular Arithmetic (from section 17.4)

Example

If a class starts at 11:00 a.m. and

lasts for 3 hours, what time does it

end?

This is a form of modular arithmetic. Modular arithmetic is helpful when

forming check digits.

We say that a modulo m is ________________ to b (written as

π‘Ž mod π‘š ≑ 𝑏) if (π‘Ž βˆ’ 𝑏) Γ· π‘š has a remainder of 0. This means π‘Ž βˆ’ 𝑏 is

a multiple of π‘š. One way to find a value for 𝑏 is to find the

________________ when π‘Ž is divided by π‘š.

Example

For our clock example, 11 + 3 = 14. Because 14 Γ· 12 has a remainder of

________, 14 mod 12 ≑ _________. This also means that (14 βˆ’ 2) Γ· 12

has a remainder of ___.

Page 2: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 2

Example

Determine if the following congruences are true or false.

a) 27 mod 9 ≑ 0

b) 29 mod 10 ≑ 9

c) 17 mod 5 ≑ 3

Example

Find the following values.

a) 17 mod 5 𝑖𝑠 _______ b) 47 mod 11 𝑖𝑠 _______

c) 53 mod 7 𝑖𝑠 _______ d) 8 mod 13 𝑖𝑠 _______

Page 3: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 3

16.1 Check Digits

Common Data Entry Errors

________________ - Occurs when an incorrect digit is entered.

This is also called a substitution.

Ex:

________________ - Occurs when adjacent digits are entered in

reverse order.

Ex:

________________ - Occurs when digits that are separated by

another digit are entered in reverse order.

Ex:

SUM of the digits mod 9

Example

The first 10 digits of a USPS Money Order identify

the money order. The last digit is a check digit,

which should equal the sum of the first 10 digits

mod 9.

Verify that the check digit in this image is correct.

Page 4: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 4

Check digits are designed to catch errors, so it is important to know which

errors will NOT be caught.

For an error not to be caught, the correct number and the number with

an error must produce the ___________ check digit.

If π‘₯ π‘šπ‘œπ‘‘ 𝑛 ≑ 𝑦 mod 𝑛, then π‘₯ βˆ’ 𝑦 is a _____________ of 𝑛.

We will label our correct number with π‘Ž1π‘Ž2π‘Ž3 … where each π‘Žπ‘–

represents a ___________ digit.

For transposition errors, we will rearrange the π‘Žπ‘– according to the

type of transposition.

For single digit errors, we will use 𝑒𝑖 to represent the error for the

digit that should have been π‘Žπ‘–.

Page 5: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 5

Example

Will the β€œsum of digits mod 9” check digit scheme that is used for money

orders detect all single-digit errors?

Let’s look at an error in the first digit, π‘Ž1.

Correct Code: π‘Ž1π‘Ž2π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10

Incorrect Code: 𝑒1π‘Ž2π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10

So the correct check digit is

(π‘Ž1 + π‘Ž2 + π‘Ž3 + π‘Ž4 + π‘Ž5 + π‘Ž6 + π‘Ž7 + π‘Ž8 + π‘Ž9 + π‘Ž10) mod 9

and the incorrect check digit is

(𝑒1 + π‘Ž2 + π‘Ž3 + π‘Ž4 + π‘Ž5 + π‘Ž6 + π‘Ž7 + π‘Ž8 + π‘Ž9 + π‘Ž10) mod 9

The error will NOT be caught if

(π‘Ž1 + π‘Ž2 + π‘Ž3 + π‘Ž4 + π‘Ž5 + π‘Ž6 + π‘Ž7 + π‘Ž8 + π‘Ž9 + π‘Ž10) βˆ’

(𝑒1 + π‘Ž2 + π‘Ž3 + π‘Ž4 + π‘Ž5 + π‘Ž6 + π‘Ž7 + π‘Ž8 + π‘Ž9 + π‘Ž10) is a multiple of 9.

This simplifies to

π‘Ž1 βˆ’ 𝑒1 is a multiple of 9.

Multiples of 9 are Β±{0, 9, 18, 27, 36, . . . }.

If π‘Ž1 βˆ’ 𝑒1 = 0, then π‘Ž1 = 𝑒1 so we did not really make an error.

If π‘Ž1 βˆ’ 𝑒1 = Β±9 (which can also be written as |π‘Ž1 βˆ’ 𝑒1| = 9), then π‘Ž1 and

𝑒1 are digits that are separated by 9 units. Digits are 0, 1, 2, 3, 4, 5, 6, 7,

8, and 9. The only digits that are separated by 9 units are 0 and 9, so our

error was writing a 0 instead of a 9 or writing a 9 instead of a 0.

If |π‘Ž1 βˆ’ 𝑒1| = 18, then then π‘Ž1 and 𝑒1 are digits that are separated by 18

units. The digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 are never separated by

more than 9 units, so this and all higher multiples of 9 are impossible.

Therefore, all single-digit errors in the first digit other than substitutions of

0 for 9 or 9 for 0 would yield a different check digit and would be

caught.

Page 6: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 6

The same logic applies for each digit, so this scheme will miss errors

where |π‘Žπ‘– βˆ’ 𝑒𝑖| = 9 and catch all other single-digit errors. This means

that all single-digit errors other than interchanging 0 and 9 are caught.

Example

Will the β€œsum of digits mod 9” check digit scheme that is used for money

orders detect all transposition of digits?

Let’s look at an adjacent transposition of the first two digits, π‘Ž1 and π‘Ž2.

Correct Code: π‘Ž1π‘Ž2π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10

Incorrect Code: π‘Ž2π‘Ž1π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10

So the correct check digit is

(π‘Ž1 + π‘Ž2 + π‘Ž3 + π‘Ž4 + π‘Ž5 + π‘Ž6 + π‘Ž7 + π‘Ž8 + π‘Ž9 + π‘Ž10) mod 9

and the incorrect check digit is

(π‘Ž2 + π‘Ž1 + π‘Ž3 + π‘Ž4 + π‘Ž5 + π‘Ž6 + π‘Ž7 + π‘Ž8 + π‘Ž9 + π‘Ž10) mod 9

The error will NOT be caught if

(π‘Ž1 + π‘Ž2 + π‘Ž3 + π‘Ž4 + π‘Ž5 + π‘Ž6 + π‘Ž7 + π‘Ž8 + π‘Ž9 + π‘Ž10) βˆ’

(π‘Ž2 + π‘Ž1 + π‘Ž3 + π‘Ž4 + π‘Ž5 + π‘Ž6 + π‘Ž7 + π‘Ž8 + π‘Ž9 + π‘Ž10) is a multiple of 9.

This simplifies to

0 is a multiple of 9.

Because 0 is a multiple of 9, transposition of the first two digits will not be

caught. The same logic applies for the transposition of any two digits.

Therefore, transposition of any two digits in the β€œsum of the digits mod

9” check digit scheme will not be caught.

We could have worked this one without as much writing. The order of

addition does not change the sum, so the check digit will not be changed

(thus the error will not be caught) if we transpose digits in the β€œsum of

the digits mod 9” check digit scheme.

Page 7: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 7

NUMBER mod 7

Airline Tickets, UPS packages, and Avis and National rental car

companies reserve the last digit as a check digit. The check digit is the

identification number mod 7.

Example

Is the check digit for the National rental car number 5007125 valid?

Note: The number in this problem includes the identification number with

the check digit appended to the end.

The β€œnumber mod 7” check digit scheme will detect all single-digit errors

with the exception of the pairs 0 and 7, 1 and 8, or 2 and 9.

The β€œnumber mod 7” check digit scheme will also detect transposition of

adjacent digits with the exception of the pairs 0 and 7, 1 and 8, or 2 and 9.

Page 8: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 8

Weighted Check Digit Schemes

Universal Product Codes (UPC)

The blocks of digits indicate the category of the item, the

manufacturer, the item, and the check digit, respectively.

Let 𝑆 = πŸ‘π‘Ž1 + π‘Ž2 + πŸ‘π‘Ž3 + π‘Ž4 + πŸ‘π‘Ž5 + π‘Ž6 + πŸ‘π‘Ž7 + π‘Ž8 + πŸ‘π‘Ž9 + π‘Ž10 + πŸ‘π‘Ž11 + π‘Ž12.

The check digit, π‘Ž12 is chosen so that S a multiple of 10.

(This is the equivalent to saying 𝑆 mod 10 ≑ 0).

This scheme does not catch jump transpositions. However, it will

catch all single-position errors and most other errors.

Example

Check to see if the first code has a valid check digit.

Example

Determine the check digit for the second code.

Example

Why does the UPC scheme not detect jump transposition errors?

Page 9: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 9

Example

Show that the UPC scheme detects all single-digit errors.

Let’s look at an error in the first digit, π‘Ž1.

Correct Code: π‘Ž1π‘Ž2π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10π‘Ž11π‘Ž12

Incorrect Code: 𝑒1π‘Ž2π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10π‘Ž11π‘Ž12

So the correct check digit is

(3π‘Ž1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) mod 10

and the incorrect check digit is

(3𝑒1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) mod 10

The error will NOT be caught if

(3π‘Ž1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) βˆ’

(3𝑒1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) is a multiple of 10.

This simplifies to

3π‘Ž1 βˆ’ 3𝑒1 is a multiple of 10,

which means 3(π‘Ž1 βˆ’ 𝑒1) is a multiple of 10,

which means π‘Ž1 βˆ’ 𝑒1 is a multiple of 10

3.

Multiples of 10

3 are Β± {0,

10

3,

20

3, 10,

40

3, . . . }.

If π‘Ž1 βˆ’ 𝑒1 = 0, then π‘Ž1 = 𝑒1 so we did not really make an error.

If π‘Ž1 βˆ’ 𝑒1 = Β±10

3, then π‘Ž1 and 𝑒1 are digits that are separated by

10

3. The

difference between digits is always an integer, so this and all other non-

integer multiples of 10

3 are impossible.

If |π‘Ž1 βˆ’ 𝑒1| = 10, then then π‘Ž1 and 𝑒1 are digits that are separated by 10

units. The digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are never separated by more

than 9 units, so this and all higher multiples of 10

3 are impossible.

Therefore, all single-digit errors in the first digit would be caught.

The same logic applies for all of the digits with a coefficient of 3 (the 3rd,

5th, 7th, 9th, and 11th digits), so this scheme will catch all single-digit

Page 10: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 10

errors in the odd-numbered positions. Therefore, we need to check the

even-numbered positions.

Let’s look at an error in the second digit, π‘Ž2.

Correct Code: π‘Ž1π‘Ž2π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10π‘Ž11π‘Ž12

Incorrect Code: π‘Ž1𝑒2π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10π‘Ž11π‘Ž12

So the correct check digit is

(3π‘Ž1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) mod 10

and the incorrect check digit is

(3π‘Ž1 + 𝑒2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) mod 10

The error will NOT be caught if

(3π‘Ž1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) βˆ’

(3π‘Ž1 + 𝑒2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) is a multiple of 10.

This simplifies to ________________________________

Multiples of 10 are _____________________________

If π‘Ž2 βˆ’ 𝑒2 = 0, ________________________________

If |π‘Ž2 βˆ’ 𝑒2| = 10, then then π‘Ž2 and 𝑒2 are digits that are separated by 10

units. The digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are never separated by more

than 9 units, so this and all higher multiples of 10 are impossible.

Therefore, all single-digit errors in the second digit would be caught.

The same logic applies for all of the digits with a coefficient of 1 (the 4th,

6th, 8th, 10th, and 12th digits), so this scheme will catch all single-digit

errors in the even-numbered positions.

Therefore, the UPC scheme detects all single-digit errors.

Page 11: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 11

Example

Will the UPC scheme detect adjacent transposition errors in the first and

second digits?

A transposition of the first and second digits would result in:

Correct Code: π‘Ž1π‘Ž2π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10π‘Ž11π‘Ž12

Incorrect Code: π‘Ž2π‘Ž1π‘Ž3π‘Ž4π‘Ž5π‘Ž6π‘Ž7π‘Ž8π‘Ž9π‘Ž10π‘Ž11π‘Ž12

So the correct check digit is

(3π‘Ž1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) mod 10

and the incorrect check digit is

(3π‘Ž2 + π‘Ž1 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) mod 10

The error will not be caught if

(3π‘Ž1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) βˆ’

(3π‘Ž2 + π‘Ž1 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12) is a multiple of 10.

This simplifies to

3π‘Ž1 + π‘Ž2 βˆ’ 3π‘Ž2 βˆ’ π‘Ž1 is a multiple of 10,

which means 2π‘Ž1 βˆ’ 2π‘Ž2 = 2(π‘Ž1 βˆ’ π‘Ž2) is a multiple of 10,

which means π‘Ž1 βˆ’ π‘Ž2 is a multiple of ______.

Multiples of ______ are _______________________________

Page 12: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 12

Banking

(Image from Nationwide.com)

Let 𝑅 = πŸ•π‘Ž1 + πŸ‘π‘Ž2 + πŸ—π‘Ž3 + πŸ•π‘Ž4 + πŸ‘π‘Ž5 + πŸ—π‘Ž6 + πŸ•π‘Ž7 + πŸ‘π‘Ž8 for the routing

number. The check-digit, π‘Ž9, equals the last digit of R.

This scheme will catch all single-position errors and most other errors,

including most jump transpositions.

Example

Does this sample routing number have a valid check digit?

Example

The HR representative could not read a new doctor’s handwriting on her

direct deposit form. The HR representative could tell the routing number

was 314x77337. Can you determine the missing digit for the HR

representative?

x 0 1 2 3 4 5 6 7 8 9

R

Page 13: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 13

Credit Cards

Credit cards have 15-digit numbers with a check digit in position 16.

Let D = the sum of the digits in odd-numbered positions

Let E = the sum of the digits in even-numbered positions

(not including the check digit)

Let T = the number of digits in odd-numbered positions that are

larger than 4.

Let 𝐢 = 2𝐷 + 𝐸 + 𝑇 + π‘Ž16

The check digit, π‘Ž16, is chosen so C is a multiple of 10.

This method detects single-position errors and 98% of other common

errors.

Example

The number 4128 0012 3456 7890 was listed on a credit card

advertisement. Is the check digit correct?

Page 14: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 14

ISBN-10

The blocks of digits represent the language of the country in which the

book was published, the publisher, the book, and the check digit,

respectively.

Let 𝑉 = πŸπŸŽπ‘Ž1 + πŸ—π‘Ž2 + πŸ–π‘Ž3 + πŸ•π‘Ž4 + πŸ”π‘Ž5 + πŸ“π‘Ž6 + πŸ’π‘Ž7 + πŸ‘π‘Ž8 + πŸπ‘Ž9 + π‘Ž10.

The check digit, π‘Ž10, is chosen so V is divisible by 11.

A remainder of 10 is possible when dividing by 11. If π‘Ž10 needs to be

10, an X is used to represent π‘Ž10 so it will take up only one space.

The scheme used for the 10-digit code detects all single-digit AND all

transposition errors!

Example

Is the check digit correct for the ISBN-10 listed above?

The scheme for ISBN-13 is similar to the UPC scheme and is described in

the summary at the end of the notes. Note the similarity between ISBN-10

and ISBN-13.

Page 15: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 15

Vehicle Identification codes (Image from text page 581)

Read the description of the scheme for VINs from page 581 of the text and

determine if the check digit in this VIN is correct.

Page 16: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 16

Example

Let the check digit π‘Ž4 = (7π‘Ž1 + 2π‘Ž2 + 9π‘Ž3) mod 10

Will this catch all single-digit errors in the first digit?

Page 17: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 17

Example

Let the check digit π‘Ž4 = (7π‘Ž1 + 2π‘Ž2 + 9π‘Ž3) mod 10

Will this catch all single-digit errors in the second digit?

Page 18: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 18

Example

Let’s keep the check digit π‘Ž4 = (7π‘Ž1 + 2π‘Ž2 + 9π‘Ž3) mod 10

Will this catch all transposition errors in the first two digits?

Page 19: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 19

Example

Let the check digit π‘Ž3 = (3π‘Ž1 + π‘Ž2) mod 11

Will this catch all single-digit errors in the first digit?

Page 20: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 20

Example

Let’s keep the check digit π‘Ž3 = (3π‘Ž1 + π‘Ž2) mod 11

Will this catch all single-digit errors in the second digit?

Page 21: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 21

Example

Let’s keep the check digit π‘Ž3 = (3π‘Ž1 + π‘Ž2) mod 11

Will this catch all transposition errors?

Page 22: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 22

16.2 Zip Codes (Image from text page 582)

Example

What does Texas A&M’s zip code of 77843-0001 tell us?

Page 23: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 23

16.3 Bar Codes

A system for representing data with only two symbols is a ___________

system.

A ______ _______ is a binary system that is made up of a series of dark

bars and light spaces that represent characters.

The ____________ code is used to encode ZIP+4 numbers. Each digit is

represented by _____ vertical bars (___ long and ____ short). The ZIP+4

is followed by a check digit determined by adding the first 9 digits and

choosing the check digit so the sum of all ten digits is a multiple of 10.

The bars for these ten digits are surrounded by a tall bar on each end

called guard bars to designate the beginning and end of the code.

Example

Determine the ZIP+4 displayed below and determine if the check digit is

correct.

(Image from text page 584)

Page 24: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 24

This special bar code is called a ________

_________ code. These can encode much

more information and are popular in print

media. The Cooking Light magazine from

September, 2011 had quite a few, including

this one.

16.4 Personal Data

Social Security

The first three digits tell the state where the application was filed.

Florida Driver’s License (image from

http://restaurantandlodging.com/a-la-

carte/new-law-permits-veterans-designation-

on-florida-driver-licen.html)

Take on the form XXXX-XXX-YY-DDD-N

XXXX-XXX is based on a coding of your name.

YY gives the last two digits of the year of your birth

DDD is coded from the month (m) and day (d) of your birth. These

three digits are

o Male: 40 (π‘š βˆ’ 1) + 𝑑

o Female: 40 (π‘š βˆ’ 1) + 𝑑 + 500

o This system uses 40 as a loose representation for the number of

days in a month.

N is an overflow digit in case multiple people have the same number.

Page 25: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 25

Example

Are the digits YY-DDD correct for Joe Sample?

Example

Determine the Florida driver’s license digits YY-DDD for a female who

was born on July 18, 1942.

Example

What can you determine about a person who holds a Florida driver’s

license with the digits YY-DDD as 61-528?

Page 26: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 26

Example

What can you determine about a person who holds a Florida driver’s

license with the digits YY-DDD as 34-475?

Page 27: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 27

Summary of Check Digit Schemes

The check digit is the last digit unless noted otherwise.

Bank Routing Number

The check digit, π‘Ž9, is the last digit of R where

𝑅 = 7π‘Ž1 + 3π‘Ž2 + 9π‘Ž3 + 7π‘Ž4 + 3π‘Ž5 + 9π‘Ž6 + 7π‘Ž7 + 3π‘Ž8

Codabar Scheme - Credit Cards, Libraries, Blood Banks, South Dakota

Driver’s License

The smallest nonnegative integer, π‘Ž16, such that 𝐢 is a multiple of 10

where

𝐢 = 2𝐷 + 𝐸 + 𝑇 + π‘Ž16 and

𝐷 = the sum of the digits in odd-numbered positions

𝐸 = the sum of the digits in even-numbered positions

(not including the check digit)

𝑇 = the number of digits in odd-numbered positions that are larger

than 4

ISBN-10

The smallest nonnegative integer, π‘Ž10, such that 𝑉 is a multiple of 11

where

𝑉 = 10π‘Ž1 + 9π‘Ž2 + 8π‘Ž3 + 7π‘Ž4 + 6π‘Ž5 + 5π‘Ž6 + 4π‘Ž7 + 3π‘Ž8 + 2π‘Ž9 + π‘Ž10.

The letter X is used to represent the integer 10.

ISBN-13 and EAN (European Article Number)

The smallest nonnegative integer, π‘Ž13, such that 𝑆 is a multiple of 10

where

𝑆 = π‘Ž1 + 3π‘Ž2 + π‘Ž3 + 3π‘Ž4 + π‘Ž5 + 3π‘Ž6 + π‘Ž7 + 3π‘Ž8 + π‘Ž9 + 3π‘Ž10 + π‘Ž11 + 3π‘Ž12 + π‘Ž13

Money Order from US Postal Service

The check digit, π‘Ž11, is the sum of the first ten digits mod 9

Rental Cars (Avis and National) and Airline Tickets

The number formed by the digits prior to the check digit mod 7.

Note that this does NOT use the sum of the digits.

Page 28: CHAPTER 16: Identification NumbersIs the check digit for the National rental car number 5007125 valid? Note: The number in this problem includes the identification number with the

( c ) C a r t e r , E p s t e i n a n d B o l l i n g e r 2 0 1 6 C h a p t e r 1 6 : I d e n t i f i c a t i o n N u m b e r s P a g e | 28

Travelers Cheques (American Express and Visa) and Euro Bank Notes

The smallest nonnegative integer such that the sum of the digits

(including the check digit) is a multiple of 9.

UPC (Universal Product Code)

The smallest nonnegative integer, π‘Ž12, such that S is a multiple of 10

where

𝑆 = 3π‘Ž1 + π‘Ž2 + 3π‘Ž3 + π‘Ž4 + 3π‘Ž5 + π‘Ž6 + 3π‘Ž7 + π‘Ž8 + 3π‘Ž9 + π‘Ž10 + 3π‘Ž11 + π‘Ž12

ZIP+4

The smallest nonnegative integer such that the sum of the digits

(including the check digit) is a multiple of 10.