Question #265246

20. Give an example of a function from N to N that is

a) one-to-one but not onto.

b) onto but not one-to-one.


c) both onto and one-to-one (but different from the iden-

tity function).


d) neither one-to-one nor onto.


1
Expert's answer
2021-11-15T18:29:16-0500


a) Let us give an example of a function from N\N to N\N that is one-to-one but not onto. The function f(n)=2nf(n)=2n is one-to-one because of f(a)=f(b)f(a)=f(b) implies 2a=2b,2a=2b, and hence a=ba=b, but it is not onto because of the preimage of the odd number 11 is emptyset.


b) Let us give an example of a function from N\N to N\N that is onto but not one-to-one. The function f(n)={1, if n=1n1, if n>1f(n)=\begin{cases}1,\text{ if } n=1\\n-1,\text{ if } n>1\end{cases} is onto because of the preimage of each natural number nn contains n+1,n+1, but it is not one-to-one as f(1)=1=f(2).f(1)=1=f(2).


c) Let us give an example of a function from N\N to N\N that is both onto and one-to-one (but different from the identity function). The function f(n)={1, if n=22, if n=1n, if n2f(n)=\begin{cases}1,\text{ if } n=2\\2,\text{ if } n=1\\n,\text{ if } n\ge 2\end{cases} obviously is onto and one-to-one, and it is different from the identity function.


d) Let us give an example of a function from N\N to N\N that is neither one-to-one nor onto. The function f(n)=2021f(n)= 2021 is neither one-to-one nor onto. Indeed, since f(1)=2021=f(2)f(1)=2021=f(2), we conclude that it is not one-to-one. Since f1(2)=,f^{-1}(2)=\emptyset, this function is not onto.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS