MATH 109 - FINAL EXAM REVIEW HINTS Answer: Answer: 1. Cardinality (1) Let a < b be two real numbers and define f : (0, 1) (a, b) by f(t) = (1 t)a + tb. (a) Prove that f is a bijection. (b) Prove that any two non-empty open intervals (a, b) and (a, b ) are equipotent. (a) First note that f is well defined. Indeed, for any 0 < t < 1 we have a < a + t(b a) = (1 t)a + tb = f(t) < b. To see f is injective, note that f(t 1 ) = f(t 2 ) implies a + t 1 (b a) = f(t 1 ) = f(t 2 ) = a + t 2 (b a), which implies that t 1 (b a) = t 2 (b a). Since b a > 0, this implies that t 1 = t 2. To see f is surjective, let a < c < b. Put t c = c a b a, then 0 < t c < 1, and we have f(t c ) = a + t c (b a) = a + c a (b a) = c. b a Since f is injective and surjective, it is bijective. (b) Recall our notation A B whenever A and B are equipotent. In view of part (a) we have (a, b) (0, 1) and (a, b ) (0, 1). Since being equipotent is transitive, we get from the above that (a, b) (a, b ). (2) Let f : ( π 2, π 2 ) R be the function given by f(x) = tan(x). Recall from calculus that f is a one-to-one and onto, i.e. f is bijective. (a) Using this and problem (1), prove that if a < b are two real numbers, then the open interval (a, b) is uncountable (not countable). (b) Let a < b are two real numbers. Prove that the closed interval [a, b] is uncountable. (a) First note that since x tan x is a bijection from ( π 2, π 2 ) to R, we have ( π 2, π 2 ) R. Moreover, by problem 1(b) we have ( π 2, π 2 ) (a, b) for any non-empty open interval (a, b). Together with transitivity of being equipotent, these imply that (a, b) R for any non-empty open interval (a, b). 1
2 MATH 109 - FINAL EXAM REVIEW HINTS (b) We argue by contradiction. First note that (a, b) [a, b] and (a, b) is infinite, so [a, b] is infinite. Assume contrary to our assumption now that [a, b] is enumerable. Hence, there exists a bijective map g : [a, b] Z +. Restricting this to (a, b), we get that h = g (a,b) : (a, b) Z + is an injective map. Using a lemma from the class, this implies that (a, b) is enumerable which contradicts part (a). Hence, [a, b] is uncountable. (3) Use mathematical induction to prove the following. Let A 1, A 2,..., A n be enumerable sets. Then A 1 A 2 A n is enumerable. Answer: We need a lemma from the class: If X and Y are countable, then X Y is countable. We now prove the assertion by induction on n. Base case: n = 1, then A 1 is countable. Inductive step: Suppose we have shown A 1 A k is countable for any collection of k countable sets, A 1,..., A k. Now, we are given k+1-countable sets A 1,..., A k, A k+1, and need to show that A 1 A k A k+1 is countable. Let X = A 1 A k and Y = A k+1. First recall from the definition of cartesian product that A 1 A k A k+1 is identified with X Y. Now by inductive hypothesis X is countable, moreover Y is countable by our assumption. Hence, the aforementioned lemma implies that X Y is countable. Therefore, the proof is complete by induction. (4) (a) Prove that {f f : {1, 2} Z + } is enumerable. (Hint: show that g : {f f : {1, 2} Z + } Z + Z +, g(f) = ( f(1), f(2) ) is a bijection.) (b) Generalize this proof and use problem 3 to show that {f f : {1,..., n} Z + } is enumerable. Answer: (a) See the proof for part (b). (b) As the hint suggests we define a similar function. g : {f f : {1..., n} Z + } Z + Z }{{ +, } n-times by g(f) = ( f(1),..., f(n) ). Note that g is well defined. We show that g is bijective. Suppose that g(f 1 ) = g(f 2 ) for two functions f 1 and f 2 from {1..., n} to Z +. That is: we have ( f1 (1),..., f 1 (n) ) = ( f 2 (1),..., f 2 (n) ). Hence, we get that f 1 (i) = f 2 (i) for all 1 i n. This implies that f 1 = f 2 ; hence, g is injective.
Answer: MATH 109 - FINAL EXAM REVIEW HINTS 3 To see g is surjective, let (a 1,..., a n ) Z + Z }{{ +. Define } n-times f : {1,..., n} Z + by f(i) = a i for all 1 i n. Then g(f) = ( f(1),..., f(n) ) = (a 1,..., a n ). Hence, g is surjective. Since g is injective and surjective, we get that it is bijective. Since Z + is enumerable, problem (3) implies that Z + Z + }{{} n-times enumerable. In view of the fact that g is bijective, we thus get that {f f : {1..., n} Z + } is enumerable. (5) Let a, b Z + Suppose gcd(a, b) = 1. Let f : Z Z Z, f(m, n) = am+bn. If true, prove. If false provide a counter example. (a) f is injective. (b) f is surjective. (a) f is not injective. To see this note for example that f(0, 0) = 0 also f( b, a) = a( b) + ba = 0 since (0, 0) ( b, a) we get that f is not injective. (b) f is surjective. First note that since gcd(a, b) = 1, by a Theorem from class, see Theorem 17.1.1 in the book, we have the following. There exist x, y Z so that ax + by = 1. Let now k Z be arbitrary. Then k = k 1 = k(ax + by) = a(kx) + b(ky) That is: f(kx, ky) = k for all k Z. Hence, f is surjective. (6) Let X be a set. Prove that P(X) is not equipotent to X. Answer: Suppose that P(X) is equipotent to X, that is, there exists a bijection f : X P(X). Define B P(X) by B = {x X : x / f(x)}. Since f is surjective, there exists some x 0 X such that f(x 0 ) = B. If x 0 B, then x 0 f(x 0 ), since B = f(x 0 ). However, by definition of B, if x 0 B, then x / f(x 0 ). Thus, we cannot have x 0 B, i.e. we must have that x 0 B. But this means x f(x 0 ), so x B by definition of B. Thus, we have a contradiction, and no such f can exist. Answer: This was proved in class, please see also the proof of Theorem 14..3.3. (7) Prove that Q, the set of rational numbers, is enumerable. Answer: This was proved in class, please see also Theorem 14.2.6 and its proof. (8) Let A be a set. Prove that A is infinite if and only if it is equipotent to a proper subset of itself. Answer: Please see Theorem 14.1.4 and its proof. (9) Let A 1 and A 2 be two enumerable subsets of a set X. Define Y = {(x, i) X {1, 2} : x A i }. (a) Let f 1 : A 1 Z + and f 2 : A 2 Z + be bijections. Define F : Y Z + {1, 2} by F (x, i) = (f i (x), i). Prove that F is a well-defined, injective map. is
4 MATH 109 - FINAL EXAM REVIEW HINTS (b) Prove that Z + {1, 2} is enumerable and conclude using part (a) that Y is enumerable. (Hint: First prove this is an infinite set, then construct a injective map from this set to a known enumerable set.) (c) Let g : Y A 1 A 2 be g(x, i) = x. Prove that g is well-defined and surjective. Conclude that A 1 A 2 is enumerable. Answer: (a) First note that by the definition of Y we have (x, i) Y implies that x A i. Hence f i (x) is defined and belongs to Z +. This, together with the fact that f i s are functions, implies that F is well-defined. To see that F is also injective, suppose for some (x, i), (x, i ) Y that F (x, i) = F (x, i ). That is (f i (x), i) = (f i (x), i ). This implies that i = i, moreover, we get that f i (x) = f i (x ). Since f i is bijective, we get that x = x. All together we have shown that (x, i) = (x, i ). Hence F is injective. (b) Note that B = {(n, 1) : n Z + } Z + {1, 2}. Since B Z + is infinite, we get that Z + {1, 2} is infinite. Moreover, Z + Z + is enumerable (this was proved in class) and Z + {1, 2} Z + Z +. This and the fact that Z {1, 2} is infinite implies that Z + {1, 2} is enumerable by a proposition from class. Now {(x, 1) : x A 1 } Y hence Y is infinite. Moreover, by part (a) F : Y Z + {1, 2} is injective. Hence, using a proposition from class we get that Y is enumerable. Alternative proof: Define f : Z + {1, 2} Z + by { 2n if i = 1 f(n, i) = 2n 1 if i = 2. Verify that f is well-defined and bijective. Conclude that Z + {1, 2} Z +. Now {(x, 1) : x A 1 } Y hence Y is infinite. Moreover, by part (a) F : Y Z + {1, 2} is injective. Hence, using a proposition from class we have that Y is enumerable. (c) First note that the map (x, i) x is well-define from Y to X. Moreover, by the definition of Y we have (x, i) Y implies that x A i. Hence g(x, i) = x is a well-defined function from Y to A 1 A 2. Now let x A 1 A 2. Then x A 1 or x A 2. Without loss of generality let us assume x A 1 (the proof in the other case is similar). Then (x, 1) Y and g(x, 1) = x. Hence g is surjective. Since A 1 Z + is infinite and A 1 A 1 A 2, we have that A 1 A 2 is infinite. Recall from part (b) that Y is enumerable. Moreover, there is a surjection g : Y A 1 A 2 as we just proved. Hence, using a proposition from class we get that A 1 A 2 is enumerable. (10) Generalize the proof of problem 9 to prove the following. Let A 1, A 2,... be an enumerable collection of enumerable subsets of X. Then A 1 A 2... is enumerable.
MATH 109 - FINAL EXAM REVIEW HINTS 5 Answer: Let Y = {(x, i) X Z + : x A i }. For each i Z +, let f i : A i Z + be a bijective function, and define F : Y Z + Z + by F (x, i) = (f i (x), i). F is injective by an argument similar to 9(a). Since Z + Z + is enumerable (proved in class), this implies that Y is enumerable. Then, define g : Y A 1 A 2... by g(x, i) = x. As in 9(c), g is surjective. Since we have a surjection from an enumerable set Y to A 1 A 2..., it follows by a proposition from class that A 1 A 2... is enumerable. 2. Basic arithmetic. (1) Write down the Division theorem and prove it. Answer: Please see Theorem 15.1.1 and its proof. (2) Write down the Euclidean algorithm. Answer: Please see Theorem 16.2.1. Answer: (3) Prove the following. (a) No integer of the form 7k + 3 (where k Z) is a perfect square. (b) No integer of the form 8k + 5 (where k Z) is a perfect square. (a) We use modular arithmetic. Let l Z then l 0, 1, 2, 3, 3, 2, 1 (mod 7) Therefore, l 2 0, 1, 4, 9 (mod 7) which implies l 2 0, 1, 4, 2 (mod 7). We thus get that no number of the form 7k + 3 can be a perfect square. (b) This is similar to the part (a). (4) (a) Prove that a i 10 i a i (mod 9). (b) Find the remainder of 201700109 divided by 9. (c) Prove that a i 10 i ( 1) i a i (mod 11). (d) Find the remainder of 109002017 divided by 11. Answer: (a) We need a lemma: 10 n 1 (mod 9) for any n Z 0. We use mathematical induction to prove this. For n = 0 we have 10 0 1 1 (mod 9). Moreover for n = 1, we have 10 1 (mod 9). Suppose now that we have we have shown 10 k 1 (mod 9) for some k 1. Since 10 1 (mod 9) and 10 k 1 (mod 9), using modular arithmetic, we get that 10 k+1 10 k 10 1 1 1 (mod 9). Hence, the claim follows by induction.
6 MATH 109 - FINAL EXAM REVIEW HINTS Using this lemma and modular arithmetic we have a i 10 i a i 1 a i (mod 9). (b) Using part (a) we have 201700109 2 + 1 + 7 + 1 + 9 2 (mod 9). (c) This is similar to part (a). See also, HW 9, problems V, #4. (d) Using part (c) we have 109002017 1 ( 1) 8 + 9 ( 1) 6 + 2 ( 1) 3 + 1 ( 1) 1 + 7 14 3 (mod 11) (5) Let a, b, n Z +. Prove that ax b (mod n) has a solution if and only if g.c.d.(a, n) b. Answer: Recall from the class, see also Theorem 18.2.1, that there are x, k Z so that ax + nk = b if and only if g.c.d.(a, n) b. Suppose now that there exists some x Z so that ax b (mod n). Then n ax b, hence there exists some k Z so that ax b = nk. By the above theorem, thus, we have g.c.d.(a, n) b. For the opposite direction, suppose that g.c.d.(a, n) b. Then by the above theorem, there exist some integers x and k so that ax + nk = b. Hence, there exist some integers x and k so that ax b = nk which implies that n ax b. That is ax b (mod n). (6) Find an integer solution of 2017x + 218y = g.c.d.(2017, 218). Answer: Use the Euclidean algorithm to show that g.c.d.(2017, 218) = 1. Hence by Theorem 18.2.1 recalled above,, see also Theorem 17.1.1, this equation has integer solutions. Then use the Euclidean algorithm to find a solution. (7) Let f : {0, 1,..., 8} {0, 1,..., 8} {0, 1,..., 8}, be given by f(x, y) xy (mod 9). Write an 9 9 table where the (i, j)-th entry is f(i 1, j 1). (a) In which rows is there a 1? (b) Using this table, find a solution for the equation 13x 1 (mod 9). Answer: Use modular arithmetic to write down the multiplication table. (a) The number 1 will appear in rows corresponding to 1,2,4,5,6,7, and 8; note that these are precisely numbers 0 r 8 with g.c.d.(r, 9) = 1. (b) Note that 13 4 (mod 9). Hence, using modular arithmetic, we need to find a solution to 4x 13x 1 (mod 9). Using the table we see that 4 2 8 1 (mod 9). Hence, x = 2 is a solution.
MATH 109 - FINAL EXAM REVIEW HINTS 7 (8) Find the remainder of 3 2017 divided by 13. Answer: Note that (1) 3 3 1 (mod 13). Moreover, 2017 = 3 672 + 1. Therefore, using modular arithmetic, we have 3 2017 3 3 672+1 3 3 672 3 1 672 3 by (1) 3 (mod 13). (9) Suppose a b (mod n). Prove that g.c.d.(a, n) = g.c.d.(b, n). Answer: We give two proof. Proof 1: a b (mod n) implies that there exists some k Z so that a b = nk. Suppose now that c a and c n. Then c a nk = b. Therefore, g.c.d.(a, n) b. Since g.c.d.(a, n) n, we thus get that g.c.d.(a, n) is a common divisor of b and n. Hence, g.c.d.(a, n) g.c.d.(b, n). Similarly if c b and c n, then c b+nk = a. We thus get that g.c.d.(b, n) a. Again since g.c.d.(b, n) n we get that g.c.d.(b, n) g.c.d.(a, n). These two inequalities prove that g.c.d.(a, n) = g.c.d.(b, n). Proof 2: First recall that by a corollary of the division theorem we have: a b (mod n) if and only if a and b have the same remainder when divided by n. That is: a b (mod n) if and only if there exist 0 r < n and two integers q 1 and q 2 so that a = nq 1 + r b = nq 2 + r. We now consider two cases: Case 1: Suppose r = 0. Then by a lemma from class, see Lemma 16.1.1, we have g.c.d.(a, n) = n = g.c.d.(b, n). Cases 2: Suppose r 0. Then by a lemma from class, see Lemma 16.1.2, we have g.c.d.(a, n) = g.c.d.(r, n) = g.c.d.(b, n). Hence in either case we have g.c.d.(a, n) = g.c.d.(b, n) as we claimed. (10) Suppose g.c.d.(a, b) = 1. Prove that a bc if and only if a c. Answer: Since g.c.d.(a, b) = 1, Theorem 18.2.1, see also 17.1.1, implies that there exists some integer x so that (2) bx 1 (mod a). Now we have a bc which is to say (3) bc 0 (mod a). Multiplying (3) by x from (2) we get xbc 0 (mod a).
8 MATH 109 - FINAL EXAM REVIEW HINTS However, since bx 1 (mod a), we get from the above that c 0 (mod a). This is to say that a c as was claimed. (11) Prove that for every n Z + there exist k, l Z with g. c. d.(3, l) = 1 so that n = 3 k l. (Hint: Use induction.) Answer: First, note that for any integer l, g. c. d.(3, l) is either 1 or 3. This is because the only positive divisors of 3 are 1 and 3. In particular, if 3 l, then g. c. d.(3, l) = 1. Now, proceed by strong induction on n. When n = 1, choose k = 0 and l = 1. Suppose that m 1 and that for every 1 a m 1, there exist integers k, l with g. c. d.(3, l) = 1 so that a = 3 k l. We will prove the statement is true for m. Case 1: m 1 (mod 3). Then 3 m, so g. c. d.(3, m) = 1 by the comment at the beginning of the proof. Thus, choose k = 0 and l = m. Case 2: m 2 (mod 3). Again, 3 m, so g. c. d.(3, m) = 1, and we can choose k = 0 and l = m. Case 3: m 0 (mod 3). Then there exists some integer q such that m = 3q. Since 1 q m 1, there exist integers k, l with g. c. d.(3, l) = 1 such that q = 3 k l. Then m = 3 k+1 l satisfies the desired conditions.