Section 3.2: Using Check Digits

Slides:



Advertisements
Similar presentations
Mr F’s Maths Notes Number 11. Standard Form.
Advertisements

Remainders When we solve a division calculation there is often a remainder. What we do with the remainder depends on the question asked. When faced with.
Math for Liberal Studies. An identification number is a sequence of letters and/or numbers that identifies an object, person, place, or concept The number.
Chapter 16: Check Digit Systems
Presented by: Tutorial Services The Math Center
The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard.
Factors Terminology: 3  4 =12
Arithmetic of random variables: adding constants to random variables, multiplying random variables by constants, and adding two random variables together.
Math for Liberal Studies. This graph does not have an Euler circuit. This graph does have an Euler circuit.
1 Lesson Dividing with Integers. 2 Lesson Dividing with Integers California Standard: Number Sense 2.3 Solve addition, subtraction, multiplication,
Math for Liberal Studies.  When we studied ID numbers, we found that many of these systems use remainders to compute the check digits  Remainders have.
Order of Operations And Real Number Operations
MA 1128: Lecture 08 – 6/6/13 Linear Equations from Graphs And Linear Inequalities.
SLIDE SHOW INSTRUCTIONS
Instructional Strategies
Math for Liberal Studies.  Problems can occur when data is transmitted from one place to another  The two main problems are  transmission errors: the.
Section 3.8: More Modular Arithmetic and Public-Key Cryptography
QUICK MATH REVIEW & TIPS 2
Solving Linear Equations
Math for Liberal Studies.  None of the methods we have investigated so far can detect transposition errors  In this section we will investigate new.
The decimal point helps us to keep track of where the "ones" place is.
aka Significant Figures
Addition Subtraction Multiplication Division
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 5 By Herbert I. Gross and Richard A. Medeiros next.
Solving Algebraic Equations
Decimals
Binary Arithmetic Math For Computers.
division algorithm Before we study divisibility, we must remember the division algorithm. r dividend = (divisor ⋅ quotient) + remainder.
Scientific Notation Why Do We Need It?.
Positional Number Systems
Maths Notes Number 5. Decimals
POWERPOINT THE SECOND In which you will learn about: Scientific notation +/-/x/÷ with sig figs Rounding.
4/21/2017 Decimals In our number system, digits can be placed to the left and right of a decimal point, to indicate numbers greater than one or less than.
Number Systems Part 2 Numerical Overflow Right and Left Shifts Storage Methods Subtraction Ranges.
Copyright © Cengage Learning. All rights reserved.
Dividing 1 digit by 2 digit numbers
Decimals.
 Good experiments have good measurements with properly recorded data.  Bad measurements create incorrect data. Incorrect data = bad results = wrong conclusions.
Lecture 12.  The ISBN 10-digit uses a reverse weighting system: multiply the first digit by 10, the second by 9, the third by 8 and so on until the check.
Extending the Definition of Exponents © Math As A Second Language All Rights Reserved next #10 Taking the Fear out of Math 2 -8.
Spring 2015 Mathematics in Management Science Identification Numbers Data Security Check Digits UPCs, Routing Nos, Bar Codes Personal Data.
SCIENTIFIC NOTATION What is it? And How it works?.
Mr. Istik Grade 9.  The Student Will Be Able To Solve One- Variable Equations using addition, subtraction, multiplication, division, and a combination.
Unaddition (Subtraction)
Dividing Decimals by Whole Numbers
BIG NUMBERS and SMALL NUMBERS (Scientific Notation)
Adding and Subtracting Decimals © Math As A Second Language All Rights Reserved next #8 Taking the Fear out of Math 8.25 – 3.5.
Slide 1 Lesson 35 Testing for Divisibility WO.17Use long division to determine if one number is divisible by another. WO.23Use divisibility rules to determine.
Divisibility Tests How can you tell quickly whether a number can be divided exactly by another?
TOOL CHECK. Adding and Subtracting FRACTIONS Unit 4 Lesson 4.
Division by 2 Any number that ends is 0, 2, 4, 6, or 8 is evenly divisible by 2.
Significant Figures. Significant Figure Rules 1) ALL non-zero numbers (1,2,3,4,5,6,7,8,9) are ALWAYS significant. 1) ALL non-zero numbers (1,2,3,4,5,6,7,8,9)
Decimal Review. Adding decimals Rules Line up the decimal points 2. Make whole numbers look like decimals.
 Scientific notation is simply a method for expressing, and working with, very large or very small numbers. It is a short hand method for writing numbers,
