1
$\begingroup$

I'm trying to do a proof of a floor function being onto, but I'm not sure where to go from here. I don't want to ask the question outright because I want to figure it out myself, but I know that if you want to prove a function is onto, say: $$ y = 3x+1 $$ Would be to swap it to terms of x, and we'd get

$$ x = (y-1)/3 $$

But the equation I'm dealing with is:

$$ y=\left \lfloor{\frac{x+1}{2}}\right \rfloor $$

How would I go about proving this is onto?

(Would have signed in, but stackexchange was not letting me today)

$\endgroup$
7
  • 3
    $\begingroup$ What are the domain and codomain? $\endgroup$ – Umberto P. Mar 25 '15 at 21:43
  • $\begingroup$ A function is onto when every element of the codomain is the image of some element in the domain. Since you have not specified the domain and codomain, your question is unanswerable. $\endgroup$ – David Mar 25 '15 at 21:44
  • $\begingroup$ Here is one way: Pick an element of the range and check if applying the floor function returns that element. $\endgroup$ – copper.hat Mar 25 '15 at 21:44
  • 1
    $\begingroup$ @UmbertoP. It amazes me how often people do not state the domain and codomain when trying to prove a function is injective/surjective/bijective. Maybe a flaw in the educational system(s), but it betrays a fundamental misunderstanding. $\endgroup$ – Daniel W. Farlow Mar 25 '15 at 21:45
  • 1
    $\begingroup$ @crash It does betray a fundamental misunderstanding, but, sadly, it no longer amazes me..... $\endgroup$ – David Mar 25 '15 at 21:46
1
$\begingroup$

If the domain and codomain are both $\mathbb Z$, then $x = 2n-1$ gives you $y=n$. It is onto.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.