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. 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\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? a. Is $\log_{16}9 = \log_{4}3$? Why or why not? 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 $$ 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 $$ 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 $$ 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. 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. 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. 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. 40. Suppose $F: X \to Y$ is one-to-one. a. Prove that for every subset $A \subseteq X$, $F^{-1}(F(A)) = A$. 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)$. 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.) 43. (See page 483 for image.) 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 45. Exercise 10b 46. Exercise 11a 47. Exercise 11b 48. Exercise 12a 49. Exercise 12b 50. Exercise 21 51. Exercise 22 52. Exercise 15 with the co-domain taken to be the set of all real numbers not equal to $1$. 53. Exercise 16 with the co-domain taken to be the set of all real numbers. 54. Exercise 17 with the co-domain taken to be the set of all real numbers not equal to $3$ 55. Exercise 18 with the co-domain taken to be the set of all real numbers not equal to 1. 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$. 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.) 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. 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.