Exercise 1.2.8

Here are two important definitions related to a function f : A B . The function f is one-to-one ( 1 1 ) if a 1 a 2 in A implies that f ( a 1 ) f ( a 2 ) in B . The function f is onto if, given any b B , it is possible to find an element a A for which f ( a ) = b Give an example of each or state that the request is impossible:

(a)
f : N N that is 1 1 but not onto.
(b)
f : N N that is onto but not 1 1 .
(c)
f : N Z that is 1 1 and onto.

Answers

(a)
Let f ( n ) = n + 1 does not have a solution to f ( a ) = 1
(b)
Let f ( 1 ) = 1 and f ( n ) = n 1 for n > 1
(c)
Let f ( n ) = n 2 for even n , and f ( n ) = ( n + 1 ) 2 for odd n .
User profile picture
2022-01-27 00:00
Comments
  • In (c), since here $\mathbb{N} = \{1,2,3,\ldots\}$, the equation $f(n) = 0$ has no solution so $f$ is not onto. To repair this, use $f \circ g$, where $g : n \mapsto n-1$. (This difficulty disappear if we take $\mathbb{N} = \{0,1,2,3,\ldots\}$.)
    richardganaye2024-07-03