Can You Solve This Onto, But Not One-to-One Function Challenge?

  • Thread starter Thread starter Jrb599
  • Start date Start date
Jrb599
Messages
24
Reaction score
0
[SOLVED] Onto, but not one-to-one

I need a function

f: N -> N such that f is onto, but not one-to-one, and I can't think of one to save my life, any suggestions?
 
Physics news on Phys.org
f({a,b}) = {x}.

Sorry, you posted N to N...
 
what does {x} stand for?
 
f(1) = 2
f(x) = x for x > 1.

Doesn't work.

Hmm...
 
Last edited:
what about

f(1)=1
f(2)=1
f(n) = n-1 for n>2
 
I think you have just found one.
 
k, well your original post helped me, so thank you!
 
what about f(x) = 2x? no...

or greatest integer not greatER THan x/2, +1?

or f(x) = x-1, for x >1 and let's see f(!) = ?

how long did you think about this?
 
Back
Top