TMF1814 DISCRETE MATHEMATICS TUTORIAL 4 S1 2015/2016
TMF1814 DISCRETE MATHEMATICS
TUTORIAL 4
3.1 Divisibility and Modular Arithmetic
1. Show that if a,b,c and d are integers, where a 0,such that a|c and b|d, then ab|cd.
Under the hypotheses, we have c = as and d = bt for some s and t . Multiplying
we obtain cd = ab(st), which means that ab | cd, as desired.
2. What are the quotient and remainder when
a. 44 is divided by 8?
b. 777 is divided by 21?
c. -123 is divided by 19?
d. -1 is divided by 23?
a. q = 5, r = 4
b. q = 37, r = 0
c. q = -7, r = 10
d. q = -1, r = 22
3. What time does a 12-hour clock read
a. 80 hours after it reads 11:00?
80 mod 12 = 8, so 8 hours after is 7:00
b. 40 hours before it reads 12:00?
(12 - 40) mod 12 = -28 mod 12 = 4, so 4 hours behind is 8:00
c. 100 hours after it reads 6:00?
100 mod 12 = 4 hours, so 4 hours after is 10:00
4. Suppose that a and b are integers, a 4 (mod 13), and b 9 (mod 13). Find the
integer c with 0 c 12 such that
a. c 9a (mod 13)
b. c 11b (mod 13)
c. c a + b (mod 13)
d. c 2a + 3b (mod 13)
e. c a2 + b2 (mod 13)
f. c a3 b3 (mod 13)
(13| a 4 ) gives you a = 17,30,43,... (13| b 9 ) gives you a = 22,35,48,...
a. c 9a (mod 13) = (13|c - 9a) = (13|c 9x17) = (13|c 153) 153 mod 13 = 10,
c = 10
1
TMF1814 DISCRETE MATHEMATICS TUTORIAL 4 S1 2015/2016
b. c 11b (mod13) = (13|c11b) = (13|c11x22) = (13|c 242) 242 mod 13 = 8,
c=8
c. c a + b (mod 13) =
(13|c (a + b)) = (13|c 13) 13 mod 13 = 0, c = 0
d. c 2a + 3b (mod 13) =
(13|c (2a +3b)) = (13|c (2x4 +3x9)) = (13|c 35) 35 mod 13 = 9, c = 9
e. c a2 + b2 (mod 13) =
(13|c (a2 + b2)) = (13|c 97) 97 mod 13 = 6, c = 6
f. c a3 b3 (mod 13) =
(13|c (a3 b3)) = (13|c (43 93)) = (13|c + 665 )
using Division algorithm: a = dq + r a = 13x51 + 13 = 676, whr d=13, q = quotient
of 665/13 and r = 13.
Hence: c + 665 = 676, c = 11
4.2 Prime and Greatest Common Divisors
5. Find the prime factorization of each of these integers.
a. 88
b. 126
c. 729
d. 1001
e. 1111
f. 909,090
a) 23*11 b) 2*32*7 c) 36 d) 7*11*13 e) 11*101 f) 2*33*5*7*13*37
6. Determine whether each of these integers is prime, verifying some of Mersennes
claims.
a. 27 1
b. 29 1
c. 211 1
d. 213 1
a. 27 1 = 127. Division by 2, 3, 5, 7, and 11 shows that these are not factors.
Since 127 < 13, we are done. 127 is prime.
b. b) 29 1 = 511 = 7 73, so this number is not prime.
c. c) 211 1 = 2047 = 23 89, so this number is not prime.
d. d) 213 1 = 8191. Division by 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47,
53, 59, 61, 67, 71, 73, 79, 83, and 89 (phew!) shows that these are not factors.
Since 8191 < 97, we are done. 8191 is prime.
2
TMF1814 DISCRETE MATHEMATICS TUTORIAL 4 S1 2015/2016
7. Find gcd(1000, 625) and lcm(1000, 625) and verify that gcd(1000, 625) lcm(1000, 625)
= 1000 625.
We have 1000 = 23 53 and 625 = 54 , so gcd(1000, 625) = 53 = 125, and lcm(1000, 625)
= 23 54 = 5000. As expected, 125 5000 = 625000 = 1000 625.
8. Use the Euclidean algorithm to find
a. gcd(12, 18).
b. gcd(111, 201).
c. gcd(1001, 1331).
d. gcd(12345, 54321).
a) 6 b) 3 c) 11 d) 3
4.1 Propositional Logic
9. Let p, q, and r be the propositions
p: you have the flu
q: you miss the final examination
r: you pass the score
Express each of these propositions as an English sentence
a) p q
b) q r
c) q r
d) p q r
e) p r q r
f) p q q r
(a) p q
If you have flu, then you miss the final exam.
(b) r
You do not miss the final exam if and only if you pass the course.
(c)
If you miss the final exam, then you do not pass the course.
(d) q r
You have the flu, or miss the final exam, or pass the course.
3
TMF1814 DISCRETE MATHEMATICS TUTORIAL 4 S1 2015/2016
(e) ( ) ( )
It is either the case that if you have the flu then you do not pass the course or the
case that if you miss the final exam then you do not pass the course
(f) ( q) ( r)
Either you have the flu and miss the final exam, or you do not miss the final exam
and do pass the course.
10. Determine whether these biconditionals are true or false.
a) 2 + 2 = 4 if and only if 1 + 1 = 2.
b) 1 + 1 = 2 if and only if 2 + 3 = 4.
c) 1 + 1 = 3 if and only if monkeys can fly.
d) If monkeys can fly, if 2 > 1.
(a) 2 + 2 = 4 if and only if 1 + 1 = 2.
T T, True
(b) 1 + 1 = 2 if and only if 2 + 3 = 4.
T F, False
(c) 1 + 1 = 3 if and only if monkeys can fly.
F F, True
(d) 0 > 1 if and only if 2 > 1.
F T, False
11. Construct a truth table for each of these compound propositions.
a. p p
b. p q
c. p q
d. p q r
e. p q r
f. p q r
g. p q r
For (a), we have the following table:
p p p p
T F T
F T T
(b) and (c)
p q p q p q p q
4
TMF1814 DISCRETE MATHEMATICS TUTORIAL 4 S1 2015/2016
T T F F T F
T F F T F T
F T T F F T
F F T T T F
(d) and (e)
p q r pq (p q) r (p q) r
T T T T T T
T T F T T F
T F T T T T
T F F T T F
F T T T T T
F T F T T F
F F T F T F
F F F F F F
. (c) and (d)
p q r pq (p q) r (p q) r
T T T T T T
T T F T T F
T F T F T F
T F F F F F
F T T F T F
F T F F F F
F F T F T F
F F F F F F
12. State the converse, contrapositive, and inverse of each of these conditional statements.
a. If it snows tonight, then I will stay at home.
b. I go to the beach whenever it is a sunny summer day.
c. When I stay up late, it is necessary that I sleep until noon.
a) Converse: If I stay home, then it will snow tonight.
Contrapositive: If I do not stay at home, then it will not snow tonight.
Inverse: If it does not snow tonight, then I will not stay home.
b) Converse: Whenever I go to the beach, it is a sunny summer day.
Contrapositive: Whenever I do not go to the beach, it is not a sunny summer day.
Inverse: Whenever it is not a sunny day, I do not go to the beach.
c) Converse: If I sleep until noon, then I stayed up late.
Contrapositive: If I do not sleep until noon, then I did not stay up late.
Inverse: If I dont stay up late, then I dont sleep until noon.
5
TMF1814 DISCRETE MATHEMATICS TUTORIAL 4 S1 2015/2016
13. Construct a truth table for each of these compound propositions.
a. p (p q)
b. (p q) (p q)
c. (q p) (p q)
d. (p q) (p q)
For (a) and (b)
(c)
(d)