MATH 2200 Quiz #2 Solutions Thomas Goller October 27, 2012 General Comments: • I graded your quizzes harshly because at this level of mathematics and beyond, precision and clarity are essential. For instance: – As many of you discovered, it is very hard to show two numbers are congruent (1c) if you don’t know the precise definition of congruence (1b). – Similarly, to prove anything about injective functions, you have to know a precise definition of what it means for a function to be injective! – Algorithms (like in 2a and 2b) have a very precise sequence of steps, which ensure that they work, and which make them easy to implement in a computer program. When using an algorithm, follow the steps! – After using the Euclidean algorithm (2a), you need to interpret the output: show me where in the output you get the gcd! Likewise, after doing substitutions to write the gcd as a linear combination (2b), show me what the multiplicative inverse is and where it is coming from! • Giving examples doesn’t strengthen a definition, but it is better than not writing anything. • Do NOT use a | b to denote usual division. As in (1a), this notation means something different: it is used to state that a and b have a certain relationship, namely that b is a multiple of a. For instance, 2 | a is another way to say a is even. • When trying to prove a formula like 11 ≡ −1 (mod 4) (1c), do NOT begin by stating the formula and working from there. You need to deduce the formula! See the solutions below. 1 Division and Congruence (10 points) (a) Define what it means for m to divide a (in symbols, m | a). (3 points) Solution: m | a means there is a k ∈ Z such that a = mk. (b) Define what it means for b to be congruent to c modulo m (in symbols, b ≡ c (mod m)). (3 points) Solution: First (more intuitive) definition: b ≡ c (mod m) means b and c have the same remainder when divided by m. Second (more useful) definition: b ≡ c (mod m) means there is a k ∈ Z such that b = c + mk. (c) Show that −1 ≡ 11 (mod 4). (2 points) Solution: To use the first definition of congruence in (b), you have to check that the remainders of −1 and 11 when divided by 4 are the same: −1 = 4(−1) + 3 and 11 = 4(2) + 3; in each case the remainder is 3, so −1 ≡ 11 (mod 4). The second definition in (b) is easier to check. Since −1 = 11 + 4(−3), we see that −1 ≡ 11 (mod 4). (d) Use (c) to show that 117 ≡ −5 (mod 4). (2 points) 1 Solution: Using (c), we compute 117 ≡ (−1)7 = −1 (mod 4). Moreover, −1 ≡ −5 (mod 4) since −1 = −5 + 4(1). Thus 117 ≡ −1 ≡ −5 (mod 4). 2 Solving a Linear Congruence (15 points) Solve the linear congruence 9x + 19 ≡ 0 (mod 23) using the following steps: (a) Find the gcd of 9 and 23 using the Euclidean algorithm. (5 points) Solution: 23 = 9 · 2 + 5 9=5·1+4 5=4·1+1 4 = 1 · 4 + 0. The last nonzero remainder is 1, so gcd(9, 23) = 1. (b) Use the substitution method to find a multiplicative inverse of 9 modulo 23. (5 points) Solution: 1 = 5 − 4 = 5 − (9 − 5) = 2 · 5 − 9 = 2 · (23 − 9 · 2) − 9 = 2 · 23 − 5 · 9. Thus the multiplicative inverse of 9 modulo 23 is the coefficient of 9, which is −5. (c) Use (b) to find all integer solutions of the linear congruence 9x + 19 ≡ 0 (mod 23). (5 points) Solution: Adding 4 to both sides, we get 9x ≡ 4 (mod 23). Multiplying both sides by −5, we get x ≡ −20 ≡ 3 (mod 23). Thus the set of solutions for x is {3 + 23k | k ∈ Z}. 3 Proof (10 points) Use congruence modulo 2 to prove the following theorem: Theorem. Let n ∈ Z. Then n is even or odd, but not both. State the theorem and write your proof using full English sentences! Solution: Proof. Note that n is even if and only if n ≡ 0 (mod 2) and n is odd if and only if n ≡ 1 (mod 2). By the division algorithm, n = 2 · q + r for some unique 0 ≤ r < 2, so r is either 0 or 1. Since n ≡ r (mod 2), we see that n is even or odd, and since the remainder r is unique, n cannot be both even and odd. 4 Sets and Functions (5 points) (a) Define what it means for a function A f ! B to be injective (one-to-one). (3 points) Solution: f injective means that f maps no two distinct elements of A to the same element of B. Another way to say this is that each b ∈ B has at most one preimage under f . In symbols, injective means that for any a1 , a2 ∈ A, if a1 %= a2 then f (a1 ) %= f (a2 ). Equivalently (by contrapositive), for any a1 , a2 ∈ A, if f (a1 ) = f (a2 ) then a1 = a2 . 2 (b) There is a unique set A such that for any set B, there is a unique function A → B. What is A? (1 point) Solution: The only set A with the stated property is the empty set ∅. (c) Give an example of a set B with the property that for any set A, there is a unique function A → B. (1 point) Solution: Take B to be any set with exactly one element. 3