Math 3355 Fall 2018 Some Review Problems for Exam 1: Solutions Here is my quick review of proof techniques. I will focus exclusively on propositions of the form p q, or more properly, x P (x) Q(x) or x y P (x, y) Q(x, y). The basic proof techniques: Direct proof: Assume p and show q. More to the point, assuming P (x) is true, what information does that give us about x? Use that information to show that Q(x) must also be true. Contrapositive proof: Assume Q(x) is false, and use that information to show that P (x) must also be false. This technique is based on the logical equivalence p q q p. Proof by contradiction: Assume P (x) is true but Q(x) is false. Given this, derive a contradiction such as something is both even and odd, or both positive and negative, or both rational and irrational, etc. This technique is based on the logical equivalence p q (p q) F. Some more advanced ideas: In a proof by cases one breaks up the hypothesis into pieces and shows each piece implies the conclusion. Such cases might be (even or odd), or (negative or nonnegative) or (zero or nonzero) or (remainder of 0, 1, or 2 when divisible by 3) or lots of other things. One special form of a proof by cases is the form p (q r), where it is common to use the cases q and q. The example I gave of this in class was xy = 0 (x = 0 y = 0). The proof went like this: If x = 0, the conclusion is trivially true. If x 0 then we can divide xy = 0 by x to get y = 0. Another idea was to modify the universe of discourse using the relation x [(P (x) Q(x)) R(x)] (x with P (x) true) [Q(x) R(x)] This can be useful for proofs by contrapositive if the contrapositive of the second statement is easier than the contrapositive of the first. In Homework 4, the problem A rational number added to an irrational number is irrational. has this form: x y [(x is rational y is irrational x + y is irrational]. This is easiest done by rewriting it rational x y (y is irrational x + y is irrational), and taking the contrapositive. Some last ideas: To prove x P (x) one only needs an example of an x. To prove x P (x) is NOT true one only needs an x for which P (x) is false. Such values of x are called counterexamples. On to the review solutions.
1. Consider the proposition (p q) r (p r) (q r). (a) Use a truth table to show that the proposition is true. p q r p q p r q r (p q) r (p r) (q r) T T T T T T T T T T F T F F F F T F T F T T T T T F F F F T T T F T T F T T T T F T F F T F T T F F T F T T T T F F F F T T T T Since the last two columns are the same, the left and right propositions are logically equivalent, making the compound proposition true. (b) Show that the proposition is true some other way. Using logical equivalences, (p q) r (p q) r p q r p q r r ( p r) ( q r) (p r) (q r). (c) Find a statement logically equivalent to [(p r) (q r)] which has no implications. [(p r) (q r)] [( p r) ( q r)] p r q r p q r 2. Carefully prove each of the following statements. (a) If x + y < 100 then x < 40 or y < 60. Use a proof by contraposition. The proof would go like this. Suppose it is false that (x < 40 or y < 60.) This means that x 40 and y 60. Thus, x + y 40 + 60 = 100, One could also do this by cases. The cases would be (1) x < 40 and (2) x 40. In the first case, the conclusion is trivially true. In the second case, multiplying by -1 gives x 40. Now taking x + y < 100, we rearrange: y < 100 x 100 40 = 60. That is, y < 60, again establishing the conclusion. Page 2
(b) The product of two odd numbers is odd. This should be done by a direct proof. Let m and n be odd. Then m = 2k+1 and n = 2l+1 for some integers k and l. Now mn = (2k+1)(2l+1) = 4kl + 2k + 2l + 1 = 2(2kl + k + l) + 1, so mn is odd. (c) The converse of (b). That is, prove that if mn is odd, then m and n are both odd. We prove the contrapositive instead, which states If m is even or n is even then mn is even. Note that the negation turned the original (and) to an (or) here. We proceed by cases. If m is even, then m = 2k for some integer k, giving mn = 2kn = 2(kn), so mn is even. Alternatively, if n is even, then n = 2l for some integer l, so mn = 2ml = 2(ml), again showing mn is even. 3. Write out quantified versions for each of the propositions in question 2. (a) If x + y < 100 then x < 40 or y < 60. x y [x + y < 100 (x < 40 y < 60) ] (b) The product of two odd numbers is odd. m m [ (m is odd n is odd ) mn is odd ] (c) The converse of (b). m m [ mn is odd (m is odd n is odd )] 4. Write quantified versions for each of the following propositions. (a) Every positive integer is the sum of four squares. n(n > 0 a b c d (n = a 2 + b 2 + c 2 + d 2 )) Page 3
(b) Not every positive integer is the sum of two squares. Write your answer in a form that does not start with. That is, write the answer in a form that does not negate a quantifier. We can start with a symbol and then get rid of it: n(n > 0 a b (n = a 2 + b 2 )) n( (n > 0 a b (n = a 2 + b 2 ))) n(n > 0 a b (n a 2 + b 2 )) (c) Every positive integer which is one more than a multiple of 4 is the sum of two squares. What does one more than a multiple of 4 mean? It means that for some integer k, n = 4k +1. This means there is another existential quantifier involved. We have: n((n > 0 k (n = 4k + 1)) a b (n = a 2 + b 2 )) 5. (a) Express the negation of problem 4c without using the negation symbol. n((n > 0 k (n = 4k + 1)) a b (n = a 2 + b 2 )) n ((n > 0 k (n = 4k + 1)) a b (n = a 2 + b 2 )) n((n > 0 k (n = 4k + 1)) a b (n a 2 + b 2 )) (b) Is the proposition in 5a or 4c true? (One of them is true, one is false, which is the true one? Why?) Certainly either a proposition or its negation is true, so it is just a matter of finding which one. In general, one should be very skeptical of any for all claim, so our default guess should be that 5a is right and 4c is wrong. This is kind of hard because there are no really small examples (1 = 0 2 + 1 2, 5 = 1 2 + 2 2, 9 = 0 2 + 3 2, etc). The smallest is n = 21. We see that n = 4 5 + 1 so n is one more than a multiple of 4. Can we write n = a 2 + b 2 for integer a and b? The demonstration that we can t would be a proof by exhaustion. If a or b is large ( 5) then a 2 + b 2 25 > 21. Looking at squares, Page 4
the possible values of a 2 or b 2 to check are 0, 1, 4, 9, 16. We seek two of these that add to 21. We see that there are no such combinations (at least one of them must be 16 or the sum would be at most 18, but 16 + 9 = 25, 16 + 16 = 32 so no combinations work.) 6. Prove that for all integers n, n 2 + 3n is even. Use a proof by cases. The two cases we should use are n even and n odd. If n is even, then n = 2k for some integer k. We have n 2 +3n = (2k) 2 +3(2k) = 4k 2 +6k = 2(2k 2 +3k) so n is even in this case. If n is odd, then n = 2l + 1 for some integer l. Here, n 2 + 3n = (2l + 1) 2 + 3(2l + 1) = 4l 2 + 4l + 1 + 6l + 3 = 4l 2 + 10l + 4 = 2(2l 2 + 5l + 2), and again n is even. 7. There are 8 different propositions of the form (quantifier of x)(quantifier of y)(quantifier of z)(x 2 + y 2 > z). An example of one of them is x y z (x 2 + y 2 > z). Write out all 8 possibilities and determine (with proof) which is true and which is false. The 8 cases are: x y z (x 2 + y 2 > z) : False, since P (1, 1, 3) is false. (1) x y z (x 2 + y 2 > z) : True, since P (x, y, x 2 + y 2 1) is always true. (2) x y z (x 2 + y 2 > z) : False, since P (x, y, x 2 + y 2 + 1) is always false. (3) x y z (x 2 + y 2 > z) : True, since part b is true. (4) x y z (x 2 + y 2 > z) : False, since P (x, y, x 2 + y 2 + 1) is always false. (5) x y z (x 2 + y 2 > z) : True, since part b is true. (6) x y z (x 2 + y 2 > z) : False, since P (x, y, x 2 + y 2 + 1) is always false. (7) x y z (x 2 + y 2 > z) : True, since part b is true. (8) Some notes on this: for (4), (6) and (8) I am using the fact that a Q(a) a Q(a) Also, (7) is the most extreme of numbers (1), (3), (5), (7). That is, once we know (7) is false, we get the other three to be false since a Q(a) a Q(a). As we mentioned in class, each of (1-8) above could be rearranged in six different ways, slightly altering the meaning (order of quantification counts.) In particular, in (5), the alternate order z x y (x 2 + y 2 > z) makes the statement is true. In this case, if z < 0, we could take x = 0, while if z > 0, then we could use x = z + 1. In this case, x 2 + y 2 = z + 2 z + 1 + y 2 z + 1 > z. Page 5
8. Express the following in terms of propositional functions and quantifiers. (a) The cube of an odd number is odd. n ( n is odd n 3 is odd ). (b) Every odd number is the difference of two cubes. n (n is odd m k (n = m 3 k 3 ) ). (c) Not every even number is the difference of two cubes. Don t leave your answer in the form (quantifier) We start with a negation and them manipulate it from there: n (n is even m k (n = m 3 k 3 ) ) n (n is even m k (n m 3 k 3 ) 9. What are the truth values for the propositions in problem 8? Problem 8 (a) is a standard direct proof: Suppose n is odd. Then n = 2k + 1 for some integer k. Now n 3 = (2k + 1) 3 = 8k 3 + 12k 2 + 6k + 1 = 2(4k 3 + 6k 2 + 3k) + 1 so n 3 is odd. The propositions in 8(b) and 8(c) are both hard. Proposition 8(b) is false, 8(c) is true. I will let you check (if you can) that 3 is not the difference of two cubes (would would show 8(b) false) and 2 is not the difference of two cubes (showing 8(c) is true). 10. If x and y are positive, then x + y > x 2 + y 2. (a) Quantify this statement. x y [(x > 0 y > 0) x + y > x 2 + y 2 ] Page 6
(b) Give a careful proof of this statement. An easy (?) example of forward-backward reasoning. Wrong would be: If x+y > x 2 + y 2 then squaring gives (x+y) 2 > x 2 +y 2 or x 2 +2xy +y 2 > x 2 + y 2. Subtracting gives 2xy > 0, which is true, since x and y are positive. But armed with this, we can read it backward to get a REAL proof: Since x and y are both positive, 2xy > 0. Adding x 2 + y 2 to both sides gives x 2 + 2xy + y 2 > x 2 + y 2, or (x + y) 2 > x 2 + y 2. Since x + y is positive, we may extract a square root to get x + y > x 2 + y 2. (c) Suppose we drop the condition that x and y be positive, but add the absolute value: Show that this proposition is false. x + y > x 2 + y 2. Easiest is an example where y = x, like x = 1, y = 1. Then x + y = 0 but x 2 + y 2 = 2 > 0. (d) What if we are more careful and write x + y > x 2 + y 2. Is this now true? In fact, this is false, because of a pesky subtlety: If x = 0, y = 1, then x + y = 1 and x 2 + y 2 = 1. That is, we get 1 = 1 not 1 > 1. This will always happen x = 0 or y = 0. 11. Consider the statement: The sum of 2 and a rational number is irrational, quantified as x ( x is rational x + 2 is irrational ) (a) How should a direct proof of this statement start and end? That is, what do you assume, what do you try to prove? The start should be Let x be rational. or Suppose that x is rational. That is, we assume the hypothesis. We would try to prove that x + 2 is irrational. That is, we would try to prove the conclusion. (b) How should an indirect proof by contraposition start and end? The contrapositive is the statement If x + 2 is rational then x is irrational. In a contrapositive proof, you tell the reader your proof is a Page 7
contrapositive proof. The start might be something like this: Suppose, by way of contraposition, that x + 2 is rational. The goal of the proof would be to show x is irrational. (c) How should a proof by contradiction start? What should you be trying to show (in general terms)? The proof of p q by contradiction uses the logical equivalence p q (p q) F, where typically F is a proposition of the form r r. In general, you assume the hypothesis is true, the conclusion is false, and try to get some statement to be both true and false. For this problem, the start should be Let x be rational and suppose that x + 2 is also rational. As stated, we want to conclude that something is both true and false. (d) Give a correct proof of the statement. It turns out that the proof by contradiction is easiest. Suppose that x and x + 2 are both rational. Then there are integers m, n, k, l with n 0 and l 0 and x = m n and x + 2 = k l. Subtracting gives 2 = (x + 2) x = k l m n kn ml =, so 2 is rational, contradicting the fact that 2 is irrational. nl 12. Find three sets A, B, C with the properties that A = B = C, A B = A C = B C > 0 but A B C = 0. This is clearly impossible! If A B > 0 then A B C A B > 0. I meant for the problem to be A = B = C, A B = A C = B C > 0 but A B C = 0. The simplest solution is probably A = {1, 2}, B = {1, 3}, C = {2, 3}. In this case, A = B = C = 2, A B = A C = B C = 1 and A B C = 0. 13. Prove that for sets A, B, C, if A B = A C, then B = C. We assume that A B = A C and try to show that B = C. We do this by trying to show both B C and C B. For B C, suppose that x B. We now proceed by cases. If x A, then x / A B so x / A C. Since x A, the only way for x / A C to be true is if x C. Page 8
If x / A then x A B so x A C. Since x / A, we get x C again. That is, in both cases, x B x C, as desired. This is one of those cases where we can appeal to symmetry to say that C B. That is, we could copy the proof above, but start with x C, and try to show that x B (with exactly the same two cases.) 14. What can be said about sets A and B in each of the following situations? In each case, prove your answer. (a) A B = A? A tricky solution would be to use problem 1 above and note that A = A. This means we have A B = A and by problem 1, we must have B =. Alternatively, suppose that x B. If x A then x / A B but x A, meaning that A B A. If x / A then x A B but x / A and again A B A. We have looked at both cases x A and x / A and each contradicted the hypothesis. This means that x B must be wrong, but if there is no x in B then B =. (b) A B =? Again, there is a tricky solution: A A = so we are told A B = A A, and by problem 1, this means B = A. Alternatively, suppose that x A. If x / B then x A B. But we are told A B = so this can t happen. That is, if x A, then x B as well. By symmetry, if x B then x A, meaning that A = B. Page 9