identification numbers and check digit schemes: using abstract algebra in your high school...

49
Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics Marist College

Upload: bryan-barrett

Post on 20-Jan-2016

245 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Identification Numbers and Check Digit Schemes: Using AbstractAlgebra in Your High School Mathematics Class

Joseph KirtlandDepartment of MathematicsMarist College

Page 2: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Check Digit Schemes

•Goal: To catch errors when identification numbers are transmitted.

•Append an extra digit using mathematical methods.

•There are schemes that append two or more digits...error correcting schemes.

Page 3: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Common Error Patterns

Error Type Form Relative Freq.

single digit error a → b 79.1%

trans. adj. digits ab → ba 10.2%

jump trans. abc → cba 0.8%

twin error aa → bb 0.5%

phonetic error a0 ↔ 1a 0.5%

a = 2, . . . , 9

jump twin error aca → bcb 0.3%

Page 4: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Modular Arithmetic

x (mod n ) = r where r is the remainder when x is divided by n (n is a positive integer and 0 ≤ r ≤ n-1).

x = y (mod n) if x and y have the same remainder when divided by n.

Page 5: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Modular Arithmetic

•51 (mod 9) = 6 (51=5•9+6)

•213 (mod 10) = 3 (213=21•10+3)•143 (mod 11) = 0 (143=13•11+0)

•57 = 107 (mod 10)•3 = 43 (mod 10)•60 = 0 (mod 10)

Page 6: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

US Postal Money Order

Page 7: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

US Postal Money Order

General Form: a1a2a3a4a5a6a7a8a9a10a11

a11 = (a1+ a2+ a3+ a4+ a5+ a6+ a7+ a8+ a9 + a10) (mod 9)

Specific Number: 67021200988

8 = (6 + 7 + 0 + 2 + 1 + 2 + 0 + 0 + 9 + 8) (mod 9)= 35 (mod 9)= 8

Page 8: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Detection Rate

error make to waysof #

detected iserror waysof#dr

•Single digit error (a → b): 10 choices for a and 9 choices for b resulting in 90 possible ways.

•Transposition error (ab → ba): 10 choices for a and 9 choices for b resulting in 90 possible ways.

Page 9: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

US Postal Money Order

a11 = (a1+ a2+ a3+ a4+ a5+ a6+ a7+ a8+ a9 + a10) (mod 9)

Page 10: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

US Postal Money Order

Single Digit Errors:

%9890

88dr

a11 = (a1+ a2+ a3+ a4+ a5+ a6+ a7+ a8+ a9 + a10) (mod 9)

Page 11: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

US Postal Money Order

Single Digit Errors:

Transposition Errors:

%9890

88dr

%090

0dr

a11 = (a1+ a2+ a3+ a4+ a5+ a6+ a7+ a8+ a9 + a10) (mod 9)

Page 12: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

UPC and EAN

Page 13: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

UPC Version AGeneral Form: a1-a2a3a4a5a6-a7a8a9a10a11-a12

a1 - number system char. // a2a3a4a5a6 - company // a7a8a9a10a11 - product // a12 - check digit

3a1+a2+3a3+a4+3a5+a6+3a7+a8+3a9+a10+3a11+a12 = 0 (mod 10)

Specific Number: 0-53600-10054-0

30+5+33+6+30+0+31+0+30+5+34+0 = 0 (mod 10)

40 = 0 (mod 10)

Page 14: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

UPC Scheme – Single Digit Errors

…a… → …b…c + 3a = 0 (mod 10) & c + 3b = 0 (mod

10)

(c + 3a) – (c + 3b) = 0 (mod 10) 3a – 3b = 0 (mod 10) 3(a – b) = 0 (mod 10) a – b = 0 (mod 10)

a = b

Page 15: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

UPC Scheme – Transposition Errors…ab… → …ba…c +3a+b = 0 (mod 10) & c+3b+a = 0

(mod 10)

(c + 3a + b) – (c + 3b + a) = 0 (mod 10) 3a + b – 3b – a = 0 (mod 10) 2a – 2b = 0 (mod 10) 2(a – b) = 0 (mod 10)

Undetected when |a – b| = 5

Page 16: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

UPC Scheme

Single Digit Errors:

Transposition Errors:

%10090

90dr

%8990

80dr

Page 17: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

IBM Scheme

Page 18: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Permutations

S10 - permutations of the set {0, 1, 2, …, 9}

- one-to-one & onto mappings

6850721934

9876543210

)8)(7,5)(3,1)(6,9,2,4,0(

Page 19: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

IBM Scheme

General Form: a1a2a3 . . . an-1an

= (0)(1, 2, 4, 8, 7, 5)(3,6)(9)

n-even: (a1) + a2 + (a3) + a4 + . . . + (an-1) + an = 0

(mod 10)

n-odd: a1 + (a2) + a3 + (a4) + . . . + (an-1) + an = 0

(mod 10)

Page 20: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

IBM Scheme

Specific Number: 00001324136 9

(0)+0+(0)+0+(1)+3+(2)+4+(1)+3+(6)+9

= 0 (mod 10)

0 + 0 + 0 + 0 + 2 + 3 + 4 + 4 + 2 + 3 + 3 + 9 = 0 (mod 10) 30 = 0 (mod 10)

Page 21: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

IBM Scheme – Single Digit Errors

…a… → …b…

c + σ(a) = 0 (mod 10) & c + σ(b) = 0 (mod 10)

(c + σ(a)) – (c + σ(b)) = 0 (mod 10) σ(a) – σ(b) = 0 (mod 10)

σ(a) – σ(b) = 0 σ(a) = σ(b)

a = b

Page 22: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

IBM SchemeTransposition Errors …ab… → …ba…

c+σ(a)+b = 0(mod 10) & c+σ(b)+a = 0 (mod

10)

(c + σ(a) + b) – (c + σ(b) + a) = 0 (mod 10)

σ(a) – σ(b) + b – a = 0 (mod 10)

σ(a) – a = σ(b) – b (mod 10)

σ designed so this will not occur unless a = 0 and b = 9 or a = 9 and b = 0.

Page 23: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

IBM Scheme

Single Digit Errors:

Transposition Errors:

%10090

90dr

%9890

88dr

Page 24: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Theorem (Gumm, 1985)

Suppose an error detecting scheme with an even modulus detects all single digit errors. Then for every i and j there is a transposition error involving positions i and j that cannot be detected.

Page 25: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

International Standard Book Numbers

Page 26: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

ISBN-10……ISBN-13………EAN-13

Page 27: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

ISBN-10 SchemeGeneral Form: a1a2a3a4a5a6a7a8a9a10

a1... – group/country number

(0,1=English, 3=German, 9978=Ecuador)

ai…aj – publisher number

aj+1…a9 – serial number

a10 – check digit

Page 28: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

ISBN-10 Scheme

10a1+9a2+8a3+7a4+6a5+5a6+4a7+3a8+2a9+a10 = 0 (mod 11)

Specific Number: 0-88385-720-0

100+98+88+73+68+ 55+ 47+ 32+ 20+ 0 = 0 (mod 11)

0 + 72+64 + 21+48 + 25 + 28 + 6 + 0 + 0 = 0 (mod 11)

264 = 0 (mod 11)

Page 29: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

ISBN-10 Scheme?

•What if you need a 10?

Page 30: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

ISBN-10 Scheme?

•What if you need a 10?•X represents 10.

Page 31: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

ISBN-10 Scheme?

•What if you need a 10?•X represents 10.•Does catch all single digit and

transposition of adjacent digit errors, but introduces a new character.

Page 32: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Symmetries of the Pentagon

Page 33: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Symmetries of the Pentagon

Reflections

D

C

BA

E

B A

CE

D

CDEAB

EDCBA

Page 34: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Symmetries of the Pentagon

Rotations

5

3

D

C

BA

E

C D

BE

A

CBAED

EDCBA

Page 35: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Symmetries of the Pentagon

5

3

A B

C

D

E

C B

A

E

D

A E

D

C

B

A B

C

D

E

A E

D

C

B

Page 36: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Symmetries of the Pentagon

CDEAB

EDCBADEABC

EDCBA

EABCD

EDCBA

ABCDE

EDCBABCDEA

EDCBA

DCBAE

EDCBA

CBAED

EDCBABAEDC

EDCBA

AEDCB

EDCBA

EDCBA

EDCBA

9

876

543

210

Page 37: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Symmetries of the Pentagon

8 * 3 = 5

3 * 8 = 6

NOT COMMUTATIVE!

Page 38: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

The Multiplication Table of D5

* 0 1 2 3 4 5 6 7 8 9

0 0 1 2 3 4 5 6 7 8 9

1 1 2 3 4 0 6 7 8 9 5

2 2 3 4 0 1 7 8 9 5 6

3 3 4 0 1 2 8 9 5 6 7

4 4 0 1 2 3 9 5 6 7 8

5 5 9 8 7 6 0 4 3 2 1

6 6 5 9 8 7 1 0 4 3 2

7 7 6 5 9 8 2 1 0 4 3

8 8 7 6 5 9 3 2 1 0 4

9 9 8 7 6 5 4 3 2 1 0

Page 39: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

Verhoeff Scheme

General Form: a1a2a3 . . . an-1an

= (0)(1,4)(2,3)(5,6,7,8,9)* = Group Operation D5

n-1(a1)*n-2(a2)*n-3(a3)* . . . *(an-1)*an = 0

(a)*b ≠ (b)*a - antisymmetric

Page 40: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

= (0)(1,4)(2,3)(5,6,7,8,9)

Page 41: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

German Bundesbank Scheme

AY7831976K1

Page 42: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

German Bundesbank Scheme

General Form: a1a2a3 . . . a10a11

= (0,1,5,8,9,4,2,7)(3,6)* = Group Operation D5

A D G K L N S U Y Z0 1 2 3 4 5 6 7 8 9

(a1)*2(a2)*3(a3)* . . . *10(a10)*a11 = 0

Page 43: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

German Bundesbank Scheme

This scheme has one major problem…………………………………………………what is it?

Page 44: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

The Euro!

Page 45: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

An Error Correcting Scheme

General Form: a1a2a3 . . . a9a10

a9 , a10 check digits

a1 + a2 + a3 + . . . + a9 + a10 = 0 (mod 11)

a1 + 2a2 + 3a3 + . . . + 9a9 + 10a10 = 0 (mod 11)

Page 46: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

An Error Correcting Code62150334a9a10

6+2+1+5+0+3+3+4+a9+a10 = 0 (mod 11) 24 +a9+a10 = 0 (mod 11) 2 +a9+a10 = 0 (mod 11)

16+22+31+45+50+63+73+84+9a9+10a10 = 0 (mod 11)

6 + 4 + 3 + 20 + 0 + 18+ 21 + 32+9a9+10a10 = 0 (mod 11)

104 +9a9+10a10 = 0 (mod 11)

5 +9a9+10a10 = 0 (mod 11)

Page 47: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

An Error Correcting Code

6215033472 → 6218033472

6+2+1+8+0+3+3+4+7+2 = 0 (mod 11)

36 = 0 (mod 11)

3 = 0 (mod 11)

Page 48: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

An Error Correcting Code16+22+31+48+50+63+73+84+97+102

= 3i (mod 11)

6+4+3+32+0+18+21+32+63+20 = 3i (mod 11)

199 = 3i (mod 11)

1 = 3i (mod 11)

i = 4

Page 49: Identification Numbers and Check Digit Schemes: Using Abstract Algebra in Your High School Mathematics Class Joseph Kirtland Department of Mathematics

References•Gallian, J.A., The Mathematics of

Identification Numbers, College Math Journal, 22(3), 1991, 194-202.

•Gallian, J. A., Error Detection Methods, ACM Computing Surveys, 28(3), 1996, 504-517.

•Gumm, H. P., Encoding of Numbers to Detect Typing Errors, Inter. J. Applied Eng. Educ., 2, 1986, 61-65.