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 identity function).

d) neither one-to-one nor onto.

SOLUTION

Step 1

We have to find the example of a function from, set of natural numbers to set of natural numbers that is,