Check Digit Schemes and Error Detecting Codes. By Breanne Oldham Union University



Similar documents
Identification Numbers and Check Digits 1

Check Digits for Detecting Recording Errors in Horticultural Research: Theory and Examples

6.2 Permutations continued

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

The College Mathematics Journal, Vol. 22, No. 3. (May, 1991), pp

8 Primes and Modular Arithmetic

MII stands for major industry identifier; 4 and 5 indicate Banking and Financial. VISA cards begin with 4 and MasterCard cards with 5.

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Flaws & Frauds Hindering Credit Cards Security

k, then n = p2α 1 1 pα k

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

Math 55: Discrete Mathematics

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Reading 13 : Finite State Automata and Regular Expressions

Math 319 Problem Set #3 Solution 21 February 2002

ON GALOIS REALIZATIONS OF THE 2-COVERABLE SYMMETRIC AND ALTERNATING GROUPS

Notes on Factoring. MA 206 Kurt Bryan

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

Mathematics of Internet Security. Keeping Eve The Eavesdropper Away From Your Credit Card Information

GREATEST COMMON DIVISOR

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

Lecture 13: Factoring Integers

Introduction. Appendix D Mathematical Induction D1

10.2 Series and Convergence


Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Universal hashing. In other words, the probability of a collision for two different keys x and y given a hash function randomly chosen from H is 1/m.

Settling Multiple Debts Efficiently: Problems

Settling a Question about Pythagorean Triples

Mathematical Induction

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

Integer roots of quadratic and cubic polynomials with integer coefficients

Quotient Rings and Field Extensions

8 Divisibility and prime numbers

Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem)

University of Lille I PC first year list of exercises n 7. Review

mod 10 = mod 10 = 49 mod 10 = 9.

Properties of Real Numbers

Applications of Fermat s Little Theorem and Congruences

Today s Topics. Primes & Greatest Common Divisors

4.5 Finite Mathematical Systems

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Elementary Number Theory

Mathematical Induction. Lecture 10-11

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

THE SIGN OF A PERMUTATION

Homework until Test #2

9.2 Summation Notation

Stupid Divisibility Tricks

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, Notes on Algebra

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

If n is odd, then 3n + 7 is even.

2 When is a 2-Digit Number the Sum of the Squares of its Digits?

Not for resale. 4.1 Divisibility of Natural Numbers 4.2 Tests for Divisibility 4.3 Greatest Common Divisors and Least Common Multiples

11 Ideals Revisiting Z

Math 55: Discrete Mathematics

Trend and Seasonal Components

Chapter 7: Products and quotients

We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: b + 90c = c + 10b

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Collatz Sequence. Fibbonacci Sequence. n is even; Recurrence Relation: a n+1 = a n + a n 1.

Lecture 3: Finding integer solutions to systems of linear equations

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

arxiv: v1 [math.pr] 5 Dec 2011

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

The last three chapters introduced three major proof techniques: direct,

Clock Arithmetic and Modular Systems Clock Arithmetic The introduction to Chapter 4 described a mathematical system

Generating Elementary Combinatorial Objects

Discrete Mathematics Problems

Labeling outerplanar graphs with maximum degree three

Math Workshop October 2010 Fractions and Repeating Decimals

FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z

4: EIGENVALUES, EIGENVECTORS, DIAGONALIZATION

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

COMMUTATIVE RINGS. Definition: A domain is a commutative ring R that satisfies the cancellation law for multiplication:

MATHEMATICAL EXCURSIONS Math and Bar Codes

Test1. Due Friday, March 13, 2015.

THE NUMBER OF REPRESENTATIONS OF n OF THE FORM n = x 2 2 y, x > 0, y 0

1 The Brownian bridge construction

Digital Signatures. (Note that authentication of sender is also achieved by MACs.) Scan your handwritten signature and append it to the document?

4/1/2017. PS. Sequences and Series FROM 9.2 AND 9.3 IN THE BOOK AS WELL AS FROM OTHER SOURCES. TODAY IS NATIONAL MANATEE APPRECIATION DAY

Math Circle Beginners Group October 18, 2015

A characterization of trace zero symmetric nonnegative 5x5 matrices

P. Jeyanthi and N. Angel Benseera

Number of Divisors. Terms. Factors, prime factorization, exponents, Materials. Transparencies Activity Sheets Calculators

Computer and Network Security

Introduction to Algebraic Coding Theory

Chapter Objectives. Chapter 9. Sequential Search. Search Algorithms. Search Algorithms. Binary Search

RSA Question 2. Bob thinks that p and q are primes but p isn t. Then, Bob thinks Φ Bob :=(p-1)(q-1) = φ(n). Is this true?

A simple criterion on degree sequences of graphs

Doug Ravenel. October 15, 2008

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

All trees contain a large induced subgraph having all degrees 1 (mod k)

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

Transcription:

Check Digit Schemes and Error Detecting Codes By Breanne Oldham Union University

What are Check Digit Schemes? Check digit schemes are numbers appended to an identification number that allow the accuracy of information stored to be checked by an algorithm.

What are error detecting codes? Error detecting codes are algorithms that utilize check digits to detect, but not to correct, errors in entering identification numbers.

Where can error detecting schemes and check digits be found? International Standard Book Numbers (ISBN) Driver s License Numbers Universal Product Codes (UPC) Personal Checks Library Cards Shipping Labels

Types of Common Errors Single digit (79.1%) 19456 19486 Transposition of 19456 19546 adjacent digits (10.2%) Jump transposition 19456 19654 (0.8%)

Types of Common Errors (cont) Twin (0.5%) 19455 19466 Phonetic (0.5%) 19406 19146 Jump twin (0.3%) 19156 49456

3 Types of Error Detecting Codes Modular Arithmetic Permutations Noncommutative Schemes

ISBN Numbers A 10-digit number assigned to books published in most industrialized nations. Uses a modulo 11 arithmetic error detecting scheme with the last digit being the check digit. Detects 100% of single digit errors and adjacent transposition errors

ISBN with a Single Digit Error Take the ISBN number 0-669-19496-4 Let it be incorrectly transmitted as 0-669-16496-4 The ISBN check digit is determined by 10d 10 +9d 9 +8d 8 +7d 7 +6d 6 +5d 5 +4d 4 +3d 3 +2d 2 +d 1 0(mod11) So, for our example, 10(0)+9(6)+8(6)+7(9)+6(1)+5(6)+4(4)+3(9)+ 2(6)+1(4) 0(mod 11) 260 7(mod 11) Therefore, you know that there is a mistake.

ISBN with a Transposition of Adjacent Digits Error Take the ISBN number 0-669-19496-4 Let it be incorrectly transmitted as 0-669-91496-4 So, in our example, 10(0)+9(6)+8(6)+7(9)+6(9)+5(1)+4(4)+3(9)+ 2(6)+1(4)? 0(mod11) 283 0(mod11) 283 8(mod11) There is an error.

Proof of the ISBN Error Detecting Code (adjacent transposition) Let the ISBN number be denoted by d 10 d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 Then, the following represents the incorrect ISBN with transposition of adjacent digits d 10 d 9 d 8 d 6 d 7 d 5 d 4 d 3 d 2 d 1 Let T denote the check sum for the ISBN number and let S denote the check sum for the incorrect ISBN number.

Proof of the ISBN Error Detecting Code (cont.) T = 10d 10 +9d 9 +8d 8 +7d 7 +6d 6 +5d 5 +4d 4 +3d 3 +2d 2 +d 1 and S = 10d 10 +9d 9 +8d 8 +7d 6 +6d 7 +5d 5 +4d 4 +3d 3 +2d 2 +d 1 Assume that T is a multiple of 11 and we show that S is not a multiple of 11. Consider T-S. After cancellations, we obtain T-S = 7d 7-7d 6 +6d 6-6d 7 = d 7 -d 6 Since d 7 -d 6 is a one-digit number, then -10< d 7 -d 6 < 10

