Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

“Investing in Africa’s future”

COLLEGE OF BUSINESS PEACE LEADERSHIP AND GOVERNANCE (CBPLG)


DISCRETE MATHEMATICS – CSC 201
ASSIGNMENT 2
AUGUST-DECEMBER 2021
LECTURER: Dr. Weston Govere

1. What time does a 12-hour clock read


a) 80 hours after it reads 11:00?

b) 100 hours after it reads 6:00?

a. 80 hours after 11:00


(11+80) mod 12
=7:00
b. 100 hours after 6:00
(100 +6) mod 12
=10:00

2. Suppose that a and b are integers,


a ≡ 11 (mod 19), and b ≡ 3 (mod 19). Find the integer c with 0 ≤ c ≤ 18 such that
(a) c ≡ 13a (mod 19).

13(11) *=143
143= 10 (mod19)

(b)c ≡ 2a^ 2 + 3b^ 2 (mod 19).

= 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 add odd positions:


7 + 3 + 7 + 4 + 1 + 4 = 26
= 26 + 46 = 72

Now subtract the last digit from the previous calculation, from 10:
10 – 2 = 8

Therefore: 8 is the check digit

(b) Is 041331021641 a valid UPC?

3𝑥1 + 𝑥2 + 3𝑥3 + 𝑥4 + 3𝑥5 + 𝑥6 + 3𝑥7 + 𝑥8 + 3𝑥9 + 𝑥10 + 3𝑥11 + 𝑥12 ≡ 0 (mod 10)

3(0) + 4 + 3(1) + 3 + 5(3) + 1 + 3(0) + 2 + 3(1) + 6 + 3(4) + 1 ≡ 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)

Therefore: 041331021641 is valid since 10 divides (50-0)

You might also like