1. (a) f is invertible if there exists a function f −1 : Y → X such that f (f −1 (y)) = y for all
y ∈ Y and f −1 (f (x)) = x for all x ∈ X.
1. (b) Since f and g are invertible functions there exist invertible functions f −1 : B → A
and g −1 : C → B. Hence there exists a function f −1 ◦ g −1 : C → A such that
(f −1 ◦ g −1 )((g ◦ f )(x)) := f −1 (g −1 (g(f (x)))) = f −1 (f (x)) from part (a) since g is invertible,
= x for all x ∈ A since f is invertible,
and
(g ◦ f )((f −1 ◦ g −1 )(y)) := g(f (f −1 (g −1 (y)))) = g(g −1 (y)) from part (a) since f is invertible.
= y for all y ∈ C since g is invertible.
Hence g ◦ f is invertible.
2. (a) Let b ∈ f (f −1 (B1 )). By definition, we have
f (f −1 (B1 )) = {f (a)|a ∈ f −1 (B1 )},
so we must have b = f (a1 ) for some a1 ∈ f −1 (B1 ). The definition of f −1 (B1 ) is
f −1 (B1 ) := {a ∈ A | f (a) ∈ B1 }.
Therefore f (a1 ) ∈ B1 . Thus b = f (a1 ) ∈ B1 . Since b is an arbitrary element of f (f −1 (B1 ))
we have that f (f −1 (B1 )) ⊂ B1 .
2. (b) Assume f is onto. We know from part (a) that f (f −1 (B1 )) ⊂ B1 so it suffices to
show that B1 ⊂ f (f −1 (B1 )) Let b ∈ B1 be an arbitrary element. Because f is onto, we know
there exists a1 ∈ A such that f (a1 ) = b. Since f (a1 ) = b ∈ B1 , a1 ∈ f −1 (B1 ). Therefore
f (a1 ) ∈ {f (a) | a ∈ f −1 (B1 )} = f (f −1 (B1 )).
Since f (a1 ) = b, we conclude that b ∈ f (f −1 (B1 )). Since b is an arbitrary element of B1 , we
have that f (f −1 (B1 )) = B1 .
3. By assumption there is a bijection f : A → B. Let n = #B, so there is a bijection
g : B → {1, 2, . . . , n}. The composition of bijections is a bijection so g ◦ f is a bijection from
A to {1, 2, . . . , n}. Therefore, #A = n = #B.
4. Proof by induction. Define P (n) to be the assertion
n
X
2i = 2n+1 − 2.
i=1
Base case. For n = 1 we have that
1
X
2i = 21 = 2 = 4 − 2 = 21+1 − 2.
i=1
1
2
So P (1) is true.
Induction step: Assume P (n − 1) is true. Then
n−1
X
2i = 2n−1+1 − 2,
by assumption.
i=1
Then
n
X
i
2 =
i=1
n−1
X
2i + 2n
i=1
= 2n−1+1 − 2 + 2n
by the induction hypothesis
= 2n − 2 + 2n = 2(2n ) − 2 = 2n+1 − 2.
Therefore P (n) is true.
5. (a) For integers a and b we say that a | b if there exists an integer k such that b = ak.
5. (b) Let a, b, c ∈ Z. If a | b then there exists k1 ∈ Z such that b = ak1 . If b | c then there
exists k2 ∈ Z such that c = bk2 . Hence c = (ak1 )k2 . Let k3 = k1 k2 . Then there exists a
integer k3 such that c = ak3 , thus a | c from part (a).
5. (c) Let a, a0 , b, b0 ∈ Z. If a | b and a0 | b0 then there exists integers k1 , k2 such that b = ak1
and b0 = a0 k2 . Then bb0 = (ak1 )(a0 k2 ) = (aa0 )(k1 k2 ). Let k3 = k1 k2 . Then there exists an
integer such that bb0 = aa0 k3 , thus aa0 | bb0 .
6. (a) Let a, b, n ∈ Z. We say that a ≡ b (mod n) if n | (a − b).
6. (b) Let a, b, c, n ∈ Z. If a ≡ b (mod n) and b ≡ c (mod n) then n | (a − b) and n | (b − c)
from part (a). From 5.(a) there exists k1 , k2 ∈ Z such that nk1 = a − b and nk2 = b − c.
Then
nk1 + nk2 = (a − b) + (b − c) = a − c
⇒n(k1 + k2 ) = a − c.
Let k3 = k1 + k2 then there exists an integer k3 such nk3 = a − c. Hence n | a − c and thus
a ≡ b (mod n) by part (a).
6. (c) Any integer is either odd or even so we consider two cases. First suppose n is even,
then n ≡ 0 (mod 2). Then there exists k1 ∈ Z such that 2k1 = n. So we have that
n2 + n = (2k1 )(2k1 ) + 2k1 = 2(2k12 + k1 ).
Let k2 = 2k12 + k1 . Then there exists k2 ∈ Z such that n2 + n = 2k2 and hence n2 + n ≡ 0
(mod 2). Thus n2 + n is even.
Now suppose n is odd, then n ≡ 1 (mod 2). Then 2 | n − 1 and there exists k1 ∈ Z such
that 2k1 = n − 1. Thus n = 2k1 + 1 and we have that
n2 + n = (2k1 + 1)(2k1 + 1) + (2k1 + 1) = 4k12 + 4k1 + 1 + 2k1 + 1 = 2(2k12 + 3k1 + 1).
3
Let k2 = 2k12 + 3k1 + 1. Then there exists k2 ∈ Z such that n2 + n = 2k2 and hence n2 + n ≡ 0
(mod 2). Thus n2 + n is even.
6. (d) There are nine equivalence classes modulo 9. Since we are picking ten integers and
10 − 9 > 0, two of them (say a and b) must have the same equivalence class modulo 9 by
the pigeonhole principle. Therefore a ≡ b (mod 9).
7. There are ten digits so we consider 20142014 modulo 10. We have that 2014 ≡ 4 (mod 10)
and therefore 20142014 ≡ 42014 (mod 10). We note that
41 = 4, 42 = 16, 43 = 64, 44 = 256, 45 = 1024 . . . .
So we guess that the last digit of 42n will be 4 for n ≥ 1. So we will show that 42n ≡ 6
(mod 10) for n ≥ 1.
Let P (n) be the assertion that 42n ≡ 6 (mod 10).
Base case: 42(1) = 16 and 16 ≡ 6 (mod 10). So P (1) is true.
Induction step: Assume P (n − 1) is true. Then 42(n−1) ≡ 6 (mod 10) by assumption.
We have that
42n = 42n−2+2 = 42(n−1)+2 = 42 ∗ 42(n−1)
and
42 ∗ 42(n−1) ≡ 42 ∗ 6 (mod 10) by the induction hypothesis.
We have that 42 ∗ 6 = 16 ∗ 6 = 96 and 96 ≡ 6 (mod 10). Thus 42n ≡ 6 (mod 10) and
therefore P (n) is true. Since 2014 is an even number we have that
20142014 ≡ 42014 ≡ 6 (mod 10).
Thus the last digit of 20142014 is 6.
8. (a) An equivalence relation on a set A is a binary relation on A that is reflexive, symmetric, and transitive. Denote the binary relation by ∼ and let a, b, c ∈ A. We have that
a ∼ a if ∼ is reflexive. If a ∼ b then b ∼ a if ∼ is symmetric. Finally, if a ∼ b and b ∼ c
then a ∼ c if ∼ is transitive.
8. (b) First we show that ∼ is reflexive. Let a, b, c ∈ A. Since f (a) = f (a) is a tautology
we have that a ∼ a. We next show that ∼ is symmetric. We have that
a ∼ b ⇒ f (a) = f (b) by definition
⇒ f (b) = f (a) since = is symmetric
⇒ b ∼ a by definition.
It now remains to show that ∼ is transitive. Suppose a ∼ b and b ∼ c. Then by definition
f (a) = f (b) and f (b) = f (c). Thus f (a) = f (c) and therefore a ∼ c. Since ∼ is reflexive,
symmetric and transitive it is an equivalence relation by part (a).
© Copyright 2026 Paperzz