Math 2200-1. Final Exam. Solutions. Fall 2008. December 21, 2008 Problem 1 (Propositional Logic). Prove that the propositions (i) (p → q) ∧ (p → r) and (q ∨ r) → p are logically equivalent. (ii) (p ∧ q) → r and (p → r) ∧ (q → r) are not logically equivalent. Proof. (i) One can use rules of propositional logic to show the equivalence, or a truth table. (ii) When p = T , q = F , and r = F, then p → r = F , q → r = T and (p → r) ∧ (q → r) = F, but (p ∧ q) → r = T Problem 2 (Induction). Prove by mathematical induction that 1+ 1 1 3 1 1 + 3 + ··· + 3 < − 2, 3 2 3 n 2 n for all n ≥ 2. , which is true. Proof. The base case is n = 2, in that case the inequality is 89 < 10 8 1 3 1 Assume that 1 + 213 + 313 + · · · + k13 < 32 − k12 , and prove 1 + 213 + 313 + · · · + (k+1) 3 < 2 − (k+1)2 . Add 1 1 3 1 on both sides of the induction hypothesis. If we show that 23 − n12 + (n+1) 3 < 2 − (n+1)2 , then (k+1)3 1 1 n+2 3 2 we’re done. This is equivalent to n12 > (n+1) 2 + (n+1)3 = (n+1)3 , and then to (n + 1) > n (n + 2), and finally n3 + 3n2 + 3n + 1 > n3 + 2n2 , which is true since n2 + 3n + 1 > 0. Problem 3 (Sets). (i) Prove that (A1 ∪ A2 ) − B = (A1 − B) ∪ (A2 − B), for every sets A1 , A2 , B. (ii) Prove by mathematical induction that (A1 ∪ A2 ∪ · · · ∪ An ) − B = (A1 − B) ∪ (A2 − B) ∪ · · · ∪ (An − B), for every sets A1 , A2 , . . . , An , n ≥ 2, and B. Proof. (i) One can prove this by showing the left hand side is included in the right hand side and then that the right hand side is included in the left hand side. Another way is to use a membership table. 1 2 (ii) The base case. n = 2, is part (i). Assume the identity holds with k sets and we prove it for k + 1 sets: (A1 ∪ A2 ∪ · · · ∪ Ak+1 ) − B = ((A1 ∪ A2 ∪ · · · ∪ Ak ) ∪ Ak+1 ) − B = ((A1 − B) ∪ (A2 − B) ∪ · · · ∪ (Ak − B)) ∪ (Ak+1 − B) = (A1 − B) ∪ (A2 − B) ∪ · · · ∪ (Ak+1 − B), where first we used the case n = 2 again, then the induction hypothesis, and finally associativity. Problem 4 (Basic Proofs). (i) Prove that x is irrational if and only if 3x + 2 is irrational. (ii) Assume that n is a perfect square. Prove that n + 6 is not a perfect square. Proof. (i) The contrapositive of this statement is: “x is rational if and only if 3x + 2 is rational.” There are two directions to prove. Firstly, assume that x is rational. Then x = m , for some integers m, n, where n 6= 0. So n 3x + 2 = 3m+2n , and 3m + 2n is an integer (being a combination of integers), and n 6= 0, so 3x + 2 n is rational. Secondly, assume that 3x + 2 is rational, so 3x + 2 = pq , for some integers p, q, q 6= 0. Then . Here p − 2q and 3q are integers, and 3q 6= 0, since q 6= 0. This proves that x is rational. x = p−2q 3q (ii) We prove the statement by contradiction. Assume n = a2 and n + 6 = b2 for some nonnegative integers a, b. Then b2 − a2 = 6, and so (b + a)(b − a) = 6. There are two cases b + a = 6, b − a = 1 and b + a = 3, b − a = 2. In the first case, b = 7/2, in the second, b = 5/2. But these are not integers, contradiction! It’s possible to give a direct proof too. Assume b2 and a2 are two perfect squares, with b, a nonnegative, and say b > a. Then b2 − a2 ≥ (a + 1)2 − a2 = 2a + 1. If a ≥ 3, this is always greater than 6, so we can’t have two perfect squares with difference equal to 6. If a ≥ 2, one checks the statement directly. Problem 5 (Modular Arithmetic). (i) What does it mean for a residue c to be an inverse of a modulo m? What is the condition that a has an inverse modulo m? (ii) Does the system of congruences x ≡ 1 (mod 2) x ≡ 2 (mod 5) x ≡ 3 (mod 7) have solutions? If it does, find explicitly the smallest positive solution. Proof. (i) The residue c is an inverse of a modulo m, if c · a ≡ 1 (mod m). The integer a has an inverse modulo m > 1, if and only if gcd(a, m) = 1. 3 (ii) Since the moduli are all prime to each other, by the Chinese Remainder Theorem, there exists a solution, and this solution is unique modulo 2 · 5 · 7 = 70. One can apply the algorithm and find this solution is x = 17. Problem 6 (Counting). (i) How many positive integers not exceeding 200 that are divisible by 3 or 5 are there? (ii) What is the minimum number of students, each of whom comes from one of the 50 states, who must be enrolled in a university to guarantee that there are at least 100 who come from the same state? Proof. (i) There are ⌊ 200 ⌋ = 66 integers divisible by 3, and ⌊ 200 ⌋ = 40 integers divisible by 5, 3 5 ⌋ = 13 integers divisible by 15. So the answer is 66 + 40 − 13 = 93. but we are overcounting ⌊ 200 15 (ii) By the pigeonhole principle, one needs 99 · 50 + 1 = 4951 students. Extra credit. (Attempt to solve it only if you finished the rest of the test.) How many surjective functions from a set with 10 elements to a set with 6 elements are there? (Hint: count how many non-surjective functions there are.) Proof. Let Ai , i = 1, 6 be the set of functions whose image does not contain the i-th element of the set with six elements. Recall that the number of functions from a set with m elements to one with n elements is nm . We will pply this repeatedly with m = 10 and 0 ≤ n ≤ 6. The number of non-surjective functions is |A1 ∪ A2 ∪ · · · ∪ A6 |. Apply inclusion-exclusion: X X X |A1 ∪ A2 ∪ · · · ∪ A6 | = |Ai | − |Ai ∩ Aj | + |Ai ∩ Aj ∩ Ak | 1≤i≤6 1≤i<j≤6 1≤i<j<k≤6 − · · · − |A1 ∩ A2 ∩ · · · ∩ A6 | = C(6, 1) · 510 − C(6, 2) · 410 + C(6, 3) · 310 − C(6, 4) · 210 + C(6, 5) · 110 − C(6, 6) · 010 (the last term is of course 0). The number of surjective functions is then 610 − C(6, 1) · 510 + C(6, 2) · 410 − C(6, 3) · 310 + C(6, 4) · 210 − C(6, 5) · 110 = 16435440.