Question

In: Advanced Math

Question Suppose you are given a 7 digit number which is a UPC. Prove that if...

Question

Suppose you are given a 7 digit number which is a UPC. Prove that if a mistake is made when scanning the number, causing one digit to be read incorrectly, then you will be able to tell that an error has been made.

Extra information.

A number is a Universal Product Code (UPC) if its last digit agrees with the following computations:

• The sum of the odd position digits (not including the last) is M. That is we add the first digit to the third digit to the fifth digit etc.

• The sum of the even position digits (not including the last) is N. •

c = (3M + N)%10.

• If c = 0 then the check digit is 0.

• If c 6= 0, then the check digit is 10 − c.

An example with number 1231242.

1) you add all odd-positioned digits except the last one:

M=1+3+2=6

2) add all even positioned digits, not including the last one:

N=2+1+4=7

3) c=(3M+N)%10=(6*3+7)%10=5

4) the check digit is 10-5=5

So 1231242 is not a UPC.

However, if we change the last digit to be 5, then it will be UPC. That is 1231245 is a UPC

Solutions

Expert Solution

The UPC includes a check digit to detect common data entry errors.

For example , UPC-A code choose the check digit X12 to satisfy the check digit equation:

( 3X1 + X2 + 3X3 + X4 + 3X5 + X6 + 3X7 + X8 + 3X9 + X10 + 3X11 + X12 ) = 0 ( mod 10)

If an entered code does not satisfy the equation , then it is not a valid UPC-A


Related Solutions

Suppose that a check digit is assigned to a four-digit number by appending the remainder after...
Suppose that a check digit is assigned to a four-digit number by appending the remainder after division by 7. If the number 36806 has a single-digit error in the first position, determine the possibilities for the correct number.
Question 4: Set P to the largest digit in your 5 digit number. For example, if...
Question 4: Set P to the largest digit in your 5 digit number. For example, if your 5 digit number is 88412, then P should be set to 8. Calculate and print the value of (P+1) multiplied by itself (P+3) times. As an example, if your 5 digit number is 88412, you should print the result of multiplying 9 with itself 12 times -- this is also known as 9 to the power of 12. HINT: you are free to...
Randomly select a 7 digit natural number. a) Find the probability that the number has 4...
Randomly select a 7 digit natural number. a) Find the probability that the number has 4 odd digits, 3 even numbers, and no number is repeated. b) Find the probability that the number 2 is present exactly 2 times, the number 3 is present exactly 3 times, the remaining digits are present no more than 1 time.
The last digit of a credit card number is the check digit, which protects against transcription...
The last digit of a credit card number is the check digit, which protects against transcription errors such as an error in a single digit or switching two digits. The following method is used to verify actual credit card numbers but, for simplicity, we will describe it for numbers with 8 digits instead of 16: 1.) Starting from the rightmost digit, form the sum of every other digit. For example, if the credit card number is 4358 9795, then you...
The number 52430 is a 5-digit number whereas 03201 is not a 5-digit number. Determine the...
The number 52430 is a 5-digit number whereas 03201 is not a 5-digit number. Determine the number of 5-digit multiples of 5 that can be created using the digits 0 to 9, if digits may not be repeated
1. Given a randomly chosen 4-digit number... What is the probability... a. That there are no...
1. Given a randomly chosen 4-digit number... What is the probability... a. That there are no pairs of consecutive digits in the number b. That there are no pairs of consecutive digits in the number, if the last digit and first digit of the number could be classified as consecutive c. Given a randomly chosen six digit number: What is the probability that the number is an odd number if it contains the six digits 7-6-4-4-3-1, and is in a...
In game 77, a 7-digit winning number consisting of the digits 0 to 9 is drawn...
In game 77, a 7-digit winning number consisting of the digits 0 to 9 is drawn one after the other (they put the numbers back in the bag before drawing another number) and their digits are arranged in the order of the draw. What is the probability that the numbers drawn in non-descending sequence, i.e. the number of a drawing is at least as large as the number of the previous drawing? Also calculate this probability for the general case...
Total number of six-digit numbers in which only and all the five digits 1, 3, 5, 7, and 9 appear, is
Total number of six-digit numbers in which only and all the five digits 1, 3, 5, 7, and 9 appear, is (a) 56 (b) (½)(6!) (c) 6! (d) (5/2) 6!    
Credit Card Number Check. The last digit of a credit card number is the check digit,...
Credit Card Number Check. The last digit of a credit card number is the check digit, which protects against transcription errors such as error in a single digit or switching two digits. The following method is used to verify actual credit card number but, for simplicity, we will describe it for numbers with 8 digits instead of 16: Starting from the rightmost digit, form the sum of every other digit. For example, if the credit card number is 43589795, then...
Credit Card Number Check. The last digit of a credit card number is the check digit,...
Credit Card Number Check. The last digit of a credit card number is the check digit, which protects against transcription errors such as an error in a single digit or switching two digits. The following method is used to verify actual credit card numbers but, for simplicity, we will describe it for numbers with 8 digits instead of 16: • Starting from the rightmost digit, form the sum of every other digit. For example, if the credit card number is...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT