ONe-to-one and onto functions

shivers20

Junior Member
Joined
Mar 3, 2006
Messages
68
I need to give examples of a function f: N --> N that is

a.) one-to-one and onto
b.) one-to-one but not onto
c.) onto but not one to one
d.) neither one-to-one nor onto

I know how to find one-to-one functions with no problem but I am having a bit of trouble when it comes to finding onto functions dealing with Natural numbers. I have seen numerous examples all dealing with integers and real numbers but none having N --> N. Can you possibly give me an example or steeer me in the right direction?
 
for a) take f(x)=x.

for b) f(x)=x+1

for c) f(2k)=k, f(2k+1)=k

for d) f(2k)=k+1, f(2k+1) = k+1

I think these work, you should check.
 
Top