# Functions (Onto and one-to-one) and Floor functions

Suppose you have: $$f:\Bbb R \rightarrow\Bbb Z \text{ where } f(x)= \lceil 2x-1 \rceil$$

Well, I know that this is not a one-to-one function, but I don't know how to show that it's onto. The reason being the ceiling constraints. What I thought of was: $$f(x)= \lceil 2x-1 \rceil = \lceil 2x \rceil -1 \\ f(x)=y\\y+1 = \rceil = \lceil 2x \rceil$$

But I don't know what to do past this point.

As you pointed out, $f$ onto would mean that for each $y$, there is some $x$ such that $f(x) = y$, or, equivalently, that $$\lceil 2x-1\rceil = y.$$

Instead of trying to deal with the problem symbolically, which you said you don't know how to do, pick a specific value of $y$ and see if you can find an $x$ that maps to it.

The expression $\lceil 2x-1\rceil$ is rather simple, so perhaps if you tabulate a few values of $x$ and $y$, you will see a pattern that you can generalize.

• Yea, If I pick $y=5$ then $x=3$. So in another words, I have to choose an arbitrary value $y$ and find if it's possible to map to it? (depending on the domain) ? Dec 6, 2013 at 2:39
• You don't have to do anything; I'm just offering a suggestion that might or might not work.
– MJD
Dec 6, 2013 at 2:45
• Yes, it did work. But can this be generalized for all onto testing? Dec 6, 2013 at 3:01
• Probably not, but the general strategy of "look at a bunch of examples and see if anything suggests itself" is often a good one to try.
– MJD
Dec 6, 2013 at 6:04