Function from $\mathbb{Z^+}$ to $\mathbb{Z^+}$ that is neither one-to-one nor onto?

630 Views Asked by At

I am thinking of something like $f(x) = 8$

Does this make sense? It seems a bit simple to me so I'm not sure.

My reasoning is that this function is not one-to-one because f takes same value for all domain. It's also not onto because range isn't equal to codomain since here the range is just the number 8.

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

This is a fine example. Few functions are one-to-one or onto, so finding one that is neither should not be hard. You have succeeded. The point is to understand the definitions and you seem to have done that.