Presentation is loading. Please wait.

Presentation is loading. Please wait.

MAT 1000 Mathematics in Today's World Winter 2015.

Similar presentations


Presentation on theme: "MAT 1000 Mathematics in Today's World Winter 2015."— Presentation transcript:

1 MAT 1000 Mathematics in Today's World Winter 2015

2 Today We will look at identification numbers. An important mathematical idea is to include a digit in an ID number that allows us to catch any errors. These are called “check digits.” We will look at several different methods for finding check digits.

3 Identification numbers It is common to use numbers as identification. Examples: Credit card numbers identify a line of credit between a lender and a person. UPC codes identify products in a store or company’s inventory

4 Identification numbers Using ID numbers, or codes, simplifies collecting and processing data. A store may use coding information to manage inventory or to record sales information. Credit card numbers can make some monetary transactions simpler and safer (as opposed to personal checks or cash).

5 Identification numbers Another advantage of codes: Coding systems can catch errors. This uses so-called “check digits.” Check digit: an extra digit in an ID number whose purpose is to verify that the rest of the digits are accurate

6 Identification numbers Where do errors come from? Human error: typos or misunderstandings Transmission errors Corrupted files

7 Identification numbers

8 It is possible to have coding schemes that catch 100% of single-digit errors We can even make coding schemes that catch 100% of single-digit errors and 100% of transposition errors The tradeoff is that to catch more errors the coding scheme must be more complex.

9 A simple coding scheme The following scheme is not used in practice, but will introduce the key ideas. For an ID number we choose a check digit so that the sum of all of the digits of the ID plus the check digit ends in 0.

10 A simple coding scheme

11

12

13 A few coding themes that are used Division by nine (money orders) Universal product codes (UPC) ISBN Codabars Zip+4

14 First we need to understand: The Division algorithm Every division has a quotient and remainder

15 Division Algorithm Divide a by b with remainder r. a = q ∙ b + r. q is the quotient. r is the remainder. Example: 22 divided by 9 is “2 remainder 4”. 22 = 2 ∙ 9 + 4.

16 Division-by-9 Check Digits Used on US Postal Service money orders. First 10 digits identify the money order. –Each money order has a unique 10-digit number. The last digit is a check digit. To compute the check digit: –Add the first ten digits. –Divide by 9 with remainder. –The remainder is the check digit. Let’s see an example.

17 Division-by-9 Check Digits This system detects some errors in serial numbers. It detects single-digit errors, except that: –It will not detect an error if 9 is replaced by 0. –It will not detect an error if two digits are switched. It detects the presence of an error, but it does not tell you how to correct the mistake. If an error is detected, go back and check for mistakes.

18 Universal Product Code (UPC) The UPC system is used on all grocery products. It consists of 12 digits, such as 0 12345 67890 1 The first digit represents a broad category of items. The next five digits identify the manufacturer. The next five digits identify the product. The last digit is a check digit.

19 UPC Numbers Used in many retail products. Here’s an example, along with a bar code: As you can see, UPC numbers are 12 digits long. The first 11 digits are the ID, the last digit is the check digit.

20 UPC Numbers

21

22

23

24 The UPC coding scheme catches 100% of single digit errors, and 89% of most other common errors. By adding some additional complexity, we can improve the proportion of errors detected.


Download ppt "MAT 1000 Mathematics in Today's World Winter 2015."

Similar presentations


Ads by Google