Discrete Structures Assignment 2
Discrete Structures Assignment 2
13(11) *=143
143= 10 (mod19)
= 2* 11 ^ 2 +(3*3 ^2)
=2 * 7 + 3*9
= 14+ 27
= 41
= 3 (mod 19)
UPCs Retail products are identified by their Universal Product Codes (UPCs). The
most common form of a UPC has 12 decimal digits: the first digit identifies the
product category, the next five digits identify the manufacturer, the following
five identify the particular product, and the last digit is a check digit. The check
digit is determined by the congruence 3x1 + x2 + 3x3 + x4 + 3x5 + x6 + 3x7 + x8 +
3x9 + x10 + 3x11 + x12 ≡ 0 (mod 10).
(a)Suppose that the first 11 digits of a UPC are 79357343104. What is the check digit?
3𝑥1 + 𝑥2 + 3𝑥3 + 𝑥4 + 3𝑥5 + 𝑥6 + 3𝑥7 + 𝑥8 + 3𝑥9 + 𝑥10 + 3𝑥11 + 𝑥12 = 0 (mod 10)
7 + 9 + 3 + 5 + 7 + 3 + 4 + 3 + 1 + 0 + 4 = 46
Now subtract the last digit from the previous calculation, from 10:
10 – 2 = 8
3𝑥1 + 𝑥2 + 3𝑥3 + 𝑥4 + 3𝑥5 + 𝑥6 + 3𝑥7 + 𝑥8 + 3𝑥9 + 𝑥10 + 3𝑥11 + 𝑥12 ≡ 0 (mod 10)
= 0 + 4 + 3 + 3 + 15 + 1 + 0 + 2 + 3 + 6 + 12 + 1 = 50 ≡ 0 (mod 10)
= 50 ≡ 0 (mod 10)
= 10/ (50 – 0)