HW2 Sets and Functions
HW2 Sets and Functions
Section 2.1
Problem 11
Determine whether each of these statements is true or false.
• a) 0 ∈ ∅
• b) ∅ ∈ {0}
• c) {0} ⊂ ∅
• d) ∅ ⊂ {0}
• e) {0} ∈ {0}
• f) {0} ⊂ {0}
• g) {∅} ⊆ {∅}
Answer:
a) False. Because the empty set ∅ contains no elements, so 0 cannot be inside this set.
b) False. The set {0} contains only the element 0, and ∅ is not equal to 0.
c) False. {0} contains an element, but ∅ has none, so {0} is not a subset of ∅.
d) True. Every set contains the empty set as a subset, since ∅ has no elements to violate subset
conditions.
e) False. {0} is a set containing 0, but not equal to 0, so it’s not an element of itself.
f) True. Every set is a subset of itself.
g) True. Both sets are equal and contain the same element ∅, so the subset relation holds.
Problem 12
Determine whether these statements are true or false.
• a) ∅ ∈ {∅}
• b) ∅ ∈ {∅, {∅}}
• c) {∅} ∈ {∅}
• d) {∅} ∈ {{∅}}
• e) {∅} ⊂ {∅, {∅}}
• f) {{∅}} ⊂ {∅, {∅}}
• g) {{∅}} ⊂ {{∅}, {∅}}
1
Answer:
a) True. The set {∅} contains exactly one element: ∅.
b) True. The set {∅, {∅}} has ∅ as one of its elements.
c) False. The set {∅} contains ∅, not the set {∅} itself.
d) True. {{∅}} contains one element, which is {∅}, matching the left side.
e) True. All elements of {∅} are also in the set {∅, {∅}}, so it is a proper subset.
f) True. The element {∅} exists in the right-hand set, so the left set is a subset.
g) False. Both sets are equal: they contain the same element {∅} (even though it’s repeated), so it’s
not a proper subset.
Problem 13
Determine whether each of these statements is true or false.
• a) x ∈ {x}
• b) {x} ⊆ {x}
• c) {x} ∈ {x}
• d) {x} ∈ {{x}}
• e) ∅ ⊆ {x}
• f) ∅ ∈ {x}
Answer:
a) True. The set {x} contains the element x.
b) True. Any set is a subset of itself.
c) False. The set {x} contains the element x, not the set {x} itself.
d) True. The set {{x}} contains one element, which is {x}.
e) True. The empty set is a subset of every set.
f) False. Unless x = ∅, then ∅ ∈
/ {x}.
Problem 26
Determine whether each of these sets is the power set of a set, where a and b are distinct elements.
• a) ∅
• b) {∅, {a}}
• c) {∅, {a}, {∅, a}}
• d) {∅, {a}, {b}, {a, b}}
Answer:
a) False. Because every power set includes at least 1 element.
b) True. This is a power set of {a}.
c) False. This set has 3 elements ̸= 2n .
d) True. This is a power set of {a, b}.
Problem 27
Prove that P(A) ⊆ P(B) if and only if A ⊆ B.
Answer:
Assume P(A) ⊆ P(B). Show that A ⊆ B: Let a ∈ A. Then {a} ⊆ A, so {a} ∈ P(A). Since
P(A) ⊆ P(B), it follows that {a} ∈ P(B), which means {a} ⊆ B, so a ∈ B. Therefore, A ⊆ B.
Assume A ⊆ B. Show that P(A) ⊆ P(B): Let X ∈ P(A). Then X ⊆ A. Since A ⊆ B, we have
X ⊆ B, so X ∈ P(B). Therefore, P(A) ⊆ P(B).
2
Problem 28
Show that if A ⊆ C and B ⊆ D, then A × B ⊆ C × D.
Answer: A × B creates a pair (x, y) where x ∈ A and y ∈ B. Since A ⊆ C, we have x ∈ C, and since
B ⊆ D, it follows that y ∈ D. Therefore, the pair (x, y) ∈ C × D, which implies that A × B ⊆ C × D.
Problem 41
Explain why A × B × C and (A × B) × C are not the same.
Answer:
A × B × C creates a pair (x, y, z) where x ∈ A, y ∈ B and z ∈ C.
However, (A × B) × C creates a pair ((x, y), z), where (x, y) ∈ (A × B), and z ∈ C.
Problem 42
Explain why (A × B) × (C × D) and A × (B × C) × D are not the same.
Answer:
(A × B) × (C × D) creates a pair ((a, b), (c, d)), where (a, b) ∈ A × B, and (c, d) ∈ C × D.
Meanwhile, A × (B × C) × D creates a pair ((a), (b, c), d), where a ∈ A, (b, c) ∈ B), and d) ∈ D).
Problem 43
Prove or disprove that if A and B are sets, then:
Problem 44
Prove or disprove: If A, B, C are nonempty sets and
A × B = A × C,
then B = C.
Answer: True.
Proof: Assume A ̸= ∅ and A × B = A × C.
Let b ∈ B. Since A ̸= ∅, choose a ∈ A. Then (a, b) ∈ A × B = A × C ⇒ b ∈ C. So B ⊆ C.
Similarly, for c ∈ C, (a, c) ∈ A × C = A × B ⇒ c ∈ B. So C ⊆ B.
Conclusion: B = C
Section 2.2
Problem 15
Prove the second De Morgan law in Table 1 by showing that if A and B are sets, then
A ∪ B = A ∩ B.
a) by showing each side is a subset of the other side.
3
b) using a membership table.
Answer:
a) Case 1: Show that A ∪ B ⊆ A ∩ B:
Let x ∈ A ∪ B. Then x ∈/ A ∪ B, so x ∈
/ A and x ∈
/ B.
Therefore, x ∈ A or x ∈ B, which means x ∈ A ∩ B.
Hence, A ∪ B ⊆ A ∩ B.
Case 2:Show that A ∩ B ⊆ A ∪ B:
Let x ∈ A ∩ B. Then x ∈ A or x ∈ B, so x ∈/ A and x ∈
/ B.
Therefore, x ∈
/ A ∪ B, which means x ∈ A ∪ B.
Hence, A ∩ B ⊆ A ∪ B.
Therefore, A ∪ B = A ∩ B.
b)
Problem 16
Let A and B be sets. Show that
a) A ∩ B ⊆ A
b) A ⊆ A ∪ B
c) A − B ⊆ A
d) A ∩ (B − A) = ∅
e) A ∪ (B − A) = A ∪ B
Answer:
• a) Let x ∈ A ∩ B. So x ∈ A and x ∈ B.
• b) Let x ∈ A. Then x ∈ A ∪ B because it creates a value ∈ A or ∈ B. Therefore, A ⊆ A ∪ B.
• c) Let x ∈ A − B. Because x is in A but not in B. So it still belongs to A. Therefore, A − B ⊆ A.
• d) Let x ∈ B − A and y ∈ A. Because x is in B but not in A, so the intersection between x and y
is empty.
• e) The set B − A has elements from B that are not already in A.Therefore, the union of A with
B − A is exactly the same as the union of A and B.
Problem 17
Show that if A and B are sets in a universe U , then A ⊆ B if and only if A ∪ B = U .
Answer: Let
U = {1, 2, 3, 4}, A = {3, 4}, B = {1, 2, 3}.
Then
A = {1, 2}, A ∪ B = {1, 2, 3} =
̸ U.
Thus this does not contradict
A ⊆ B ⇐⇒ A ∪ B = U.
.
4
Problem 19
Show that if A, B, and C are sets, then A ∩ B ∩ C = A ∪ B ∪ C.
a) by showing each side is a subset of the other side.
b) using a membership table.
Answer:
a) Let x ∈ A ∩ B ∩ C. Then
x∈/ A∩B∩C =⇒ x ∈ /A ∨ x∈ / C =⇒ x ∈ A ∨ x ∈ B ∨ x ∈ C =⇒ x ∈ A∪B∪C.
/B ∨ x∈
b)
Problem 20
Let A, B, and C be sets. Show that
a) (A ∪ B) ⊆ (A ∪ B ∪ C).
b) (A ∩ B ∩ C) ⊆ (A ∩ B).
c) (A − B) − C ⊆ A − C.
d) (A − C) ∩ (C − B) = ∅.
e) (B − A) ∪ (C − A) = (B ∪ C) − A.
Answer:
a) Let x ∈ (A ∪ B) and y ∈ C. (A ∪ B ∪ C) includes x and y. Therefore, (A ∪ B) ⊆ (A ∪ B ∪ C).
b) Let x ∈ A ∩ B ∩ C. Then x ∈ A and x ∈ B, so x ∈ A ∩ B, hence (A ∩ B ∩ C) ⊆ (A ∩ B).
c) Let x ∈ (A−B)−C. Then x ∈ A\B and x ∈
/ C, so x ∈ A and x ∈
/ C, hence (A−B)−C ⊆ A−C.
d) If x ∈ (A − C) ∩ (C − B) then x ∈
/ C and x ∈ C, a contradiction, so (A − C) ∩ (C − B) = ∅.
e) If x ∈ (B − A) ∪ (C − A) then x ∈ / A and x ∈ B ∪ C, so (B − A) ∪ (C − A) ⊆ (B ∪ C) − A.
Conversely, if x ∈ (B ∪ C) − A then x ∈
/ A and x ∈ B ∪ C, so (B ∪ C) − A ⊆ (B − A) ∪ (C − A).
Hence equality.
Problem 21
Show that if A and B are sets, then
(a) A − B = A ∩ B.
(b) (A ∩ B) ∪ (A ∩ B) = A.
Answer:
(a) Let x ∈ A \ B ⇐⇒ x ∈ A ∧ x ∈
/ B, hence A \ B = A ∩ B.
(b) Let x ∈ A. If x ∈ B then x ∈ A ∩ B, otherwise x ∈ A ∩ B, so A = (A ∩ B) ∪ (A ∩ B).
5
Problem 35
Let A, B, and C be sets. Use the identities in Table 1 to show that
(A ∪ B) ∩ (B ∪ C) ∩ (A ∪ C) = A ∩ B ∩ C.
Answer:
(A ∪ B) = A ∩ B, (B ∪ C) = B ∩ C, (A ∪ C) = A ∩ C.
Therefore
(A ∪ B) ∩ (B ∪ C) ∩ (A ∪ C) = (A ∩ B) ∩ (B ∩ C) ∩ (A ∩ C)
= A ∩ B ∩ C,
Problem 36
Let A, B, and C be sets. Prove or disprove that
a) A × (B ∪ C) = (A × B) ∪ (A × C).
b) A × (B ∩ C) = (A × B) ∩ (A × C).
Answer:
Problem 37
Let A, B, C be sets. Prove or disprove:
a) A × (B \ C) = (A × B) \ (A × C).
b) A × (B ∪ C) = (A × B) ∪ (A × C).
Answer:
Section 2.3
Problem 25.
Proof. Let f : R → R be a function such that f (x) > 0 for all x ∈ R. Show that f (x) is strictly decreasing
1
if and only if the function g(x) = f (x) is strictly increasing.
Proof:
(⇒) Assume f (x) is strictly decreasing. Then for any x1 < x2 , we have:
6
Since f (x) > 0, taking reciprocals preserves the inequality direction:
1 1
<
f (x1 ) f (x2 )
1
Thus, g(x) = f (x) is strictly increasing.
1
(⇐) Now assume g(x) = f (x) is strictly increasing. Then for any x1 < x2 , we have:
1 1
< ⇒ f (x1 ) > f (x2 )
f (x1 ) f (x2 )
The left and right commands make the brackets get as big as we need them to be.
7
Problem 26
Given...
Proof. (a) Prove that a strictly increasing function from R to itself is one-to-one.
(b) Give an example of an increasing function from R to itself that is not one-to-one.
Solution:
(a) Let f : R → R be a strictly increasing function. By definition, this means:
Problem 27
Proof. (a) Prove that a strictly decreasing function from R to itself is one-to-one.
(b) Give an example of a decreasing function from R to itself that is not one-to-one.
Solution.
(a) Let f : R → R be a strictly decreasing function. That is, for all x1 , x2 ∈ R, if x1 < x2 , then
f (x1 ) > f (x2 ).
To prove that f is one-to-one, we must show that:
f (x1 ) = f (x2 ) ⇒ x1 = x2 .
We will prove this by contrapositive: suppose x1 ̸= x2 . Without loss of generality, assume x1 < x2 .
Then, by the strictly decreasing property,
This function is decreasing (since for any x1 < x2 , we have f (x1 ) = f (x2 )), but it is not strictly
decreasing.
Moreover, f is not one-to-one because:
8
Problem 33
Proof. (a) Show that if both f and g are one-to-one functions, then f ◦ g is also one-to-one.
Proof:
Assume f and g are one-to-one functions.
Let x1 , x2 ∈ A and suppose that:
x1 = x2
Therefore, f ◦ g is one-to-one.
(b) Show that if both f and g are onto functions, then f ◦ g is also onto.
Proof:
Assume f and g are onto functions.
Let c ∈ C be arbitrary. Since f is onto, there exists b ∈ B such that:
f (b) = c
g(a) = b
Then:
(f ◦ g)(a) = f (g(a)) = f (b) = c
Hence, for every c ∈ C, there exists a ∈ A such that (f ◦ g)(a) = c.
Therefore, f ◦ g is onto.
Problem 34
Proof. (a) If f ◦ g is onto, then f must also be onto.
Proof:
Assume that f ◦ g is onto. That means for every c ∈ C, there exists a ∈ A such that:
(f ◦ g)(a) = f (g(a)) = c
Let b = g(a) ∈ B. Then f (b) = c. Since this is true for all c ∈ C, it follows that for every c ∈ C,
there exists b ∈ B such that f (b) = c.
Hence, f is onto.
(b) If f ◦ g is one-to-one, then g must also be one-to-one.
Proof:
Assume f ◦ g is one-to-one. Let x1 , x2 ∈ A and suppose:
f (g(a)) = c
9
Let b = g(a) ∈ B. Then f (b) = c. Because f is one-to-one, each b must be unique to ensure f
covers all of C. Thus, to provide all needed b values, g must map onto all of B. Hence, g is onto.
Problem 35
Proof. Find an example of functions f and g such that f ◦ g is a bijection, but g is not onto and f is not
one-to-one.
Example:
Let the sets be:
A = {1, 2}, B = {a, b, c}, C = {X, Y }
Define:
g : A → B, with g(1) = a, g(2) = b
f : B → C, with f (a) = X, f (b) = Y, f (c) = X
Then:
(f ◦ g)(1) = f (g(1)) = f (a) = X(f ◦ g)(2) = f (g(2)) = f (b) = Y
So, f ◦ g : A → C is a bijection (one-to-one and onto).
However:
• g is not onto because c ∈ B is not in the image of g.
• f is not one-to-one because f (a) = f (c) = X.
Problem 42
Proof. Let f be a function from the set A to the set B. Let S and T be subsets of A.
(a) Show that f (S ∪ T ) = f (S) ∪ f (T ).
Proof:
Let y ∈ f (S ∪ T ). Then there exists x ∈ S ∪ T such that f (x) = y.
Then x ∈ S or x ∈ T , so y ∈ f (S) ∪ f (T ). Hence,
f (S ∪ T ) ⊆ f (S) ∪ f (T )
Hence,
f (S ∪ T ) = f (S) ∪ f (T ) ■
(b) Show that f (S ∩ T ) ⊆ f (S) ∩ f (T ).
Proof:
Let y ∈ f (S ∩ T ). Then there exists x ∈ S ∩ T such that f (x) = y.
Since x ∈ S and x ∈ T , we get y ∈ f (S) and y ∈ f (T ). So,
y ∈ f (S) ∩ f (T ) ⇒ f (S ∩ T ) ⊆ f (S) ∩ f (T ) ■
10
Problem 43
Proof. Let f : A → B be a function. Let S, T ⊆ A. Recall from Exercise 42 that:
f (S ∩ T ) ⊆ f (S) ∩ f (T )
Problem 44
Proof. Let f : R → R be the function defined by f (x) = x2 . Find the following inverse images:
(a) f −1 ({1})
0 < f (x) < 1 ⇒ 0 < x2 < 1 ⇒ x ∈ (−1, 0) ∪ (0, 1) ⇒ f −1 ((0, 1)) = (−1, 0) ∪ (0, 1)
f (x) > 4 ⇒ x2 > 4 ⇒ x < −2 or x > 2 ⇒ f −1 ({x | x > 4}) = (−∞, −2) ∪ (2, ∞)
Problem 45
Proof. Let g(x) = ⌊x⌋, the floor function. Find the following inverse images:
(a) g −1 ({0})
11
(b) g −1 ({−1, 0, 1})
Problem 46
Proof. Let f : A → B be a function, and let S and T be subsets of B. We prove the following identities
involving inverse images.
(a) f −1 (S ∪ T ) = f −1 (S) ∪ f −1 (T )
Proof:
Let x ∈ f −1 (S ∪ T ). Then f (x) ∈ S ∪ T , so f (x) ∈ S or f (x) ∈ T . Hence, x ∈ f −1 (S) or
x ∈ f −1 (T ), which implies
x ∈ f −1 (S) ∪ f −1 (T )
(b) f −1 (S ∩ T ) = f −1 (S) ∩ f −1 (T )
Proof:
Let x ∈ f −1 (S ∩ T ). Then f (x) ∈ S ∩ T , so f (x) ∈ S and f (x) ∈ T . Hence, x ∈ f −1 (S) ∩ f −1 (T ).
Conversely, if x ∈ f −1 (S) ∩ f −1 (T ), then f (x) ∈ S ∩ T , so x ∈ f −1 (S ∩ T ).
Thus,
f −1 (S ∩ T ) = f −1 (S) ∩ f −1 (T )
Problem 47
Proof. Let f : A → B be a function, and let S ⊆ B. We are to show that
f −1 (S) = f −1 (S)
where S denotes the complement of S in B, and f −1 (S) denotes the complement of f −1 (S) in A.
Proof:
Let x ∈ A.
12
Problem 60
We know that:
1 byte = 8 bits
Therefore, the number of bytes required to encode n bits is given by:
lnm
8
where ⌈x⌉ denotes the ceiling function (i.e., the smallest integer greater than or equal to x).
(a) For n = 4:
4
= ⌈0.5⌉ = 1 byte
8
(b) For n = 10:
10
= ⌈1.25⌉ = 2 bytes
8
(c) For n = 500:
500
= ⌈62.5⌉ = 63 bytes
8
(d) For n = 3000:
3000
= ⌈375⌉ = 375 bytes
8
Problem 62
Each ATM cell consists of 53 bytes, which is:
53 × 8 = 424 bits
Let R be the data rate in bits per second, and T = 10 seconds. Then, the number of ATM cells
transmitted is:
R×T
424
(a) R = 128,000 bits/sec
128,000 × 10 1,280,000
= ≈ 3,018.87 ⇒ 3018 cells
424 424
(b) R = 300,000 bits/sec
300,000 × 10 3,000,000
= ≈ 7,075.47 ⇒ 7075 cells
424 424
(c) R = 1,000,000 bits/sec
1,000,000 × 10 10,000,000
= ≈ 23,584.90 ⇒ 23,584 cells
424 424
Problem 72
Proof: We will prove this by showing that:
(g −1 ◦ f −1 ) ◦ (f ◦ g) = idX and (f ◦ g) ◦ (g −1 ◦ f −1 ) = idZ
1. Compute:
(g −1 ◦ f −1 ) ◦ (f ◦ g) = g −1 ◦ (f −1 ◦ f ) ◦ g = g −1 ◦ idY ◦ g = g −1 ◦ g = idX
2. Compute:
(f ◦ g) ◦ (g −1 ◦ f −1 ) = f ◦ (g ◦ g −1 ) ◦ f −1 = f ◦ idY ◦ f −1 = f ◦ f −1 = idZ
Since both compositions result in the identity functions, we conclude:
(f ◦ g)−1 = g −1 ◦ f −1
13
Problem 73
Proof:
(a) By definition of intersection: - If x ∈ A ∩ B, then fA (x) = fB (x) = 1 - Otherwise, at least one of
fA (x), fB (x) is zero
Hence,
fA∩B (x) = fA (x) · fB (x)
(b) We analyze case-by-case: - If x ∈ A ∩ B, both are 1 → RHS: 1 + 1 − 1 = 1 - If x ∈ A \ B, RHS:
1 + 0 − 0 = 1 - If x ∈ B \ A, RHS: 0 + 1 − 0 = 1 - If x ∈
/ A ∪ B, RHS: 0 + 0 − 0 = 0
Thus,
fA∪B (x) = fA (x) + fB (x) − fA (x)fB (x)
(c) By definition:
(
1 if x ∈
/ A ⇒ fA (x) = 0
fA (x) = ⇒ fA (x) = 1 − fA (x)
0 if x ∈ A ⇒ fA (x) = 1
Problem 75
(a) ⌈⌊x⌋⌉ = ⌊x⌋ for all real numbers x.
Proof: Since ⌊x⌋ is always an integer, applying the ceiling function does not change its value.
Conclusion: True.
(b) ⌊2x⌋ = 2⌊x⌋ for all real numbers x.
Counterexample: Let x = 1.5. Then:
Conclusion: False.
(c) ⌈x⌉ + ⌈y⌉ − ⌈x + y⌉ = 0 or 1 for all real x, y.
Proof: The sum of two ceilings may exceed the ceiling of the sum by at most 1, depending on the
fractional parts of x and y.
Conclusion: True.
(d) ⌈xy⌉ = ⌈x⌉ · ⌈y⌉ for all real x, y.
Counterexample: Let x = 1.1, y = 1.1. Then:
Conclusion: False.
(e) ⌈2x⌉ = ⌊x + 21 ⌋ for all real x.
Proof: This is a standard identity used in rounding. It can be proven by considering the intervals
x ∈ [n, n + 1).
Conclusion: True.
Problem 76
Proof: This expression can be either 0 or 1, depending on the fractional parts of x and y. True.
(d) ⌈xy⌉ = ⌈x⌉ · ⌈y⌉ for all real x, y. Counterexample: Let x = 1.1, y = 1.1, then:
False.
(e) ⌈2x⌉ = ⌊x + 21 ⌋ for all real x. Proof: This identity holds for all real x. It is a well-known identity
used in rounding operations. True.
14
Problem 77
jp k √
(a) ⌊x⌋ = ⌊ x⌋
Proof: Let a = ⌊x⌋, so we know:
√ √ √
a≤x<a+1⇒ a≤ x< a+1
Problem 78
Let x be a real number. We want to show that:
x+1 x+2
⌊3x⌋ = ⌊x⌋ + +
3 3
15
Problem 79
1
Function a: f : Z → R, f (n) = n
• Domain: Z
• Codomain: R
• Domain: Z
• Codomain: Z
• Domain of definition: Z
• Domain: Z × Z
• Codomain: Q
• Domain of definition: Z × (Z \ {0})
• Undefined at: {(m, 0) | m ∈ Z}
• Total function? No
Function d: f : Z × Z → Z, f (m, n) = m · n
• Domain: Z × Z
• Codomain: Z
• Domain of definition: Z × Z
• Undefined at: None
• Total function? Yes
• Domain: Z × Z
• Codomain: Z
• Domain of definition: {(m, n) ∈ Z × Z | m > n}
16
Section 2.4
Problem 25
a) Sequence: 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, . . .
This sequence appears to follow a repeating pattern:
1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, . . .
Pattern length increases: 1’s followed by 0’s, each group of 1’s or 0’s increasing in length by 1.
Rule: Repeat k ones followed by k zeros, incrementing k each time.
Next three terms: 1, 1, 1 (starting the group of four 1’s)
b) Sequence: 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, . . .
The pattern shows each odd number appearing once, each even number appearing twice.
Rule: n
an = n − n3 , or generate as odd once, even twice
an = n3 + n
Verify:
13 + 1 = 2, 23 + 2 = 10, 33 + 3 = 30, too low
Try:
an = n3 + n2
13 + 12 = 2, 23 + 22 = 8 + 4 = 12, toolow
Actual pattern:
Eventually, try fitting or refer to OEIS: Turns out the formula is:
an = n3 + n
17
Check values:
Rule: an = n! + 1 for n ≥ 3
Next three terms: 40321 (8!), 362881 (9!), 3628801 (10!)
|A| ≤ |B|
Conclusion:
If A ⊂ B, then the cardinality of A is less than or equal to the cardinality of B: |A| ≤ |B|.
In the finite case, we can define an injective function g : A → Z+ , where the image is the first n positive
integers if |A| = n.
In the countably infinite case, the bijection itself is an injective function.
Thus, in both cases, there exists an injective function from A into Z+ , so:
|A| ≤ |Z+ |
18
Exercise 15: Solution
- Suppose B is a countable set. By the definition of countability, we can list the elements of B as:
B = {b1 , b2 , b3 , . . . }, where each bi ∈ B.
- Since A ⊆ B, every element of A is also an element of B. Therefore, the elements of A appear in the
list of elements of B.
- If A were countable, we could list the elements of A based on the order in which they appear in the
listing of B. That is, we can assign the elements of A to some subset of the indices 1, 2, 3, . . ., which
means we can list the elements of A as:
A = {a1 , a2 , a3 , . . . }, where each ai ∈ A.
- However, we are given that A is uncountable, so it cannot be listed in this way. This leads to a
contradiction, as we cannot have both A being uncountable and A ⊆ B, where B is countable.
Conclusion: Since assuming that B is countable leads to a contradiction, we must conclude that B is
uncountable.
Thus, if A is uncountable and A ⊆ B, then B must also be uncountable.
A = (A ∩ B) ∪ (A − B).
- Since B is countable, by Exercise 16, the subset A ∩ B must also be countable (because a subset of a
countable set is countable).
- Now, suppose that A − B is countable. Since the union of two countable sets is countable (by Theorem
1), we would conclude that A = (A ∩ B) ∪ (A − B) is countable, because both A ∩ B and A − B are
countable.
- However, this contradicts the assumption that A is uncountable.
- Therefore, our assumption that A − B is countable must be wrong, and we conclude that A − B is
uncountable.
Conclusion: if A is an uncountable set and B is a countable set, A − B must be uncountable.
- Since f is bijective, it follows that Sf is also bijective: it is one-to-one and onto from P(A) to P(B).
Conclusion: |P(A)| = |P(B)|.
19
Exercise 19: Solution
- Suppose we are given that |A| = |B| and |C| = |D|. This means there exist bijections f : A → B and
g : C → D.
- Define a function h : A × C → B × D by:
Section 8.2
Exercise 28: Solution
(a) Find all solutions of the recurrence relation
an = 2an−1 + 2n2 .
Solution:
The associated homogeneous recurrence relation is:
a(h)
n = 2an−1 .
This is a first-order linear homogeneous recurrence relation, and the solution is:
(h)
an = α · 2n , where α is a constant.
Now we find a particular solution to the nonhomogeneous recurrence:
an = 2an−1 + 2n2 .
an(p) = p2 n2 + p1 n + p0 .
p2 n2 + p1 n + p0 = 2 p2 (n − 1)2 + p1 (n − 1) + p0 + 2n2 .
Matching coefficients:
p2 = 2p2 + 2 ⇒ p2 = −2,
p1 = −4p2 + 2p1 ⇒ p1 = −8,
p0 = 2p2 − 2p1 + 2p0 ⇒ p0 = −12.
20
Hence, the general solution is:
an = α · 2n − 2n2 − 8n − 12.
2α = 26 ⇒ α = 13.
an = 13 · 2n − 2n2 − 8n − 12.
an = 2an−1 + 3n .
a(h)
n = 2an−1 .
an = 2an−1 + 3n .
a2 = 2a1 + 32 = 2 · 5 + 9 = 19.
From formula:
a2 = −22+1 + 32+1 = −8 + 27 = 19.
Both results match, confirming the solution is correct.
21
Exercise 30: Solution
(a) Find all solutions of the recurrence relation:
an = −5an−1 − 6an−2 + 42 · 4n .
an = −5an−1 − 6an−2 .
22
Exercise 31: Solution
Find all solutions of the recurrence relation:
an = 5an−1 − 6an−2 + 2n + 3n
First, we solve the associated homogeneous recurrence relation:
an = 5an−1 − 6an−2
The characteristic equation is:
r2 − 5r + 6 = 0
Solving this, we get r = 2 and r = 3. So the general solution to the homogeneous part is:
an(h) = α · 2n + β · 3n
Now we find a particular solution to the non-homogeneous equation:
an = 5an−1 − 6an−2 + 2n + 3n
Since both 2n and 3n appear in the homogeneous solution, we look for a particular solution of the form:
n
a(p)
n =c·n·2 +d·n+e
We substitute this into the original equation and compare coefficients. After simplification, we solve the
resulting system to find:
3 21
c = −2, d = , e =
2 4
Thus, the particular solution is:
n 3 21
a(p)
n = −2n · 2 + n +
2 4
Combining the homogeneous and particular solutions, the general solution is:
3 21
an = α · 2n + β · 3n − 2n · 2n + n +
2 4
23
Exercise 33: Solution
Find all solutions of the recurrence relation:
an = 4an−1 − 4an−2
Next, we find a particular solution to the full recurrence. Since the non-homogeneous term is (n + 1)2n ,
and 2n appears in the homogeneous solution with multiplicity 2, we try a particular solution of the form:
n2 (cn + d)2n = 4(n − 1)2 (c(n − 1) + d)2n−1 − 4(n − 2)2 (c(n − 2) + d)2n−2 + (n + 1)2n
Divide through by 2n to simplify the expression. After simplifying and equating coefficients of like powers
of n, we obtain:
1
c= , d=1
6
So the particular solution is:
2 n
a(p)
n =n + 1 2n
6
Finally, the general solution is the sum of the homogeneous and particular solutions:
n3
an = α + βn + n2 + 2n
6
(r − 2)2 (r − 3) = 0
Next, we find a particular solution. Since the non-homogeneous term is n · 4n , and 4 is not a root of the
characteristic equation, we try:
an(p) = (cn + d) · 4n
24
Substitute into the recurrence and simplify (tedious but mechanical):
an = α · 2n + βn · 2n + γ · 3n + (16n − 80) · 4n
a0 = α + γ − 80 = −2
a1 = 2α + 2β + 3γ − 256 = 0
a2 = 4α + 8β + 9γ − 768 = 5
an = 4an−1 − 3an−2
r2 − 4r + 3 = 0 ⇒ (r − 1)(r − 3) = 0
Now for a particular solution. Since the nonhomogeneous term is 2n + n + 3, and neither 2 nor 1
(corresponding to the polynomial part) are roots of the characteristic equation except 1, we try:
n
a(p) 2
n = c · 2 + dn + en
25
Use:
1 5
a0 = 1 = α + β − 4a1 = 4 = α + 3β − 8 − −
4 2
From the first equation:
α+β =5
From the second:
11 75
α + 3β = 4 + 8 + =
4 4
Solve the system:
75
α+β =5 (1)α + 3β = (2)
4
Subtracting (1) from (2):
75 55 55 55 40 − 55 15
2β = −5= ⇒β= , α=5− = =−
4 4 8 8 8 8
1 5 15 55 n
an = −4 · 2n − n2 − n − + ·3
4 2 8 8
26