Cryptography
Solutions to Practice Problems
1. (a) TRUE. Remainder of 9/4 is 1 and remainder of 21/4 is also 1. (OR, using the
alternate denition that we proved in class: 21 1 = 20 is divisible by 4.)
(b) FALSE. Remainder of 10/3 is 2 (10 = 3(4) + 2) and

WW
MA TH 3710/ COMP 3240
1. Alice and Bob have decided to pass secret messages using Afﬁne Transformation. AI—
ice and Bob have agreed to communicate mod n, using the secret numbers (1,!) 6
{0,1,. . . .11 ﬂ 1} with gcd(a,n) = 1, and they have agreed that

MATH 3710/ COMP 3240 Page 1 of5
[6] 1. Let n 2 2 be an integer. Use induction to prove that n can be expressed (i.e. written)
as a product of (one or more) prime numbers. ( Be sure to clearly state your induction
hypothesis at an appropriate point in your

Qujz Name: ego/66(17—
MATH 3710 Discrete Math /COMP 324D Discrete Structures
Friday, April 1‘1, 2015 User id:
Instructions:
y of the following to look at during the quiz: your class notes.
ice problems/solutions, our deﬁnitions sheet, our model proofs
e

Quiz #5: Solutions
MATH 3710 Discrete Math /COMP 3240 Discrete Structures
Friday, March 20, 2015
1. Since p = 3, q = 5, we get = (p 1)(q 1) = (2)(4) = 8. We want to nd
s so that ns 1 (mod ), that is, 3s 1 (mod 8). This means that we must
choose s = 3 (sin

Quiz #4: Part 1 Solutions
MATH 3710 Discrete Math /COMP 3240 Discrete Structures
Friday, March 6, 2015
1. Lemma. Let R = cfw_(a, b)| a, b R and a2 b2 > 8. Then R is transitive.
Proof. Let x, y, z R, and suppose that (x, y), (y, z) R. Then x2 y 2 > 8
and y

Quiz #3: Solutions
MATH 3710 Discrete Math /COMP 3240 Discrete Structures
Friday, February 6, 2015
1. Lemma. Suppose that there are exactly three dierent colours of tacks on a
bulletin board (each tack is either red, blue, or yellow), and there are a tota

Quiz #2: Solutions
MATH 3710 Discrete Math /COMP 3240 Discrete Structures
Friday, January 23, 2015
1. Lemma. Let a, b Z and suppose that a and b are both odd.
Then the following number is odd: 4a 3b .
Proof. Since a and b are both odd, there exists m, n Z

Proofs & Math
Practice Problems
1. Let x, y Z with x y odd and y even. Prove that x must be odd.
2. Let a, b Z and suppose that 3|a and 4|b. Prove that 12|ab.
3. Let m, n Z, let d Z+ and let p be a prime. Suppose that d is a divisor of both m
and n, and t

Proofs & Math
Solutions to Practice Problems
1. Lemma. Let x, y Z with x y odd and y even. Then x must be odd.
Proof. Since x y is odd, there exists m Z such that x y = 2m + 1. Since y is
even, there exists k Z such that y = 2k. We have that
x = (x y) + y

Enumeration
Solutions to Practice Problems
1. (a) There are 10+26=36 dierent possible characters to use in the password. So, the
total number of such passwords is
8
(36)i .
i=1
(b) We have to disallow the all-zero string of length i for i cfw_1, 2, . . .

Enumeration
Practice Problems
1. (a) How many dierent passwords of length 8 (and 1) are there, using only
lowercase letters and the digits 0, 1, . . . , 9?
(b) What if the all zeros string is not allowed as a password?
(c) What if the all zeros string is

Graph Theory
Practice Problems
1. For each of the following, either draw a graph G satisfying the giving conditions, or
explain why no such graph exists.
(a) 3-regular, |V (G)| = 2
(b) 3-regular, |V (G)| = 7
(c) (G) = 4 and (G) = 5
(d) |E(G)| = 4 and 2-re

Graph Theory
Solutions to Practice Problems
1. (a) There are two dierent possibilities. See attached picture.
(b) Not possible since the degree sum of any graph is even (by the Degree Sum
Formula, proved in class), and the degree sum of such a graph would

Cryptography
Practice Problems
1. Which of the following statements are true, and which are false?
(a) 9 21 (mod 4)
(b) 10 7 (mod 3)
(c) 8 8 (mod 10)
(d) 4 13 (mod 3)
2. In class we saw the following theorem, and proved parts (a) and (b) of it. Prove the