Proof of the ISBN Error Detecting Code (cont.) The only multiple of 11 between -10 and 10 is zero. But if d 7 -d 6 = 0, then d 7 = d 6 and no error has occurred. This is a contradiction.

Problems with the ISBN Error Detecting Code Using mod 11 arithmetic, the check digit can be 10. Since 10 is not a single digit, it must be denoted by X Does not detect all double errors

The IBM Scheme Can be used with any length identification number Used by credit card companies, libraries, blood banks, DMVs, and German banks Catches ALL Single Digit Errors Uses the permutation σ = (0)(1,2,4,8,7,5)(3,6)(9)

Problems with the IBM Scheme Does not catch all transposition of adjacent digits errors Specifically does not catch errors involving 0 and 9

Definition of the IBM Check Digit Scheme Let a 1 a 2 a 3... a n-1 represent an identifying number. The check digit a n is appended to the number a 1 a 2 a 3... a n-1 a n by using the permutation σ = (0)(1,2,4,8,7,5)(3,6)(9) in one of the following two ways.

Definition of the IBM Check Digit Scheme (cont.) 1. If n is even, the check digit a n is assigned such that σ(a 1 )+a 2 +σ(a 3 )+a 4 +... +σ(a n-1 )+a n 0(mod10) 2. If n is odd, the check digit a n is assigned such that a 1 + σ (a 2 ) + a 3 + σ (a 4 )+... +a n-1 + σ (a n ) 0(mod10)

Proof of the IBM Error Detecting Code Let a 1... a i... a n be an identification number with n even and 1 i n. Let a single digit error occur transmitting a 1... a i... a n as a 1... b i... a n with a i b i Assume that the error is not caught.

Proof of the IBM Error Detecting Code (cont) Case I: Since both errors are not caught, σ(a 1 )+a 2 +... σ(a i )+... +σ(a n-1 )+a n 0(mod10) and σ(a 1 )+a 2 +... σ(b i )+... +σ(a n-1 )+a n 0(mod10) This can also be written (σ(a 1 )+a 2 +... σ(a i )+... +σ(a n-1 )+a n ) (σ(a 1 )+a 2 +... σ(b i )+... +σ(a n-1 )+a n) 0(mod10)

Proof of the IBM Error Detecting Code (cont) This results in: 0= (σ(a 1 )+a 2 +... σ(a i )+... +σ(a n-1 )+a n ) (σ(a 1 )+a 2 +... +σ(b i )+... +σ(a n-1 )+a n ) (mod 10) = σ(a 1 )+a 2 +... σ(a i )+... +σ(a n-1 )+a n σ(a 1 ) - a 2 -... σ(b i ) -... - σ(a n-1 ) a n (mod 10) = σ(a i ) σ(b i ) (mod 10)

Proof of the IBM Error Detecting Code (cont) Thus σ(a i ) σ(b i ) 0 (mod10). Since a i b i and σ is a permutation, σ(a i ) σ(b i )=0. Adding σ(b i ) to both sides yields the result σ(a i ) = σ(b i ). Since σ is a permutation, this means that a i =b i. This is a contradiction. Thus the assumption that the error is not caught is false, and the error is caught.

Proof of the IBM Error Detecting Code (cont) Case II: Since both errors are not caught, σ(a 1 )+a 2 +... a i +... +σ(a n-1 )+a n 0(mod10) and σ(a 1 )+a 2 +... b i +... +σ(a n-1 )+a n 0(mod10) This can also be written (σ(a 1 )+a 2 +... a i +... +σ(a n-1 )+a n ) (σ(a 1 )+a 2 +... b i +... +σ(a n-1 )+a n ) 0(mod10)

Proof of the IBM Error Detecting Code (cont) This results in: 0= (σ(a 1 )+a 2 +... a i +... +σ(a n-1 )+a n ) (σ(a 1 )+a 2 +... +b i +... +σ(a n-1 )+a n ) (mod 10) = σ(a 1 )+a 2 +... a i +... +σ(a n-1 )+a n σ(a 1 ) - a 2 -... b i -... - σ(a n-1 ) a n (mod 10) = a i b i (mod 10)

Proof of the IBM Error Detecting Code (cont) Thus a i b i 0 (mod10). Since a i b i and both a i and b i are integers between 0 and 10, a i b i = 0. Adding b i to both sides, the calculation results in a i = b i. This is a contradiction. Thus the assumption that the error is not caught is false, and the error is caught.

Checking a Library Number for Errors Using the IBM Scheme Let a library book number be 21005620917 9 where 9 is the check digit. Suppose the number is entered as 21005260917 9 The calculation shows that σ(2)+1+σ(0)+0+σ(5)+2+σ(6)+0+σ(9)+1+σ(7) +9? 0 mod(10) 4+1+0+0+1+2+3+0+9+0+1+5+9? 0 mod(10) 35? 0 mod(10) 35 5 mod(10) There is an error.

The Verhoeff Check Digit Scheme A noncommutative scheme Catches all errors previously mentioned Based on the Cayley Table for D 10 * 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

Definition of the Verhoeff Check Digit Scheme Let a 1 a 2... a n-1 a n be an identification number with check digit a n. The check digit a n is appended to the number a 1 a 2... a n-1 such that the following equation is satisfied: σ n-1 (a 1 ) * σ n-2 (a 2 ) * σ n-3 (a 3 ) *... * σ(a n-1 ) = 0 Where σ = (0)(1,4)(2,3)(5,6,7,8,9) and * is the group operation from D 10 as previously presented.

Checking an Identification Number Using the Verhoeff Scheme Let 386018429278 be an identification number that is incorrectly transmitted as 386015429278. (Single Digit Error) Compute the check scheme using the Cayley Table for D 10. σ 11 (3)*σ 10 (8)*σ 9 (6)*σ 8 (0)*σ 7 (1)*σ 6 (5)*σ 5 (4)*σ 4 (2)* σ 3 (9)*σ 2 (2)*σ(7)*8? 0

Checking an Identification Number Using the Verhoeff Scheme This leads to 2*8*5*0*4*6*1*2*7*2*8*8? 0 2 0 Thus, there must be an error. This error would be caught. * 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

Checking an Identification Number Using the Verhoeff Scheme Let 386018429278 be an identification number that is incorrectly transmitted as 386014892278. (transpostion of adjacent digits error) Compute the check scheme using the Cayley Table for D 10. σ 11 (3)*σ 10 (8)*σ 9 (6)*σ 8 (0)*σ 7 (1)*σ 6 (8)*σ 5 (4)*σ 4 (9)* σ 3 (2)*σ 2 (2)*σ(7)*8? 0

Checking an Identification Number Using the Verhoeff Scheme This leads to 2*8*5*0*4*9*1*8*3*2*8*8? 0 4 0 Thus, there must be an error. This error would be caught. * 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

What s Next? Multiple Check Digits in a single Identification Number Error Correcting Codes Similar to Error Detecting Codes Both detect and correct the errors that are found.

Conclusion Check digits are an integral part of error detecting codes. There are three different types of error detecting codes which are progressively more sophisticated and detect more errors

Bibliography Dixon, Emily. Take a Break. http://pass.maths.org.uk/issue12/features/codes/ Gallian, Joseph A. The Mathematics of Identification Numbers. The College Mathematics Journal. May 1991. 194-202. Kirtland, Joseph. Identification Numbers and Check Digit Schemes. Mathematical Assoc. of America. 2001. Wheeler, Mary L. Check Digit Schemes. The Mathematics Teacher. April 1994. 228-230.