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

90.2K

Verified Solution

Question

Advance Math

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

• The sum of the odd position digits (not including the last) isM. That is we add the first digit to the third digit to the fifthdigit 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.

(a) Check whenever 1928467 is a UPC.

(b) Suppose you are given a 7 digit number which is a UPC. Provethat if a mistake is made when scanning the number, causing onedigit to be read incorrectly, then you will be able to tell that anerror has been made. Hint: use results from question 2.

(c) Find an example of two 7-digit UPCs that have equal lastdigits, and disagree with each other at exactly two of the otherdigits numbers.

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 lastone:

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 an UPC.

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

Answer & Explanation Solved by verified expert
4.0 Ratings (553 Votes)
    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students