Question #17426

Give an example of a function with the following properties:
a. f: Z âŸ¶ Z that is one-to-one but not onto
b. f: Z âŸ¶ Z that is onto but not one-to-one
c. f: Z âŸ¶ N that is bijective
d. f: N âŸ¶Z that is bijective
e. f: Z âŸ¶ N that is one-to-one but not onto
f. f: N âŸ¶Z that is onto but not one-to-one

Expert's answer

a. f=x, if x<0 or x>0 (for x=0 y is absent=>isn't onto)

b. f=x^2 (x=2=-2 =>f(x)=4 =>isn't one-to-one)

c. f=2*x,if x>0 and -2*x-1, if x<0

d. f=(x+1)/2, if x is odd and f=-x/2, if x is even

e. f=2^x+2 f. f=x+1, if is even and f=x if x is odd.

b. f=x^2 (x=2=-2 =>f(x)=4 =>isn't one-to-one)

c. f=2*x,if x>0 and -2*x-1, if x<0

d. f=(x+1)/2, if x is odd and f=-x/2, if x is even

e. f=2^x+2 f. f=x+1, if is even and f=x if x is odd.

## Comments

## Leave a comment