Exercise 14.
Let \(X = \{n \in \N \st 0 \le n \le 999\}\) be the set of all numbers with three or fewer digits. Define the function \(f:X \to \N\) by \(f(abc) = a+b+c\text{,}\) where \(a\text{,}\) \(b\text{,}\) and \(c\) are the digits of the number in \(X\) (write numbers less than 100 with leading 0’s to make them three digits). For example, \(f(253) = 2 + 5 + 3 = 10\text{.}\)
Let \(A = \{n \in X \st 113 \le n \le 122\}\text{.}\) Find \(f(A)\text{.}\)
Find \(f\inv(\{1,2\})\)
Find \(f\inv(3)\text{.}\)
Find \(f\inv(28)\text{.}\)
Is \(f\) injective? Explain.
Is \(f\) surjective? Explain.