Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spring 2015 Mathematics in Management Science Identification Numbers Data Security Check Digits UPCs, Routing Nos, Bar Codes Personal Data.

Similar presentations


Presentation on theme: "Spring 2015 Mathematics in Management Science Identification Numbers Data Security Check Digits UPCs, Routing Nos, Bar Codes Personal Data."— Presentation transcript:

1 Spring 2015 Mathematics in Management Science Identification Numbers Data Security Check Digits UPCs, Routing Nos, Bar Codes Personal Data

2 Identification Numbers Modern identification numbers serve at least two functions: The number should unambiguously identify the person or thing with which it is associated. (codes) The number should have a “self- checking” aspect. (check digits)

3 Examples ISBN – International Standard Book No VIN – Vehicle Identification No UPC – Universal Product Code BIN – Bank Identification No (aka, routing numbers) Money orders, credit card numbers, DL numbers, etc etc.

4 Data Security Want: error detection error correction protection Illustrate ideas via check digits; but in fact, essential in all data transmission. Calculations use modular arithmetic.

5 Modular Arithmetic Consider: 13 ÷ 5. Can’t divide evenly. Could say 13 ÷ 5 = 2.6, but better to say 13 ÷ 5 = 2 R 3 which is read “2 with remainder 3”. In modular arithmetic, we are only interested in the remainder.

6 Modular Arithmetic For two numbers n and p (p ≠ 0), n mod p is the remainder when we divide n by p. So, 13 mod 5 is 3 (3 = 13 − 2 ・ 5) 46 mod 7 is 4 (4 = 46 − 6 ・ 7) 167 mod 14 is 13 (13 =167−11 ・ 14)

7 Using a Calculator If your calculator has a “mod” or “remainder” function, you can use it. Otherwise, still fairly easy. Look at 13 mod 5 = 3 which simply means that 13 = q ・ 5 + 3 where q is the quotient when we divide 13 by 5. That is, 13 = 2 ・ 5 + 3. How to get the 3 ?

8 Using a Calculator Look at 13 mod 5 = 3 which means that 13 = 2 ・ 5 + 3. How to get the 3 ? 1.Divide 13 by 5 to get 2.6 2.Subtract the integer part: 2.6-2=0.6 3.Multiply this by 5 to get 3 See Algebra Reviews on pp 575 & 622 in your text book.

9 Other Options Large numbers can cause problems for calculators. There’re tricks….but, just use Google’s built in calculator. Type 4712254086545815 mod 17 into any google search bar. Also, can get many answers at www.wolframalpha.com

10 More Modular Arithmetic Recall that n mod p = r is equivalent to n = q p + r for some integer q chosen so that 0 ≤ r < p. Thus, r = n – q p.

11 More Modular Arithmetic We say that n ≡ m mod p (read as “n is equivalent to m mod p”) to mean that m and n have the same remainder when divided by p: n mod p = m mod p n ≡ m mod p means n − m is a whole number multiple of p.

12 Examples 18 ≡ 15 mod 3(18=15+3) 167 ≡ 27 mod 14 (167 mod 14=13) 1234 ≡ 1000...00 mod 9 If n ≡ m mod p, then m and n are interchangeable in all computations (such as +, −, ×) done mod p.

13 Spring 2015 Mathematics in Management Science Check Digits What are these? Possible Errors Division Schemes Examples

14 Check Digits A digit attached to identification number for the purpose of error & fraud detection and correction. Mathematical calculations or schemes are used on the digits of the identification number to compute the check digit. Check digits used to help detect and correct errors during data entry or transmission, and to prevent and detect fraud.

15 Check Digits Start with pre-id number. Use this to calculate check digit. Get id number. Check digit is an extra digit appended to pre-id number for purposes of detecting/correcting errors (or fraud) when the complete id number is copied or transmitted.

16 Check Digits Check digit is an extra digit appended to a pre-id number for purposes of detecting (and correcting) errors when id number is copied or transmitted. Check digit is calculated from the rest of the number and transmitted along with the number. When an error occurs, a recalculation of the check digit won’t match.

17 USPS Money Order U.S. Postal Service money order with id number 6302438384, check digit 5. The check digit in this case is the calculated remainder after dividing the sum of the first ten digits by 9.

18 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 UPC code can achieve greater error detection—up to 100% of all single-digit errors and most other types of errors.

19 Example Consider the number 0 38000 00127 7 found on bottom of box of cornflakes. First digit identifies broad category of goods. Next five digits identify manufacturer. Next five digits identify product. The last digit is a check digit.

20 Possible Data Errors Send id no ….abc…. What received? Single digit error ….axc…. Multipile digit error ….axy…. Adjacent transposition….bac…. Other transposition ….cba…. Some errors easy to detect; some hard.

21 USPS Money Order Check digit is remainder after dividing sum of the first ten digits by 9. Will not detect any transposition errors. Will detect single digit errors, except replacing 0 by 9 or vice versa. May not detect multiple digit errors. E.g. if 2,5 replaced by 3,4

22 American Express Cheques Another division by 9 scheme. Id no has form a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 c ; The check digit c is chosen so that a 1 +a 2 +a 3 +a 4 +a 5 +a 6 +a 7 +a 8 +a 9 +c is evenly divisible by 9. Same error detection as USPS money orders.

23 Direct vs Indirect Methods USPS money order check digit is computed via direct calculation: c is remainder after division by 9. AmExpress cheques check digit is computed via indirect calculation: c is chosen so that sum is evenly divisible by 9. Direct methods easier to compute, but harder to verify. Indirect methods harder to compute, but easier to verify.

24 Detecting Errors Direct Method: Recalculate check digit and compare it to one supplied. Indirect Method: Use supplied check digit and see if it satisfies condition.

25 Example Is 80164402172 valid AmX check no? Compute 8+0+1+6+4+4+0+2+1+7+2=35. Since 35 not divisible by 9, this not a valid AmX cheque number!

26 Other Schemes Can be “direct” or “indirect”. Can use division by 7 or 10 or 11 or 13. Can introduce “weights”: UPC, BIN, ISBN, codabar Do not need to memorize all these! But, shud be able to calculate a check digit given description of scheme.

27 Indirect Div by 10 Example This a division by 10 scheme. 11 digits + check digit Check digit c chosen so that sum of all digits is divisible by 10. Id no of form a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 c Check digit c is chosen so that a 1 +a 2 +a 3 +a 4 +a 5 +a 6 +a 7 +a 8 +a 9 +a 10 +c is divisible by 10.


Download ppt "Spring 2015 Mathematics in Management Science Identification Numbers Data Security Check Digits UPCs, Routing Nos, Bar Codes Personal Data."

Similar presentations


Ads by Google