Significant Figures Chemistry I. Significant Figures The numbers reported in a measurement are limited by the measuring tool Significant figures in a.
Addition Subtraction Multiplication Division
Addition Subtraction Multiplication Division
Adding, Subtracting, and Multiplying Decimals 3-1/3-2
Addition Subtraction Multiplication Division
Mr Barton’s Maths Notes
Digital Logic & Design Lecture 02.
Addition Subtraction Multiplication Division
Solving Linear Equations
Addition Subtraction Multiplication Division
Mr Barton’s Maths Notes
Top 10 maths topics that GCSE students struggle with
Presentation transcript:

Section 3.2: Using Check Digits Math for Liberal Studies Section 3.2: Using Check Digits

Check Digits In many ID number systems, one of the digits of the ID number is reserved for checking whether the number is valid or invalid This “check digit” is not truly a part of the ID number itself, but it needs to be included so that the checking can take place

Example: USPS Money Orders The serial number on US Postal Service money orders includes a serial number In this case, the serial number is 04213000012 , and the last digit is a check digit

USPS Money Orders A postal money order serial number is 11 digits long, including a check digit. Add up all of the digits except the check digit. Divide this total by 9 and find the remainder. This remainder should equal the check digit.

Example: 04213000012 A postal money order serial number is 11 digits long, including a check digit. We count the digits and verify the format of our number. Add up all of the digits except the check digit. 0+4+2+1+3+0+0+0+0+1 = 11 Divide this total by 9 and find the remainder. This remainder should equal the check digit. 11 divided by 9: goes in once, remainder 2 

Finding Remainders In general, how do you find the remainder when one number is divided by another? We could always use long division, but that can sometimes be difficult How can we use our calculators to solve this kind of problem?

Finding Remainders Suppose we want the remainder when 132 is divided by 7 If we type 132 divided by 7 into the calculator, we get a decimal answer How do we use the decimal answer to find the remainder?

Finding Remainders The part of our answer before the decimal point tells us that 7 goes into 132 a total of 18 times The fact that there is stuff after the decimal point tells us that there is some nonzero remainder

Finding Remainders We know that 132 can be broken up into 18 groups of 7 with some left over Using the calculator again, we see that 18 groups of 7 is 126 Now we can subtract to find the remainder, 6

Finding Remainders Here is another example: the remainder when 246 is divided by 11 Divide the two numbers Take the whole number part of the answer and multiply it by the number you divided by Then subtract to find the remainder

You Try It Find these remainders: The remainder when 1000 is divided by 27 The remainder when 1234 is divided by 11 The remainder when 143 is divided by 13

You Try It Find these remainders: The remainder when 1000 is divided by 27 is 1 The remainder when 1234 is divided by 11 is 2 The remainder when 143 is divided by 13 is 0

Using a Check Digit System Now that we know how the USPS money order check digit system works, we want to use it to do these three things: Determine whether ID numbers are valid or invalid Create a new ID number with a correct check digit Detect (and possibly correct) errors

1. Determine if an ID number is valid We already know how to check if an ID number is valid Simply perform the calculation to get the check digit: add up all the digits (except the check digit) and find the remainder when this total is divided by 9 Then compare your answer to see if the check digit that was given is correct

2. Create a new ID number When we have an ID number, but no check digit, we need to perform the check digit calculation anyway If the calculation does not involve the check digit, then this is easy If the calculation does involve the check digit, think about which digit would give you the result you need

2. Create a new ID number What if we wanted to create a money order with serial number 6891305915 The box indicates the space the check digit goes into We calculate the digit normally: 6+8+9+1+3+0+5+9+1+5 = 47 So the check digit is 2

