0
$\begingroup$

So far, I used the definition of floors to provide an interval. Then I did some algebra in order to get $(n-1)/2$. And I am able to deduce that $\lfloor n/2 \rfloor > (n-1)/2$, but now I'm stuck on proving them to be equivalent to each other.

$$(n/2) - 1 < \lfloor n/2 \rfloor \leq n/2$$ $$\lfloor n/2 \rfloor > (n-2)/2$$ $$\lfloor n/2 \rfloor -1/2 > (n-1)/2$$

Thus, $\lfloor n/2 \rfloor > (n-1)/2$.

But how do I prove that they could also be equivalent to each other?

$\endgroup$
2
$\begingroup$

When $n$ is even, $\lfloor n/2 \rfloor = n/2$.

When $n$ is odd, $n/2 = (n-1)/2 +1/2$. Since $n-1$ is even, $(n-1)/2$ is an integer and $1/2$ is a fraction. Thus, $\lfloor n/2 \rfloor = (n-1)/2$.

$\endgroup$
  • $\begingroup$ Thank you very much. $\endgroup$ – Mark Park Mar 14 at 0:50

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.