discrete_mathematics_with_a.../chapter_7/exercises.md
2026-08-12 00:39:58 -07:00

4895 lines
125 KiB
Markdown

Page 458
**Exercise Set 7.1**
1. Let $X = \{1, 3, 5\}$ and $Y = \{s, t, u, v\}$. Define $f: X \to Y$ by the
following arrow diagram.
(See page 458 for image)
a. Write the domain of $f$ and the co-domain of $f$.
Domain: $\{1, 3, 5\}$
Co-domain: $\{s, t, u, v\}$
b. Find $f(1)$, $f(3)$, and $f(5)$.
$f(1) = v, f(3) = s, f(5) = v$
c. What is the range of $f$?
$\{s, v\}$
d. Is $3$ an inverse image of $s$? Is $1$ an inverse image of $u$?
yes; no
e. What is the inverse image of $s$? of $u$? of $v$?
$\{3\}$;$\emptyset$;$\{1, 5\}$
f. Represent $f$ as a set of ordered pairs.
$\{(1, v), (3, s), (5, v)\}$
2. Let $X = \{1, 3, 5\}$ and $Y = \{a, b, c, d\}$. Define $g: X \to Y$ by the
following arrow diagram.
(See page 459 for image)
a. Write the domain of $g$ and the co-domain of $g$.
Domain: $\{1, 3, 5\}$
Co-domain: $\{a, b, c, d\}$
b. Find $g(1)$, $g(3)$, and $g(5)$.
$g(1) = b, g(3) = b, g(5) = b$
c. What is the range of $g$?
$\{b\}$
d. Is $3$ an inverse image of $a$? Is $1$ an inverse image of $b$?
no;yes
e. What is the inverse image of $b$? of $c$?
$\{1, 3, 5\}, \emptyset$
f. Represent $g$ as a set of ordered pairs.
$$ \{(1, b), (3, b), (5, b)\} $$
3. Indicate whether the statements in parts (a)-(d) are true or false for all
functions. Justify your answers.
a. If two elements in the domain of a function are equal, then their images in
the co-domain are equal.
True. The definition of a function states that every input element in the domain
must have an output element in the co-domain. Since two elements in the domain
of the function are equal, then their outputs in the co-domain must be equal by
this definition.
b. If two elements in the co-domain of a function are equal, then their
preimages in the domain are also equal.
This is false. A function can have the same output for two different inputs.
c. A function can have the same output for more than one input.
True, the definition of a function only states that every input to the function
must have an output, not necessarily unique outputs.
d. A function can have the same input for more than one output.
This is false. A single input can only map to a single output, not multiple
outputs.
4.
a. Find all functions from $X = \{a, b\}$ to $Y = \{u, v\}$.
$$ f(a) = u, f(a) = v, f(b) = u, f(b) = v $$
b. Find all functions from $X = \{a, b, c\}$ to $Y = \{u\}$.
$$ f(a) = u, f(b) = u, f(c) = u $$
c. Find all functions from $X = \{a, b, c\}$ to $Y = \{u, v\}$.
$$ f(a) = u, f(a) = v, f(b) = u, f(b) = v, f(c) = u, f(c) k v $$
5. Let $I_{\mathbb{z}}$ bee the identity function defined on the set of all
integers, and suppose that $e$, $b_i^{jk}$, $K(t)$, and $u_{kj}$ all
represent integers. Find the following:
a. $I_{\mathbb{Z}}(e)$
$$ I_{\mathbb{Z}}(e) = e $$
b. $I_{\mathbb{Z}}\left(b_i^{jk}\right)$
$$ I_{\mathbb{Z}}\left(b_i^{jk}\right) = b_i^{jk}\right $$
c. $I_{\mathbb{Z}}(K(t))$
$$ I_{\mathbb{Z}}(K(t)) = K(t) $$
d. $I_{\mathbb{Z}}(u_{kj})$
$$ I_{\mathbb{Z}}(u_{kj}) = u_{kj} $$
6. Find functions defined on the set of nonnegative integers that can be used to
define the sequences whose first six terms are given below.
a. $1, -\dfrac{1}{3}, \dfrac{1}{5}, -\dfrac{1}{7}, \dfrac{1}{9}, -\dfrac{1}{11}$
$$ f: \mathbb{Z}^{\text{nonneg}} \to \mathbb{R} $$
$$ f(n) = \frac{(-1)^n}{2n + 1} $$
b. $0, -2, 4, -6, 8, -10$
$$ f: \mathbb{Z}^{\text{nonneg}} \to \mathbb{R} $$
$$ f(n) = (-1)^n \cdot 2n $$
7. Let $A = \{1, 2, 3, 4, 5\}$, and define a function
$F: \mathscr{P}(A) \to \mathbb{Z}$ as follows: For each set $X$ in
$\mathscr{P}(A)$,
$$
F(x) =
\begin{cases}
0& \text{if } X \text{ has an even number of elements} \\
1 & \text{if } X \text{ has an odd number of elements}
\end{cases}
$$
Find the following:
a. $F(\{1, 3, 4\})$
$$ F(\{1, 3, 4\}) = 1 $$
because $\{1, 3, 4\}$ has an odd number of elements.
b. $F(\emptyset)$
$$ F(\emptyset) = 0 $$
because $\emptyset$ has an even number of elements.
c. $F(\{2, 3\})$
$$ F(\{2, 3\}) = 0 $$
because $\{2, 3\}$ has an even number of elements.
d. $F(\{2, 3, 4, 5\})$
$$ F(\{2, 3, 4, 5\}) = 0 $$
because $\{2, 3, 4, 5\}$ has an even number of elements.
8. Let $J_5 = \{0, 1, 2, 3, 4\}$, and define a function $F: J_5 \to J_5$ as
follows: For each $x \in J_5$, $F(x) = (x^3 + 2x + 4) \mod 5$.
Find the following:
a. $F(0)$
$$ F(0) = ((0)^3 + 2(0) + 4) \mod 5 $$
$$ = (0 + 0 + 4) \mod 5 $$
$$ = 4 \mod 5 $$
$$ = 4 $$
b. $F(1)$
$$ F(1) = ((1)^3 + 2(1) + 4) \mod 5 $$
$$ = (1 + 2 + 4) \mod 5 $$
$$ = 7 \mod 5 $$
$$ = 2 $$
c. $F(2)$
$$ F(2) = ((2)^3 + 2(2) + 4) \mod 5 $$
$$ = (8 + 4 + 4) \mod 5 $$
$$ = 16 \mod 5 $$
$$ = 1 $$
d. $F(3)$
$$ F(3) = ((3)^3 + 2(3) + 4) \mod 5 $$
$$ = (27 + 6 + 4) \mod 5 $$
$$ = 37 \mod 5 $$
$$ = 2 $$
e. $F(4)$
$$ F(4) = ((4)^3 + 2(4) + 4) \mod 5 $$
$$ = (64 + 8 + 4) \mod 5 $$
$$ = 76 \mod 5 $$
$$ = 1 $$
9. Define a function $S: \mathbb{Z}^+ \to \mathbb{Z}^+$ as follows: For each
positive integer $n$,
$$ S(n) = \text{ the sum of the positive divisors of } n $$
Find the following:
a. $S(1)$
$$ S(1) = 1 $$
b. $S(15)$
$$ S(15) = 1 + 3 + 5 + 15 = 24 $$
c. $S(17)$
$$ S(17) = 1 + 17 = 18 $$
d. $S(5)$
$$ S(5) = 1 + 5 = 6 $$
e. $S(18)$
$$ S(18) = 1 + 2 + 3 + 6 + 9 + 18 = 39 $$
f. $S(21)$
$$ S(21) = 1 + 3 + 7 + 21 = 32 $$
10. Let $D$ be the set of all finite subsets of positive integers.
Define a function $T: \mathbb{Z}^+ \to D$ as follows: For each positive integer
$n$, $T(n) =$ the set of positive divisors of $n$.
Find the following:
a. $T(1)$
$$ T(1) = \{1\} $$
b. $T(15)$
$$ T(15) = \{1, 3, 5, 15\} $$
c. $T(17)$
$$ T(17) = \{1, 17\} $$
d. $T(5)$
$$ T(5) = \{1, 5\} $$
e. $T(18)$
$$ T(18) = \{1, 2, 3, 6, 9, 18\} $$
f. $T(21)$
$$ T(21) = \{1, 3, 7, 21\} $$
11. Define $F: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z} \times \mathbb{Z}$ as
follows: For every ordered pair $(a, b)$ of integers,
$F(a, b) = (2a + 1, 3b - 2)$.
Find the following:
a. $F(4, 4)$
$$ F(4, 4) = (2(4) + 1, 3(4) - 2) $$
$$ = (8 + 1, 12 - 2) $$
$$ = (9, 10) $$
b. $F(2, 1)$
$$ F(2, 1) = (2(2) + 1, 3(1) - 2) $$
$$ = (4 + 1, 3 - 2) $$
$$ = (5, 1) $$
c. $F(3, 2)$
$$ F(3, 2) = (2(3) + 1, 3(2) - 2) $$
$$ = (6 + 1, 6 - 2) $$
$$ = (7, 4) $$
d. $F(1, 5)$
$$ F(1, 5) = (2(1) + 1, 3(5) - 2) $$
$$ = (2 + 1, 15 - 2) $$
$$ = (3, 13) $$
12. Let $J_5 = \{0, 1, 2, 3, 4\}$, and define
$G: J_5 \times J_5 \to J_5 \times J_5$ as follows: For each
$(a, b) \in J_5 \times J_5$,
$$ G(a, b) = ((2a + 1) \mod 5, (3b - 2) \mod 5) $$
Find the following:
a. $G(4, 4)$
$$ G(4, 4) = ((2(4) + 1) \mod 5, (3(4) - 2) \mod 5) $$
$$ = ((8 + 1) \mod 5, (12 - 2) \mod 5) $$
$$ = (9 \mod 5, 10 \mod 5) $$
$$ = (4, 0) $$
b. $G(2, 1)$
$$ G(2, 1) = ((2(2) + 1) \mod 5, (3(1) - 2) \mod 5) $$
$$ = ((4 + 1) \mod 5, (3 - 2) \mod 5) $$
$$ = (5 \mod 5, 1 \mod 5) $$
$$ = (0, 1) $$
c. $G(3, 2)$
$$ G(3, 2) = ((2(3) + 1) \mod 5, (3(2) - 2) \mod 5) $$
$$ = ((6 + 1) \mod 5, (6 - 2) \mod 5) $$
$$ = (7 \mod 5, 4 \mod 5) $$
$$ = (2, 4) $$
d. $G(1, 5)$
$$ G(1, 5) = ((2(1) + 1) \mod 5, (3(5) - 2) \mod 5) $$
$$ = ((2 + 1) \mod 5, (15 - 2) \mod 5) $$
$$ = (3 \mod 5, 13 \mod 5) $$
$$ = (3, 3) $$
13. Let $J_5 = \{0, 1, 2, 3, 4\}$, and define functions $f: J_5 \to J_5$ and
$g: J_5 \to J_5$ as follows: For each $x \in J_5$,
$$ f(x) = (x + 4)^2 \mod 5 \quad \text{ and } \quad g(x) = (x^2 + 3x + 1) \mod 5 $$
Is $f = g$? Explain.
| $x$ | $f(x)$ | $g(x)$ |
| --- | ------ | ------ |
| $0$ | $1$ | $1$ |
| $1$ | $0$ | $0$ |
| $2$ | $1$ | $1$ |
| $3$ | $4$ | $4$ |
| $4$ | $4$ | $4$ |
The table shows that $f(x) = g(x)$ for every $x \in J_5$. Therefore $f = g$ by
definition of equality of functions.
14. Define functions $H$ and $K$ from $\mathbb{R}$ to $\mathbb{R}$ by the
following formulas:
For every $x \in \mathbb{R}$,
$$ H(x) = \lfloor x \rfloor + 1 \quad \text{ and } \quad K(x) = \lceil x \rceil $$
Does $H = K$? Explain.
No. For example say $x = 0$, then $H(0) = \lfloor 0 \rfloor + 1 = 0 + 1 = 1$ and
$K(0) = \lceil 0 \rceil = 0$. Therefore it cannot be said that for every
$x \in \mathbb{R}$ that $H(x) = K(x)$, and thus $H \neq K$.
15. Let $F$ and $G$ be functions from the set of all real numbers to itself.
Define the product functions $F \cdot G: \mathbb{R} \to \mathbb{R}$ and
$G \cdot F: \mathbb{R} \to \mathbb{R}$ as follows: For every
$x \in \mathbb{R}$,
$$ (F \cdot G)(x) = F(x) \cdot G(x) $$
$$ (G \cdot F)(x) = G(x) \cdot F(x) $$
Does $F \cdot G = G \cdot F$? Explain.
Yes, by the commutative law of multiplication of Real numbers:
$$ (F \cdot G)(x) = F(x) \cdot G(x) = G(x) \cdot F(x) = (G \cdot F)(x) $$
Therefore, since $(F \cdot G)(x) = (G \cdot F)(x)$ for all $x \in \mathbb{R}$,
it can be concluded that $F \cdot G = G \cdot F$ by the definition of equality
of functions.
16. Let $F$ and $G$ be function sfrom the set of all real numbers to itself.
Define new functions $F - G: \mathbb{R} \to \mathbb{R}$ and
$G - F: \mathbb{R} \to \mathbb{R}$ as follows: For every $x \in \mathbb{R}$,
$$ (F - G)(x) = F(x) - G(x) $$
$$ (G - F)(x) = G(x) - F(x) $$
Does $F - G = G - F$? Explain.
No. Consider the definition of the difference of sets:
$$ (F - G)(x) = F(x) - G(x) = F(x) $$
and:
$$ (G - F)(x) = G(x) - F(x) = G(x) $$
Since $F(x) \neq G(x)$ for all $x \in \mathbb{R}$, it can be concluded that
$F - G \neq G - F$ by the definition of the equality of functions.
17. Use the definition of logarithm to fill in the blanks below.
a. $\log_28 = 3$ because _____.
$$ 2^3 = 8 $$
b. $\log_5\left(\dfrac{1}{25}\right) = -2$ because _____.
$$ 5^{-2} = \frac{1}{5^2} = \frac{1}{25} $$
c. $\log_44 = 1$ because _____.
$$ 4^1 = 4 $$
d. $\log_3(3^n) = n$ because _____.
$$ 3^n = 3^n $$
e. $\log_41 = 0$ because _____.
$$ 4^0 = 1 $$
18. Find exact values for each of the following quantities without using a
calculator.
a. $\log_{3}81$
$$ 3^{\text{?}} = 81 $$
$$ \log_{3}81 = 4 $$
b. $\log_{2}1024$
$$ 2^{\text{?}} = 1024 $$
$$ \log_{2}1024 = 10 $$
c. $\log_{3}\left(\dfrac{1}{27}\right)$
$$ \log_{3}\left(\frac{1}{27}\right) = -3 $$
d. $\log_{2}1$
$$ \log_{2}1 = 0 $$
e. $\log_{10}\left(\dfrac{1}{10}\right)$
$$ \log_{10}\left(\dfrac{1}{10}\right) = -1 $$
f. $\log_{3}3$
$$ \log_{3}3 = 1 $$
g. $\log_{2}(2^k)$
$$\log_{2}(2^k) = k $$
19. Use the definition of logarithm to prove that for any positive real number
$b$ with $b \neq 1$, $\log_{b}b = 1$.
**Proof:**
Let $b$ be any positive real number with $b \neq 1$. Since $b^1 = b$, then
$\log_{b}b = 1$ by definition of logarithm.
Q.E.D.
20. Use the definition of logarithm to prove that for any positive real number
$b$ with $b \neq 1$, $\log_{b}1 = 0$.
**Proof:**
Let $b$ be any positive real number with $b \neq 1$. Since $b^0 = 1$, then
$\log_{b}1 = 0$ by definition of logarithm.
Q.E.D.
21. If $b$ is any positive real number with $b \neq 1$ and $x$ is any real
number, $b^{-x}$ is defined as follows:
$b^{-x} = \dfrac{1}{b^x}$. Use this definition and the definition of logarithm
to prove that $\log_{b}\left(\dfrac{1}{u}\right) = -\log_{b}u$ for all positive
real numbers $u$ and $b$, with $b \neq 1$.
**Proof:**
Let $b$ be any positive real number with $b \neq 1$. Let $u$ be any positive
real number.
Let $v = \log_{b}\left(\dfrac{1}{u}\right)$. By the definition of logarithm,
this means that $b^v = \dfrac{1}{u}$. It follows by algebra that:
$$ b^v = \frac{1}{u} $$
$$ u \cdot b^v = 1 $$
$$ u = \frac{1}{b^v} $$
$$ u = b^{-v} $$
Hence, by the definition of logarithm:
$$ -v = \log_{b}(u) $$
and by algebra:
$$ v = -\log_{b}(u) $$
Since $v = \log_{b}\left(\dfrac{1}{u}\right)$ and $v = -\log_{b}(u)$, it follows
by the definition of equality that:
$$ \log_{b}\left(\frac{1}{u}\right) = -\log{b}(u) $$
This is what was to be shown.
Q.E.D.
22. Use the unique factorization for the integers theorem (Section 4.4) and the
definition of logarithm to prove that $\log_{3}(7)$ is irrational.
_Hint:_ Use a proof by contradiction. Suppose $\log_{3}7$ is rational. Then
$\log_{3}7 = \dfrac{a}{b}$ for some integers $a$ and $b$ with $b \neq 0$.
Apply the definition of logarithm and rewrite $\log_{3}7 = \dfrac{a}{b}$ in
exponential form.
**Proof (by contradiction):**
Suppose $\log_{3}(7)$ is rational, that is $\log_{3}(7) = \dfrac{a}{b}$ for some
integers $a$ and $b$ where $b \neq 0$.
By the definition of logarithm, this would mean that:
$$ 3^{\frac{a}{b}} = 7 $$
Then by algebra:
$$ 3^a = 7^b $$
Since $b \neq 0$, we know that $7^b \neq 1$, and by equality it follows that
$3^a \neq 1$. Additionally, by the definition of exponentiation, it is known
that $7^b > 0$ and $3^a > 0$ (they are both positive numbers).
But, by the unique factorization for integers theorem, this means that $7^b$ and
$3^a$ are two different prime factorizations of the same positive integer. This
is only possible if the positive integer is equal to $1$.
Hence $3^a = 7^b = 1$, but it has already been established that
$3^a = 7^b \neq 1$. This is a contradiction.
Therefore the supposition is false, and $\log_{3}(7)$ is irrational.
Q.E.D.
23. If $b$ and $y$ are positive real numbers such that $\log_{b}y = 3$, what is
$\log_{\frac{1}{b}}y$? Explain.
**Proof:**
Suppose $b$ and $y$ are positive real numbers such that $\log_{b}y = 3$.
By the definition of logarithm, this means that:
$$ b^3 = y $$
To find $\log_{\frac{1}{b}}y$, first, replace $y$ by substitution:
$$ \log_{\frac{1}{b}}y $$
$$ = \log_{\frac{1}{b}}(b^3) $$
Then notice that $\dfrac{1}{b} = b^{-1}$, and then substitute:
$$ = \log_{b^{-1}}(b^3) $$
By the definition of logarithm, this means that:
$$ (b^{-1})^x = b^3 $$
Where $x$ is $\log_{\frac{1}{b}}y$, or our answer. By the multiplication of
exponents, this means that:
$$ b^{-1 \cdot x} = b^3 $$
And by multiplication of negative numbers:
$$ b^{-1 \cdot -3} = b^3 $$
Therefore $x = -3$, or:
$$ \log_{\frac{1}{b}}y = -3 $$
This is what was to be found.
Q.E.D.
24. If $b$ and $y$ are positive real numbers such that $\log_{b}y = 2$, what is
$\log_{b^2}(y)$? Explain.
**Proof:**
Suppose $b$ and $y$ are positive real numbers such that $\log_{b}y = 2$. By the
definition of logarithm, this means that:
$$ \log_{b}y = 2 $$
$$ b^2 = y $$
To find $\log_{b^2}(y)$, first substitute in for $y$:
$$ \log_{b^2}(b^2) $$
By the definition of logarithm, this means that:
$$ \log_{b^2}(b^2) = 1 $$
because $(b^2)^1 = b^2$.
This is what was to be found.
Q.E.D.
25. Let $A = \{2, 3, 5\}$ and $B = \{x, y\}$. Let $p_1$ and $p_2$ be the
**projections of $A \times B$ onto the first and second coordinates.** That
is, for each pair $(a, b) \in A \times B$, $p_1(a, b) = a$ and
$p_2(a, b) = b$.
a. Find $p_1(2, y)$ and $p_1(5, x)$. What is the range of $p_1$?
$$ p_1(2, y) = 2 $$
$$ p_1(5, x) = 5 $$
Range of $p_1$:
$$ \{2, 3, 5\} $$
b. Find $p_2(2, y)$ and $p_2(5, x)$. What is the range of $p_2$?
$$ p_2(2, y) = y $$
$$ p_2(5, x) = x $$
Range of $p_2$:
$$ \{x, y\} $$
26. Observe that $\mod$ and $\text{div}$ can be defined as functions from
$\mathbb{Z}^{\text{nonneg}}$ \times \mathbb{Z}^+$ to $\mathbb{Z}$. For each
ordered pair $(n, d)$ consisting of a nonnegative integer $n$ and a positive
integer $d$, let
$\mod(n, d) = n \mod d$ (the nonnegative remainder obtained when $n$ is divided
by $d$).
$\text{div}(n, d) = n \text{ div } d$ (the integer quotient obtained when $n$ is
divided by $d$).
Find each of the following:
a. $\mod(67, 10)$ and $\text{div}(67, 10)$
$$ \mod(67, 10) = 7 $$
$$ \text{div}(67, 10) = 6 $$
b. $\mod(59, 8)$ and $\text{div}(59, 8)$
$$ \mod(59, 8) = 3 $$
$$ \text{div}(59, 8) = 7 $$
c. $\mod(30, 5)$ and $\text{div}(30, 5)$
$$ \mod(30, 5) = 0 $$
$$ \text{div}(30, 5) = 6 $$
27. Let $S$ be the set of all strings of $a$'s and $b$'s.
a. Define $f: S \to \mathbb{Z}$ as follows: For each string $s$ in $S$
$$
f(s) =
\begin{cases}
& \text{ the number of b's to the left-most a in s} \\
0 & \text{if s contains no a's}
\end{cases}
$$
Find $f(aba)$, $f(bbab)$, and $f(b)$. What is the range of $f$?
$$ f(aba) = 0 $$
$$ f(bbab) = 2 $$
$$ f(b) = 0 $$
The range of $f$: $\mathbb{Z}^{\text{nonneg}}$
b. Define $g: S \to S$ as follows: For each string $s$ in $S$,
$$ g(s) = \text{ the string obtained by writing the characters of s in reverse order} $$
Find $g(aba)$, $g(bbab)$, and $g(b)$. What is the range of $g$?
$$ g(aba) = aba $$
$$ g(bbab) = babb $$
The range of $g$ is $S$.
28. Consider the coding and decoding functions $E$ and $D$ defined in Example
7.1.9.
a. Find $E(0110)$ and $D(111111000111)$.
$$ E(0110) = 000111111000 $$
$$ D(111111000111) = 1101 $$
b. Find $E(1010)$ and $D(000000111111)$.
$$ E(1010) = 111000111000 $$
$$ D(000000111111) = 0011 $$
29. Consider the Hamming distance function defined in Example 7.1.10.
a. Find $H(10101, 00011)$.
$$ H(10101, 00011) = 3 $$
b. Find $H(00110, 10111)$.
$$ H(00110, 10111) = 2 $$
30. Draw arrow diagrams for the Boolean functions defined by the following
input/output tables.
a.
| Input | Intput | Output |
| ------- | ------ | ------ |
| $P$ | $Q$ | $R$ |
| ------- | - | |
| 1 | 1 | 0 |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 0 | 0 | 1 |
Omitted.
b.
| Input | Intput | Input | Output |
| ----- | ------ | ----- | ------ |
| $P$ | $Q$ | $R$ | $S$ |
| - | - | - | - |
| 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
Omitted.
31. Fill in the following table to show the values of all possible two-place
Boolean functions.
| Input | Input | $f_1$ | $f_2$ | $f_3$ | $f_4$ | $f_5$ | $f_6$ | $f_7$ | $f_8$ | $f_9$ | $f_{10}$ | $f_{11}$ | $f_{12}$ | $f_{13}$ | $f_{14}$ | $f_{15}$ | $f_{16}$ |
| ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
32. Consider the three-place Boolean function $f$ defined by the following rule:
For each triple $(x_1, x_2, x_3)$ of $0$'s and $1$'s,
$$ f(x_1, x_2, x_3) = (4x_1 + 3x_2 + 2x_3) \mod 2 $$
a. Find $f(1, 1, 1)$ and $f(0, 0, 1)$.
$$ f(1, 1, 1) = (4(1) + 3(1) + 2(1)) \mod 2 $$
$$ f(1, 1, 1) = (4 + 3 + 2) \mod 2 $$
$$ f(1, 1, 1) = 9 \mod 2 $$
$$ f(1, 1, 1) = 1 $$
$$ f(0, 0, 1) = (4(0) + 3(0) + 2(1)) \mod 2 $$
$$ f(0, 0, 1) = (0 + 0 + 2) \mod 2 $$
$$ f(0, 0, 1) = 2 \mod 2 $$
$$ f(0, 0, 1) = 0 $$
b. Describe $f$ using an input/output table.
| $x_1$ | $x_2$ | $x_3$ | $f(x_1, x_2, x_3)$ |
| ----- | ----- | ----- | ------------------ |
| $0$ | $0$ | $0$ | $0$ |
| $0$ | $0$ | $1$ | $0$ |
| $0$ | $1$ | $0$ | $1$ |
| $0$ | $1$ | $1$ | $1$ |
| $1$ | $0$ | $0$ | $0$ |
| $1$ | $0$ | $1$ | $0$ |
| $1$ | $1$ | $0$ | $1$ |
| $1$ | $1$ | $1$ | $1$ |
33. Student A tries to define a function $g: \mathbb{Q} \to \mathbb{Z}$ by the
rule
$g\left(\dfrac{m}{n}\right) = m - n$, for all integers $m$ and $n$ with
$n \neq 0$.
Student B claims that $g$ is not well defined. Justify student B's claim.
Suppose $\dfrac{m}{n} = \dfrac{1}{2}$, this would mean that
$g\left(\dfrac{m}{n}\right) = 1 - 2 = -1$.
Since $\dfrac{m}{n} = \dfrac{1}{2}$, this means that
$\dfrac{m}{n} = \dfrac{1}{2} = \dfrac{2}{4}$. Since they are equivalent, this
means that
$g\left(\dfrac{1}{2}\right) = g\left(\dfrac{2}{4}\right) = 2 - 4 = -2$.
But notice that:
$$ g\left(\frac{1}{2}\right) = -1 \neq -2 = g\left(\frac{2}{4}\right) $$
Since the function $g$ gives two different outputs for the same input, the
function $g$ is not well defined.
34. Student C tries to define a function $h: \mathbb{Q} \to \mathbb{Q}$ by the
rule
$h\left(\dfrac{m}{n}\right) = \dfrac{m^2}{n}$, for all integers $m$ and $n$ with
$n \neq 0$.
Student D claims that $h$ is not well defined. Justify student D's claim.
Suppose $\dfrac{m}{n} = \dfrac{2}{3}$, then
$h\left(\dfrac{2}{3}\right) = \dfrac{(2)^2}{3} = \dfrac{4}{3}$.
Notice that $\dfrac{2}{3} = \dfrac{4}{6}$, so
$h\left(\dfrac{4}{6}\right) = \dfrac{(4)^2}{6} = \dfrac{16}{6} = \dfrac{8}{3}$.
Notice that:
$$ h\left(\frac{2}{3}\right) = \frac{4}{3} \neq \frac{8}{3} = h\left(\frac{4}{6}\right) $$
Since the function $h$ does not produce the same output given the same input,
the function is not well defined.
35. Let $U = \{1, 2, 3, 4\}$. Student A tries to define a function
$R: U \to \mathbb{Z}$ as follows: For each $x \in U$,
$R(x)$ is the integer $y$ so that $(xy) \mod 5 = 1$.
Student B claims that $R$ is not well defined. Who is correct: student A or
student B? Justify your answer.
Consider $R(3) = 2$ since $(3 \cdot 2) \mod 5 = 1$. On the other hand,
$R(3) = 7$ since $(3 \cdot 7) \mod 5 = 1$.
Since $R$ returns multiple outputs for the same input, it is not well defined,
and Student B is correct.
36. Let $V = \{1, 2, 3\}$. Student C tries to define a function $S: V \to V$ as
follows: For each $x \in V$,
$S(x)$ is the integer $y$ in $V$ so that $(xy) \mod 4 = 1$.
Student D claims that $S$ is not well defined. Who is right: student C or
student D? Justify your answer.
Consider $S(1) = 17$ since $(1 \cdot 17) \mod 4 = 1$. On the other hand
$S(1) = 13$ since $(1 \cdot 13) \mod 4 = 1$.
Since $S$ returns multiple outputs for the same input, it is not well defined,
and Student D is correct.
37. On certain computers the integer data type goes from $-2,147,483,648$
through $2,147,483,647$. Let $S$ be the set of all integers from
$-2,147,483,648$ through $2,147,483,647$. Try to define a function
$f: S \to S$ by the rule $f(n) = n^2$ for each $n$ in $S$. Is $f$ well
defined? Explain.
No, $2,147,483,247 = 2^{31} - 1$, so for values of $n$ greater than $2^{16}$,
$f(n) = n^2$ will be greater than $2^{32}$, which falls outside of $S$.
38. Let $X = \{a, b, c\}$ and $Y = \{r, s, t, u, v, w\}$. Define $f: X \to Y$ as
follows: $f(a) = v$, $f(b) = v$, and $f(c) = t$.
a. Draw an arrow diagram for $f$.
Omitted.
b. Let $A = \{a, b\}$, $C = \{t\}$, $D = \{u, v\}$, and $E = \{r, s\}$. Find
$f(A)$, $f(X)$, $f^{-1}(C)$, $f^{-1}(D)$, $f^{-1}(E)$, and $f^{-1}(Y)$.
$$ f(A) = \{v\} $$
$$ f(X) = $\{t, v\} $$
$$ f^{-1}(C) = \{c\} $$
$$ f^{-1}(D) = \{a, b\} $$
$$ f^{-1}(E) = \emptyset $$
$$ f^{-1}(Y) = \{a, b, c\} $$
39. Let $X = \{1, 2, 3, 4\}$ and $Y = \{a, b, c, d, e\}$. Define $g: X \to Y$ as
follows: $g(1) = a$, $g(2) = a$, $g(3) = a$, and $g(4) = d$.
a. Draw an arrow diagram for $g$.
Omitted.
b. Let $A = \{2, 3\}$, $C = \{a\}$, and $D = \{b, c\}$. Find $g(A)$, $g(X)$,
$g^{-1}(C)$, $g^{-1}(D)$, and $g^{-1}(Y)$.
$$ g(A) = \{a\} $$
$$ g(X) = \{a, d\} $$
$$ g^{-1}(C) = \{1, 2, 3\} $$
$$ g^{-1}(D) = \emptyset $$
$$ g^{-1}(Y) = \{1, 2, 3, 4\} $$
40. Let $X$ and $Y$ be sets, let $A$ and $B$ be any subsets of $X$, and let $F$
be a function from $X$ to $Y$. Fill in the blanks in the following proof
that $F(A) \cup F(B) \subseteq F(A \cup B)$.
**Proof:**
Let $y$ be any element in $F(A) \cup F(B)$. _[We must show that $y$ is in
$F(A \cup B)$.]_ By definition of union, __ (i) __.
_Case 1 $y \in F(A)$:_
In this case, by definition of $F(A)$, $y = F(x)$ for __ (ii) __ $x \in A$.
Since $A \subseteq A \cup B$, it follows from the definition of union that
$x \in$ __ (iii) __. Hence, $y = F(x)$ for some $x \in A \cup B$, and thus, by
definition of $F(A \cup B)$, $y \in$ __ (iv) __.
_Case 2, $y \in F(B)$:_
In this case, by definition of $F(B)$, __ (v) __ for some $x \in B$. Since
$B \subseteq A \cup B$ it follows from the definition of union that __ (vi) __.
Thus $y \in F(A \cup B)$.
Therefore, regardless of whether $y \in F(A)$ or $y \in F(B)$, we have that
$y \in F(A \cup B)$ _[as was to be shown]_.
i. $y \in F(A) \cup F(B)$
ii. some
iii. $A \cup B$
iv. $F(A \cup B)$
v. $y = F(x)$
vi. $x \in A \cup B$
In 41-49 let $X$ and $Y$ be sets, let $A$ and $B$ be any subsets of $X$, and let
$C$ and $D$ be any subsets of $Y$. Determine which of the properties are true
for every function $F$ from $X$ to $Y$ and which are false for at least one
function $F$ from $X$ to $Y$. Justify your answers.
41. If $A \subseteq B$ then $F(A) \subseteq F(B)$
**Proof:**
Let $F$ be a function from $X$ to $Y$ and suppose $A \subseteq X$,
$B \subseteq X$, and $A \subseteq B$.
Then, let $y$ be some element such that $y \in F(A)$.
By definition of image of a set, $y = F(x)$ for some $x \in A$. Thus since
$A \subseteq B$, $x \in B$, and so $y = F(x)$ for some $x \in B$. Hence
$y \in F(B)$, and therefore $F(A) \subseteq F(B)$.
Q.E.D.
42. $F(A \cap B) \subseteq F(A) \cap F(B)$
**Proof:**
Suppose $y$ is some element such that $y \in F(A \cap B)$.
By the supposition and the definition of $A \cap B$, this means that $y = F(x)$
for some $x \in A \cap B$.
By the definition of intersection, it follows that $x \in A$ and $x \in B$.
By the definition of $F(A)$ and $F(B)$, $y = F(x)$ is in $F(A)$ and in $F(B)$.
Hence, by the definition of intersection, $y \in F(A) \cap F(B)$.
Since $y \in F(A) \cap F(B)$, it can be concluded that
$F(A \cap B) \subseteq F(A) \cap F(B)$.
Q.E.D.
43. $F(A) \cap F(B) \subseteq F(A \cap B)$
**Disproof (by counterexample):**
Let $X = \{1, 2, 3\}$ and $Y = \{a, b\}$. Then, define a function $F: X \to Y$
such that $F(1) = a, F(2) = b, F(3) = b$.
Let $A = \{1, 2\}$ and $B = \{1, 3\}$. Then $F(A) = \{a, b\}$ and
$F(B) = \{a, b\}$.
So $F(A) \cap F(B) = \{a, b\}$, and $F(A \cap B) = F(\{1\}) = \{a\}$.
Since $\{a\} \neq \{a, b\}$, the given statement is false.
Q.E.D.
44. For all subsets $A$ and $B$ of $X$, $F(A - B) = F(A) - F(B)$.
**Disproof (by counterexample):**
Let $X = \{1, 2\}$ and $Y = \{a\}$. Then, define a function $F: X \to Y$ such
that $F(1) = a$ and $F(2) = a$.
Let $A = \{1\}$ and $B = \{2\}$. Then $F(A - B) = F(\{1\}) = \{a\}$.
Then $F(A) - F(B) = F(\{1\}) - F(\{2\}) = \{a\} - \{a\} = \emptyset$.
Since $\{a\} \neq \emptyset$, the given statement is false.
Q.E.D.
45. For all subsets $C$ and $D$ of $Y$, if $C \subseteq D$, then
$F^{-1}(C) \subseteq F^{-1}(D)$.
**Proof:**
Let $F$ be a function from a set $X$ to a set $Y$, and suppose $C \subseteq Y$,
$D \subseteq Y$, and $C \subseteq D$.
Suppose $x \in F^{-1}(C)$. Then $F(x) \in C$. Since $C \subseteq D$,
$F(x) \in D$ also. Hence, by definition of inverse image, $x \in F^{-1}(D)$.
Therefore $F^{-1}(C) \subseteq F^{-1}(D)$.
Q.E.D.
46. For all subsets $C$ and $D$ of $Y$,
$$ F^{-1}(C \cup D) = F^{-1}(C) \cup F^{-1}(D) $$
**Proof:**
In order to prove:
$$ F^{-1}(C \cup D) = F^{-1}(C) \cup F^{-1}(D) $$
We must prove:
$$ F^{-1}(C \cup D) \subseteq F^{-1}(C) \cup F^{-1}(D) $$
and:
$$ F^{-1}(C) \cup F^{-1}(D) \subseteq F^{-1}(C \cup D) $$
_Proof $F^{-1}(C \cup D) \subseteq F^{-1}(C) \cup F^{-1}(D)$:_
Suppose $x \in F^{-1}(C \cup D)$. Then $F(x) \in C \cup D$. By the definition of
union, this means that $F(x) \in C$ or $F(x) \in D$.
_Case $F(x) \in C$:_
Since $F(x) \in C$, this means that $x \in F^{-1}(C)$. By the definition of
union, this means that $x \in F^{-1}(C) \cup F^{-1}(D)$.
_Case $F(x) \in D$:_
Since $F(x) \in D$, this means that $x \in F^{-1}(D)$. By the definition of
union, this means that $x \in F^{-1}(C) \cup F^{-1}(D)$.
In both cases, $x \in F^{-1}(C) \cup F^{-1}(D)$. Therefore, any element in
$F^{-1}(C \cup D)$ is also in $F^{-1}(C)$, and
$F^{-1}(C \cup D) \subseteq F^{-1}(C) \cup F^{-1}(D)$, as was to be shown.
_Proof $F^{-1}(C) \cup F^{-1}(D) \subseteq F^{-1}(C \cup D)$:_
Suppose $x \in F^{-1}(C) \cup F^{-1}(D)$. By definition of union, this means
that $x \in F^{-1}(C)$ or $x \in F^{-1}(D)$.
_Case $x \in F^{-1}(C)$:_
Since $x \in F^{-1}(C)$, this means that $F(x) \in C$. It follows by definition
of union that $F(x) \in C \cup D$, or $x \in F^{-1}(C \cup D)$.
_Case $x \in F^{-1}(D)$:_
Since $x \in F^{-1}(D)$, this means that $F(x) \in D$. It follows by definition
of union that $F(x) \in C \cup D$, or $x \in F^{-1}(C \cup D)$.
In both cases, $x \in F^{-1}(C \cup D)$. Therefore any element in
$F^{-1}(C) \cup F^{-1}(D)$ is in $F^{-1}(C \cup D)$, and so
$F^{-1}(C) \cup F^{-1}(D) \subseteq F^{-1}(C \cup D)$. This is what was to be
shown.
_Conclusion:_
Since both subset relations have been proved, it can be concluded that
$F^{-1}(C \cup D) = F^{-1}(C) \cup F^{-1}(D)$. This is what was to be shown.
Q.E.D.
47. For all subsets $C$ and $D$ of $Y$,
$$ F^{-1}(C \cap D) = F^{-1}(C) \cap F^{-1}(D) $$
**Proof:**
In order to prove:
$$ F^{-1}(C \cap D) = F^{-1}(C) \cap F^{-1}(D) $$
it must be shown that:
$$ F^{-1}(C \cap D) \subseteq F^{-1}(C) \cap F^{-1}(D) $$
and also that:
$$ F^{-1}(C) \cap F^{-1}(D) \subseteq F^{-1}(C \cap D) $$
_Proof $F^{-1}(C \cap D) \subseteq F^{-1}(C) \cap F^{-1}(D)$:_
Suppose $x \in F^{-1}(C \cap D)$, or $F(x) \in C \cap D$. By definition of
intersection, this means that $F(x) \in C$ and $F(x) \in D$, or
$x \in F^{-1}(C) \cap F^{-1}(D)$. This is what was to be shown.
_Proof $F^{-1}(C) \cap F^{-1}(D) \subseteq F^{-1}(C \cap D)$:_
Suppose $x \in F^{-1}(C) \cap F^{-1}(D)$, or $F(x) \in C$ and $F(x) \in D$. By
definition of intersection, $F(x) \in C \cap D$, or $x \in F^{-1}(C \cap D)$.
This is what was to be shown.
_Conclusion:_
Since both subset relations have been proved, it can be concluded that
$F^{-1}(C \cap D) = F^{-1}(C) \cap F^{-1}(D)$. This is what was to be shown.
Q.E.D.
48. For all subsets $C$ and $D$ of $Y$,
$$ F^{-1}(C - D) = F^{-1}(C) - F^{-1}(D) $$
**Proof:**
In order to prove:
$$ F^{-1}(C - D) = F^{-1}(C) - F^{-1}(D) $$
it must be shown that:
$$ F^{-1}(C - D) \subseteq F^{-1}(C) - F^{-1}(D) $$
and also that:
$$ F^{-1}(C) - F^{-1}(D) \subseteq F^{-1}(C - D) $$
_Proof $F^{-1}(C - D) \subseteq F^{-1}(C) - F^{-1}(D)$:_
Suppose $x \in F^{-1}(C - D)$, or $F(x) \in C - D$. By definition of difference
of sets, this means that $F(x) \in C$ and $F(x) \notin D$. By the definition of
inverse image, this means $x \in F^{-1}(C)$ and $x \notin F^{-1}(D)$. By the
definition of difference, this is $x \in F^{-1}(C) - F^{-1}(D)$. Thus
$F^{-1}(C - D) \subseteq F^{-1}(C) - F^{-1}(D)$, which is what was to be shown.
_Proof $F^{-1}(C) - F^{-1}(D) \subseteq F^{-1}(C - D)$:_
Suppose $x \in F^{-1}(C) - F^{-1}(D)$, or $F(x) \in C$ and $F(x) \notin D$. By
the definition of inverse image, this means that $F(x) \in C - D$, or
$x \in F^{-1}(C - D)$. Thus $F^{-1}(C) - F^{-1}(D) \subseteq F^{-1}(C - D)$,
which is what was to be shown.
_Conclusion:_
Since both subset relations have been proved, it can be concluded that
$F^{-1}(C - D) = F^{-1}(C) - F^{-1}(D)$, which is what was to be shown.
Q.E.D.
49. $F(F^{-1}(C)) \subseteq C$
**Proof:**
Suppose $x \in F(F^{-1}(C))$. By definition of image, there exists some
$a \in F^{-1}(C)$ such that $F(a) = x$. By definition of inverse image,
$a \in F^{-1}(C)$ means $F(a) \in C$. Since $F(a) = x$, we have $x \in C$.
Therefore $F(F^{-1}(C)) \subseteq C$.
Q.E.D.
50. Given a set $S$ and a subset $A$, the **characteristic function of $A$**,
denoted $\chi_A$, is the function defined from $S$ to $\mathbb{Z}$ with the
property that for each $u \in S$,
$$
\chi_{A}(u) =
\begin{cases}
1 & \text{if } u \in A \\
0 & \text{if } u \notin A
\end{cases}
$$
Show that each of the following holds for all subsets $A$ and $B$ of $S$ and
every $u \in S$.
a. \chi_{A \cap B}(u) = \chi_{A}(u) \cdot \chi_{B}(u)
Omitted.
b.
$\chi_{A \cup B}(u) = \chi_{A}(u) + \chi_{B}(u) - \chi_{A}(u) \cdot \chi_{B}(u)$
Omitted.
Each of exercises 51-53 refers to the Euler phi function, denoted $\phi$, which
is defined as follows: For each integer $n \geq 1$, $\phi(n)$ is the number of
positive integers less than or equal to $n$ that have no common factors with $n$
except $\pm 1$. For example $\phi(10) = 4$ because there are four positive
integers less than or equal to $10$ that have no common factors with $10$ except
$\pm 1$ - namely, $1$, $3$, $7$, and $9$.
51. Find each of the following:
a. $\phi(15)$
Omitted.
b. $\phi(2)$
Omitted.
c. $\phi(5)$
Omitted.
d. $\phi(12)$
Omitted.
e. $\phi(11)$
Omitted.
f. $\phi(1)$
Omitted.
52. Prove that if $p$ is a prime number and $n$ is an integer with $n \geq 1$,
then $\phi(p^n) = p^n - p^{n - 1}$.
Omitted.
53. Prove that there are infinitely many integers $n$ for which $\phi(n)$ is a
perfect square.
Omitted.
---
Page 480
**Exercise Set 7.2**
1. The definition of one-to-one is stated in two ways:
$$ \forall x_1, x_2 \in X, \text{ if } F(x_1) = F(x_2) \text{ then } x_1 = x_2 $$
and
$$ \forall x_1, x_2 \in X, \text{ if } x_1 \neq x_2 \text{ then } F(x_1) \neq F(x_2) $$
Why are these two statements logically equivalent?
Because the second statement is the contrapositive of the first.
2. Fill in each blank with the word _most_ or _least_.
a. A function $F$ is one-to-one if, and only if, each element in the co-domain
of $F$ is the image of at _____ one element in the domain of $F$.
most
b. A function $F$ is onto if, and only if, each element in the co-domain of $F$
is the image of at _____ one element in the domain of $F$.
least
3. When asked to state the definition of one-to-one, a student replies, "A
function $f$ is one-to-one if, and only if, every element of $X$ is sent by
$f$ to exactly one element of $Y$." Give a counterexample to show that the
student's reply is incorrect.
Suppose $X = \{a, b\}$ and $Y = \{1, 2\}$, and that $f: X \to Y$ such that
$f(a) = 1$ and $f(b) = 1$. This fulfills the students definition as every
element in $X$ is sent by $f$ to exactly one element of $Y$. Note that $f$ is
not one-to-one though, as $f(a) = f(b)$, but $a \neq b$.
4. Let $f: X \to Y$ be a function. True or false? A sufficient condition for $f$
to be one-to-one is that for every element $y$ in $Y$, there is at most one
$x$ in $X$ with $f(x) = y$. Explain your answer.
This is true. This is the definition for one-to-one, since every element $y$ in
$Y$ has at most one element $x$ in $X$, this means that, given any $x_1$ and
$x_2$ in $X$, if $x_1 \neq x_2$, then $F(x_1) \neq F(x_2)$. The key wording that
makes this true is "at most one."
5. All but two of the following statements are correct ways to express the fact
that a function $f$ is onto. Find the two that are incorrect.
a. $f$ is onto $\Leftrightarrow$ every element in its co-domain is the image of
some element in its domain.
true.
b. $f$ is onto $\Leftrightarrow$ every element in its domain has a corresponding
image in its co-domain.
false.
c. $f$ is onto $\Leftrightarrow \forall y \in Y, \exists x \in X$ such that
$f(x) = y$.
true.
d. $f$ is onto $\Leftrightarrow \forall x \in X, \exists y \in Y$ such that
$f(x) = y$.
false.
e. $f$ is onto $\Leftrightarrow$ the range of $f$ is the same as the co-domain
of $f$.
true.
6. Let $X = \{1, 5, 9\}$ and $Y = \{3, 4, 7\}$.
a. Define $f: X \to Y$ by specifying that
$$ f(1) = 4, f(5) = 7, f(9) = 4 $$
Is $f$ one-to-one? Is $f$ onto? Explain your answers.
$f$ is not one-to-one, as $f(1) = 4$ and $f(9) = 4$, but $1 \neq 9$.
$f$ is not onto, as there is no $x \in X$ such that $f(x) = 3$
b. Define $g: X \to Y$ by specifying that
$$ g(1) = 7, g(5) = 3, g(9) = 4 $$
Is $g$ one-to-one? Is $g$ onto? Explain your answers.
$g$ is one-to-one, as $g(1) \neq g(5) \neq g(9)$.
$g$ is onto, as every $y$ in $Y$ is an image of at least one $x$ in $X$.
7. Let $X = \{a, b, c, d\}$ and $Y = \{e, f, g\}$. Define functions $F$ and $G$
by the arrow diagrams below.
(See page 481) for images.
a. Is $F$ one-to-one? Why or why not? Is it onto? Why or why not?
$F$ is not one-to-one, as $F(c) = e$ and $F(d) = e$, but $c \neq d$.
$F$ is onto, as every $y$ in $Y$ is an image of at least one $x$ in $X$.
b. Is $G$ one-to-one? Why or why not? Is it onto? Why or why not?
$G$ is not one-to-one, as $G(a) = f$, $G(b) = f$, and $G(d) = f$, but
$a \neq b \neq d$.
$G$ is not onto, as $g \in Y$, but there is no $x$ in $X$ such that $G(x) = g$.
8. Let $X = \{a, b, c\}$ and $Y = \{d, e, f, g\}$. Define functions $H$ and $K$
by the arrow diagrams below.
(See page 481) for images.
a. Is $H$ one-to-one? Why or why not? Is it onto? Why or why not?
$H$ is not one-to-one, as $H(b) = f$ and $H(c) = f$, but $b \neq a$.
$H$ is not onto, as both $e$ and $g$ are in $Y$, but there is no $x$ in $X$ such
that $H(x) = e$ nor $H(x) = g$.
b. Is $K$ one-to-one? Why or why not? Is it onto? Why or why not?
$K$ is one-to-one, as $K(a) \neq K(b) \neq K(c)$.
$K$ is not onto, as $g \in Y$, but $\nexists x \in X$ such that $K(x) = g$.
9. Let $X = \{1, 2, 3\}$, $Y = \{1, 2, 3, 4\}$, and $Z = \{1, 2\}$.
a. Define a function $f: X \to Y$ that is one-to-one but not onto.
Let $f: X \to Y$ such that $f(1) = 1$, $f(2) = 2$, and $f(3) = 3$.
b. Define a function $g: X \to Z$ that is onto but not one-to-one.
Let $g: X \to Z$ such that $g(1) = 1$, $g(2) = 2$, and $g(3) = 2$.
c. Define a function $h: X \to X$ that is neither one-to-one nor onto.
Let $h: X \to X$ such that $h(1) = 1$, $h(2) = 1$, and $h(3) = 1$.
d. Define a function $k: X \to X$ that is one-to-one and onto but is not the
identity function on $X$.
Let $k: X \to X$, such that $k(1) = 3$, $k(2) =1$, $k(3) = 2$.
10.
a. Define $f: \mathbb{Z} \to \mathbb{Z}$ by the rule $f(n) = 2n$, for every
integer $n$.
i. Is $f$ one-to-one? Prove or give a counterexample.
$f$ is one-to-one.
**Proof:**
Suppose $f(n_1) = f(n_2)$.
To prove $f$ is one-to-one, it must be shown that $n_1 = n_2$.
By definition of $f$, $f(n_1) = f(n_2)$ can be substituted with:
$$ 2n_1 = 2n_2 $$
Then, by algebra:
$$ n_1 = n_2 $$
This is what was to be shown.
Q.E.D.
ii. Is $f$ onto? prove or give a counterexample.
**Disproof (by counterexample):**
Consider $1 \in \mathbb{Z}$. It is claimed that $1 \neq f(n)$ for any integer
$n$.
For if there were an integer $n$ such that $1 = f(n)$, then, by definition of
$f$, $1 = 2n$.
Then, by division:
$$ n = \frac{1}{2} $$
.
Note then that $n$ is not an integer. Hence $1 \neq f(n)$ for any integer $n$.
Therefore, it can be concluded that $f$ is not onto.
Q.E.D.
b. Let $2\mathbb{Z}$ denote the set of all even integers. That is,
$2\mathbb{Z} = \{n \in \mathbb{Z} | n = 2k \text{, for some integer } k\}$.
Define $h: \mathbb{Z} \to 2\mathbb{Z}$ by the rule $h(n) = 2n$, for each integer
$n$. Is $h$ onto? Prove or give a counterexample.
$h$ is onto.
**Proof:**
Suppose $m$ is an integer such that $m \in 2\mathbb{Z}$.
To prove that $h$ is onto, it must be shown that there is some integer which
when passed through $h$ equals $m$.
By definition of $2\mathbb{Z}$, this means that:
$$ m = 2k $$
for some integer $k$.
Then:
$$ h(k) = 2k = m $$
Hence there is an integer, namely $k$, such that $h(k) = m$.
Q.E.D.
11.
a. Define $g: \mathbb{Z} \to \mathbb{Z}$ by the rule $g(n) = 4n - 5$, for each
integer $n$.
i. Is $g$ one-to-one? Prove or give a counterexample.
$g$ is one-to-one.
**Proof:**
Suppose $n_1, n_2 \in \mathbb{Z}$ such that $g(n_1) = g(n_2)$.
To prove $g$ is one-to-one, it must be shown that $n_1 = n_2$.
By definition of $g$, $g(n_1) = g(n_2)$ can be expressed by substitution as:
$$ 4n_1 - 5 = 4n_2 - 5 $$
Then, by algebra:
$$ 4n_1 = 4n_2 $$
$$ n_1 = n_2 $$
This is what was to be shown, and it can therefore be concluded that $g$ is
one-to-one.
Q.E.D.
ii. Is $g$ onto? Prove or give a counterexample.
$g$ is not onto.
**Disproof (by counterexample):**
Suppose $m \in \mathbb{Z}$.
To prove that $g$ is onto, it must be shown that there exists some integer $n$
such that $g(n) = m$.
By the definition of $g$, $g(n) = m$ can be expressed by substitution as:
$$ 4n - 5 = m $$
Then, by algebra:
$$ 4n = m + 5 $$
$$ n = \frac{m + 5}{4} $$
But then $n$ is not necessarily an integer, say in the case of $m = 0$. Note
that $0 \in \mathbb{Z}$, but if $m = 0$, then $n = \dfrac{5}{4}$, and
$\dfrac{5}{4}$ is not an integer.
Hence there is no $n$, such that $g(n) = 0$.
Therefore it can be concluded that $g$ is not onto.
Q.E.D.
b. Define $G: \mathbb{R} \to \mathbb{R}$ by the rule $G(x) = 4x - 5$ for every
real number $x$. Is $G$ onto? Prove or give a counterexample.
$G$ is onto.
**Proof:**
Suppose there exists some $y \in \mathbb{R}$.
To prove $G$ is onto, it must be shown that there exists some $x \in \mathbb{R}$
such that $G(x) = y$.
By the given definition for $G$, $G(x) = y$ can be expressed by substitution as:
$$ 4x - 5 = y $$
$$ 4x = y + 5 $$
$$ x = \frac{y + 5}{4} $$
Now, $\dfrac{y + 5}{4}$ is a real number by the addition and division of real
numbers. Hence $x = \dfrac{y + 5}{4} \in \mathbb{R}$.
Then, evaluate $G\left(\dfrac{y + 5}{4}\right)$:
$$ G\left(\frac{y + 5}{4}\right) = 4\left(\frac{y + 5}{4}\right) - 5 $$
$$ = y + 5 - 5 $$
$$ = y $$
Hence, it has been shown that $G(x) = y$ for some $x$.
This is what was to be shown. Therefore it can be concluded that $G$ is onto.
Q.E.D.
12.
a. Define $F: \mathbb{Z} \to \mathbb{Z}$ by the rule $F(n) = 2 - 3n$, for each
integer $n$.
i. Is $F$ one-to-one? Prove or give a counterexample.
$F$ is one-to-one.
**Proof:**
Suppose $n_1, n_2 \in \mathbb{Z}$ such that $F(n_1) = F(n_2)$.
To prove $F$ is one-to-one, it must be shown that $n_1 = n_2$.
By the given definition of $F$, $F(n_1) = F(n_2)$ can be expressed by
substitution as:
$$ 2 - 3n_1 = 2 - 3n_2 $$
Then, by algebra:
$$ -3n_1 = -3n_2 $$
$$ n_1 = n_2 $$
Hence it has been shown that $n_1 = n_2$ when $F(n_1) = F(n_2)$.
This is what was to be shown. Therefore it can be concluded that $F$ is
one-to-one.
Q.E.D.
ii. Is $F$ onto? Prove or give a counterexample.
$F$ is not onto.
**Disproof (by counterexample):**
To prove that $F$ is onto, it must be shown that there exists some
$m \in \mathbb{Z}$ such that $m = 2 - 3n$.
Evaluating for $n$ shows:
$$ m = 2 - 3n $$
$$ 3n = 2 - m $$
$$ n = \dfrac{2 - m}{3} $$
But since $n$ must be an integer by the definition for $F$, this evaluation
shows that there exists at least one $m \in \mathbb{Z}$ that is not in the
co-domain of $F$.
Take $m = 1$, for example, note that $1 \in \mathbb{Z}$. But, when $m = 1$, then
$n = \dfrac{1}{3}$, which is not an integer.
Therefore, it can be concluded that $F$ is not onto.
Q.E.D.
b. Define $G: \mathbb{R} \to \mathbb{R}$ by the rule $G(x) = 2 - 3x$ for each
real number $x$. Is $G$ onto? Prove or give a counterexample.
$G$ is onto.
**Proof:**
Suppose $y \in \mathbb{R}$.
To prove that $G$ is onto, it must be shown that $G(x) = y$ for some
$x \in \mathbb{R}$.
By the given definition for $G$, $G(x) = y$ can be expressed by substitution as:
$$ 2 - 3x = y $$
Then, by algebra:
$$ -3x = y - 2 $$
$$ x = -\left(\frac{y - 2}{3}\right) $$
$$ x = \frac{2 - y}{3} $$
Now, $\dfrac{2 - y}{3}$ by the product, division, and addition of real numbers.
It follows that $x \in \mathbb{R}$ since $x = \dfrac{2 - y}{3}$.
Now, evaluating $G\left(\dfrac{2 - y}{3}\right)$:
$$ G\left(\frac{2 - y}{3}\right) = 2 - 3\left(\frac{2 - y}{3}\right) $$
$$ = 2 - (2 - y) $$
$$ = 2 - 2 + y $$
$$ = y $$
Hence it has been shown that $G(x) = y$ for some $x \in \mathbb{R}$.
This is what was to be shown, and therefore it can be concluded that $G$ is
onto.
Q.E.D.
13.
a. Define $H: \mathbb{R} \to \mathbb{R}$ by the rule $H(x) = x^2$, for each real
number $x$.
i. Is $H$ one-to-one? Prove or give a counterexample.
$H$ is not one-to-one.
**Disproof (by counterexample):**
Suppose $x_1, x_2 \in \mathbb{R}$ such that $H(x_1) = H(x_2)$.
To prove that $H$ is one-to-one, it must be shown that $x_1 = x_2$.
Substituting $H(x_1) = H(x_2)$ by the given definition for $H$:
$$ (x_1)^2 = (x_2)^2 $$
$$ \sqrt{(x_1)^2} = \sqrt{(x_2)^2} $$
$$ \pm x_1 = \pm x_2 $$
But $\pm x_1 = x_1$ or $\pm x_1 = -x_1$. Similarly, $\pm x_2 = x_2$ or
$\pm x_2 = -x_2$. It follows then that there exists some $-x_1 = x_2$ or
$x_1 = -x_2$, but this cannot be the case when $H(x_1) = H(x_2)$.
Consider $x_1 = -2$,and $x_2 = 2$. Note that $x_1, x_2 \in \mathbb{R}$.
Then:
$$ H(x_1) = (-2)^2 = 4 = (2)^2 = H(x_2) $$
So, $H(-2) = H(2)$, but $-2 \neq 2$. Therefore, by the definition of one-to-one,
it can be concluded that $H$ is not one-to-one.
Q.E.D.
ii. Is $H$ onto? Prove or give a counterexample.
$H$ is not onto.
**Disproof (by counterexample):**
Suppose there is some $y$ such that $y \in \mathbb{R}$.
To prove that $H$ is onto, it must be shown that $H(x) = y$ for some
$x \in \mathbb{R}$.
By substitution of the given definition for $H$:
$$ x^2 = y $$
$$ x = \sqrt{y} $$
Now, $\sqrt{y} \in \mathbb{R}$, but only if $y \geq 0$. If $y < 0$, then
$\sqrt{y}$ is a complex or imaginary number.
Consider $y = -1$. Note that $-1 \in \mathbb{R}$.
Then, by substitution into $H(x)$:
$$ x^2 = -1 $$
$$ x = \sqrt{-1} $$
$$ x = i \notin \mathbb{R} $$
Thus it has been shown that there is no such $x \in \mathbb{R}$ such that
$H(x) = -1$.
By the definition of onto, it can be concluded that $H$ is not onto.
Q.E.D.
b. Define $K: \mathbb{R}^{\text{nonneg}} \to \mathbb{R}^{\text{nonneg}}$ by the
rule $K(x) = x^2$, for each nonnegative real number $x$. Is $K$ onto? Prove or
give a counterexample.
$K$ is onto.
**Proof:**
Suppose there exists some $y$ such that $y \in \mathbb{R}^{\text{nonneg}}$.
To prove that $K$ is onto, it must be shown that $K(x) = y$ for some
$x \in \mathbb{R}^{\text{nonneg}}$.
By substitution of the given definition for $K$:
$$ x^2 = y $$
$$ x = \sqrt{y} $$
Now, $\sqrt{y} \in \mathbb{R}^{\text{nonneg}}$ by the square root of positive
real numbers.
Evaluating for $K(\sqrt{y})$:
$$ K(\sqrt{y}) = (\sqrt{y})^2 $$
$$ = y $$
Thus it has been shown that $K(x) = y$ for some
$x \in \mathbb{R}^{\text{nonneg}}$.
This is what was to be shown, and therefore it can be concluded that $K$ is
onto.
Q.E.D.
14. Explain the mistake in the following "proof."
**Theorem:** The function $f: \mathbb{Z} \to \mathbb{Z}$ defined by the formula
$f(n) = 4n + 3$, for each integer $n$, is one-to-one.
"**Proof:** Suppose any integer $n$ is given. Then by definition of $f$, there
is only one possible value for $f(n)$ - namely, $4n + 3$. Hence $f$ is
one-to-one."
This "proof" makes the mistake of assuming the conclusion. In order to prove
that a function is one-to-one, it must be shown that given any two inputs, say
$n_1, n_2 \in \mathbb{Z}$ such that $f(n_1) = f(n_2)$, then $n_1 = n_2$.
Alternatively, one could show that given any two outputs, say
$f(n_1), f(n_2) \in \mathbb{Z}$, that if $f(n_1) \neq f(n_2)$, then
$n_1 \neq n_2$.
In each of 15-18 a function $f$ is defined on a set of real numbers. Determine
whether or not $f$ is one-to-one and justify your answer.
15. $f(x) = \dfrac{x + 1}{x}$, for each number $x \neq 0$
Scratch Proof:
$$ \frac{x_1 + 1}{x_1} = \frac{x_2 + 1}{x_2} $$
$$ (x_2)(x_1 + 1) = (x_1)(x_2 + 1) $$
$$ x_2x_1 + x_2 = x_2x_1 + x_1 $$
$$ x_2 = x_1 $$
$f$ is one-to-one.
16. $f(x) = \dfrac{x}{x^2 + 1}$, for each real number $x$
$$ \frac{x_1}{x_1^2 + 1} = \frac{x_2}{x_2^2 + 1} $$
$$ (x_2^2 + 1)x_1 = (x_1^2 + 1)x_2 $$
$$ x_2^2x_1 + x_1 = x_1^2x_2 + x_2 $$
$f$ is not one-to-one since $x_1 \neq x_2$. Take $x_1 = 2$ and
$x_2 = \dfrac{1}{2}$:
$$ \frac{2}{2^2 + 1} = \frac{\dfrac{1}{2}}{\left(\dfrac{1}{2}\right)^2 + 1} $$
$$ \frac{2}{4 + 1} = \frac{\dfrac{1}{2}}{\dfrac{1}{4} + 1} $$
$$ \frac{2}{5} = \frac{\dfrac{1}{2}}{\dfrac{5}{4}} $$
$$ \frac{2}{5} = \frac{1}{2} \cdot \frac{4}{5} $$
$$ \frac{2}{5} = \frac{4}{10} $$
$$ \frac{2}{5} = \frac{2}{5} $$
Since $f(2) = f\left(\dfrac{1}{2}\right)$, but $2 \neq \dfrac{1}{2}$, it can be
concluded that $f$ is not one-to-one.
17. $f(x) = \dfrac{3x - 1}{x}$, for each real number $x \neq 0$
$$ \frac{3x_1 - 1}{x_1} = \frac{3x_2 - 1}{x_2} $$
$$ x_2(3x_1 - 1) = x_1(3x_2 - 1) $$
$$ 3x_1x_2 - x_2 = 3x_1x_2 - x_1 $$
$$ -x_2 = -x_1 $$
$$ x_2 = x_1 $$
Since $x_1 = x_2$, $f$ is one-to-one.
18. $f(x) = \dfrac{x + 1}{x - 1}$, for each real number $x \neq 1$
$$ \frac{x_1 + 1}{x_1 - 1} = \frac{x_2 + 1}{x_2 - 1} $$
$$ (x_1 + 1)(x_2 - 1) = (x_2 + 1)(x_1 - 1) $$
$$ x_1x_2 + x_2 - x_1 - 1 = x_1x_2 + x_1 - x_2 - 1 $$
$$ x_1x_2 + x_2 - x_1 - 1 = x_1x_2 + x_1 - x_2 - 1 $$
$$ x_2 - x_1 = x_1 - x_2 $$
$$ 2x_2 = 2x_1 $$
$$ x_2 = x_1 $$
$f$ is one-to-one.
19. Referring to Example 7.2.3, assume that records with the following ID
numbers are to be placed in sequence into Table 7.2.1. Find the position
into which each record is placed.
a. $417302072$
$$ 417302072 \mod 11 = 0 $$
Since position $0$ is empty, $417302072$ is placed in position $0$.
b. $364981703$
$$ 364981703 \mod 11 = 9 $$
Since position $9$ is empty, $364981703$ is placed in position $9$.
c. $283090787$
$$ 283090787 \mod 11 = 1 $$
Since position $1$ is not empty, position $2$ is checked. Since position $2$ is
not empty, position $3$ is checked. Since position $3$ is empty, $283090787$ is
placed in position $3$.
20. Define $\text{Floor}: \mathbb{R} \to \mathbb{Z}$ by the formula
$\text{Floor}(x) = \lfloor x \rfloor$, for every real number $x$.
a. Is $\text{Floor}$ one-to-one? Prove or give a counterexample.
$\text{Floor}$ is not one-to-one.
**Disproof (by counterexample):**
Consider $x_1, x_2 \in \mathbb{R}$ such that $x_1 = 1.1$ and $x_2 = 1.2$.
By the definition of $\text{Floor}$:
$$ \text{Floor}(1.1) = \lfloor 1.1 \rfloor = 1 $$
and
$$ \text{Floor}(1.2) = \lfloor 1.2 \rfloor = 1 $$
Thus $\text{Floor}(1.1) = \text{Floor}(1.2)$, but $1.1 \neq 1.2$.
By the definition of one-to-one, it can be concluded that $\text{Floor}$ is not
one-to-one.
Q.E.D.
b. Is $\text{Floor}$ onto? Prove or give a counterexample.
$\text{Floor}$ is onto.
**Proof:**
Suppose there exists some $y$ such that $y \in \mathbb{Z}$.
To prove that $\text{Floor}$ is onto, it must be shown that
$\text{Floor}(x) = y$ for some $x \in \mathbb{R}$.
Now, let $x = y$.
By substitution of the given definition for $\text{Floor}$, and the supposition
that $x = y$:
$$ \lfloor x \rfloor = y $$
By substitution for $x$:
$$ \lfloor y \rfloor = y $$
$$ y = y $$
Thus it has been shown that $\text{Floor}(x) = y$ for some $x \in \mathbb{R}$.
This is what was to be shown, and therefore, by the definition of onto, it can
be concluded that $\text{Floor}$ is onto.
Q.E.D.
21. Let $S$ be the set of all strings of $0$'s and $1$'s, and define
$L: S \to \mathbb{Z}^{\text{nonneg}}$ by
$$ L(s) = \text{ the length of } s \text{, for every string } s \text{ in } S $$
a. Is $L$ one-to-one? Prove or give a counterexample.
$L$ is not one-to-one.
**Disproof (by counterexample):**
Suppose $s_1, s_2 \in S$ such that $s_1 = 10$ and $s_2 = 01$.
Then, by definition of $L$:
$$ L(s_1) = 2 = L(s_2) $$
Hence $L(s_1) = L(s_2)$ and $s_1 \neq s_2$.
Therefore it can be concluded, by the definition of one-to-one, that $L$ is not
one-to-one.
b. Is $L$ onto? Prove or give a counterexample.
$L$ is onto.
**Proof:**
Suppose $n$ is some integer such that $n \in \mathbb{Z}^{\text{nonneg}}$.
To prove that $L$ is onto, it must be shown that $L(s) = n$ for some string
$s \in S$.
Let $s$ be some string such that $s \in S$.
Since $s \in S$, this means that the $s$ is either $\lambda$ (where $\lambda$ is
the null string), or some combination of all strings of $0$'s and $1$'s.
This means that the length of $s$ is at least $0$ (when $s = \lambda$), and
otherwise is an ever increasing integer. Therefore for every $s$ passed through
$L$, there will always be a corresponding nonnegative integer $n$.
By the definition of onto, it can therefore be concluded that $L$ is onto.
Q.E.D.
22. Let $S$ be the set of all strings of $0$'s and $1$'s, and define
$D: S \to \mathbb{Z}$ as follows: For every $s \in S$,
$$ D(s) = \text{ the number of 1's in } s \text{ minus the number of 0's in } s $$
a. Is $D$ one-to-one? Prove or give a counterexample.
$D$ is not one-to-one.
**Disproof (by counterexample):**
Suppose $s_1, s_2 \in S$ such that $s_1 = 01$ and $s_2 = 10$.
By definition of $D$:
$$ D(s_1) = 0 = D(s_2) $$
So $D(s_1) = D(s_2)$, but $s_1 \neq s_2$.
Therefore, by the definition of one-to-one, $D$ is not one-to-one.
Q.E.D.
b. Is $D$ onto? Prove or give a counterexample.
$D$ is onto.
**Proof:**
Suppose $n \in \mathbb{Z}$.
To prove $D$ is onto, it must be shown that $D(s) = n$ for some string
$s \in S$.
Consider three cases:
_Case $n = 0$:_
Let $s = \lambda$. Then $D(s) = 0 = n$.
_Case $n > 0$:_
Let $s$ be a string of $n$ ones. Then $D(s) = n - 0 = n$.
_Case $n < 0$:_
Let $s$ be a string of $|n|$ ones. Then $D(s) = 0 - |n| = n$.
In all cases, there exists some $s \in S$ such that $D(s) = n$.
Therefore, by definition of onto, $D$ is onto.
Q.E.D.
23. Define $F: \mathscr{P}(\{a, b, c\}) \to \mathbb{Z}$ as follows: For every
$A$ in $\mathscr{P}(\{a, b, c\})$,
$$ F(A) = \text{ the number of elements in } A $$
a. Is $F$ one-to-one? Prove or give a counterexample.
$F$ is not one-to-one.
**Disproof (by counterexample):**
Suppose $A_1 = \{a\}$, and $A_2 = \{b\}$.
Then, by the definition of $F$:
$$ F(A_1) = 1 = F(A_2) $$
So $F(A_1) = F(A_2)$, but $A_1 \neq A_2$.
By the definition of one-to-one, it can be concluded that $F$ is not one-to-one.
Q.E.D.
b. Is $F$ onto? Prove or give a counterexample.
$F$ is not onto.
**Disproof (by counterexample):**
Consider $-1 \in \mathbb{Z}$.
To prove that $F$ is onto, it would have to be shown that $F(A) = -1$ for some
$A \in \mathscr{P}(\{a, b, c\})$, but:
$$ \mathscr{P}(\{a, b, c\}) = \{\emptyset, \{a\}, \{b\}, \{c\}, \{a, b\}, \{a, c\}, \{b, c\}, \{a, b, c\}\} $$
This shows that there is no element in $\mathscr{P}(\{a, b, c\})$ such that
$F(A) = -1$ even though $-1 \in \mathbb{Z}$.
Therefore, $F$ is not onto.
Q.E.D.
24. Let $S$ be the set of all strings of $a$'s and $b$'s, and define
$N: S \to \mathbb{Z}$ by
$$ N(s) = \text{ the number of a's in } s \text{, for each } s \in S $$
a. Is $N$ one-to-one? Prove or give a counterexample.
$N$ is not one-to-one.
**Disproof (by counterexample):**
Consider $s_1, s_2 \in S$ such that $s_1 = ab$ and $s_2 = ba$.
By the given definition for $N$:
$$ N(s_1) = 1 = N(s_2) $$
Thus $N(s_1) = N(s_2)$, but $s_1 \neq s_2$.
By the definition of one-to-one, $N$ is not one-to-one.
Q.E.D.
b. Is $N$ onto? Prove or give a counterexample.
$N$ is not onto.
**Disproof (by counterexample):**
Consider $-1 \in \mathbb{Z}$.
To prove that $N$ is onto, it would have to be shown that $N(s) = -1$ for some
$s \in S$, but by definition of string, and by the definition of $s \in S$, $s$
can have at a minimum $0$ $a$'s in it.
Therefore, $N$ is not onto.
Q.E.D.
25. Let $S$ be the set of all strings in $a$'s and $b$'s, and define
$C: S \to S$ by
$$ C(s) = as \text{, for each } s \in S $$
($C$ is called **concatenation** by $a$ on the left.)
a. Is $C$ one-to-one? Prove or give a counterexample.
$C$ is one-to-one.
**Proof:**
Suppose $s_1, s_2 \in S$ such that $C(s_1) = C(s_2)$.
To prove $C$ is one to one, it must be shown that $s_1 = s_2$.
By the given definition of $C$:
$$ as_1 = as_2 $$
Since the strings $as_1$ and $as_2$ are equal and share the same first character
$a$, the remaining portions $s_1$ and $s_2$ must also be equal.
$$ s_1 = s_2 $$
Since $C(s_1) = C(s_2)$ and $s_1 = s_2$, by the definition of one-to-one, it can
be concluded that $C$ is one-to-one.
This is what was to be shown.
Q.E.D.
b. Is $C$ onto? Prove or give a counterexample.
$C$ is not onto.
**Disproof (by counterexample):**
Consider some string $t \in S$ such that $t = b$.
To prove that $C$ is onto, it must be shown that $C(s) = b$ for some $s \in S$.
But, by definition of $C$, $C(s) = as$ for each $s \in S$, but $b$ does not have
a concatenated $a$ on the left.
Therefore, by definition of onto, it can be concluded that $C$ is not onto.
Q.E.D.
26. Define $S: \mathbb{Z}^+ \to \mathbb{Z}^+$ by the rule: For each integer $n$,
$$ S(n) = \text{ the sum of the positive divisors of } n $$
a. Is $S$ one-to-one? Prove or give a counterexample.
$S$ is not one-to-one.
**Disproof (by counterexample):**
Consider $n_1, n_2 \in \mathbb{Z}^+$ where $n_1 = 6$ and $n_2 = 11$.
By definition of $S$:
$$ S(n_1) = 6 + 3 + 2 + 1 = 12 = 11 + 1 = S(n_2) $$
So $S(n_1) = S(n_2)$, but $n_1 \neq n_2$.
By the definition of one-to-one, $S$ is not one-to-one.
Q.E.D.
b. Is $S$ onto? Prove or give a counterexample.
$S$ is not onto.
**Disproof (by counterexample):**
Consider $5 \in \mathbb{Z}^+$.
To prove $S$ is onto, it would have to be shown that $S(n) = 5$ for some
$n \in \mathbb{Z}^+$.
In order for $S(n) = 5$, note that it must be the case that $n < 5$.
But $S(1) = 1$, $S(2) = 3$, $S(3) = 4$, and $S(4) = 7$.
Hence there is no positive integer $n$ such that $S(n) = 5$.
Q.E.D.
27. Let $D$ be the set of all finite subsets of positive integers, and define
$T: \mathbb{Z}^+ \to D$ by the following rule:
For every integer $n$,
$T(n) = \text{ the set of all of the positive divisors of } n$.
a. Is $T$ one-to-one? Prove or give a counterexample.
$T$ is one-to-one.
**Proof (by contradiction):**
Suppose $n_1, n_2 \in \mathbb{Z}^+$ such that $n_1 \neq n_2$ and
$T(n_1) = T(n_2)$.
Since $n_1 \neq n_2$, it follows that $n_1 < n_2$ or $n_1 > n_2$.
_Case $n_1 < n_2$:_
By the definition of $T$, $n_2$ is a positive divisor of $n_2$, so
$n_2 \in T(n_2)$.
But, since $T(n_1) = T(n_2)$, this means that $n_2 \in T(n_1)$.
This means that $n_2$ is a positive divisor of $n_1$, or $n_1 = n_2$. This is a
contradiction.
_Case $n_1 > n_2$:_
By the definition of $T$, $n_1$ is a positive divisor of $n_1$, so
$n_1 \in T(n_1)$.
But, since $T(n_1) = T(n_2)$, this means that $n_1 \in T(n_2)$.
This means that $n_1$ is a positive divisor of $n_2$, or $n_1 = n_2$. This is a
contradiction.
In both cases, it has been shown that $n_1 = n_2$, which contradicts the
supposition.
Therefore it can be concluded that $T$ is one-to-one.
b. Is $T$ onto? Prove or give a counterexample.
$T$ is not onto.
**Disproof (by counterexample):**
Consider the set $\{1, 2, 3\}$. Note that $\{1, 2, 3\} \in D$.
To prove that $T$ is onto, it must be shown that $T(n) = \{1, 2, 3\}$, but the
set $\{1, 2, 3\}$ would also include $6$ since any such $n$ would also be
divisible by $6$ (by the given definition of $T$).
Since $6 \notin \{1, 2, 3\}$, it can be concluded that $T$ is not onto.
Q.E.D.
28. Define $G: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \times \mathbb{R}$ as
follows:
$$ G(x, y) = (2y, -x) \text{ for every } (x, y) \in \mathbb{R} \times \mathbb{R} $$
a. Is $G$ one-to-one? Prove or give a counterexample.
$G$ is one-to-one.
**Proof:**
Suppose $(x_1, y_1), (x_2, y_2) \in \mathbb{R} \times \mathbb{R}$ such that
$G(x_1, y_1) = G(x_2, y_2)$.
To prove that $G$ is one-to-one, it must be shown that
$(x_1, y_1) = (x_2, y_2)$.
By the definition for $G$:
$$ (2(y_1), -(x_1)) = (2(y_2), -(x_2)) $$
$$ (2y_1, -x_1) = (2y_2, -x_2) $$
By the definition of ordered pair (and algebra), this means that:
$$ 2y_1 = 2y_2 $$
$$ y_1 = y_2 $$
and:
$$ -x_1 = -x_2 $$
$$ x_1 = x_2 $$
Thus it has been shown that $(x_1, y_1) = (x_2, y_2)$.
By the definition of one-to-one, it can be concluded that $G$ is one-to-one.
Q.E.D.
b. Is $G$ onto? Prove or give a counterexample.
$G$ is onto.
**Proof:**
Suppose $(t, w) \in \mathbb{R} \times \mathbb{R}$.
To prove that $G$ is onto, it must be shown that $G(x, y) = (t, w)$ for some
$(x, y) \in \mathbb{R} \times \mathbb{R}$.
By the definition for $G$:
$$ (2y, -x) = (t, w) $$
By the definition of ordered pairs (and algebra), this means that:
$$ 2y = t $$
$$ y = \frac{t}{2} $$
and:
$$ -x = w $$
$$ x = -w $$
Now, note that $\dfrac{t}{2} \in \mathbb{R}$, and $-w \in \mathbb{R}$. It
follows that $\left(\dfrac{t}{2}, -w\right) \in \mathbb{R} \times \mathbb{R}$.
Now, evaluating for $G(x, y)$, which is $G\left(-w, \dfrac{t}{2}\right)$:
$$ G\left(-w, \frac{t}{2}\right) = \left(2\left(\frac{t}{2}, -(-w)\right)\right) $$
$$ = (t, w) $$
Hence it has been shown that $G(x, y) = (t, w)$ for some
$(x, y) \in \mathbb{R} \times \mathbb{R}$.
Therefore, by the definition of onto, it can be concluded that $G$ is onto.
Q.E.D.
29. Define $H: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \times \mathbb{R}$ as
follows:
$$ H(x, y) = (x + 1, 2 - y) \text{ for every } (x, y) \in \mathbb{R} \times \mathbb{R} $$
a. Is $H$ one-to-one? Prove or give a counterexample.
$H$ is one-to-one.
**Proof:**
Suppose $(x_1, y_1), (x_2, y_2) \in \mathbb{R} \times \mathbb{R}$ such that
$H(x_1, y_1) = H(x_2, y_2)$.
To prove $H$ is one-to-one. It must be shown that $(x_1, y_1) = (x_2, y_2)$.
By the given definition of $H$:
$$ (x_1 + 1, 2 - y_1) = (x_2 + 1, 2 - y_2) $$
By the definition of ordered pair (and algebra):
$$ x_1 + 1 = x_2 + 1 $$
$$ x_1 = x_2 $$
and:
$$ 2 - y_1 = 2 - y_2 $$
$$ -y_1 = -y_2 $$
$$ y_1 = y_2 $$
It follows then that $(x_1, y_1) = (x_2, y_2)$.
Therefore, by the definition of one-to-one, it can be concluded that $H$ is
one-to-one.
Q.E.D.
b. Is $H$ onto? Prove or give a counterexample.
$H$ is onto.
**Proof:
Suppose $(u, v) \in \mathbb{R} \times \mathbb{R}$.
To prove $H$ is onto, it must be shown that $H(x, y) = (u, v)$ for some
$(x, y) \in \mathbb{R} \times \mathbb{R}$.
By the given definition of $H$:
$$ (x + 1, 2 - y) = (u, v) $$
By the definition of ordered pair (and algebra):
$$ x + 1 = u $$
$$ x = u - 1 $$
and:
$$ 2 - y = v $$
$$ -y = v - 2 $$
$$ y = 2 - v $$
Now, $u - 1 \in \mathbb{R}$ by the difference of real numbers, and
$2 - v \in \mathbb{R}$ by the difference of real numbers. It follows that
$(u - 1, 2 - v) \in \mathbb{R} \times \mathbb{R}$.
Evaluating for $H(u - 1, 2 - v)$:
$$ H(u - 1, 2 - v) = ((u - 1) + 1, 2 - (2 - v)) $$
$$ = (u - 1 + 1, 2 - 2 + v) $$
$$ = (u, v) $$
Thus it has been shown that $H(x, y) = (u, v)$ for some
$(x, y) \in \mathbb{R} \times \mathbb{R}$.
Therefore, by the definition of onto, it can be concluded that $H$ is onto.
Q.E.D.
30. Define $J: \mathbb{Q} \times \mathbb{Q} \to \mathbb{R}$ by the rule
$$ J(r, s) = r + \sqrt{2}s \text{ for each } (r, s) \in \mathbb{Q} \times \mathbb{Q} $$
a. Is $J$ one-to-one? Prove or give a counterexample.
Omitted.
b. Is $J$ onto? Prove or give a counterexample.
Omitted.
31. Define $F: \mathbb{Z}^+ \times \mathbb{Z}^+ \to \mathbb{Z}^+$ and
$G: \mathbb{Z}^+ \times \mathbb{Z}^+ \to \mathbb{Z}^+$ as follows:
For each $(n, m) \in \mathbb{Z}^+ \times \mathbb{Z}^+$,
$$ F(n, m) = 3^n5^m \text{ and } G(n, m) = 3^n6^m $$
a. Is $F$ one-to-one? Prove or give a counterexample.
Omitted.
b. Is $G$ one-to-one? Prove or give a counterexample.
Omitted.
32.
a. Is $\log_{8}27 = \log_{2}3$? Why or why not?
Let $x = \log_{8}27$, and let $y = \log_{2}3$. By definition of logarithms:
$$ 8^x = 27 \text{ and } 2^y = 3 $$
Now, $8 = 2^3$, so:
$$ 8^x = (2^3)^x = 2^{3x} $$
Also, $27 = 3^3, so:$
$$ 27 = 3^3 = (2^y)^3 = 2^{3y}$$
Hence, since $8^x = 27$:
$$ 8^x = 2^{3x} = 27 = 2^{3y} $$
Since:
$$ 2^{3x} = 2^{3y} $$
By the laws of exponents:
$$ 3x = 3y $$
Then, by algebra:
$$ x = y $$
Now, we back-substitute our original definitions of $x$ and $y$, and find that:
$$ \log_{8}27 = \log_{2}3 $$
It can therefore be concluded that the answer to the query is yes.
b. Is $\log_{16}9 = \log_{4}3$? Why or why not?
Let $x = \log_{16}9$ and $y = \log_{4}3$. Then by definition of log:
$$ 16^x = 9 \text{ and } 4^y = 3 $$
Note that $16 = 4^2$, so:
$$ 9 = (4^2)^x = 4^{2x} $$
Note that $9 = 3^2$, so:
$$ 9 = 3^2 = (4^y)^2 = 4^{2y} $$
So, by the laws of equivalency:
$$ 4^{2x} = 9 = 4^{2y} $$
$$ 4^{2x} = 4^{2y} $$
By the laws of exponents then:
$$ 2x = 2y $$
Then, by algebra:
$$ x = y $$
Back-substituting in the definitions for $x$ and $y$:
$$ \log_{16}9 = \log_{4}3 $$
Therefore the answer to the given question is yes.
The properties of logarithm established in 33-35 are used in Sections 11.4 and
11.5.
33. Prove that for all positive real numbers $b$, $x$, and $y$ with $b \neq 1$,
$$ \log_{b}\left(\frac{x}{y}\right) = \log_{b}x - \log_{b}y $$
**Proof:**
Suppose that $b$, $x$, and $y$ are any positive real numbers with $b \neq 1$.
Let $u = \log_{b}x$ and $v = \log_{b}y$. By definition of logarithm then:
$$ b^u = x \text{ and } b^v = y $$
By substitution:
$$ \frac{x}{y} = \frac{b^u}{b^v} $$
By the laws of exponents:
$$ = b^{u - v} $$
Taking the logarithm base $b$ of both sides now gives:
$$ \log_{b}\left(\frac{x}{y}\right) = \log_{b}(b^{u - v}) $$
$$ = u - v $$
Back-substituting the definitions of $u$ and $v$ yields:
$$ = \log_{b}x - \log_{b}y $$
This is what was to be shown.
Q.E.D.
34. Prove that for all positive real numbers $b$, $x$, and $y$ with $b \neq 1$,
$$ \log_{b}(xy) = \log_{b}x + \log_{b}y $$
**Proof:**
Suppose $b$, $x$, and $y$ are any positive real numbers with $b \neq 1$.
Let $u = \log_{b}x$, and $v = \log_{b}y$.
By definition of logarithms, this means that:
$$ b^u = x \text{ and } b^v = y $$
By substitution, this means that:
$$ xy = b^u \cdot b^v $$
$$ = b^{u + v} $$
Taking the logarithm of base $b$ of both sides yields:
$$ \log_{b}(xy) = \log_{b}(b^{u + v}) $$
$$ = u + v $$
Back-substituting in the values for $u$ and $v$ shows:
$$ \log_{b}(xy) = \log_{b}x + \log_{b}y $$
This is what was to be shown.
Q.E.D.
35. Prove that for all real numbers $a$, $b$, and $x$ with $b$ and $x$ positive
and $b \neq 1$,
$$ \log_{b}(x^a) = a\log_{b}x $$
**Proof:**
Suppose $a$, $b$, and $x$ are any real numbers with $x$ and $b$ being positive
and $b \neq 1$.
Let $r = \log_{b}(x^a)$ and $s = \log_{b}x$.
By definition of logarithms, this means that:
$$ b^r = x^a \text{ and } b^s = x $$
Since $b^s = x$, by substitution:
$$ b^r = x^a = (b^s)^a = b^{sa} $$
So:
$$ x^a = b^{sa} $$
Now, applying $\log_{b}$ to both sides:
$$ \log_{b}(x^a) = \log_{b}(b^{sa}) $$
$$ = sa $$
Back-substituting in the definition for $s$, this yields:
$$ \log_{b}(x^a) = \log_{b}x \cdot a $$
Or:
$$ \log_{b}(x^a) = a\log_{b}x $$
This is what was to be shown.
Q.E.D.
Exercises 36 and 37 use the following definition: If
$f: \mathbb{R} \to \mathbb{R}$ and $g: \mathbb{R} \to \mathbb{R}$ are functions,
then the function $(f + g): \mathbb{R} \to \mathbb{R}$ is defined by the formula
$(f + g)(x) = f(x) + g(x)$ for every real number $x$.
36. If $f: \mathbb{R} \to \mathbb{R}$ and $g: \mathbb{R} \to \mathbb{R}$ are
both one-to-one, is $f + g$ also one-to-one? Justify your answer.
No.
**Disproof (by counterexample):**
Suppose $f$ and $g$ are functions such that $f: \mathbb{R} \to \mathbb{R}$ and
$g: \mathbb{R} \to \mathbb{R}$ and both $f$ and $g$ are one-to-one functions.
Furthermore, suppose $(f + g)$ is a function where
$(f + g): \mathbb{R} \to \mathbb{R}$ such that $(f + g)(x) = f(x) + g(x)$.
Consider $f(x) = x$ and $g(x) = -x$. Note that $f$ and $g$ are one-to-one
functions still follow the definitions of $f$ and $g$ in the supposition.
Then, by definition of $(f + g)$, $(f + g)(x) = f(x) + g(x) = x + (-x) = 0$.
Then consider $x_1 = 1$, and $x_2 = 2$, then:
$$ f(x_1) = 1 \text{ and } g(x_1) = -1 \text{ and } (f + g)(x_1) = 1 + (-1) = 0 $$
$$ f(x_2) = 2 \text{ and } g(x_2) = -2 \text{ and } (f + g)(x_2) = 2 + (-2) = 0 $$
So $(f + g)(x_1) = (f + g)(x_2)$, but $x_1 \neq x_2$.
By the definition of one-to-one, it can therefore be concluded that $(f + g)$ is
not one-to-one.
Q.E.D.
37. If $f: \mathbb{R} \to \mathbb{R}$ and $g: \mathbb{R} \to \mathbb{R}$ are
both onto, is $f + g$ also onto? Justify your answer.
**Disproof (by counterexample):**
Suppose $f$ and $g$ are both functions where $f: \mathbb{R} \to \mathbb{R}$, and
$g: \mathbb{R} \to \mathbb{R}$. Furthermore, suppose
$(f + g): \mathbb{R} \to \mathbb{R}$ where $(f + g)(x) = f(x) + g(x)$ for some
$x \in \mathbb{R}$.
Consider $f(x) = x$ and $g(x) = -x$. Note that both $f$ and $g$ are still onto
based off the definition of onto as required by the supposition.
Then by definition of $(f + g)$:
$$ (f + g)(x) = x + (-x) = 0 $$
Since no matter what the value for $x$ will always output $0$, while
$0 \in \mathbb{R}$, by the definition of onto, every element in the co-domain of
$\mathbb{R}$ must have a corresponding input image.
Consider that $1 \in \mathbb{R}$, but there is no input image $x$ such that
$(f + g)(x) = 1$.
Therefore, by the definition of onto, $(f + g)$ is not onto.
Q.E.D.
Exercises 38 and 39 use the following definition: If
$f: \mathbb{R} \to \mathbb{R}$ and $c$ is a nonzero real number, the function
$(c \cdot f): \mathbb{R} \to \mathbb{R}$ is defined by the formula
$(c \cdot f)(x) = c \cdot (f(x))$ for every real number $x$.
38. Let $f: \mathbb{R} \to \mathbb{R}$ be a function and $c$ a nonzero real
number. If $f$ is one-to-one, is $c \cdot f$ also one-to-one? Justify your
answer.
Yes, $(c \cdot f)$ is one-to-one.
**Proof:**
Suppose $f: \mathbb{R} \to \mathbb{R}$ is a one-to-one function, and that $c$ is
a nonzero real number such that $(c \cdot f): \mathbb{R} \to \mathbb{R}$ is
defined as $(c \cdot f)(x) = c \cdot (f(x))$ for any real number $x$.
To prove $(c \cdot f)$ is one-to-one, it must be shown that there are some
$x_1, x_2 \in \mathbb{R}$ such that if $(c \cdot f)(x_1) = (c \cdot f)(x_2)$,
then $x_1 = x_2$.
By definition of $(c \cdot f)$:
$$ (c \cdot f)(x_1) = c \cdot (f(x_1)) = c \cdot (f(x_2)) = (c \cdot f)(x_2) $$
$$ c \cdot (f(x_1)) = c \cdot (f(x_2)) $$
By arithmetic:
$$ f(x_1) = f(x_2) $$
By the supposition, $f$ is a one-to-one function, so therefore, by definition of
one-to-one:
$$ x_1 = x_2 $$
This is what was to be shown.
Q.E.D.
39. Let $f: \mathbb{R} \to \mathbb{R}$ be a function and $c$ a nonzero real
number. If $f$ is onto, is $c \cdot f$ also onto? Justify your answer.
$c \cdot f$ is onto.
**Proof:**
Suppose $f: \mathbb{R} \to \mathbb{R}$ such that $f$ is onto. Furthermore,
suppose $c$ is a nonzero real number, where
$(c \cdot f): \mathbb{R} \to \mathbb{R}$ is defined as
$(c \cdot f)(x) = c \cdot (f(x))$ for any real number $x$.
To prove that $(c \cdot f)(x)$ is onto, it must be shown that there exists some
$y \in \mathbb{R}$, such that $(c \cdot f)(x) = y$.
By definition for $c \cdot f$:
$$ (c \cdot f)(x) = c \cdot (f(x)) = y $$
$$ c \cdot (f(x)) = y $$
By algebra:
$$ f(x) = \frac{y}{c} $$
Since $f$ is onto (by the supposition), this means that there exists some
$z \in \mathbb{R}$ such that $f(z) = \dfrac{y}{c}$.
Let $x = z$, then:
$$ (c \cdot f)(x) = c \cdot (f(x)) $$
$$ = c \cdot (f(z)) $$
$$ = c \cdot \left(\frac{y}{c}\right) $$
$$ = y $$
This is what was to be shown. Therefore it can be concluded that $(c \cdot f)$
is onto.
Q.E.D.
40. Suppose $F: X \to Y$ is one-to-one.
a. Prove that for every subset $A \subseteq X$, $F^{-1}(F(A)) = A$.
**Proof:**
Suppose $A \subseteq X$.
To prove that $F^{-1}(F(A)) = A$, it must be shown that:
$$ F^{-1}(F(A)) \subseteq A $$
and also that:
$$ A \subseteq F^{-1}(F(A)) $$
_Proof ($F^{-1}(F(A)) \subseteq A$):_
Let $x \in F^{-1}(F(A))$.
By the definition of inverse image:
$$ F^{-1}(F(A)) = \{x \in X | F(x) \in F(A)\} $$
By the definition for $F(A)$, there exists $r \in A$ such that $F(r) = F(x)$.
Since $F(r) = F(x)$, and since $F$ is one-to-one, it follows that $x \in A$
Since $x \in F^{-1}(F(A))$ and $x \in A$, it can be concluded that
$F^{-1}(F(A)) \subseteq A$.
This is what was to be shown.
_Proof ($A \subseteq F^{-1}(F(A))$):_
Let $x \in A$.
Since $x \in A$, then $F(x) \in F(A)$, by the definition of $F(A)$.
By the definition of inverse image:
$$ x \in F^{-1}(F(A)) $$
Since $x \in A$ and $x \in F^{-1}(F(A))$, it can be concluded that
$A \subseteq F^{-1}(F(A))$.
This is what was to be shown.
_Conclusion:_
Since both subset definitions have been shown, it can be concluded that
$F^{-1}(F(A)) = A$.
Q.E.D.
b. Prove that for all subsets $A_1$ and $A_2$ in $X$,
$F(A_1 \cap A_2) = F(A_1) \cap F(A_2)$.
**Proof:**
Suppose $A_1, A_2 \in X$.
To prove $F(A_1 \cap A_2) = F(A_1) \cap F(A_2)$, it must be shown that:
$$ F(A_1 \cap A_2) \subseteq F(A_1) \cap F(A_2) $$
and that:
$$ F(A_1) \cap F(A_2) \subseteq F(A_1 \cap A_2) $$
_Proof ($F(A_1 \cap A_2) \subseteq F(A_1) \cap F(A_2)$):_
Suppose $y \in F(A_1 \cap A_2)$.
It must be shown that $y \in F(A_1) \cap F(A_2)$.
By the definition of $F(A_1 \cap A_2)$, there exists some $x \in A_1 \cap A_2$
such that $F(x) = y$.
By the definition of intersection:
$$ x \in A_1 \text{ and } x \in A_2 $$
Since $x \in A_1$ and $x \in A_2$, it follows that:
$$ y \in F(A_1) \text{ and } y \in F(A_2) $$
By the definition of intersection, this means that:
$$ y \in F(A_1) \cap F(A_2) $$
Since $y \in F(A_1 \cap A_2)$ and $y \in F(A_1) \cap F(A_2)$, it can be
concluded that $F(A_1 \cap A_2) \subseteq F(A_1) \cap F(A_2)$.
This is what was to be shown.
_Proof ($F(A_1) \cap F(A_2) \subseteq F(A_1 \cap A_2)$):_
Suppose $y \in F(A_1) \cap F(A_2)$.
It must be shown that $y \in F(A_1 \cap A_2)$.
By the definition of intersection:
$$ y \in F(A_1) \text{ and } y \in F(A_2) $$
By the definition of $F(A_1)$, there exists some $x_1 \in A_1$ such that:
$$ F(x_1) = y $$
Similarly, by definition of $F(A_2)$, there exists some $x_2 \in A_2$ such that:
$$ F(x_2) = y $$
Since $F$ is one-to-one (by the supposition), and since $F(x_1) = y = F(x_2)$,
or $F(x_1) = F(x_2)$, this means that:
$$ x_1 = x_2 $$
By the definition of intersection:
$$ x_1 \in A_1 \cap A_2 $$
It follows then that since $y = F(x_1)$, that:
$$ y \in F(A_1) \cap F(A_2) $$
Since $y \in F(A_1) \cap F(A_2)$ and $y \in F(A_1) \cap F(A_2)$, it can be
concluded that $F(A_1) \cap F(A_2) \subseteq F(A_1 \cap A_2)$.
This is what was to be shown.
_Conclusion:_
Since both subset relations have been shown, it can be concluded that
$F(A_1 \cap A_2) = F(A_1) \cap F(A_2)$.
Q.E.D.
41. Suppose $F: X \to Y$ is onto. Prove that for every subset $B \subseteq Y$,
$F(F^{-1}(B)) = B$.
**Proof:**
Suppose $F: X \to Y$ such that $F$ is onto.
Let $B \subseteq Y$.
To prove that $F(F^{-1}(B)) = B$, it must be shown that:
$$ F(F^{-1}(B)) \subseteq B $$
and that:
$$ B \subseteq F(F^{-1}(B)) $$
_Proof ($F(F^{-1}(B)) \subseteq B$):_
Suppose $y \in F(F^{-1}(B))$.
It must be shown that $y \in B$.
By definition of $F$, there exists some $x \in F^{-1}(B)$ such that $F(x) = y$.
By definition of inverse image, since $x \in F^{-1}(B)$, this means that:
$$ F(x) \in B $$
Since $F(x) = y$, it follows then that:
$$ y \in B $$
Since $y \in F(F^{-1}(B))$ and $y \in B$, it can be concluded that
$F(F^{-1}(B)) \subseteq B$.
_Proof ($B \subseteq F(F^{-1}(B))$):_
Suppose $y \in B$.
It must be shown that $y \in F(F^{-1}(B))$.
Since $y \in B$, and since $B \subseteq Y$, it follows that $y \in Y$.
By the supposition, $F$ is onto. It follows that since $y \in Y$, there exists
some $x \in X$ such that $F(x) = y$.
Since $F(x) = y$ and $y \in B$, by the definition of inverse function:
$$ x \in F^{-1}(B) $$
It follows then that:
$$ y \in F(F^{-1}(B)) $$
Since $y \in B$ and $y \in F(F^{-1}(B))$, it can be concluded that
$B \subseteq F(F^{-1}(B))$.
_Conclusion:_
Since both subset relations have been shown, it can be concluded that
$F(F^{-1}(B)) = B$.
Q.E.D.
Let $X = \{a, b, c, d, e\}$ and $Y = \{s, t, u, v, w\}$. In each of 42 and 43 a
one-to-one correspondence $F: X \to Y$ is defined by an arrow diagram. In each
case draw an arrow diagram for $F^{-1}$.
42.
(See page 483 for image.)
Omitted.
43.
(See page 483 for image.)
Omitted.
In 44-55 indicate which of the functions in the referenced exercise are
one-to-one correspondences. For each function that is a one-to-one
correspondence, find the inverse function.
44. Exercise 10a
The exercise is not a one-to-one correspondence because it is not onto.
45. Exercise 10b
Exercise 10b shows that the function $h$ is onto.
To prove that $h$ is one-to-one, it must be shown that there exists some
$n_1, n_2 \in \mathbb{Z}$ such that if $h(n_1) = h(n_2)$, then $n_1 = n_2$.
By definition of $h$, this implies that:
$$ 2n_1 = 2n_2 $$
Then, by algebra:
$$ n_1 = n_2 $$
This is what was to be shown, and therefore it can be concluded that $h$ is a
one-to-one correspondence.
Now, to find the inverse function.
Given any integer $m \in 2\mathbb{Z}$ (where $2\mathbb{Z}$ is the set of all
even integers) such that $h(n) = m$, by the definition of $h$, it follows that:
$$ h(n) = m = 2n $$
The inverse can be found by evaluating for $n$ as it relates to $m$.
$$ m = 2n $$
$$ n = \frac{m}{2} $$
Thus:
$$ h^{-1}(m) = \frac{m}{2} $$
for some $m \in 2\mathbb{Z}$.
46. Exercise 11a
The exercise is not a one-to-one correspondence because it is not onto.
47. Exercise 11b
Exercise 11b shows that $G$ is onto.
To prove that $G$ is one-to-one, it must be shown that there exists some
$x_1, x_2 \in \mathbb{R}$ such that when $G(x_1) = G(x_2)$, then $x_1 = x_2$.
By the definition of $G$:
$$ 4x_1 - 5 = 4x_2 - 5 $$
By algebra:
$$ 4x_1 = 4x_2 $$
$$ x_1 = x_2 $$
This is what was to be shown. Therefore it can be concluded that $G$ is
one-to-one.
Now to find the inverse.
Suppose there is some $y \in \mathbb{R}$ such that $y = 4x - 5$, then evaluating
for $x$:
$$ x = \frac{y + 5}{4} $$
Replacing $x$ with $G^{-1}(y)$:
$$ G^{-1}(y) = \frac{y + 5}{4} $$
By definition of inverse, this is true if and only if
$G\left(\dfrac{y + 5}{4}\right) = y$. By the definition for $G$:
$$ G\left(\frac{y + 5}{4}\right) = 4\left(\frac{y + 5}{4}\right) - 5 $$
$$ = (y + 5) - 5 $$
$$ = y $$
Therefore, it can be concluded that $G^{-1}(y) = \dfrac{y + 5}{4}$ for every
$y \in \mathbb{R}$.
48. Exercise 12a
The function $F$ is not a one-to-one correspondence, because $F$ is not onto.
49. Exercise 12b
Exercise 12b shows that $G$ is onto. To prove that $G$ is one-to-one, it must be
shown that there exists some $x_1, x_2 \in \mathbb{R}$ such that when
$G(x_1) = G(x_2)$, then $x_1 = x_2$.
By the definition of $G$, this means that:
$$ 2 - 3x_1 = 2 - 3x_2 $$
$$ -3x_1 = -3x_2 $$
$$ x_1 = x_2 $$
This is what was to be shown. Therefore, it can be concluded that $G$ is
one-to-one.
Now, to find the inverse. Suppose there is some $y = 2 - 3x$. Solving for $x$:
$$ 3x = 2 - y $$
$$ x = \frac{2 - y}{3} $$
Then substituting for $x$ with $G^{-1}(y)$:
$$ G^{-1}(y) = \dfrac{2 - y}{3} $$
By the definition of inverse, this can only be true if
$G\left(\dfrac{2 - y}{3}\right) = y$. By the definition for $G$:
$$ G\left(\frac{2 - y}{3}\right) = 2 - 3\left(\frac{2 - y}{3}\right) $$
$$ = 2 - (2 - y) $$
$$ = 2 - 2 + y $$
$$ = y $$
Therefore, it can be concluded that:
$$ G^{-1}(y) = \frac{2 - y}{3} $$
for any $y \in \mathbb{R}$.
50. Exercise 21
The function $L$ is not a one-to-one correspondence, because $L$ is not
one-to-one.
51. Exercise 22
The function $D$ is not a one-to-one correspondence, because $D$ is not
one-to-one.
52. Exercise 15 with the co-domain taken to be the set of all real numbers not
equal to $1$.
Omitted.
53. Exercise 16 with the co-domain taken to be the set of all real numbers.
Omitted.
54. Exercise 17 with the co-domain taken to be the set of all real numbers not
equal to $3$
Omitted.
55. Exercise 18 with the co-domain taken to be the set of all real numbers not
equal to 1.
Omitted.
56. In Example 7.2.8 a one-to-one correspondence was defined from the power set
of $\{a, b\}$ to the set of all strings of $0$'s and $1$'s that have length
$2$. Thus the elements of these two sets can be matched up exactly, and so
the two sets have the same number of elements.
a. Let $X = \{x_1, x_2, \dots, x_n\}$ be a set with $n$ elements. Use Example
7.2.8 as a model to define a one-to-one correspondence from $\mathscr{P}(X)$,
the set of all subsets of $X$, to the set of all strings of $0$'s and $1$'s that
have length $n$.
Omitted.
b. In Section 9.2 we show that there are $2^n$ strings of $0's$ and $1$'s that
have length $n$. What does this allow you to conclude about the number of
subsets of $\mathscr{P}(X)$? (This provides an alternative proof of Theorem
6.3.1.)
Omitted.
57. Write a computer algorithm to check whether a function from one finite set
to another is one-to-one. Assume the existence of an independent algorithm
to compute values of the function.
Omitted.
58. Write a computer algorithm to check whether a function from one finite set
to another is onto. Assume the existence of an independent algorithm to
compute values of the function.
Omitted.
---
Page 494
**Exercise Set 7.3**
In each of 1 and 2, functions $f$ and $g$ are defined by arrow diagrams. Find
$g \circ f$ and $f \circ g$ and determine whether $g \circ f$ equals
$f \circ g$.
1. (See page 494 for image)
$$ f(1) = 5, f(3) = 3, f(5) = 1 $$
$$ g(1) = 3, g(3) = 5, g(5) = 1 $$
$$ g(f(1)) = g(5) = 1, g(f(3)) = g(3) = 5, g(f(5)) = g(1) = 3 $$
$$ f(g(1)) = f(3) = 3, f(g(3)) = f(5) = 1, f(g(5)) = f(1) = 5 $$
Since not all elements of $g(f(x))$ do not equal $f(g(x))$ (such as
$g(f(1)) = 1 \neq 3 = f(g(1))$), it can be concluded that:
$$ g \circ f \neq f \circ g $$
2. (See page 494 for image)
$$ f(1) = 3, f(3) = 1, f(5) = 5 $$
$$ g(1) = 1, g(3) = 1, g(5) = 1 $$
$$ g(f(1)) = g(3) = 1, g(f(3)) = g(1) = 1, g(f(5)) = g(5) = 1 $$
$$ f(g(1)) = f(1) = 3, f(g(3)) = f(1) = 3, f(g(5)) = f(1) = 3 $$
Since not all elements of $g(f(x))$ do not equal $f(g(x))$ (such as
$g(f(1)) = 1 \neq 3 = f(g(1))$), it can be concluded that:
$$ g \circ f \neq f \circ g $$
In 3 and 4, functions $F$ and $G$ are defined by formulas. Find $G \circ F$ and
$F \circ G$ and determine whether $G \circ F$ equals $F \circ G$.
3. $F(x) = x^3$ and $G(x) = x - 1$, for each real number $x$.
$$ (G \circ F)(x) = G(F(x)) = G(x^3) = x^3 - 1 $$
$$ (F \circ G)(x) = F(G(x)) = F(x - 1) = (x - 1)^3 $$
$$ = (x - 1)(x - 1)(x - 1) $$
$$ = (x^2 - 2x + 1)(x - 1) $$
$$ = x^2(x - 1) - 2x(x - 1) + 1(x - 1) $$
$$ = x^3 - x^2 - 2x^2 - 2x + x - 1 $$
$$ = x^3 - 3x^2 - x - 1 $$
As $x^3 - 1 \neq x^3 - 3x^2 - x - 1 \forall x \in \mathbb{R}$
Consider $x = 2$, then:
$$ (G \circ F)(2) = (2)^3 - 1 = 8 - 1 = 7 $$
$$ (F \circ G)(2) = (2 - 1)^3 = (2 - 1)(2 - 1)(2 - 1) = (1)(1)(1) = 1 $$
Note that:
$$ 7 \neq 1 $$
So $(G \circ F)(2) \neq (F \circ G)(2)$.
Hence it can be concluded then that, for all real numbers:
$$ G \circ F \neq F \circ G $$
4. $F(x) = x^5$ and $G(x) = x^{\frac{1}{5}}$ for each real number $x$.
$$ (G \circ F)(x) = G(F(x)) = G(x^5) = (x^5)^{\frac{1}{5}} = x^{5 \cdot \frac{1}{5}} = x $$
$$ (F \circ G)(x) = F(G(x)) = F(x^{\frac{1}{5}}) = (x^{\frac{1}{5}})^5 = x^{\frac{1}{5} \cdot 5} = x $$
Since both $(G \circ F)(x) = x = (F \circ G)(x)$, it can be concluded that for
all $x \in \mathbb{R}$:
$$ G \circ F = F \circ G $$
5. Define $f: \mathbb{R} \to \mathbb{R}$ by the rule $f(x) = -x$ for every real
number $x$. Find $(f \circ f)(x)$.
$$ (f \circ f)(x) = f(f(x)) = f(-x) = -(-x) = x $$
6. Define $F: \mathbb{Z} \to \mathbb{Z}$ and $G: \mathbb{Z} \to \mathbb{Z}$ by
the rules $F(a) = 7a$ and $G(a) = a \mod 5$ for each integer $a$. Find
$(G \circ F)(0)$, $(G \circ F)(1)$, $(G \circ F)(2)$, $(G \circ F)(3)$, and
$(G \circ F)(4)$.
$$ (G \circ F)(0) = G(F(0)) = G(7(0)) = G(0) = 0 \mod 5 = 0 $$
$$ (G \circ F)(1) = G(F(1)) = G(7(1)) = G(7) = 7 \mod 5 = 2 $$
$$ (G \circ F)(2) = G(F(2)) = G(7(2)) = G(14) = 14 \mod 5 = 4 $$
$$ (G \circ F)(3) = G(F(3)) = G(7(3)) = G(21) = 21 \mod 5 = 1 $$
$$ (G \circ F)(4) = G(F(4)) = G(7(4)) = G(28) = 28 \mod 5 = 3 $$
7. Define $L: \mathbb{Z} \to \mathbb{Z}$ and $M: \mathbb{Z} \to \mathbb{Z}$ by
the rules $L(a) = a^2$ and $M(a) = a \mod 5$ for each integer $a$.
a. Find $(L \circ M)(12)$, $(M \circ L)(12)$, $(L \circ M)(9)$, and
$(M \circ L)(9)$.
$$ (L \circ M)(12) = L(M(12)) = L(12 \mod 5) = L(2) = 2^2 = 4 $$
$$ (M \circ L)(12) = M(L(12)) = M(12^2) = M(144) = 144 \mod 5 = 4 $$
$$ (L \circ M)(9) = L(M(9)) = L(9 \mod 5) = L(4) = 4^2 = 16 $$
$$ (M \circ L)(9) = M(L(9)) = M(9^2) = M(81) = 81 \mod 5 = 1 $$
b. Is $L \circ M = M \circ L$?
No, since $(L \circ M)(9) = 16 \neq 1 = (M \circ L)(9)$, it can be concluded
that $L \circ M \neq M \circ L$ for all integers.
8. Let $S$ be the set of all strings in _a_'s and _b_'s and let
$L: S \to \mathbb{Z}$ be the length function:
For all strings $s \in S$ ,
$$ L(s) = \text{ the number of characters in } s $$
Let $T: \mathbb{Z} \to \{0, 1, 2\}$ be the $\mod 3$ function:
$$ \text{For every integer } n, \quad T(n) = n \mod 3 $$
a. $(T \circ L)(abaa) = \text{ ?}$
$$ (T \circ L)(abaa) = T(L(abaa)) = T(4) = 4 \mod 3 = 1 $$
b. $(T \circ L)(baaab) = \text{ ?}$
$$ (T \circ L)(baaab) = T(L(baaab)) = T(5) = 5 \mod 3 = 2 $$
c. $(T \circ L)(aaa) = \text{ ?}$
$$ (T \circ L)(aaa) = T(L(aaa)) = T(3) = 3 \mod 3 = 0 $$
9. Define $F: \mathbb{R} \to \mathbb{R}$ and $G: \mathbb{R} \to \mathbb{Z}$ by
the following formulas: $F(x) = \dfrac{x^2}{3}$ and
$G(x) = \lfloor x \rfloor$ for every $x \in \mathbb{R}$.
a. $(G \circ F)(2) = \text{ ?}$
$$ (G \circ F)(2) = G(F(2)) = G\left(\frac{(2)^2}{3}\right) = G\left(\frac{4}{3}\right) = \left\lfloor v\frac{4}{3} \right\rfloor = 1 $$
b. $(G \circ F)(-3) = \text{ ?}$
$$ (G \circ F)(-3) = G(F(-3)) = G\left(\frac{(-3)^2}{3}\right) = G\left(\frac{9}{3}\right) = G(3) = \lfloor 3 \rfloor = 3 $$
c. $(G \circ F)(5) = \text{ ?}$
$$ (G \circ F)(5) = G(F(5)) = G\left(\frac{(5)^2}{3}\right) = G\left(\frac{25}{3}\right) = \left\lfloor \frac{25}{3} \right\rfloor = 8 $$
10. Define $F: \mathbb{Z} \to \mathbb{Z}$ and $G: \mathbb{Z} \to \mathbb{Z}$ by
the rules $F(n) = 2n$ and $G(n) = \left\lfloor \dfrac{n}{2} \right\rfloor$
for every integer $n$.
a. Find $(G \circ F)(8)$, $(F \circ G)(8)$, $(G \circ F)(3)$, and
$(F \circ G)(3)$.
$$ (G \circ F)(8) = G(F(8)) = G(2(8)) = G(16) = \left\lfloor \frac{(16)}{2} \right\rfloor = \lfloor 8 \rfloor = 8 $$
$$ (F \circ G)(8) = F(G(8)) = F\left(\left\lfloor \frac{(8)}{2} \right\rfloor\right) = F(\lfloor 4 \rfloor) = F(4) = 2(4) = 8 $$
$$ (G \circ F)(3) = G(F(3)) = G(2(3)) = G(6) = \left \lfloor \frac{(6)}{2} \right\rfloor = \lfloor 3 \rfloor = 3 $$
$$ (F \circ G)(3) = F(G(3)) = F\left(\left\lfloor \frac{(3)}{2} \right\rfloor\right) = F(1) = 2(1) = 2 $$
b. Is $G \circ F = F \circ G$? Explain.
No, since $(G \circ F)(3) = 3 \neq 2 = (F \circ G)(3)$, it can be concluded that
$G \circ F \neq F \circ G$ for all integers.
11. Define $F: \mathbb{R} \to \mathbb{R}$ and $G : \mathbb{R} \to \mathbb{R}$ by
the rules $F(n) = 3x$ and $G(n) = \left\lceil \dfrac{x}{3} \right\rceil$ for
every real number $x$.
a. Find $(G \circ F)(6)$, $(F \circ G)(6)$, $(G \circ F)(1)$, and
$(F \circ G)(1)$.
$$ (G \circ F)(6) = G(F(6)) = G(3(6)) = G(18) = \left\lceil \frac{(18)}{3} \right\rceil = \lceil 6 \rceil = 6 $$
$$ (F \circ G)(6) = F(G(6)) = F\left(\left\lceil \frac{(6)}{3} \right\rceil \right) = F(\lceil 2 \rceil) = F(2) = 3(2) = 6 $$
$$ (G \circ F)(1) = G(F(1)) = G(3(1)) = G(3) = \left\lceil \frac{(3)}{3} \right\rceil = \lceil 1 \rceil = 1 $$
$$ (F \circ G)(1) = F(G(1)) = F\left(\left\lceil \frac{(1)}{3} \right\rceil \right) = F(1) = 3(1) = 3 $$
b. Is $G \circ F = F \circ G$? Explain.
No, since $(G \circ F)(1) = 1 \neq 3 = (F \circ G)(1)$, it can be concluded that
$G \circ F \neq F \circ G$ for all real numbers.
The functions of each pair in 12-14 are inverse to each other. For each pair,
check that both compositions give the identity function.
12. $F: \mathbb{R} \to \mathbb{R}$ and $F^{-1}: \mathbb{R} \to \mathbb{R}$ are
defined by
$$ F(x) = 3x + 2 \quad \text{ and } \quad F^{-1}(y) = \frac{y - 2}{3} $$
for every $y \in \mathbb{R}$.
$$ (F^{-1} \circ F)(x) = F^{-1}(F(x)) = F^{-1}(3x + 2) = \frac{(3x + 2) - 2}{3} = \frac{3x}{3} = x = I_{\mathbb{R}}(x) $$
Hence, for every $x \in \mathbb{R}$, $F^{-1} \circ F = I_{\mathbb{R}}$ by
definition of the equality of functions.
$$ (F \circ F^{-1})(y) = F(F^{-1}(y)) = F\left(\frac{y - 2}{3}\right) = 3\left(\frac{y - 2}{3}\right) + 2 = y - 2 + 2 = y = I_{\mathbb{R}(y)} $$
Hence, for every $y \in \mathbb{R}$, $F \circ F^{-1} = I_{\mathbb{R}}$ by
definition of the equality of functions.
13. $G: \mathbb{R}^+ \to \mathbb{R}^+$ and
$G^{-1}: \mathbb{R}^+ \to \mathbb{R}^+$ are defined by
$$ G(x) = x^2 \quad \text{ and } \quad G^{-1}(x) = \sqrt{x} $$
for every $x \in \mathbb{R}^+$.
$$ (G^{-1} \circ G)(x) = G^{-1}(G(x)) = G^{-1}(x^2) = \sqrt{(x^2)} = x = I_{\mathbb{R}^+}(x) $$
Hence, for every $x \in \mathbb{R}^+$, $G^{-1} \circ G = I_{\mathbb{R}^+}$ by
definition of the equality of functions.
$$ (G \circ G^{-1})(y) = G(G^{-1}(y)) = G\left(\sqrt{y}\right) = \left(\sqrt{y}\right)^2 = y = I_{\mathbb{R}^+}(y) $$
Hence, for every $y \in \mathbb{R}^+$, $G \circ G^{-1} = I_{\mathbb{R}^+}$ by
definition of the equality of functions.
14. $H$ and $H^{-1}$ are both defined from $\mathbb{R} - \{1\}$ to
$\mathbb{R} - \{1\}$ by the formula
$$ H(x) = H^{-1}(x) = \frac{x + 1}{x - 1}, \quad \text{ for each } x \in \mathbb{R} - \{1\} $$
$$ (H^{-1} \circ H)(x) = H^{-1}(H(x)) = H^{-1}\left(\frac{x + 1}{x - 1}\right) $$
$$ = \frac{\dfrac{x + 1}{x - 1} + 1}{\dfrac{x + 1}{x - 1} - 1} $$
$$ = \frac{\dfrac{x + 1 + (x - 1)}{x - 1}}{\dfrac{x + 1 - (x - 1)}{x - 1}} $$
$$ = \frac{x + 1 + (x - 1)}{x + 1 - (x - 1)}$$
$$ = \frac{x + 1 + x - 1}{x + 1 - x + 1}$$
$$ = \frac{2x}{2} $$
$$ = x = I_{\mathbb{R} - \{1\}}(x) $$
Hence, for every $x \in \mathbb{R} - \{1\}$,
$H^{-1} \circ H = I_{\mathbb{R} - \{1\}}$ by definition of the equality of
functions.
$$ (H \circ H^{-1})(y) = H(H^{-1}(y)) = H\left(\frac{y + 1}{y - 1}\right) $$
$$ = \frac{\dfrac{y + 1}{y - 1} + 1}{\dfrac{y + 1}{y - 1} - 1} $$
$$ = \frac{\dfrac{y + 1 + (y - 1)}{y - 1}}{\dfrac{y + 1 - (y - 1)}{y - 1}} $$
$$ = \frac{y + 1 + (y - 1)}{y + 1 - (y - 1)}$$
$$ = \frac{y + 1 + y - 1}{y + 1 - y + 1}$$
$$ = \frac{2y}{2} $$
$$ = y = I_{\mathbb{R} - \{1\}}(y) $$
Hence, for every $y \in \mathbb{R} - \{1\}$,
$H \circ H^{-1} = I_{\mathbb{R} - \{1\}}$ by definition of the equality of
functions.
15. Explain how it follows from the definition of logarithm that
a. $\log_{b}(b^x) = x$, for every real number $x$.
By definition of logarithm with base $b$, for each real number $x$,
$\log_{b}(b^x)$ is the exponent to which $b$ must be raised to obtain $b^x$. But
this exponent is just $x$. So $\log_{b}(b^x) = x$.
b. $b^{\log_{b}x} = x$, for every positive real number $x$.
By definition of logarithm with base $b$, for each real number r$x$, $\log_{b}x$
is the exponent to which $b$ must be raised to obtain $x$. So
$b^{\log_{b}x} = x$.
16. Prove Theorem 7.3.1(b): If $f$ is any function from a set $X$ to a set $Y$,
then $I_y \circ f = f$, where $I_y$ is the identity function on $Y$.
_Hint:_ Suppose $f$ is any function from a set $X$ to a set $Y$, and show that
for every $x$ in $X$, $(I_Y \circ f)(x) = f(x)$.
**Proof:**
_Part (b):_
Suppose $f$ is any function from a set $X$ to a set $Y$.
To prove that $I_Y \circ f = f$, it must be shown that for every $x \in X$,
$(I_Y \circ f)(x) = f(x)$.
By the definition of the composition of functions:
$$ (I_Y \circ f)(x) = I_Y(f(x)) $$
By the definition of the Identity function, since $f(x) = y$:
$$ I_Y(f(x)) = I_Y(y) = y = f(x) $$
This is what was to be shown.
Q.E.D.
17. Prove Theorem 7.3.2(b): If $f: X \to Y$ is a one-to-one and onto function
with inverse function $f^{-1}: Y \to X$, then $f \circ f^{-1} = I_Y$, where
$I_Y$ is the identity function on $Y$.
**Proof:**
_Part (b):_
Suppose $f: X \to Y$ is a one-to-one and onto function with inverse function
$f^{-1}: Y \to X$.
To prove that $f \circ f^{-1} = I_Y$, we must show that for each $y \in Y$,
$(f \circ f^{-1})(y) = y$.
By the definition of the composition of functions:
$$ (f \circ f^{-1})(y) = f(f^{-1}(y)) $$
Since $f$ is one-to-one and onto, this implies that there exists a unique
$x \in X$ such that $f(x) = y$. Therefore, by the definition of inverse
functions:
$$ f^{-1}(y) = x $$
Substituting this in to our composition of functions:
$$ (f \circ f^{-1})(y) = f(x) = y = I_Y $$
This is what was to be shown.
Q.E.D.
18. Suppose $Y$ and $Z$ are sets and $g: Y \to Z$ is a one-to-one function. This
means that if $g$ takes the same value on any two elements of $Y$, then
those elements are equal. Thus, for example, if $a$ and $b$ are elements of
$Y$ and $g(a) = g(b)$, then it can be inferred that $a = b$. What can be
inferred in the following situations?
a. $s_k$ and $s_m$ are elements of $Y$ and $g(s_k) = g(s_m)$.
It can be inferred that $s_k = s_m$.
b. $\dfrac{z}{2}$ and $\dfrac{t}{2}$ are elements of $Y$ and
$g\left(\dfrac{z}{2}\right) = g\left(\dfrac{t}{2}\right)$.
It can be inferred that $\dfrac{z}{2} = \dfrac{t}{2}$, and furthermore, by
algebra, that $z = t$.
c. $f(x_1)$ and $f(x_2)$ are elements of $Y$ and $g(f(x_1)) = g(f(x_2))$.
We can infer that $f(x_1) = f(x_2)$. Of note here is that we cannot infer that
$x_1 = x_2$ since we do not know if $f$ is one-to-one.
19. If $f: X \to Y$ and $g: Y \to Z$ are functions and $g \circ f$ is
one-to-one, must $g$ be one-to-one? Prove or give a counterexample.
No, $g$ is not necessarily one-to-one.
**Disproof (by counterexample):**
Suppose $X = \{a, b\}$, $Y = \{1, 2, 3\}$, and $Z = \{x, y\}$. Then suppose:
$$ f(a) = 2, f(b) = 3, g(1) = x, g(2) = x, and g(3) = y $$
So $g \circ f$ is one-to-one since $(g \circ f)(a) = g(f(a)) = g(2) = x$ and
$(g \circ f)(b) = g(f(b)) = g(3) = y$.
Thus it has been shown that for some sets $X$, $Y$, and $Z$, there are functions
$f: X \to Y$ and $g: Y \to Z$ such that $g \circ f$ is one-to-one, but $g$ is
not one-to-one.
Q.E.D.
20. If $f: X \to Y$ and $g: Y \to Z$ are functions and $g \circ f$ is onto, must
$f$ be onto? Prove or give a counterexample.
No, $f$ is not necessarily onto.
**Disproof (by counterexample):**
Suppose $X = \{a, b, c, d\}$, $Y = \{1, 2, 3, 4, 5\}$, and $Z = \{x, y, z\}$.
Then, define $f$ and $g$ as:
$$ f(a) = 1, f(b) = 2, f(c) = 3, f(d) = 4, g(1) = x, g(2) = y, g(3) = z, g(4) = z $$
Then, $g\circ f$ is onto, as
$(g \circ f)(a) = x, (g \circ f)(b) = y, (g \circ f)(c) = z, (g \circ f)(d) = z$.
But, notice that $f$ is not onto, as the element $5$ is in the co-domain of $f$,
but is not in the range of $f$.
Hence $f$ is not onto.
Q.E.D.
21. If $f: X \to Y$ and $g: Y \to Z$ are functions and $g \circ f$ is
one-to-one, must $f$ be one? Prove or give a counterexample.
_Hint:_
Suppose $f: X \to Y$ and $g: Y \to Z$ are functions and $g \circ f$ is
one-to-one. Given $x_1$ and $x_2$ in $X$, if $f(x_1) = f(x_2)$ then
$(g \circ f)(x_1) = (g \circ f)(x_2)$. (Why?) Then use the fact that $g \circ f$
is one-to-one.
Yes, $f$ is one-to-one.
**Proof:**
Suppose $f: X \to Y$ and $g: Y \to Z$ are functions and that $g \circ f$ is
one-to-one.
Let $x_1, x_2 \in X$ such that $f(x_1) = f(x_2)$. To prove that $f$ is
one-to-one, it must be shown that $x_1 = x_2$.
By the definition of the composition of functions:
$$ (g \circ f)(x_1) = g(f(x_1)) $$
And also by the definition of the composition of functions:
$$ (g \circ f)(x_2) = g(f(x_2)) $$
Now, since $f(x_1) = f(x_2)$, it follows that:
$$ g(f(x_1)) = g(f(x_2)) $$
Furthermore, since $g \circ f$ is one-to-one, it also follows that:
$$ x_1 = x_2 $$
This is what was to be shown. Therefore it can be concluded that $f$ is
one-to-one.
Q.E.D.
22. If $f: X \to Y$ and $g: Y \to Z$ are functions and $g \circ f$ is onto, must
$g$ be onto? Prove or give a counterexample.
_Hint:_
Suppose $f: X \to Y$ and $g: Y \to Z$ are functions and $g \circ f$ is onto.
Given $z \in Z$, there is an element $x$ in $X$ such that $(g \circ f)(x) = z$.
(Why?) If $y = f(x)$, what can you deduce about $g(y)$?
Yes, $g$ is onto.
**Proof:**
Suppose $f: X \to Y$ and $g: Y \to Z$ are functions and $g \circ f$ is onto.
Let $z \in Z$.
To prove that $g$ is onto, it must be shown that there exists some $y \in Y$
such that $g(y) = z$.
Since $g \circ f$ is onto, this implies that there exists some $x \in X$ such
that $(g \circ f)(x) = z$. By the definition of the composition of functions,
this can be expressed as:
$$ (g \circ f)(x) = g(f(x)) = z $$
Now, let $f(x) = y$ where $y \in Y$. Then, it follows that:
$$ g(y) = z $$
This is what was to be shown. Therefore it can be concluded that $g$ is onto.
Q.E.D.
23. Let $f: W \to X$, $g: X \to Y$, and $h: Y \to Z$ be functions. Must
$h \circ (g \circ f) = (h \circ g) \circ f$? Prove or give a counterexample.
The stated equality is true.
**Proof:**
Suppose $f: W \to X$, $g: X \to Y$, and $h: Y \to Z$ are functions.
Let $w \in W$.
To prove $h \circ (g \circ f) = (h \circ g) \circ f$, it must be shown that
$(h \circ (g \circ f))(w) = ((h \circ g) \circ f)(w)$.
By the definition of the composition of functions:
$$ (h \circ (g \circ f))(w) = h((g \circ f)(w)) = h(g(f(w))) $$
Also by the definition of the composition of functions:
$$ ((h \circ g) \circ f)(w) = (h \circ g)(f(w)) = h(g(f(w))) $$
Thus it has been shown that the two sides of the given proposed equality are
indeed equal since $h(g(f(w))) = h(g(f(w)))$.
Therefore $h \circ (g \circ f) = (h \circ g) \circ f$.
Q.E.D.
24. True or False? Given any set $X$ and given any functions $f: X \to X$,
$g: X \to X$, and $h: X \to X$, if $h$ is one-to-one and
$h \circ f = h \circ g$, then $f = g$. Justify your answer.
True.
**Proof:**
Suppose given any set $X$ such that $f: X \to X$, $g: X \to X$, and $h: X \to X$
are functions. Furthermore, suppose $h$ is one-to-one and
$h \circ f = h \circ g$.
Let $x \in X$.
To prove $f = g$, it must be shown that $f(x) = g(x)$.
By the definition of the composition of functions:
$$ (h \circ f)(x) = h(f(x)) $$
And also by the definition of the composition of functions:
$$ (h \circ g)(x) = h(g(x)) $$
By the supposition, this means that:
$$ h(f(x)) = h(g(x)) $$
Now, since $h$ is one-to-one, and since $h(f(x)) = h(g(x))$, it follows that:
$$ f(x) = g(x) $$
This is what was to be shown. Therefore $f = g$.
Q.E.D.
25. True or False? Given any set $X$ and given any functions $f: X \to X$,
$g: X \to X$, and $h: X \to X$, if $h$ is one-to-one and
$f \circ h = g \circ h$, then $f = g$. Justify your answer.
Omitted.
In 26 and 27 find $(g \circ f)^{-1}$, $g^{-1}$, $f^{-1}$, and
$f^{-1} \circ g^{-1}$, and state how $(g \circ f)^{-1}$ and
$f^{-1} \circ g^{-1}$ are related.
26. Let $X = \{a, b, c\}$, $Y = \{x, y, z\}$, and $Z = \{u, v, w\}$. Define
$f: X \to Y$ and $g: Y \to Z$ by the arrow diagrams below.
(See page 495 for image.)
Omitted.
27. Define $f: \mathbb{R} \to \mathbb{R}$ and $g: \mathbb{R} \to \mathbb{R}$ by
the formulas
$$ f(x) = x + 3 \quad \text{ and } \quad g(x) = -x \quad \text{ for each } x \in \mathbb{R} $$
Omitted.
28. Prove or give a counterexample: If $f: X \to Y$ and $g: Y \to X$ are
functions such that $g \circ f = I_x$ and $f \circ g = I_y$, then $f$ and
$g$ are both one-to-one and onto and $g = f^{-1}$.
Omitted.
29. Suppose $f: X \to Y$ and $g: Y \to Z$ are both one-to-one and onto. Prove
that $(g \circ f)^{-1}$ exists and that
$(g \circ f)^{-1} = f^{-1} \circ g^{-1}$.
Omitted.
30. Let $f: X \to Y$ and $g: Y \to Z$. Is the following property true or false?
For every subset $C$ in $Z$, $(g \circ f)^{-1}(C) = f^{-1}(g^{-1}(C))$.
Justify your answer.
Omitted.
---
Page 507
**Exercise Set 7.4**
1. When asked what it means to say that set $A$ has the same cardinality as set
$B$, a student replies, "$A$ and $B$ are one-to-one and onto." What _should_
the student have replied? Why?
Since $A$ and $B$ are sets and not functions, the student's statement is
incorrect, since sets cannot have the properties of being one-to-one and onto,
only a function can have these properties. Instead, the student have claimed
that $A$ and $B$ have the same cardinality if, and only if, there is a function
from $A$ to $B$ that is both one-to-one and onto (a one-to-one correspondence).
2. Show that "there are as many squares as there are numbers" by exhibiting a
one-to-one correspondence from the positive integers, $\mathbb{Z}^+$, to the
set $S$ of all squares of positive integers:
$$ S = \{n \in \mathbb{Z}^+ | n = k^2, \text{ for some positive integer } k\} $$
**Proof:**
Suppose there is a set $S$ that is the set of all squares:
$$ S = \{n \in \mathbb{Z}^+ | n = k^2, \text{ for some positive integer } k\} $$
To prove that $S$ and the set of all positive integers, $\mathbb{Z}^+$, have the
same cardinality, it must be shown that there exists some function, $f$, such
that $f$ is a one-to-one correspondence from $\mathbb{Z}^+$ to $S$. In other
words, it must be shown that there exists some function $f: \mathbb{Z}^+ \to S$
such that $f$ is one-to-one and onto.
_Proof ($f$ is one-to-one):_
Suppose $k_1, k_2 \in \mathbb{Z}^+$ such that $f(k_1) = f(k_2)$.
To prove that $f$ is one-to-one, it must be shown that $k_1 = k_2$.
By definition of $f$:
$$ k_1^2 = k_2^2 $$
By algebra:
$$ \sqrt{k_1^2} = \sqrt{k_2^2} $$
$$ \pm k_1 = \pm k_2 $$
Recall that $k_1, k_2 \in \mathbb{Z}^+$, so it follows that:
$$ k_1 = k_2 $$
This is what was to be shown. Therefore, it can be concluded that $f$ is
one-to-one.
_Proof ($f$ is onto):_
Suppose there is some $m \in S$.
To prove that $f$ is onto, it must be shown that there exists some
$k \in \mathbb{Z}^+$ such that $f(k) = m$.
By definition of $S$:
$$ m = k^2 $$
for some integer $k$.
Then, by definition of $f$:
$$ f(k) = k^2 = m $$
This is what was to be shown. Therefore it can be concluded that $f$ is onto.
_Conclusion:_
Since it has been shown that $f$ is both one-to-one and onto, it follows by the
properties of cardinality that the sets $S$ and $\mathbb{Z}^+$ have the same
cardinality (the same number of elements in them).
Q.E.D.
3. Let
$3\mathbb{Z} = \{n \in \mathbb{Z} | n = 3k, \text{ for some integer } k\}$.
Prove that $\mathbb{Z}$ and $3\mathbb{Z}$ have the same cardinality.
**Proof:**
Suppose there is a set $3\mathbb{Z}$ that represents the set of all integers
divisible by $3$:
$$ 3\mathbb{Z} = \{n \in \mathbb{Z} | n = 3k, \text{ for some integer } k\} $$
Define $f: \mathbb{Z} \to 3\mathbb{Z}$ as $f(n) = 3n$ for some integer $n$.
To prove that $\mathbb{Z}$ and $3\mathbb{Z}$ have the same cardinality, it must
shown that $f$ is a one-to-one correspondence from $\mathbb{Z}$ to 3\mathbb{Z}.
_Proof ($f$ is one-to-one):_
Suppose there exists some $x_1, x_2 \in 3\mathbb{Z}$ such that
$f(x_1) = f(x_2)$.
To prove that $f$ is one-to-one, it must be shown that $x_1 = x_2$.
By definition of $f$:
$$ 3x_1 = 3x_2 $$
By algebra:
$$ x_1 = x_2 $$
This is what was to be shown. Therefore, it can be concluded that $f$ is
one-to-one.
_Proof ($f$ is onto):_
Suppose there is some $m \in 3\mathbb{Z}$.
To prove that $f$ is onto, it must be shown that $f(k) = m$ for some integer
$k$.
By definition of $3\mathbb{Z}$:
$$ f(k) = 3k = m $$
for some integer $k$.
This is what was to be shown. Therefore, it can be concluded that $f$ is onto.
_Conclusion:_
Since it has been shown that $f$ is a one-to-one correspondence from
$\mathbb{Z}$ to $3\mathbb{Z}$, it can be concluded that $\mathbb{Z}$ and
$3\mathbb{Z}$ have the same cardinality.
Q.E.D.
4. Let $\mathbb{O}$ be the set of all odd integers. Prove that $\mathbb{O}$ has
the same cardinality as $2\mathbb{Z}$, the set of all even integers.
**Proof:**
Suppose there is a set $\mathbb{O}$ that represents the set of all odd integers:
$$ \mathbb{O} = \{n \in \mathbb{Z} | n = 2k + 1 \text{ for some integer } k\} $$
Let $f: \mathbb{O} \to 2\mathbb{Z}$ (where $2\mathbb{Z}$ is the set of all even
integers) such that $f(n) = n - 1$ for some integer $n$.
To prove that $\mathbb{O}$ has the same cardinality as $2\mathbb{Z}$, it must be
shown that $f$ is a one-to-one correspondence from $\mathbb{O}$ to
$2\mathbb{Z}$.
_Proof ($f$ is one-to-one):_
Suppose $x_1, x_2 \in \mathbb{O}$ such that $f(x_1) = f(x_2)$.
To prove that $f$ is one-to-one, it must be shown that $x_1 = x_2$.
By the definition of $f$:
$$ x_1 - 1 = x_2 - 1 $$
By algebra:
$$ x_1 = x_2 $$
This is what was to be shown. Therefore, it can be concluded that $f$ is
one-to-one.
_Proof ($f$ is onto):_
Suppose $m \in 2\mathbb{Z}$.
To prove that $f$ is onto, it must be shown that $f(k) = m$ for some integer
$k \in \mathbb{O}$.
Let $k = m + 1$. Since $m \in 2\mathbb{Z}$, $m + 1$ is odd (by definition of
odd). This means that $k$ is odd, so $k \in \mathbb{O}$. Then:
$$ f(k) = k - 1 = (m + 1) - 1 = m $$
This is what was to be shown. Therefore it can be concluded that $f$ is onto.
_Conclusion:_
Since it has been shown that $f$ is a one-to-one correspondence from
$\mathbb{O}$ to $2\mathbb{Z}$, it can be concluded that $\mathbb{O}$ and
$2\mathbb{Z}$ have the same cardinality.
5. Let $25\mathbb{Z}$ be the set of all integers that are multiples of $25$.
Prove that $25\mathbb{Z}$ has the same cardinality as $2\mathbb{Z}$, the set
of all even integers.
**Proof:**
Suppose $25\mathbb{Z}$ represents the set of all integers that are multiples of
$25$.
$$ 25\mathbb{Z} = \{n \in \mathbb{Z} | n = 25k \text{ for some integer } k\} $$
Let $f: 25\mathbb{Z} \to 2\mathbb{Z}$ (where $2\mathbb{Z}$ represents the set of
all even integers), and define $f$ as $f(n) = \dfrac{2}{25}n$ for some integer
$n$.
To prove that $25\mathbb{Z}$ has the same cardinality as $2\mathbb{Z}$, it must
be shown that $f$ is a one-to-one correspondence from
$25\mathbb{Z} \to 2\mathbb{Z}$.
_Proof ($f$ is one-to-one):_
Suppose $x_1, x_2 \in 25\mathbb{Z}$ such that $f(x_1) = f(x_2)$.
To prove that $f$ is one-to-one, it must be shown that $x_1 = x_2$.
By the definition for $f$:
$$ \frac{2}{25}x_1 = \frac{2}{25}x_2 $$
By algebra:
$$ x_1 = x_2 $$
This is what was to be shown. Therefore, it can be concluded that $f$ is
one-to-one.
_Proof ($f$ is onto):_
Let $m \in 2\mathbb{Z}.
To show that $f$ is onto, it must be shown that $f(k) = m$ for some
$k \in 25\mathbb{Z}$.
Let $k = \dfrac{25m}{2}$.
Since $m$ is even, $\dfrac{m}{2}$ is an integer, so $k = 25 \cdot \dfrac{m}{2}$,
which is a multiple of $25$. It follows that $k \in 25\mathbb{Z}$.
Then:
$$ f(k) = \frac{2}{25}\left(\frac{25m}{2}\right) = m $$
This is what was to be shown. Therefore, it can be concluded that $f$ is onto.
_Conclusion:_
Since it has been shown that $f$ is a one-to-one correspondence from
$25\mathbb{Z} \to 2\mathbb{Z}$, it can be concluded that $25\mathbb{Z}$ and
$2\mathbb{Z}$ have the same cardinality.
6. Use the functions $I$ and $J$ defined in the paragraph following Example
7.4.1 to show that even though there is a one-to-one correspondence, $H$,
from $2\mathbb{Z}$ to $\mathbb{Z}$, there is also a function from
$2\mathbb{Z}$ to $\mathbb{Z}$ that is one-to-one but not onto and a function
from $\mathbb{Z}$ to $2\mathbb{Z}$ that is onto but not one-to-one. In other
words, show that $I$ is one-to-one but not onto, and show that $J$ is onto
but not one-to-one.
_Hint:_ If $m \in 2\mathbb{Z}$, show that $J(m) = J(m + 1) = m$.
Suppose $I: 2\mathbb{Z} \to \mathbb{Z}$, and define $I$ as $I(n) = n$ for some
even integer $n$.
Furthermore, suppose $J: \mathbb{Z} \to 2\mathbb{Z}$, and define $J$ as $J(m) =
2\left\lfloor \dfrac{m}{2} \right\rfloor$ for some integer $m$.
**Proof ($I$ is one-to-one, but not onto):**
_Proof ($I$ is one-to-one):_
Suppose $x_1, x_2 \in 2\mathbb{Z}$ such that $I(x_1) = I(x_2)$. To prove that
$I$ is one-to-one, it must be shown that $x_1 = x_2$.
By definition for $I$:
$$ x_1 = x_2 $$
This is what was to be shown. Therefore it can be concluded that $I$ is
one-to-one.
_Proof ($I$ is not onto):_
Suppose $m \in \mathbb{Z}$.
To prove that $I$ is onto, it would need to be shown that $I(k) = m$, for some
$k \in \mathbb{Z}$.
But since $m \in \mathbb{Z}$, $m$ could be an odd integer. If $m$ is odd, then
$m = 2k + 1$ for some integer $k$, and so $I$ is not onto.
Consider $m = 3$, then there would exist no $k$ for which $I(k) = 3$, since $I$.
Therefore $I$ is not onto.
**Proof ($J$ is onto, but not one-to-one):**
_Proof ($J$ is onto):_
Suppose $m \in 2\mathbb{Z}$.
To prove that $J$ is onto, it must be shown that $J(k) = m$ for some
$k \in \mathbb{Z}$.
Let $k = m$.
By the definition for $J$:
$$ J(k) = 2\lfloor \frac{k}{2} \rfloor $$
Since $k$ is even (since $k = m$ and $m \in 2\mathbb{Z}$), $k = 2p$ for some
integer $p$. By substitution:
$$ J(k) = 2\lfloor \frac{2p}{2} \rfloor $$
$$ = 2\lfloor p \rfloor $$
Then, by definition of floor:
$$ = 2p $$
Since $p$ is an integer, $2p \in 2\mathbb{Z}$, by the definition of even. It
follows that:
$$ J(k) = 2p = k = m $$
This is what was to be shown. Therefore it can be concluded that $J$ is onto.
_Proof ($J$ is not one-to-one):_
Were it to be proven that $J$ is one-to-one, it would have to assumed that for
some $x_1, x_2 \in \mathbb{Z}$, such that $J(x_1) = J(x_2)$, and then shown that
$x_1 = x_2$.
By the definition for $J$:
$$ 2\lfloor \frac{x_1}{2} \rfloor = 2\lfloor \frac{x_2}{2} \rfloor $$
But the floor function does not necessarily have to take the same image to
generate the same elements of its co-domain.
Consider $x_1 = 2$ and $x_2 = 3$, then by definition for $J$:
$$ J(x_1) = 2\lfloor \frac{2}{2} \rfloor = 2\lfloor 1 \rfloor = 2(1) = 2 $$
$$ J(x_2) = 2\lfloor \frac{3}{2} \rfloor = 2(1) = 2 $$
So, $J(x_1) = J(x_2)$, but $x_1 \neq x_2$. Therefore $J$ is not one-to-one.
7.
a. Check that the formula for $F$ given at the end of Example 7.4.2 produces the
correct values for $n = 1, 2, 3, \text{ and } 4$.
The formula for $F$ is as follows:
$$
F(n) =
\begin{cases}
\dfrac{n}{2} & \text{if } n \text{ is an even positive integer} \\
-\dfrac{n - 1}{2} & \text{if } n \text{ is an odd positive integer}
\end{cases}
$$
_Case $n = 1$:_
$$ F(1) = -\frac{(1) - 1}{2} = -\frac{0}{2} = (-1)0 = 0 $$
_Case $n = 2$:_
$$ F(2) = \frac{(2)}{2} = 1 $$
_Case $n = 3$:_
$$ F(3) = -\frac{(3) - 1}{2} = (-1)\left(\frac{2}{2}\right) = (-1)(1) = -1 $$
_Case $n = 4$:_
$$ F(4) = \frac{(4)}{2} = 2 $$
b. Use the floor function to write a formula for $F$ as a single algebraic
expression for each positive integer $n$.
$$ F(n) = (-1)^n\lfloor \frac{n}{2} \rfloor $$
8. Use the result of exercise 3 to prove that $3\mathbb{Z}$ is countable.
Recall that a set is countable if, and only if, it is finite or countably
infinite.
Additionally, recall that a set is countably infinite if, and only if, it has
the same cardinality as the set of positive integers $\mathbb{Z}^+$ (_i.e._
there is a function that is a one-to-one correspondence from the given set to
$\mathbb{Z}^+$).
**Proof:**
Suppose $3\mathbb{Z}$ represents the set of all integers that are multiples of
$3$:
$$ 3\mathbb{Z} = \{n \in \mathbb{Z} | n = 3k, \text{ for some integer } k\} $$
To prove that $3\mathbb{Z}$ is countable, it must be shown that $3\mathbb{Z}$ is
finite or countably infinite.
$3\mathbb{Z}$ is not finite, thus it must be shown that $3\mathbb{Z}$ is
countably infinite.
As was shown in Example 7.4.3, $\mathbb{Z}$ is countably infinite (_i.e._
$\mathbb{Z}$ has the same cardinality as $\mathbb{Z}^+$). Additionally, by
problem 3, it has been shown that $3\mathbb{Z}$ has the same cardinality has
$\mathbb{Z}$. By the transitive property of cardinality, it follows that
$3\mathbb{Z}$ has the same cardinality as $\mathbb{Z}^+$, and therefore
$3\mathbb{Z}$ is countably infinite.
9. Show that the set of all nonnegative integers is countable by exhibiting a
one-to-one correspondence between $\mathbb{Z}^+$ and
$\mathbb{Z}^{\text{nonneg}}$.
Recall that a set is countable if, and only if, it is finite or countably
infinite.
Additionally, recall that a set is countably infinite if, and only if, it has
the same cardinality as the set of positive integers $\mathbb{Z}^+$ (_i.e._
there is a function that is a one-to-one correspondence from the given set to
$\mathbb{Z}^+$).
**Proof:**
Suppose $\mathbb{Z}^+$ represents the set of all positive integers and that
$\mathbb{Z}^{\text{nonneg}}$ represents the set of all nonnegative integers.
To prove that $\mathbb{Z}^{\text{nonneg}}$ is countable, it must be shown that
$\mathbb{Z}^{\text{nonneg}}$ is finite or countably infinite. Since
$\mathbb{Z}^{\text{nonneg}}$ is not finite, it follows that it must be shown
that $\mathbb{Z}^{\text{nonneg}}$ is countably infinite (_i.e._ has the same
cardinality as $\mathbb{Z}^+$).
Let $f: \mathbb{Z}^+ \to \mathbb{Z}^{\text{nonneg}}$ be defined as
$f(n) = n - 1$ for some positive integer $n$.
_Proof ($f$ is one-to-one):_
Suppose $x_1, x_2 \in \mathbb{Z}^+$ such that $f(x_1) = f(x_2)$.
To prove that $f$ is one-to-one, it must be shown that $x_1 = x_2$.
By definition of $f$:
$$ x_1 - 1 = x_2 - 1 $$
By algebra:
$$ x_1 = x_2 $$
This is what was to be shown. Therefore, it can be concluded that $f$ is
one-to-one.
_Proof ($f$ is onto):_
Suppose $m \in \mathbb{Z}^{\text{nonneg}}$.
To prove that $f$ is onto, it must be shown that $f(n) = m$ for some
$n \in \mathbb{Z}^+$.
By definition for $f$:
$$ f(n) = n - 1 $$
Let $n = m + 1$. Since $m \in \mathbb{Z}^{\text{nonneg}}$, it follows that
$n \in \mathbb{Z}^+$ (since adding $1$ to any nonnegative integer is positive).
Then, by substitution:
$$ = (m + 1) - 1 $$
By algebra:
$$ = m $$
This is what was to be shown. Therefore it can be concluded that $f$ is onto.
_Conclusion:_
Since $f$ has been shown to be a one-to-one correspondence, it can be concluded
that $\mathbb{Z}^{\text{nonneg}}$ is countable.
In 10-14 $S$ denotes the set of real numbers strictly between $0$ and $1$. That
is, $S = \{x \in \mathbb{R} | 0 < x < 1\}$.
10. Let $U = \{x \in \mathbb{R} | 0 < x < 2\}$. Prove that $S$ and $U$ have the
same cardinality.
**Proof:**
Suppose $S$ represents the set of real numbers strictly between $0$ and $1$:
$$ S = \{x \in \mathbb{R} | 0 < x < 1\} $$
Additionally, suppose $U$ is the set of real numbers strictly between $0$ and
$2$:
$$ U = \{x \in \mathbb{R} | 0 < x < 2\} $$
Let $f: S \to U$, and define $f$ as $f(n) = 2n$ for some $n \in S$.
To prove that $S$ and $U$ have the same cardinality, it must be shown that $f$
is a one-to-one correspondence from $S \to U$.
_Proof ($f$ is one-to-one):_
Suppose $n_1, n_2 \in S$ such that $f(n_1) = f(n_2)$.
To prove that $f$ is one-to-one, it must be shown that $n_1 = n_2$.
By definition of $f$:
$$ 2n_1 = 2n_2 $$
By algebra:
$$ n_1 = n_2 $$
This is what was to be shown. Therefore, it can be concluded that $f$ is
one-to-one.
_Proof ($f$ is onto):_
Let $m \in U$.
To prove that $f$ is onto, it must be shown that $f(n) = m$ for some $n \in S$.
Let $n = \frac{m}{2}$.
Since $m \in U$, $0 < m < 2$. It follows that $0 < \dfrac{m}{2} < 1$. By
substitution, this means that $0 < n < 1$, which means that $n \in S$.
Then, by definition for $f$:
$$ f(n) = 2n $$
By substitution:
$$ = 2\left(\frac{m}{2}\right) $$
By algebra:
$$ = m $$
This is what was to be shown. Therefore, it can be concluded that $f$ is onto.
_Conclusion:_
Since it has been shown that $f$ is a one-to-one correspondence, it can be
concluded that $S$ and $U$ have the same cardinality.
Q.E.D.
11. Let $V = \{x \in \mathbb{R} | 2 < x < 5\}$. Prove that $S$ and $V$ have the
same cardinality.
_Hint:_ Define $h: S \to V$ as follows: $h(x) = 3x + 2$, for every $x \in S$.
**Proof:**
Suppose $S$ represents the set of real numbers strictly between $0$ and $1$:
$$ S = \{x \in \mathbb{R} | 0 < x < 1\} $$
Additionally, suppose $V$ is the set of real numbers strictly between $2$ and
$5$:
$$ V = \{x \in \mathbb{R} | 2 < x < 5\} $$
Let $h: S \to V$, and define $h$ as $h(x) = 3x + 2$ for some $x \in S$.
To prove that $S$ and $V$ have the same cardinality, it must be shown that $h$
is a one-to-one correspondence for $S \to V$.
_Proof ($h$ is one-to-one):_
Suppose $x_1, x_2 \in S$ such that $h(x_1) = h(x_2)$.
To prove $h$ is one-to-one, it must be shown that $x_1 = x_2$.
By the definition of $h$:
$$ 3x_1 + 2 = 3x_2 + 2 $$
By algebra:
$$ 3x_1 = 3x_2 $$
$$ x_1 = x_2 $$
This is what was to be shown. Therefore, it can be concluded that $h$ is
one-to-one.
_Proof ($h$ is onto):_
Let $v \in V$.
To prove that $h$ is onto, it must be shown that $f(x) = v$ for some $x \in S$.
Let $x = \dfrac{v - 2}{3}$.
Since $v \in V$, $2 < v < 5$. It follows that:
$$ 2 - 2 < v - 2 < 5 - 2 $$
$$ 0 < v - 2 < 3 $$
$$ \frac{0}{3} < \frac{v - 2}{3} < \frac{3}{3} $$
$$ 0 < \frac{v - 2}{3} < 1 $$
By substitution, this means that:
$$ 0 < x < 1 $$
This means that $x \in S$.
Then, by definition for $h$:
$$ h(x) = 3x + 2 $$
By substitution:
$$ h(x) = 3\left(\frac{v - 2}{3}\right) + 2 $$
By algebra:
$$ = (v - 2) + 2 $$
$$ = v $$
This is what was to be shown. Therefore it can be concluded that $h$ is onto.
_Conclusion:_
Since it has been shown that $h$ is a one-to-one correspondence for $S \to V$,
it can be concluded that $S$ and $V$ have the same cardinality.
Q.E.D.
12. Let $a$ and $b$ be real numbers with $a < b$, and suppose that
$W = \{x \in \mathbb{R} | a < x < b\}$. Prove that $S$ and $W$ have the same
cardinality.
**Proof:**
Suppose $S$ represents the set of real numbers strictly between $0$ and $1$:
$$ S = \{x \in \mathbb{R} | 0 < x < 1\} $$
Additionally, suppose $a, b \in \mathbb{R}$ such that $a < b$. Then, suppose $W$
is a set defined as:
$$ W = \{x \in \mathbb{R} | a < x < b\} $$
Let $f: S \to W$ be defined as $f(x) = (b - a)x + a$ for some $x \in S$.
To prove that $S$ and $W$ have the same cardinality, it must be shown that $f$
is a one-to-one correspondence for $S \to W$.
_Proof ($f$ is one-to-one):_
Let $x_1, x_2 \in S$ such that $f(x_1) = f(x_2)$.
To prove that $f$ is one-to-one, it must be shown that $x_1 = x_2$.
By the definition of $f$:
$$ (b - a)x_1 + a = (b - a)x_2 + a $$
By algebra:
$$ (b - a)x_1 = (b - a)x_2 $$
$$ x_1 = x_2 $$
This is what was to be shown. Therefore it can be concluded that $f$ is
one-to-one.
_Proof ($f$ is onto):_
Let $w \in W$.
To prove that $f$ is onto, it must be shown that $f(x) = w$ for some $x \in S$.
Let $x = \dfrac{w - a}{b - a}$.
Since $w \in W$, this means that $a < w < b$. It follows that:
$$ a - a < w - a < b - a $$
$$ 0 < w - a < b - a $$
$$ \frac{0}{b - a} < \frac{w - a}{b - a} < \frac{b - a}{b - a} $$
$$ 0 < \frac{w - a}{b - a} < 1 $$
By substitution:
$$ 0 < x < 1 $$
It follows that $x \in S$.
By definition for $f$:
$$ f(x) = (b - a)x + a $$
By substitution:
$$ f(x) = (b - a)\left(\frac{w - a}{b - a}\right) + a $$
$$ = (w - a) + a $$
$$ = w $$
This is what was to be shown. Therefore it can be concluded that $f$ is onto.
_Conclusion:_
Since it has been shown that $f$ is a one-to-one correspondence for $S \to W$,
it can be concluded that $S$ and $W$ have the same cardinality.
Q.E.D.
13. Draw the graph of the function $f$ defined by the following formula:
For each real number $x$ with $0 < x < 1$,
$$ f(x) = \tan\left(\pi x - \frac{\pi}{2}\right) $$
Use the graph to explain why $S$ and $\mathbb{R}$ have the same cardinality.
Omitted.
14. Define a function $g$ from the set of real numbers to $S$ by the following
formula:
For each real number $x$,
$$ g(x) = \frac{1}{2} \cdot \left(\frac{x}{1 + |x|}\right) + \frac{1}{2} $$
Prove that $g$ is a one-to-one correspondence. (It is possible to prove this
statement either with calculus or without it.) What conclusion can you draw from
this fact?
Omitted.
15. Show that the set of all bit strings (strings of $0$'s and $1$'s) is
countable.
Recall that a set is countable if, and only if, it is finite or countably
infinite.
Additionally, recall that a set is countably infinite if, and only if, it has
the same cardinality as the set of positive integers $\mathbb{Z}^+$ (_i.e._
there is a function that is a one-to-one correspondence from the given set to
$\mathbb{Z}^+$).
**Proof:**
Suppose $B$ is the set of all bit strings (strings of $0$'s and $1$'s).
To prove that $B$ is countable, it must be shown that $B$ is finite or countably
infinite. Since $B$ is not finite, it must be shown that $B$ is countably
infinite.
To show that $B$ is countably infinite, it must be shown that $B$ has the same
cardinality as the set of all positive integers, $\mathbb{Z}^+$.
To show that $B$ and $\mathbb{Z}^+$ have the same cardinality, it must be shown
that there exists some one-to-one correspondence for $B \to \mathbb{Z}^+$.
Consider a function, $f$ that maps the bit strings by their length to some
positive integer. For example, say $f(\lambda) = 1$ (where $\lambda$ represents
the null string). Additional examples would include $f(0) = 2, f(1) = 3$ for bit
strings of length $2$. Further examples for length $3$ include
$f(00) = 4, f(01) = 5, f(10) = 6, f(11) = 7$, and so on.
Generally, for each integer $n \geq 0$, there are $2^n$ bit strings of length
$n$, and $f$ maps them to the positive integers between $2^n$ (inclusive) and
$2^{n + 1} - 1$ (inclusive).
$f$ is one-to-one since two bit strings never map to the same positive integer.
$f$ is onto as every positive integer is in the range for $f$ (namely
$\mathbb{Z}^+$).
Therefore, since $f$ is a one-to-one correspondence for $B \to \mathbb{Z}^+$, it
can be concluded that $B$ and $\mathbb{Z}^+$ have the same cardinality, and
therefore $B$ is countable.
Q.E.D.
16. Show that $\mathbb{Q}$, the set of all rational numbers, is countable.
Omitted.
17. Show that $\mathbb{Q}$, the set of all rational numbers, is dense along the
number line by showing that given any two rational numbers $r_1$ and $r_2$
with $r_2 < r_2$, there exists a rational number $x$ such that
$r_1 < x < r_2$.
_Hint:_ See the hints for exercises 18 and 19 in Section 4.3.
18. _Hint:_
$$ \frac{\dfrac{a}{b} + \dfrac{c}{d}}{2} = \frac{\dfrac{(ad + bc)}{(bd)}{2} =
\frac{ad + bc}{2bd} $$
19. _Hint:_ If $a < b$ then $a + a < a + b$ (by T19 of Appendix A), or
equivalently, $2a < a + b$. Thus $a < \dfrac{a + b}{2}$ (by T20 of Appendix
A).
**Proof:**
Let $r_1, r_2 \in \mathbb{Q}$ such that $r_1 < r_2$.
To prove $\mathbb{Q}$ is dense along the number line, it must be shown there
exists some $x \in \mathbb{Q}$ such that $r_1 < x < r_2$.
Let $x = \dfrac{r_1 + r_2}{2}$.
Since $r_1, r_2 \in \mathbb{Q}$, it follows that
$\dfrac{r_1 + r_2}{2} \in \mathbb{Q}$, hence $x \in \mathbb{Q}$.
Since $r_1 < r_2$, it follows that $r_1$ is less than their average:
$$ r_1 < \frac{r_1 + r_2}{2} $$
Similarly, since $r_2 > r_1$, it follows that $r_2$ is greater than their
average:
$$ \frac{r_1 + r_2}{2} < r_2 $$
This means that:
$$ r_1 < \frac{r_1 + r_2}{2} < r_2 $$
Now, by substitution:
$$ r_1 < x < r_2 $$
This is what was to be shown. Therefore it can be concluded that $\mathbb{Q}$ is
dense along the number line.
Q.E.D.
20. Must the average of two irrational numbers always be irrational? Prove or
give a counterexample.
**Disproof (by counterexample):**
Consider $r_1, r_2 \notin \mathbb{Q}$ where $r_1 = \sqrt{2}$ and
$r_2 = -\sqrt{2}$.
Then, their average would be:
$$ \frac{r_1 + r_2}{2} = \frac{\sqrt{2} + (-\sqrt{2})}{2} = \frac{0}{2} = 0 $$
Now, $0 \in \mathbb{Q}$.
This shows that the average of two irrational numbers is not always irrational.
Q.E.D.
21. Show that the set of all irrational numbers is dense along the number line
by showing that given any two real numbers, there is an irrational number in
between.
22. Give two examples of functions from $\mathbb{Z}$ to $\mathbb{Z}$ that are
one-to-one but not onto.
23. Give two examples of functions from $\mathbb{Z}$ to $\mathbb{Z}$ that are
onto but not one-to-one.
24. Define a function: $g: \mathbb{Z}^+ \times \mathbb{Z}y+ \to \mathbb{Z}^+$ by
the formula $g(m, n) = 2^m3^n$ for all
$(m, n) \in \mathbb{Z}^+ \times \mathbb{Z}^+$. Show that $g$ is one-to-one
and use this result to prove that $\mathbb{Z}^+ \times \mathbb{Z}^+$ is
countable.
25.
a. Explain how to use the following diagram to show that
$\mathbb{Z}^{\text{nonneg}} \times \mathbb{Z}^{\text{nonneg}}$ and
$\mathbb{Z}^{\text{nonneg}}$ have the same cardinality.
(See Page 508 for image.)
b. Define a function
$H: \mathbb{Z}^{\text{nonneg}} \times \mathbb{Z}^{\text{nonneg}} \to \mathbb{Z}^{\text{nonneg}}$
by the formula
$$ H(m, n) = n + \frac{(m + n)(m + n + 1)}{2} $$
for all nonnegative integers $m$ and $n$. Interpret the action of $H$
geometrically using the diagram of part (a).
24. Prove that the function $H$ defined analytically in exercise 23b is a
one-to-one correspondence.
25. Prove that $0.1999 \dots = 0.2$.
26. Prove that any infinite set contains a countably infinite subset.
27. Prove that if $A$ is any countably infinite set, $B$ is any set, and
$g: A \to B$ is onto, then $B$ is countable.
28. Prove that a disjoint union of any finite set and any countably infinite set
is countably infinite.
29. Prove that a union of any two countably infinite sets is countably infinite.
30. Use the result of exercise 29 to prove that the set of all irrational
numbers is uncountable.
31. Use the results of exercises 28 and 29 to prove that a union of any two
countable sets is countable.
32. Prove that $\mathbb{Z} \times \mathbb{Z}$, the Cartesian product of the set
of integers with itself, is countably infinite.
33. Use the results of exercises 27, 31, and 32 to prove the following: If $R$
is the set of all solutions to all equations of the form $x^2 + bx + c = 0$,
where $b$ and $c$ are integers, then $R$ is countable.
34. Let $\mathscr{P}(S)$ be the set of all subsets of set $S$, and let $T$ be
the set of all functions from $S$ to $\{0, 1\}$. Show that $\mathscr{P}(S)$
and $T$ have the same cardinality.
35. Let $S$ be a set and let $\mathscr{P}(S)$ be the set of all subsets of $S$.
Show that $S$ is "smaller than" $\mathscr{P}(S)$ in the sense that there is
a one-to-one function from $S$ to $\mathscr{P}(S)$ but there is no onto
function from $S$ to $\mathscr{P}(S)$.
36. The Schroeder-Bernstein theorem states the following: if $A$ and $B$ are any
sets with the property that there is a one-to-one function from $A$ to $B$
and a one-to-one function from $B$ to $A$, then $A$ and $B$ have the same
cardinality. Use this theorem to prove that there are as many functions from
$\mathbb{Z}^+$ to $\{0, 1, 2, 3, 4, 5, 6, 7, 8, 9\}$ as there functions from
$\mathbb{Z}^+$ to $\{0, 1\}$.
37. Prove that if $A$ and $B$ are any countably infinite sets, then $A \times B$
is countably infinite.
38. Suppose $A_1, A_2, A_3, \dots$ is an infinite sequence of countable sets.
Recall that
$$ \bigcup_{i = 1}^{\infty}A_i = \{x | x \in A_i \text{ for some positive integer } i\} $$
Prove that $\bigcup_{i = 1}^{\infty}A_i$ is countable. (In other words, prove
that a countably infinite union of countable sets is countable.)