Solution to 20. Give an example of a function from N to N that is a) one-to-one … - Sikademy
Author Image

Archangel Macsika

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.

The Answer to the Question
is below this banner.

Can't find a solution anywhere?

NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?

Get the Answers Now!

You will get a detailed answer to your question or assignment in the shortest time possible.

Here's the Solution to this Question

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


b) Let us give an example of a function from \N to \N that is onto but not one-to-one. The function f(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 n contains n+1, but it is not one-to-one as f(1)=1=f(2).


c) Let us give an example of a function from \N to \N that is both onto and one-to-one (but different from the identity function). The function f(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 to \N that is neither one-to-one nor onto. The function f(n)= 2021 is neither one-to-one nor onto. Indeed, since f(1)=2021=f(2), we conclude that it is not one-to-one. Since f^{-1}(2)=\emptyset, this function is not onto.

Related Answers

Was this answer helpful?

Join our Community to stay in the know

Get updates for similar and other helpful Answers

Question ID: mtid-5-stid-8-sqid-879-qpid-764