Homework 1
2/8/2017
SOLUTIONS
In-class Exercise 1.
(a) Graph the following sets
(i) C = {x ∈ R | x in Z}
Answer:
0
R
(ii) D = {(x, y) | x, y in R, x, y ≥ −2}.
Answer:
x = −2 y
x
y = −2
(iii) C × C
Answer:
y
x
1
2
(iv) (C × C) ∩ D
Answer:
x = −2 y
x
y = −2
(v) (C × C) ∪ D
Answer:
x = −2 y
x
y = −2
3
(vi) (C × C) ∩ D, where U = R2 .
Answer: Since
and D looks like
x = −2 y
(C × C) looks like
y
x
x
y = −2
we have (C × C) ∩ D looks like
x = −2 y
x
y = −2
(vii) ((C × C) ∪ D), where U = R2 .
Answer: From the picture of (C × C) ∪ D in part (v), we can see that the picture of
((C × C) ∪ D) is the same as the one in part (vi).
(b) Pick a set A and two universal sets U1 and U2 that illustrate that Ā depends on the choice of
universal set.
Answer: Let A = {1}, U1 = {1} and U2 = {1, 2, 3}. Then in U1 , A = ∅, and in U2 , A = {2, 3}.
4
(c) Let A and B be sets contained in a universal set U . Decide whether the following identities are
true or false. If false, give an example where the identity doesn’t hold. If true, explain why
(in complete sentences).
(i) A ∩ B = B ∩ A
Answer: TRUE. The set A ∩ B is the set elements that are in both A and B, which does
not depend on the order of sets considered.
(ii) A ∪ B = B ∪ A
Answer: TRUE. The set A ∪ B is the set elements that are in either A or B (or both),
which does not depend on the order of sets considered.
(iii) A − B = B − A
Answer: FALSE. For example, if A = {1, 2} and B = {2, 3}, then A − B = {1} and
B − A = {3}.
(iv) A × B = B × A
Answer: FALSE. For example, if A = {1} and B = {2}, then A × B = {(1, 2)} and
B × A = {(2, 1)}.
(v) |A − B| = |A| − |B|
Answer: FALSE. See part (iii) for example.
(vi) If A is finite, then so is P(A)
Answer: TRUE. If A is finite, then |P(A)| = 2|A| < ∞ (see the bonus problem).
(vii) A ∩ B = (A ∪ B)
Answer: TRUE. If x is in A and in B, then x is neither in A nor in B, so x is in the
complement of A ∪ B, and vice versa.
5
P
(BONUS) Use what we learned about Pascal’s triangle to explain why 2n = nk=0 nk by counting the
size of the power set of a set of size n in two ways (the cardinality of a power set of A only
depends on the cardinality of A).
Answer: Let A be a set of size n.
Step 1: Show |P(A)| = 2n . For each element a ∈ A, exactly half of the subsets include a:
P(A) = P(A − {a}) ∪ {S ∪ {a} | S ∈ P(A − {a})}.
So |P(A)| = 2 ∗ |P(A − {a})|. Similarly, do the same thing for any element of A − {a} until
you’ve exhausted the elements of A. For example, the subsets of A = {x, y, z} are
{S
P (A −
|S∈
∪ { a}
{x})}
all subsets
P (A −
{x})
subsets with x
with y
with z:
{x, y, z}
without z:
{x, y}
subsets without x
without y
with z:
{x, z}
with y
without z:
{x}
with z:
{y, z}
without y
without z:
{y}
with z:
{z}
without z:
∅
So
|P(A)| = |2 ∗ 2 ∗{z· · · ∗ 2} = 2n .
|A| terms
Step 2: Show |P(A)| =
of
Pn
n
k=0 k
. The set of subsets of A can be broken into the disjoint union
{ subsets of size 0 }
(of which there are
{ subsets of size 1 }
(of which there are
{ subsets of size 2 }
..
.
(of which there are
n
0 ),
n
1 ),
n
2 ),
..
.
{ subsets of size n }
(of which there are
P
So there are nk=0 nk subsets of A in total.
Step 3: conclusion. So for a set A of size n,
n X
n
2 = |P(A)| =
.
k
n
k=0
n
n
).
6
In-class Exercise 2. Fix two sets A and B and a universal set U . Draw and shade in diagrams
to decide whether the following identities are true or false. For those that are false, give a concrete
example illustrating the failure of the identity.
(a) (A ∩ B) = A ∪ B
U
A ∩ B looks like
A
B
U
so A ∩ B looks like
A
B
U
which is the same as the union of A:
A
B
U
and B:
A
B
7
(b) (A ∪ B) = A ∪ B
U
A ∪ B looks like
A
B
U
so A ∪ B looks like
A
B
which is the same as the intersection of A and B as drawn in part (a).
(c) A ∩ (A ∪ B) = (U − (B − A)) − (A ∪ B)
A ∪ B is as drawn in part (b), so
U
A ∩ (A ∪ B) = looks like
A
B
(∗)
On the other hand,
U
B − A looks like
A
B
U
so U − (B − A) looks like
A
B
Then subtracting (A ∪ B) (drawn in part (b)) gets us back to the picture in (∗).
8
In-class Exercise 3. Let Ai = {1, 2, . . . , i} for i = 1, 2, 3, . . . .
Calculate
n
[
i=1
Ai
and
n
\
Ai
i=1
T
S
for n = 2, 4, 5. Make aShypothesis T
about what ni=1 Ai and ni=1 Ai are for general n. Make a
∞
hypothesis about what ∞
i=1 Ai and
i=1 Ai are. Explain in words why.
We have
2
[
i=1
3
[
i=1
4
[
Ai = A1 ∪ A2 = {1} ∪ {1, 2} = {1, 2} = A2 ,
Ai = A1 ∪ A2 ∪ A3 = {1} ∪ {1, 2} ∪ {1, 2, 3} = {1, 2, 3} = A3 ,
Ai = A1 ∪ · · · ∪ A4 = {1} ∪ · · · ∪ {1, 2, 3, 4} = {1, 2, 3, 4} = A4 .
i=1
S
From this we can conjecture that ni=1 Ai = An . SinceSfor every integer in Z>0 , there is a big
enough n such that An contains it, we hypothesize that ∞
i=1 Ai = Z>0 .
Next, we have
2
\
i=1
3
\
i=1
4
\
Ai = A1 ∩ A2 = {1} ∩ {1, 2} = {1} = Aa
Ai = A1 ∩ A2 ∩ A3 = {1} ∩ {1, 2} ∩ {1, 2, 3} = {1} = A1
Ai = A1 ∩ · · · ∩ A4 = {1} ∩ · · · ∩ {1, 2, 3, 4} = {1} = A1
i=1
S
From this we can conjecture
that ni=1 Ai = A1 . But since A1 is a subset of every finite intersection,
S∞
we conjecture that i=1 Ai = A1 .
9
T
In-class Exercise
4. Show that if Ai = {1, 2, . . . , i} for i = 1, 2, 3, . . . , then ∞
i=1 Ai = {1}.
T∞
[Hint: Call
A
=
A
for
brevity.
First
argue
that
{1}
⊆
A.
For
the
reverse,
explain why
T i=1 i
A
,
and
use
that
expression
to
show
that
A
⊆
{1}.]
A = A1 ∩ ∞
i=2 i
T
Proof. Let ∞
i=1 Ai = A. Since 1 ∈ Ai for all i, we have 1 ∈ A, so that {1} ⊆ A.
Next, by the associative identity, we have
A=
∞
\
Ai = A1 ∩
i=1
But A = A1 ∩
T∞
i=2 Ai
∞
\
Ai .
i=2
⊆ A1 . In summary
A ⊇ {1}
and
A ⊆ {1}.
So A = {1}.
In-class Exercise 5. Argue formally that A ∪ B = A ∩ B.
Proof. First, we’ll show that A ∪ B ⊆ A ∩ B:
Let x ∈ A ∪ B. This equivalent to x ∈
/ A ∪ B. This means that x is not in A (so that x ∈ A) and
x is not in B (so that x ∈ B). So x ∈ A ∩ B. Thus A ∪ B ⊆ A ∩ B.
Next, show that A ∪ B ⊇ A ∩ B:
Let x ∈ A ∩ B. This equivalent to x ∈
/ A and x ∈
/ B. So x is in neither A nor B, so x ∈ A ∪ B.
Thus A ∪ B ⊇ A ∩ B.
Therefore A ∪ B = A ∩ B.
10
§2.1#4 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
Australian accent:
{ people who speak English } ⊇ { people who speak English with an Australian accent }
(b) the set of fruits, the set of citrus fruits:
{ fruits } ⊇ { citrus fruits }
(c) the set of students studying discrete mathematics, the set of students studying data
structures:
Normally, neither is a subset of the other.
§2.1#10 Determine whether these statements are true or false.
(a) ∅ ∈ {∅}
TRUE
(b) ∅ ∈ {∅, {∅}}
TRUE
(c) {∅} ∈ {∅}
FALSE (the only element of the RHS is ∅)
(d) {∅} ∈ {{∅}}
TRUE
(e) {∅} ⊂ {∅, {∅}}
TRUE
(f) {{∅}} ⊂ {∅, {∅}}
TRUE
(g) {{∅}} ⊂ {{∅}, {∅}}
FALSE. Careful: {{∅}} = {{∅}, {∅}}, but the ⊂ symbol
means subset but not equal.
§2.1#23 How many elements does each of these sets have where a and b are distinct elements?
(a) P ({a, b, {a, b}})
Answer: |{a, b, {a, b}}| = 3, so |P({a, b, {a, b}})| = 23 = 8.
(b) P ({∅, a, {a}, {{a}}})
Answer: |{∅, a, {a}, {{a}}}| = 4, so |P({∅, a, {a}, {{a}}})| = 24 = 16.
(c) P (P (∅))
Answer: |P (∅)| = 1, so |P(∅)| = 2.
§2.1#28 What is the Cartesian product A × B, where A is the set of courses offered by the
mathematics department at a university and B is the set of mathematics professors at
this university? Give an example of how this Cartesian product can be used.
Answer: This is the set of all possible pairings of courses taught and professors who
could teach them. This might be the possible entries in a table of who is teaching what
math courses.
§2.1#30 Suppose that A × B = ∅, where A and B are sets. What can you conclude?
Answer: If both A and B are nonempty, then this isn’t possible. So at least one of A
or B must be empty. And in fact, if A is empty, then so is A × B; similarly so when B
is empty.
§2.2 #1 Let A be the set of students who live within one mile of school and let B be the set of
students who walk to classes. Describe the students in each of these sets.
(a) A ∩ B Ans: Students who both live within a mile of school and walk to classes.
(b) A ∪ B Ans: Students who live within a mile of school and/or who walk to classes.
11
(c) A − B Ans: Students who live within a mile of school but don’t walk to classes.
(d) Ans: Students who live farther that a mile away from school but who walk to classes
anyway.
§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}.
Ans:
A = (A − B) ∪ (A ∩ B) = {1, 3, 5, 6, 7, 8, 9},
and
B = (B − A) ∪ (A ∩ B) = {2, 3, 6, 9, 10}.
§2.2 #28 Draw the Venn diagrams for each of these combinations of the sets A, B, C, and D.
Note that you cannot draw a proper Venn involving four sets using just circles. You
can check by counting the regions in your diagrams! There should be 24 = 16 total
distinct regions (if you use all circles, you’ll have at most 13): (In and out of A)×(In and
out of B)×(In and out of C)×(In and out of D). One example of a good four-set Venn
diagram is:
1
3
14
5
15
2
4
7
6
8
9
10
11
13
16
12
Notice I’ve numbered the regions to check that I have a good diagram.
(a) (A ∩ B) ∪ (C ∩ D)
12
(b) A ∪ B ∪ C ∪ D
(c) A − (B ∩ C ∩ D)
First, let’s look at B ∩ C ∩ D:
Thus, A − (B ∩ C ∩ D) looks like:
13
For problems 32–39, the symmetric difference of A and B, denoted A ⊕ B, is the set
containig those elements in A or B but not both.
§2.2 #32 Find the symmetric difference of {1, 3, 5} and {1, 2, 3}
Ans: {1, 3, 5} ⊕ {1, 2, 3} = {5, 2}.
§2.2 #34 Draw a Venn diagram of A ⊕ B.
U
A
B
§2.2 #36 Show that A ⊕ B = (A − B) ∪ (B − A).
Proof. First we show that A ⊕ B ⊆ (A − B) ∪ (B − A):
Let x ∈ A ⊕ B. Then either x is in A but not in B (i.e. x ∈ A − B); or x is in B but not
in A (i.e. x ∈ B − A). So x ∈ (A − B) ∪ (B − A).
Next we show that A ⊕ B ⊇ (A − B) ∪ (B − A):
Let x ∈ (A − B) ∪ (B − A). Then either x ∈ (A − B), in which case x is in A but not
in B, so that x ∈ A ⊕ B; or x ∈ (B − A), in which case x is in B but not in A, so that
x ∈ A ⊕ B again.
Thus A ⊕ B = (A − B) ∪ (B − A).
§2.2 #39 What can you say about the sets A and B if A ⊕ B = A?
Ans: If A ⊕ B = A, then
(1) nothing in A is also in B (i.e. if a ∈ A, then a ∈
/ B, so that A ∩ B = ∅), and
(2) there’s nothing in B that is not in A (i.e. if b ∈ B, then b ∈ A, so that B ⊆ A).
Together, these two statements imply that B = ∅.
14
§2.2 #50 Find
∞
[
Ai
∞
\
and
i=1
Ai
i=1
for the following.
(a) Ai = {i, i + 1, i + 2, . . . }:
∞
[
Claim:
Ai = Z>0
and
i=1
Proof. Let U =
S∞
i=1 Ai
∞
\
Ai = ∅
i=1
and I =
T∞
i=1 Ai .
To show U = Z>0 , first we show U ⊆ Z>0 :
For each i = 1, 2, . . . , Ai ⊆ Z>0 . So their union U is also a subset of Z>0 .
Next, we show U ⊇ Z>0 :
For each n ∈ Z>0 , we have n ∈ An ⊆ U . So Z>0 ⊆ U .
So U = Z>0 .
To show I = ∅, we note that I ⊆ A1 = Z≥1 . But for each n ∈ Z≥1 , we have n is not
an element of An+1 . So n is not an element of I. Thus I = ∅.
(b) Ai = {0, i}:
∞
[
Claim:
Ai = Z≥0
and
i=1
Proof. Let U =
S∞
i=1 Ai
∞
\
Ai = {0}
i=1
and I =
T∞
i=1 Ai .
To show U = Z≥0 , first we show U ⊆ Z≥0 :
For each i = 1, 2, . . . , we have Ai ⊆ Z≥0 . So their union U is also a subset of Z≥0 .
Next, we show U ⊇ Z≥0 :
For each n ∈ Z≥0 , we have n ∈ An ⊆ U . Thus U ⊇ Z≥0 .
So U = Z>0 .
To show I = {0}, first we show I ⊆ {0}:
We have that
I = A1 ∩ A2 ∩ (A3 ∩ A4 ∩ · · · ) ⊆ A1 ∩ A2 .
So since A1 ∩ A2 = {0, 1} ∩ {0, 2} = {0}, we have I ⊆ {0}.
Next, we show I ⊇ {0}:
For each i = 1, 2, . . . , we have 0 ∈ Ai . Thus 0 ∈ I, so that I ⊇ {0}.
So I = {0}.
15
(c) Ai = (0, i):
Claim:
Proof. Let U =
∞
[
Ai
i=1
S∞
i=1 Ai
= (0, ∞)
and
∞
\
Ai = (0, 1)
i=1
and I =
T∞
i=1 Ai .
To show U = (0, ∞), first we show U ⊆ (0, ∞):
For each i = 1, 2, 3, . . . , we have Ai ⊆ (0, ∞). So the union U is also a subset of
(0, ∞).
Next, we show U ⊇ (0, ∞):
For each x ∈ (0, ∞), let n be an integer greater than x. Then x ∈ An ⊆ U . Thus
(0, ∞) ⊂ U .
So U = (0, ∞).
To show I = (0, 1), first we show I ⊆ (0, 1):
We have that
I = A1 ∩ A2 ∩ (A3 ∩ A4 ∩ · · · ) ⊆ A1 ∩ A2 .
So since A1 ∩ A2 = (0, 1) ∩ (0, 2) = (0, 1), we have I ⊆ (0, 1).
Next, we show I ⊇ (0, 1):
For each i = 1, 2, 3, . . . , we have (0, 1) ⊆ Ai . So (0, 1) ⊆ I.
So I = (0, 1).
(d) Ai = (i, ∞):
∞
[
Claim:
Ai = (1, ∞)
and
i=1
Proof. Let U =
S∞
i=1 Ai
∞
\
Ai = ∅
i=1
and I =
T∞
i=1 Ai .
To show U = Z>0 , first we show U ⊆ (1, ∞):
For each i = 1, 2, 3, . . . , we have Ai ⊆ (1, ∞). Therefore their union U is also a
subset of (1, ∞).
Next, we show U ⊇ (1, ∞):
This is because (1, ∞) = A1 ⊆ U .
So U = (1, ∞).
To show I = ∅, we note that I ⊆ A1 = (1, ∞). But for any x ∈ (1, ∞), and any
integer n greater than x, we have x ∈
/ An . So x is not in the intersection I.
© Copyright 2026 Paperzz