Question: A Universal Product Code ( UPC ) is a numeric code assigned to virtually all products sold in stores; you usually see it as a

A Universal Product Code (UPC) is a numeric code assigned to virtually all products
sold in stores; you usually see it as a bar code, which you scan at the cash register. The
UPC is a 12-digit numeric code a1... a12; the 12 digits have to satisfy the condition
below:
3a1+ a2+3a3+ a4++ a120 mod 10
The sum 3a1+ a2+3a3+ a4++ a12 mod 10 is called the checksum.
If the digits do not satisfy this condition, it can not be a valid UPC code so
probably there was an error when scanning the barcode and it needs to be re-scanned.
For example, 380177-051136 is a valid UPC code (check!); however, if the first 3 was
replaced by 8, this would change the checksum by 3\times 5=155 mod 10, so the
new checksum woudlnt be zero.
Show that this scheme detects all single-digit errors. Does it detect all transpositions
(i.e. interchange of two adjacent digits)?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!