Check Digit Schemes - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Check Digit Schemes

Description:

J. Verhoeff, 'Error Detecting Decimal Codes', Mathematical Centre Tract 29, The ... US Postal Money Orders. MOD 9 arithmetic. Airline Tickets. MOD 7 arithmetic ... – PowerPoint PPT presentation

Number of Views:249
Avg rating:3.0/5.0
Slides: 26
Provided by: jerzyw
Category:
Tags: check | codes | digit | postal | schemes

less

Transcript and Presenter's Notes

Title: Check Digit Schemes


1
Check Digit Schemes
  • Presented by
  • Phung Nghi Gamester

2
(No Transcript)
3
Check Digit Schemes
  • A decimal (or alphanumeric) digit added to a
    number for the purpose of detecting errors humans
    typically make is on data entry.
  • When we use numbers
  • - whether keying them into computers
  • - dialing them on telephones or
  • - reading them and telling them to others
  • Certain kinds of mistakes more often than others.

4
Check Digit Schemes
  • According to Richard Hamming (Coding and
    Information Theory, 2e, Prentice-Hall, 1986, p.
    27), the two most common human errors are
  • Interchanging adjacent digits of numbers
  • 67 becomes 76
  • 2) the wrong one of a triple of digits, two
    adjacent ones of which are the same
  • 667 becomes 677

5
Check Equation
  • Check Equation An equation which all the digits
    in a number, including the check digit, must
    satisfy.
  • We can eliminate (or easily detect) the problem
    by restricting the input field to a given number
    of digits
  • - credit card numbers,
  • - Social Insurance Numbers
  • - local phone numbers
  • - student ID numbers.
  • The check digit is included in the equation so
    that it is protected against errors as well as if
    the check equation is true. the equation is not
    true, an error is present if it is true, there
    may or may not be an error.

6
Common Error Patterns
7
Common Error Patterns
8
Credit Cards
  • First 6-digits BIN
  • BIN is the Bank International Number
  • Only for Visa and Mastercard

9
Credit Cards
  • Check digit algorithm(s)
  • MOD 10
  • Luhn Formula
  • IBM Check
  • Permutation Check
  • Hans Peter Luhn (1896-1964)
  • Worked for IBM since 1941

10
Credit Cards
11
Consider the example identification number
446-667-651. The first step is to double every
other digit, starting with the second-to-last
digit and moving left, and sum the digits in the
result. The following table shows this step
(highlighted rows indicating doubled digits)
12
A lookup table (i.e. calculate Double, Reduce,
and Sum of digits only once and for all) can be
used (0123456789 is mapped to 0246813579)
13
Credit Cardswho uses
  • libraries
  • blood banks
  • photo-finishing companies
  • pharmacies
  • some motor vehicle divisions
  • some German banks

14
Credit Cards
  • If n is even, the check digit an is assigned
    such that
  • s (a1)a2s (a3)a4...s (an-1)an 0 (mod
    10)
  • If n is odd, the check digit an is assigned
    such that
  • a1s (a2)a3s (a4)... s (an-1)an 0 (mod 10)

15
Credit Card example
  • credit card number 6182-0923-1553

16
Credit Cards
  • Advantages
  • Detects all single errors
  • Corrects single error (if corrupted digit is
    known)
  • Works for any length
  • Disadvantages (does not detect)
  • Jump transpositions
  • Adjacent transpositions 09 ? 90 and 90 ? 09

17
ISBN
  • The International Standard Book Number (ISBN)
  • Uses a weighted code
  • Each digit is weighted according to its position
    in the number
  • The check digit is chosen so the weighted sum is
    evenly divisible by a prime number. The digit
    positions are numbered 1, 2, 310 from right to
    left. The weighted sum is divided by 11. Since
    the remainder resulting from division by 11 can
    be any number between 0 and 10, an 'X' is used to
    represent a check digit of 10 if necessary.

18
ISBN
  • Ten digits and three dashes (-)
  • d1 d2 d3 d4 d5 d6 d7 d8 d9 d10
  • d1,, d9 0, 1, , 9 d10 0, , 9, X10
  • Check equation

19
ISBN - Example
  • CSUSM Spanish book
  • 0-8384-0852-4
  • 4 is the X, check digit

20
ISBN
21
ISBN
231 11 21
22
ISBN
4071137
23
ISBN
  • Advantages
  • Detects all single errors
  • Corrects single error (if corrupted digit is
    known)
  • Detects all transposition errors (!!)
  • Disadvantages
  • Works for bounded length ( 10)
  • Additional symbol X

24
Other
  • US Postal Money Orders
  • MOD 9 arithmetic
  • Airline Tickets
  • MOD 7 arithmetic
  • Electronic Funds Transfer
  • MOD 10, weights 3 7 1 3 7 1 3 7 1
  • Verhoeffs Check Digit Scheme
  • German DM
  • Dihedral Group D5 multiplication

25
Bibliography
  • www.wikipedia
  • http//www.academic.marist.edu/mwa/idsn.htm
  • Professor Neelon
Write a Comment
User Comments (0)
About PowerShow.com