Formal Methods Name: Key Midterm 2, Spring, 2007 Show Your Work! Point values are in square brackets. There are 35 points possible. Some facts about sets are on the last page.. Determine whether each of the following statements is true or false. [4 points] (a) { } (Recall that means is a proper subset of.) (b) (c) { } (d) {{ }} {, { }} (a) True. The empty set is an (ordinary) subset of every set, and since { } has one element and has no elements, is a proper subset of { }. (b) False. Since =, is not a proper subset of. (c) True. { } has one element,. (d) True. { } {, { }}. So every element of {{ }} is an element of {, { }}, and {{ }} is an (ordinary) subset of {, { }}. Furthermore, {, { }}, but {{ }}. So {{ }} is a proper subset of {, { }}. 2. If A = {, { }}, find P(A), the power set of A. [2] Observe that A has the following subsets: One 0-element subset:. Two -element subsets: { } and {{ }}. One 2-element subset: A. So P(A) = {, { }, {{ }}, {, { }} }.
3. Suppose that A is a set. Prove that A A =. You should only use basic logic and the definition of relative difference. [3] Proof. We show that for any element x, x A A leads to a contradiction. So suppose that x A A. Then x A A (x A) (x A) (Definition of A B) (x A) (x A) (x A (x A)) F (P P F) So the assumption that x A A must be false, and A A must be empty. 4. The symmetric difference of two sets A and B is defined to be (a) Draw a Venn diagram of A B. [2] See me if you need help with this. A B = (A B) (B A). 2
(b) If A and B are subsets of some universal set U, prove that You can use any of the facts on page 8. [4] Proof. We have A B = (A B) (A B). A B = (A B) (B A) = (A B ) (B A ) (Fact 4) = [(A B ) B] [(A B ) A ] (Fact 0) = [(A B) (B B )] [(A A ) (A B )] (Facts 6 and 0) = [(A B) U] [U (A B )] (A A = U, see below) = (A B) (A B ) (A U = A, see below) = (A B) (A B) (Fact 3) = (A B) (A B) (Fact 4) So to complete the proof, we only need to see that if A is a subset of some universal set U, then A A = U, and A U = A. So suppose first that x A A. Then x A A (x A) (x A ) (Definition of union) (x A) (x A) (Definition of complement) T (P P T) x U (x U is always true) Finally suppose that x A U. Then x A U (x A) (x U) (Definition of intersection) (x A) T (x U is always true) (x A) (P T P ) 3
5. We saw in class that A B and B C, does not imply A C. However it is possible for A B, B C, and A C to all be true. Give an example of three sets A, B, and C for which all three statements are true. [2] There are many possible examples here. Perhaps the easiest way to get all three to be true is to choose sets A and B such that A B, and then define C = {A, B}. For example, we might define A = and B = { }. Then A B. Furthermore, if we define we see that both A C and B C. 6. For each real number λ > 0, define If Λ is the set of positive real numbers, find (a) λ Λ A λ (b) λ Λ A λ [4] C = {, { }}, A λ = ( λ, λ) = {y R : λ < y < λ}. (a) λ Λ A λ = R. If x is any real real number, then x + is a positive real number such that ( x + ) < x < x +. So if λ = x +, x A λ, and hence x λ Λ A λ. So R λ Λ A λ. But each A λ R. So λ Λ A λ R, and hence λ Λ A λ = R, (b) λ Λ A λ = {0}. Since each λ is a positive real number, λ < 0 < λ, for all λ, and hence 0 λ Λ A λ. But if x is any nonzero real number, then either x > x /2 or x < x /2. So if λ = x /2, then x A λ. So no nonzero real number belongs to λ Λ A λ, and hence λ Λ A λ = {0}. 4
7. Sally is working on a proof that contains the following steps. 2 n+ = 2 2 n 2 (n + ) 2 ( ) = 2n 2 + 4n + 2 = n 2 + 4n + (2 + n 2 ) ( ) n 2 + 4n + (2 + 2) = n 2 + 4n + 4 = (n + 2) 2 = [(n + ) + ] 2 If Sally s work is correct, which, if any, of the following statements do we know to be true? [3] (a) 2 n+ = [(n + ) + ] 2 (b) 2 n+ [(n + ) + ] 2 (c) 2 n+ [(n + ) + ] 2 Only (c) must be true. Because of the inequalities ( ) and ( ), we see that both (a) and (b) could be false. 5
8. Bob wants to use the extended principle of mathematical induction to prove that + + + + > n 2 3 n for all integers n 2. (a) What are P 2, P 3, and P 4? [] (b) What should Bob prove for his base case? [2] (c) What should Bob s induction hypothesis be? [2] (d) What should the conclusion of Bob s induction step be? [2] Note that you don t need to prove anything in this problem. (a) The statements Bob wants to prove all have the form P n : + + + + > n 2 3 n In particular, for n = 2, 3, and 4, the statements are P 2 : P 3 : P 4 : + 2 > 2 + + > 3 2 3 + + + > 4 2 3 4 (b) Bob is trying to prove the result is true for n 2. So for his base case, he should prove P 2. That is, he needs to prove that + > 2. 2 (c) His induction hypothesis should be something like this: Suppose n is an integer 2 such that + + + + > n. 2 3 n (d) The conclusion of his induction step should be that P n+ is true. So he should conclude that + + + + > n +. 2 n n + 6
9. Use some form of mathematical induction to prove that for all positive integers n. [4] 2 + 4 + 8 + + 2 n = 2 n+ 2, Proof. Since we want to prove the result is true for all positive integers, we should either use the basic PMI or the strong PMI. So let s try the basic PMI. For our base case we need to see that 2 + 4 + 8 + + 2 n = 2 n+ 2, when n =. But when n =, the left-hand side is just 2, and the right-hand side is 2 + 2 = 2. So if n =, 2 + 4 + 8 + + 2 n = 2 n+ 2. Suppose then that n is a positive integer such that We need to show that Starting with the left-hand side, we have 2 + 4 + 8 + + 2 n = 2 n+ 2. 2 + 4 + 8 + + 2 n + 2 n+ = 2 (n+)+ 2. 2 + 4 + + 2 n + 2 n+ = (2 + 4 + + 2 n ) + 2 n+ = 2 n+ 2 + 2 n+ (by the IH) = 2 2 n+ 2 = 2 (n+)+ 2. So by the (basic) PMI, for all positive integers n. 2 + 4 + 8 + + 2 n = 2 n+ 2, 7
Some Facts About Sets and Set Operations Suppose A, B, and C are sets.. A and A A. 2. If A B, and B C, then A C. 3. A = and A = A. 4. A B A. 5. A A B. 6. A B = B A and A B = B A. 7. A (B C) = (A B) C and A (B C) = (A B) C. 8. A A = A = A A. 9. If A B, then A C B C and A C B C. 0. A (B C) = (A B) (A C) and A (B C) = (A B) (A C). If A and B are also subsets of some universal set U, then. (A B) = A B. 2. (A ) = A. 3. (A B) = A B. 4. A B = A B. 5. A B iff B A. 8