Professional Documents
Culture Documents
Discussion 3 Fall 2019 Solutions PDF
Discussion 3 Fall 2019 Solutions PDF
Fall 2019
Discussion 3 Notes
1 Definitions
• Direct Proofs:
• Proof by Cases:
• Proof by Contraposition:
• Proof by Contradiction:
• Without Loss of Generality (WLOG):
• Set:
• Set Operations:
- Union S ∪ T
- Intersection S ∩ T
- Complement S
- Minus S − T
• Subset:
• Proper Subset:
• Disjoint:
• Power Set:
• Cardinality:
• Cartesian Product:
Solution:
• Direct Proof: prove that p → q by showing that if p is true, then q must also be
true. (so that the combination p true and q false never occurs.)
1
• Proof by Cases: Prove by considering all possibilities, or all categories of possi-
bilities (ie. cases), and showing that in all those cases, p is true.
• Without loss of generality (WLOG): used when the same argument can be
made for multiple cases, or there is some symmetry between variables.
• Set Operations:
• Disjoint: The sets A and B are disjoint if and only if they do not share any
elements
• Power Set: The set of all subsets of a set. P (S) denotes the power set of S.
• Cartesian Product: A × B is the set of all pairs of elements from A and B, i.e.
(a, b) where a ∈ A and b ∈ B.
2
1. Not in Book 1
Using ONLY Natural Deduction, prove
∃xP (x), ∀x[P (x) → Q(x)]
∴ ∃xQ(x)
Solution:
2. Excercise 1.7.19
Show that if n is an integer and n3 + 5 is odd, then n is even using
a) a proof by contraposition.
b) a proof by contradiction.
Solution:
n3 + 5 = (2k + 1)3 + 5
= (8k 3 + 12k 2 + 6k + 1) + 5
= 8k 3 + 12k 2 + 6k + 6
= 2(4k 3 + 6k 2 + 3k + 3)
3
b) The contradiction of the given statement can be written as “n3 + 5 is odd, and n is
odd.” Proof: Let n3 + 5 be odd. Now assume n is odd. Since n is odd, it can be
written as 2k + 1, where k is some integer. So
n3 + 5 = (2k + 1)3 + 5
= (8k 3 + 12k 2 + 6k + 1) + 5
= 8k 3 + 12k 2 + 6k + 6
= 2(4k 3 + 6k 2 + 3k + 3)
3. Exercise 2.1.6
For each of these pairs of sets, determine whether the first is a subset of the second, the
second is a subset of the first, or neither is a subset of the other.
a) the set of people who speak English, the set of people who speak English with an Aus-
tralian accent
c) the set of students studying discrete mathematics, the set of students studying data
structures
Solution:
a) The second condition imposes an extra requirement, so clearly the second set is a
subset of the first, but not vice versa.
b) Again the second condition imposes an extra requirement, so the second set is a subset
of the first, but not vice versa.
c) There could well be students studying discrete mathematics but not data structures
(for example, pure math majors) and students studying data structures but not dis-
crete mathematics (e.g. someone who is taking EECS 280 but not EECS 203), so
neither set is a subset of the other.
4
4. Exercise 2.1.8
Suppose that A = {2, 4, 6}, B = {2, 6}, C = {4, 6}, and D = {4, 6, 8}. Determine which of
these sets are subsets of which other of these sets.
Solution: Each of the sets is a subset of itself. Aside from that, the only relations are
B ⊆ A, C ⊆ A, and C ⊆ D.
5. Exercise 2.1.24
Can you conclude that A = B if A and B are two sets with the same power set?
Solution: The union of all the sets in the power set of a set X must be exactly X . In
other words, we can recover X from its power set, uniquely. Therefore the answer is yes.
6. Exercise 2.1.26
Determine whether each of these sets is the power set of a set, where a and b are distinct
elements.
a) ∅
b) {∅, {a}}
Solution:
a) The power set of every set includes at least the empty set, so the power set cannot
be empty. Thus ∅ is not the power set of any set.
c) We know that the power set a set of size n has 2n elements, but this set has three ele-
ments. Since 3 is not a power of 2, this set cannot be the power set of any set. Set car-
dinality aside, the set {∅, a} may come to mind, but P ({∅, a}) = {∅, {∅}, {a}, {∅, a}}.
5
7. Exercise 2.1.39
How many different elements does An have when A has m elements and n is a positive
integer?
8. Exercise 2.2.10a
a) Show that A − ∅ = A.
Solution:
A − ∅ = {x|x ∈ A ∧ x ∈
/ ∅}
= {x|x ∈ A ∧ T }
= {x|x ∈ A}
=A
9. Exercise 2.2.14
Find the sets A and B if A − B = {1, 5, 7, 8}, B − A = {2, 10}, and A ∩ B = {3, 6, 9}.
Solution: This can be done easily by drawing the Venn diagram. This is a good way to
think about.
6
Here’s a formal solution:
We need to find A and B such that A − B = {1, 5, 7, 8}, B − A = {2, 10} and A ∩ B =
{3, 6, 9}.
Since A ∩ B = {3, 6, 9}, this means that 3, 6, 9 ∈ A and 3, 6, 9 ∈ B.
A − B = {1, 5, 7, 8} means that the elements 1, 5, 7, 8 ∈ A but 1, 5, 7, 8 6∈ B.
B − A = {2, 10} means that the elements 2, 10 ∈ B but 2, 10 6∈ A.
Thus, A = {1, 3, 5, 6, 7, 8, 9} and B = {2, 3, 6, 9, 10}.
Solution:
b) Using set identities:
(A ∩ B) ∪ (A ∩ B̄) = ((A ∩ B) ∪ A) ∩ ((A ∩ B) ∪ B̄) Distributive Law
= (A ∪ A) ∩ (B ∪ A) ∩ (A ∪ B̄) ∩ (B ∪ B̄) Distributive Law
= A ∩ (B ∪ A) ∩ (A ∪ B̄) ∩ (B ∪ B̄) Idempotent Law
= A ∩ (B ∪ A) ∩ (A ∪ B̄) ∩ U Complement Law
= A ∩ (A ∪ (B ∩ B̄)) ∩ U Distributive Law
= A ∩ (A ∪ ∅) ∩ U Complement Law
=A∩A∩U Identity Law
=A∩U Idempotent Law
=A Identity Law
7
11. Exercise 2.2.26
Let A, B, and C be sets. Show that (A − B) − C = (A − C) − (B − C) by showing that
either side is a subset of the other.
Solution: We will show that these two sets are equal by showing that each is a subset
of the other.
LHS ⊆ RHS:
Suppose x ∈ (A − B) − C
By the definition of set difference, we have x ∈ (A − B) but x ∈
/ C.
Applying the definition of set difference again, we have x ∈ A but x ∈
/ B and x ∈/ C.
Thus as x ∈ A and x ∈ / C, then we have x ∈ (A − C).
We also know that x ∈ / B, as B − C is a subset of B, then we also have that x ∈
/ B − C.
Therefore we can conclude that x ∈ (A − C) − (B − C) and that (A − B) − C ⊆
(A − C) − (B − C).
RHS ⊆ LHS:
Suppose that x ∈ (A − C) − (B − C).
Thus by the definition of set difference, we have x ∈ (A − C) and x ∈
/ (B − C).
Thus we know that x ∈ A and x ∈ / C.
We also know that x ∈ / B, because if x ∈ B, then x ∈ (B − C) which does not satisfy
our given that x ∈
/ (B − C).
We now have x ∈ A and x ∈ / B and x ∈/ C.
By the definition of set difference, we have x ∈ (A − B) and x ∈/ C which then leads to
x ∈ (A − B) − C. Thus (A − C) − (B − C) ⊆ (A − B) − C.
Therefore, as we have shown both sides are subsets of each other, we can conclude
that (A − B) − C = (A − C) − (B − C)
a) A ∪ C = B ∪ C
b) A ∩ C = B ∩ C
c) A ∪ C = B ∪ C and A ∩ C = B ∩ C
Solution:
8
a) No. Counterexample: if C = U , then A ∪ C = B ∪ C = U for any two sets A and B.
Suppose that x ∈ A.
There are two cases, x ∈ C and x ∈
/ C.
• Case 1: x ∈ C
If x ∈ C, then x ∈ A ∩ C.
As A ∩ C = B ∩ C, then we know that x ∈ B ∩ C.
Thus by ∧-elim we know that x ∈ B.
So, in case 1, x ∈ A → x ∈ B, i.e., A ⊆ B.
• Case 2: x ∈ /C
We are given that A ∪ C = B ∪ C, so if x ∈ A ∪ B then x ∈ B ∪ C.
Because x ∈ / C, then we must have x ∈ B.
So, in case 1, x ∈ A → x ∈ B, i.e., A ⊆ B.
In both cases we have shown the same subset relation; thus we can conclude A ⊆ B.