0% found this document useful (0 votes)
19 views2 pages

Tute 1 Solns

Uploaded by

kyad0003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Tute 1 Solns

Uploaded by

kyad0003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MAT1830 - Discrete Mathematics for Computer Science

Tutorial Sheet #1 Solutions


1. (a) False (because 8 does not divide 20 − 14).
(b) True (because −15 = −5 × 3).
(c) True (because 3 divides −11 − 1).
(d) False (because 9 = 3 × 3).
(e) False (because 1000 ≡ 0 (mod 5) and 12544 ≡ 4 (mod 5)).
(f) False (because there is no integer k such that 66k = 22).
2. (a) We use the Euclidean algorithm.
1022 = 2 × 400 + 222
400 = 1 × 222 + 178
222 = 1 × 178 + 44
178 = 4 × 44 + 2
44 = 22 × 2 + 0
So gcd(1022, 400) = 2.

(b) Now we use the extended Euclidean algorithm.


2 = 178 − 4 × 44
2 = 178 − 4 × (222 − 178) = −4 × 222 + 5 × 178
2 = 5 × (400 − 222) − 4 × 222 = 5 × 400 − 9 × 222
2 = 5 × 400 − 9 × (1022 − 2 × 400) = −9 × 1022 + 23 × 400
So 2 = −9 × 1022 + 23 × 400. So a = −9, b = 23 is one solution.

(c) We just saw that


2 = −9 × 1022 + 23 × 400.
Multiplying through by 4 gives
4 × 2 = (4 × −9) × 1022 + (4 × 23) × 400
8 = −36 × 1022 + 92 × 400.
So a = −36, b = 92 is one solution.
3. (a) x must be prime.
If x were not prime then there would be an integer d such that 2 6 d < x and d divides
x. But then d would also divide n, and this would mean that x wasn’t the smallest
integer such that x > 2 and x divides n (because d would be smaller).
(b) Because y ≡ 2 (mod 3), y = 3k + 2 for some integer k. For some integer l, the integer
k is 4l, 4l + 1, 4l + 2 or 4l + 3.
If k = 4l, then y = 3(4l) + 2 = 12l + 2 and y ≡ 2 (mod 12).
If k = 4l + 1, then y = 3(4l + 1) + 2 = 12l + 5 and y ≡ 5 (mod 12).
If k = 4l + 2, then y = 3(4l + 2) + 2 = 12l + 8 and y ≡ 8 (mod 12).
If k = 4l + 3, then y = 3(4l + 3) + 2 = 12l + 11 and y ≡ 11 (mod 12).
So y might be congruent to 2, 5, 8 or 11 modulo 12.
4. (a) 7 and 21 and 28 are all divisible by 7, and by using these jugs (adding and subtracting
multiples of these numbers) we can only get numbers of litres of water that are divisible
by 7. Of course, 4 isn’t divisible by 7. Send Batman.

(b) If we add 400 lots of 1022 to a number and subtract 1022 lots of 400, then the number
doesn’t change. This means that the pair (−9 + 400, 23 − 1022) = (391, −999) works
as well as (−9, 23) and we can keep doing this getting (791, −2021), (1191, −3043), . . ..
We can also go the other way and get (−409, 1045), (−809, 2067), . . ..

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy