Math 3200 Final Exam Practice Problem Solutions

advertisement
Math 3200 Final Exam Practice Problem Solutions
1. Suppose |A| = m and |B| = n for m, n ∈ N.
(a) What is |P(A × B)|?
Answer: Since |A × B| = mn and since |P(C)| = 2|C| for any finite set C, we know that
|P(A × B)| = 2mn .
(b) What is |P(A × P(B))|?
Answer: Since |B| = n, we know that |P(B)| = 2n . In turn, this means that |A × P(B)| = m · 2n ,
and hence that
n
|P(A × P(B))| = 2m·2 .
2. For each of the following, determine whether the statement is true or false. Explain your reasoning.
(a) (R × Z) ∩ (Z × R) = Z × Z
Answer: This is true.
To see this, suppose (a, b) ∈ (R × Z) ∩ (Z × R). Then (a, b) ∈ R × Z, so b is an integer. Likewise,
(a, b) ∈ Z × R, so a is an integer. Therefore, (a, b) ∈ Z × Z. Hence, (R × Z) ∩ (Z × R) ⊆ Z × Z.
On the other hand, if (a, b) ∈ Z×Z, then a ∈ R, so (a, b) ∈ R×Z; likewise, b ∈ R, so (a, b) ∈ Z×R.
Therefore, (a, b) ∈ (R × Z) ∩ (Z × R) and so Z × Z ⊆ (R × Z) ∩ (Z × R).
Having proved containment both ways, it follows that (R × Z) ∩ (Z × R) = Z × Z.
(b) (R × Z) ∪ (Z × R) = R × R
Answer: This is false. To see this, notice that (π, π) ∈ R × R, but it’s definitely not the case
that (π, π) ∈ R × Z, nor that (π, π) ∈ Z × R, so we see that (π, π) ∈
/ (R × Z) ∪ (Z × R).
3. Determine the negations of the following statements.
(a) “If 3 is prime, then 3 is even.”
Answer: The negation is “3 is prime and 3 is odd”.
(b) “If r is a nonzero rational number, then tan(r) is irrational.”
Answer: The negation is “r is a nonzero rational number and tan(r) is rational.”
4. What is the contrapositive of the statement “If you can’t beat them, join them”?
Answer: The contrapositive is “If you don’t join them, then you can beat them.”
5. Let S = {0, 1, 2, 3, 4, 5} and let Q(x, y) be the statement that x is divisible by y. Translate the following
into English and then determine whether it is true or false:
∃y ∈ S, ∀x ∈ S, Q(x, y).
Answer: In words, this says that there’s some y ∈ S so that y divides every element of S. This is
clearly true, since y = 1 divides every element of S.
6. Give the truth tables for the following:
(a) ∼ (P ⇒ Q)
Answer:
P
T
T
F
F
Q
T
F
T
F
P ⇒Q
T
F
T
T
1
∼ (P ⇒ Q)
F
T
F
F
(b) P ∨ (Q ∧ (∼ R))
Answer:
P
T
T
T
T
F
F
F
F
Q
T
T
F
F
T
T
F
F
(c) (P ∧ (∼ P )) ⇒ Q
Answer:
P
T
T
F
F
Q
T
F
T
F
∼R
F
T
F
T
F
T
F
T
R
T
F
T
F
T
F
T
F
∼P
F
F
T
T
Q ∧ (∼ R)
F
T
F
F
F
T
F
F
P ∧ (∼ P )
F
F
F
F
P ∨ (Q ∧ (∼ R))
T
T
T
T
F
T
F
F
(P ∧ (∼ P )) ⇒ Q
T
T
T
T
7. (a) Is P ∧ Q logically equivalent to ∼ ((∼ P ) ∨ (∼ Q))?
Answer: Yes. We can see this by constructing the truth tables for each and seeing that both
statements have the same combination of truth values.
P
T
T
F
F
Q
T
F
T
F
P ∧Q
T
F
F
F
∼P
F
F
T
T
∼Q
F
T
F
T
(∼ P ) ∨ (∼ Q)
F
T
T
T
∼ ((∼ P ) ∨ (∼ Q))
T
F
F
F
(b) Is P ⇒ Q logically equivalent to (P ∧ (∼ Q)) ⇒ (Q ∧ (∼ Q))?
Answer: Yes. Again, we just need to see that they always have the same truth value:
P
T
T
F
F
Q
T
F
T
F
P ⇒Q
T
F
T
T
∼Q
F
T
F
T
P ∧ (∼ Q)
F
T
F
F
Q ∧ (∼ Q)
F
F
F
F
(P ∧ (∼ Q)) ⇒ (Q ∧ (∼ Q))
T
F
T
T
8. √
Prove
√ or give a counterexample for each of the following statements (you can use the fact that
2, 3, π, e, etc. are irrational without having to give a proof).
(a) If x is a nonzero rational number and y is irrational, then xy is irrational.
Proof. First of all, notice that the assumption that x 6= 0 is essential: if x = 0, then xy = 0 is
rational regardless of what y is.
Now, I prove the above statement by contradiction. Suppose there were a nonzero rational number
x and an irrational number y so that xy ∈ Q. Since xy ∈ Q, I know that xy = ab with a, b ∈ Z
with b 6= 0. Since x 6= 0, I can multiply both sides of the equation
xy =
2
a
b
by
1
x
to get
y=
1 a
· .
x b
Now, since x is nonzero and rational, I know that x = pq for p, q ∈ Z with p, q 6= 0. Then
and so
1 a
qa
y= · =
,
x b
pb
1
x
= pq ,
which is rational since qa, pb ∈ Z and pb 6= 0. This contradicts the fact that y is irrational. From
the contradiction, then, I conclude that xy must be irrational.
(b) If x and y are irrational, then xy is irrational.
√
Answer: This is not true. Let x = y = 2. Then
xy =
√
2·
√
2=
√
2
2 = 2.
9. Prove that if x ∈ Z is odd, then x3 is odd (it may be helpful to recall that (a+b)3 = a3 +3a2 b+3ab2 +b3
for any a and b).
Proof. Suppose x ∈ Z is odd. Then x = 2n + 1 for some n ∈ Z. Therefore,
x3 = (2n + 1)3 = 8n3 + 12n2 + 6n + 1 = 2(4n3 + 6n2 + 3n) + 1
is odd since 4n3 + 6n2 + 3n ∈ Z.
10. Prove that if x ∈ Z with x3 − 1 even, then x is odd.
Proof. I will prove the contrapositive, which is the statement that “if x is even, then x3 − 1 is odd”.
So assume x ∈ Z is even. Then x = 2n for some n ∈ Z. Hence,
x3 − 1 = (2n)3 − 1 = 8n3 − 1 = 8n3 − 2 + 1 = 2(4n3 − 1) + 1
is odd since 4n3 − 1 ∈ Z.
11. Prove that if n ∈ Z, then 4 6 | (n2 − 3).
Proof. Assume n ∈ Z. Then n is congruent to 0, 1, 2, or 3 modulo 4. But that means n2 is congruent
to 02 ≡ 0 (mod 4), 11 ≡ 1 (mod 4), 22 ≡ 0 (mod 4), or 32 ≡ 1 (mod 4). Therefore, n2 is congruent
to either 0 or 1 modulo 4, so n2 − 3 is congruent to either 1 or 2 modulo 4. Either way, n2 − 3 is not
divisible by 4.
12. Let A, B, and C be sets. Prove that (A ∩ B) − C = (A − C) ∩ (B − C).
Proof. (⊆) Assume x ∈ (A ∩ B) − C. In other words, x ∈ A ∩ B and x ∈
/ C. But then x ∈ A, x ∈ B,
and x ∈
/ C, so x ∈ A − C and x ∈ B − C. Hence, x ∈ (A − C) ∩ (B − C). Since x was arbitrary, we
see that (A ∩ B) − C ⊆ (A − C) ∩ (B − C).
(⊇) On the other hand, assume y ∈ (A − C) ∩ (B − C). Then y ∈ A − C and y ∈ B − C; the first
means that y ∈ A and y ∈
/ C, while the second means that y ∈ B and y ∈
/ C. Therefore, y ∈ A ∩ B
and y ∈
/ C, so y ∈ (A ∩ B) − C. Since y was arbitrary, it follows that (A ∩ B) − C ⊇ (A − C) ∩ (B − C).
Having proved containment both ways, we conclude that (A∩B)−C = (A−C)∩(B−C), as desired.
3
13. Suppose A and B are sets so that A − B = ∅. Does this imply that B 6= ∅? Prove or give a
counterexample.
Answer: No. If A = ∅ and B = ∅, then A − B = ∅ even though B = ∅.
14. Either prove the following statement or give a counterexample: the product of any two consecutive
integers is even.
Proof. Consider two consecutive integers, say n and n + 1. If n is even, then n = 2m and hence
n(n + 1) = 2m(n + 1) = 2(m(n + 1)) is even since m(n + 1) ∈ Z. On the other hand, if n is odd, then
n = 2m + 1 for some m ∈ Z and hence n + 1 = 2m + 2. Therefore, n(n + 1) = n(2m + 2) = 2(n(m + 1))
is even since n(m + 1) ∈ Z. Either way, we see that the product of our two consecutive integers is
even.
15. Either prove the following statement or give a counterexample: every odd integer is the sum of three
odd integers.
Proof. Suppose n ∈ Z is odd, meaning that n = 2m + 1 for some m ∈ Z. Then n − 2 = 2m − 1 =
2(m − 1) + 1 is odd. Since 1 is also odd, we see that
n = 2m + 1 = 2m − 1 + 1 + 1
is the sum of 3 odd integers.
16. Recall that for any n ∈ N, the factorial of n is n! = 1 · 2 · 3 · · · · · (n − 1) · n. For example, 3! = 1 · 2 · 3 = 6
and 4! = 1 · 2 · 3 · 4 = 24.
Prove that
2
n
1
1
+ + ... +
=1−
2! 3!
(n + 1)!
(n + 1)!
P∞
i
for all n ∈ N. (Notice: this implies that i=1 (i+1)! = 1.)
Proof. By induction. For each n ∈ N, let P (n) be the assertion that the above equality holds.
1
1
= 1 − (1+1)!
, which is true since both sides are equal
Base Case: The statement P (1) says that (1+1)!
1
to 2 .
Inductive Step: Let k ∈ N and assume P (k) is true, meaning that
1
2
k
1
+ + ... +
=1−
.
2! 3!
(k + 1)!
(k + 1)!
Now, I want to prove P (k + 1), so consider the quantity
1
2
k
k+1
+ + ... +
+
.
2! 3!
(k + 1)! (k + 2)!
Since P (k) is true, the first k terms in the above are equal to 1 −
is equal to
1−
1
(k+1)! ,
so we see that the above
1
k+1
k+2
k+1
−k − 2 + k + 1
1
+
=1−
+
=1+
=1−
(k + 1)! (k + 2)!
(k + 2)! (k + 2)!
(k + 2)!
(k + 2)!
after finding common denominators and simplifying.
Putting it all together, we see that
1
2
k
k+1
1
+ + ... +
+
=1−
,
2! 3!
(k + 1)! (k + 2)!
(k + 2)!
which is exactly what P (k + 1) claims.
4
Having proved both the base case and the inductive step, the Principal of Mathematical Induction
implies that P (n) is true for all n ∈ N, as desired.
17. Use induction to prove that for all integers n ≥ 0, the number n2 + 5n − 4 is even.
Proof. For integers n ≥ 0, let P (n) be the statement that n2 + 5n − 4 is even. The goal is to prove
P (n) for all n ≥ 0.
Base Case: Since we’re concerned with integers greater than or equal to zero, the base case is when
n = 0. P (0) says that 02 + 5(0) − 4 is even, which is clearly true.
Inductive Step: Let k ∈ Z with k ≥ 0 and assume P (k) is true, meaning that k 2 + 5k − 4 is even. In
other words, k 2 + 5k − 4 = 2m for some m ∈ Z. Now, the goal is to prove that P (k + 1) is true.
To that end, notice that
(k + 1)2 + 5(k + 1) − 4 = k 2 + 2k + 1 + 5k + 5 − 4 = (k 2 + 5k − 4) + 2k + 6.
Now, since k 2 + 5k − 4 = 2m the above is equal to
2m + 2k + 6 = 2(m + k + 3),
which is clearly even since m + k + 3 ∈ Z. Therefore, we’ve proved that (k + 1)2 + 5(k + 1) − 4 is
even, which is what P (k + 1) says.
Having proved the base case and the inductive step, the Principle of Mathematical Induction implies
that P (n) is true for all integers n ≥ 0, as desired.
18. Suppose R is an equivalence relation on an infinite set S. Does R necessarily have infinitely many
equivalence classes? Either prove that it does or find a counterexample.
Answer: No. Let R be the equivalence relation on Z given by xRy if x ≡ y (mod 2). You can
easily check that R is an equivalence relation, but it only has two equivalence classes, namely the odd
numbers and the even numbers.
19. Give an example of a relation R on a set S so that R is reflexive but not transitive.
Answer: Let S = {a, b, c} and define R to be the relation
R = {(a, a), (a, b), (b, c), (b, b), (c, c)}.
Then R is reflexive since x R x for all x ∈ S, but R is not transitive since we have a R b and b R c, but
aR
6 c.
20. Define the function f : Z × Z → Z by f (m, n) = 3n − 4m.
(a) Is f injective?
Answer: No. Notice that f (3, 4) = 0 = f (6, 8).
(b) Is f surjective?
Answer: Yes. To see this, let x ∈ Z. Then
f (−x, −x) = 3(−x) − 4(−x) = −3x + 4x = x,
so x is in the range of f . Since the choice of x was arbitrary, we see that f is surjective.
21. Consider Z6 = {[0], [1], [2], [3], [4], [5]}, the set of equivalence classes of integers modulo 6. Define
g : Z6 → Z6 by g([a]) = [a2 ]. Let A = {[0], [2], [4]} and let B = {[0], [1], [2]}.
5
(a) What is g(A)?
Answer: By definition, since A = {[0], [2], [4]},
g(A) = {g([0]), g([2]), g([4])} = {[0], [4], [4]} = {[0], [4]}.
(b) What is g −1 (B)?
Answer: By definition, g −1 (B) is the set of all elements of Z6 whose squares are in the set B.
We’ve already seen that
g([0]) = 0, g([2]) = [4], g([4]) = [4];
now we just check that
g([1]) = [1],
g([3]) = [3],
g([5]) = [1].
Therefore, the only elements of Z6 that get sent to B are [0], [1], and [5], so
g −1 (B) = {[0], [1], [5]}.
22. Recall (from Exam 3) the function h : Z → Z given by
(
h(a) =
a
2
3a + 1
if a is even
if a is odd
Is h injective? Prove or give a counterexample.
Answer: No, h is not injective since h(8) = 4 = h(1), but obviously 1 6= 8.
23. Suppose f : A → B and g : B → C so that g ◦ f is surjective. For each of the following statements,
either prove or give a counterexample.
(a) g is surjective.
Proof. Let z ∈ C. Then since g ◦ f is surjective, there exists x ∈ A so that (g ◦ f )(x) = z. But
then g(f (x)) = z, so z is in the range of g. Since z was arbitrary, we see that every element of C
is in the range of g, so g is surjective.
(b) f is surjective.
Answer: This is not true. Consider A = C = {1} and B = {1, 2}, where f : A → B is given by
f (1) = 1 and g : B → C is given by g(1) = 1 and g(2) = 1. Then
(g ◦ f )(1) = g(f (1)) = g(1) = 1;
since 1 is the only element of C, we see that g ◦ f is surjective. However, f is clearly not surjective
since 2 ∈ B is not in the range of f .
(c) g is injective.
Answer: This isn’t true, either. In fact, the same example given in part (b) provides a counterexample.
24. Suppose A and B are sets so that there exists a surjective function f : A → B. If B is uncountable,
what can we say about the cardinality of A?
Answer: A must also be uncountable. We can prove this by contradiction: assume A is not uncountable. Then A is either finite or countable; either way, there exists a surjective map g : N → A. But
then since the composition of surjective maps is surjective, we have that f ◦ g : N → B is surjective,
contradicting the fact that B is uncountable.
6
25. Prove or give a counterexample: If S is an uncountable set, then |S| = |R|.
Answer: This is not true. We know that |P(A)| > |A| for any set A. In particular, if I let S = P(R),
then |S| > |R|, so S is an uncountable set with a different cardinality than R.
26. Prove that {0, 1} × N is countable.
Proof. This is very similar to the proof that Z is countable. As usual, the goal is to find a bijective
function f : N → {0, 1} × N. There are of course many such functions, but here’s one: define f by
(
(n/2, 0)
if n is even
f (n) =
((n + 1)/2, 1) if n is odd
(If you don’t like piecewise functions, you can also write f (n) =
1−(−1)n +2n 1−(−1)n
,
4
2
, but that seems
more confusing than helpful.)
To see that f is injective, suppose m, n ∈ N so that f (m) = f (n). Then, in particular, f (m) = (a1 , b1 )
and f (n) = (a2 , b2 ) where a1 , a2 ∈ N and b1 , b2 ∈ {0, 1}. Since f (m) = f (n), we know that b1 = b2 .
Case I: If b1 = b2 = 0, then m and n must both have been even, so a1 = m/2 and a2 = n/2. But
since a1 = a2 , this means that m = n.
Case II: If b1 = b2 = 1, then m and n must both have been odd, so a1 = (m−1)/2 and a2 = (n+1)/2.
Again, since a1 = a2 , this means that m = n.
Hence, m = n no matter what, so f is injective.
To see that f is surjective, let (a, b) ∈ N × {0, 1}. If b = 0, then
f (2a) = (2a/2, 0) = (a, 0) = (a, b).
If b = 1, then
f (2a − 1) = ((2a − 1 + 1)/2, 1) = (a, 1) = (a, b).
Hence, (a, b) is in the range of f and f is surjective.
Since f is injective and surjective, it’s bijective, so |N| = |N × {0, 1}|.
Challenge Problem: We know that the set of all subsets of N is uncountable (and, in fact, has the same
cardinality as R). On the other hand, we’ve seen that the set of all two-element subsets of N is
countable. So here’s something in the middle: let F be th set of all finite subsets of N. Is F countable
or uncountable? Justify your answer.
Answer: F is countable. There are many ways to prove this; I’ll give two.
First, notice that it makes sense to talk about the sum of the elements of a finite subset of N (whereas
it definitely does not make sense to talk about the sum of the elements of an infinite subset of N).
Therefore, I can define An ⊆ F to consist of those sets whose elements sum to n. For example,
A0 = ∅,
A1 = {{1}},
A4 = {{4}, {1, 3}},
A2 = {{2}},
A3 = {{3}, {1, 2}},
A5 = {{5}, {1, 4}, {2, 3}},
etc.
Now, each An contains only finitely many sets, so we can form a list which puts the single element of
A1 first, then the single element of A2 , then the two elements of A3 , etc.:
∅, {1}, {2}, {3}, {1, 2}, {4}, {1, 3}, {5}, {1, 4}, {2, 3}, {6}, {1, 5}, {2, 4}, {1, 2, 3}, . . .
7
This then defines a function f : N → F , where f (n) is the nth element on the above list. Since each
element of F appears on the list exactly once, this function is bijective, so we see that |N| = |F |.
Here’s a second proof: Recall that every element of N except for has a unique prime factorization,
meaning that we can write each n ∈ N as
n = 2a1 · 3a2 · 5a3 · · ·
where only finitely many of the ai are nonzero. Notice, in particular, that all of the ai are zero when
n = 1, but otherwise at least one of the ai is nonzero.
Now, define f : N → F by
f (n) = {nonzero ai from the prime factorization of n}.
So f (1) = ∅, f (2) = {1}, f (3) = {1}, f (4) = {2}, f (12) = {1, 2}, f (63,000,000) = {1, 2, 6}, etc. The
function f is clearly not injective, but it is surjective: if {a1 , a2 , . . . , an } is a finite subset of N, then
f (2a1 · 3a2 · · · pann ) = {a1 , a2 , . . . , an }
(here pn is the nth prime number, which of course I can only figure out once I know what n is). Hence
{a1 , a2 , . . . , an } is in the range of f , so f is surjective.
Since f : N → F is surjective and F is clearly infinite, it follows that |F | = |N|.
8
Download