2. Create a new ID number Suppose we have a check digit system like this: ID numbers are 5 digits and a check digit The sum of all the digits (including the check digit) should be 20 Which check digit should be added to 63204?

3. Detecting Errors Let’s start with a valid money order serial number: 45910758396 We will cause a substitution error and see if the system detects it: 45910458396

3. Detecting Errors Let’s start with a valid money order serial number: 45910758396 We will cause a substitution error and see if the system detects it: 45910458396 Perform the check digit calculation: 4+5+9+1+0+4+5+8+3+9 = 48 But 48 has a remainder of 3

3. Detecting Errors Let’s start with a valid money order serial number: 45910758396 We will cause a substitution error and see if the system detects it: 45910458396 Perform the check digit calculation: 4+5+9+1+0+4+5+8+3+9 = 48 But 48 has a remainder of 3

3. Detecting Errors Since the calculated check digit didn’t match the actual check digit, we know that the serial number is not valid So the error was detected Can this check digit system detect all substitution errors?

3. Detecting Errors Remember that our original serial number is 45910758396 Let’s cause a different substitution error: 45010758396 We calculate: 4+5+0+1+0+7+5+8+3+9 = 42, which leaves a remainder of 6

3. Detecting Errors Remember that our original serial number is 45910758396 Let’s cause a different substitution error: 45010758396 We calculate: 4+5+0+1+0+7+5+8+3+9 = 42, which leaves a remainder of 6

3. Detecting Errors The new ID number is valid, which means the error we caused was not detected In fact, any time we replace a 0 with a 9 (or vice versa) in this system, that error cannot be detected However, any other single-digit substitution error will be detected

3. Detecting Errors What about transposition errors? Again we’ll start with our valid ID number: 45910758396 Suppose we get 45910785396 If we calculate the check digit of this new number, we get 4+5+9+1+0+7+8+5+3+9 = 51, which leaves a remainder of 6

3. Detecting Errors What about transposition errors? Again we’ll start with our valid ID number: 45910758396 Suppose we get 45910785396 If we calculate the check digit of this new number, we get 4+5+9+1+0+7+8+5+3+9 = 51, which leaves a remainder of 6

3. Detecting Errors The transposition error was not detected because the check digit system only looks at the sum of the first 10 digits So any rearrangement of the first 10 digits of a valid money order serial number will result in another valid number We will have to look at a different kind of check digit system to detect transposition errors

3. Correcting Errors Earlier, we were able to detect that 45910458396 is not a valid ID number We caused a substitution error, but if we didn’t know the original ID number, would there be any way of recovering it from this one? Unfortunately, the “bad” digit could be anywhere

3. Correcting Errors Suppose you are given this serial number: 13598712658 We can easily determine that this number is invalid: 1+3+5+9+8+7+1+2+6+5 = 47, which leaves a remainder of 2 However, there is no way to get the original serial number from this information

3. Correcting Errors Suppose you are given this serial number: 13598712658 Now suppose you are told that the third digit is the one that is incorrect

3. Correcting Errors Suppose you are given this serial number: 13598712658 Now suppose you are told that the third digit is the one that is incorrect In fact, since we know that digit is wrong, we might as well replace it with an empty box

3. Correcting Errors Suppose you are given this serial number: 1398712658 Can we determine which number belongs in the box?

3. Correcting Errors Suppose you are given this serial number: 1398712658 Can we determine which number belongs in the box? Let’s calculate the check digit: 1+3+?+9+8+7+1+2+6+5 = 42 + ?

3. Correcting Errors Suppose you are given this serial number: 1398712658 Now 42 + ? should have a remainder of 8 when divided by 9 By itself, 42 has a remainder of 6, so what could we add to 42 to get a remainder of 8?

3. Correcting Errors This reasoning gives us 13298712658 Let’s check our answer: 1+3+2+9+8+7+1+2+6+5 = 44, which leaves a remainder of 8 

3. Correcting Errors As we have seen, in certain situations we will be able to not only detect an error, but also correct it This is a very valuable tool, but in our example, we needed a key piece of information: the location and type of error Later in this unit we will study ways to correct errors without that extra information