Answer to Question #265246 in Discrete Mathematics for Sajib

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" 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.


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!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS