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

  • Thread starter Thread starter Jrb599
  • Start date Start date
AI Thread Summary
The discussion centers on finding a function f: N -> N that is onto but not one-to-one. A proposed solution is f(1)=1, f(2)=1, and f(n)=n-1 for n>2, which meets the criteria. Other suggestions include f(x) = 2x and the greatest integer function, but these do not satisfy the requirements. The conversation highlights the challenge of creating such a function while acknowledging the contributions of various participants. Ultimately, the thread concludes with a sense of collaborative problem-solving.
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