1
$\begingroup$

How would you prove that if $x$ is an integer, then

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


I tried to start by saying that if $x$ is an even integer, then:

$$\left\lfloor \frac{x}{2} \right\rfloor = \frac{x}{2}.$$

However, I am stuck on showing that $$\left\lfloor \frac{x+1}{2} \right\rfloor$$ is also $\frac{x}{2}$. Intuitively It makes intuitive sense just by playing around with some sample numbers, but I don't know how to make it mathematically rigorous. Further, what do you do in the odd case? Is this even the right way to go about it?

$\endgroup$
3
  • $\begingroup$ Start with $\lfloor y+n \rfloor = \lfloor y\rfloor +n$. $\endgroup$
    – lhf
    Sep 25, 2014 at 1:53
  • $\begingroup$ @lhf Is there a proof for that? $\endgroup$
    – 1110101001
    Sep 25, 2014 at 1:56
  • $\begingroup$ By definition, $\lfloor y \rfloor \le y < \lfloor y \rfloor +1$ and so $\lfloor y \rfloor + n \le y + n < \lfloor y \rfloor +n+1$, which says that $\lfloor y+n \rfloor = \lfloor y\rfloor +n$. $\endgroup$
    – lhf
    Sep 25, 2014 at 1:58

2 Answers 2

2
$\begingroup$

If $x$ is even, then $x=2k$ where $k \in \mathbb{Z}$.


We then have: $$x-\left\lfloor \frac{x}{2} \right\rfloor=2k-\lfloor k \rfloor=k=\left\lfloor k+\frac{1}{2} \right\rfloor=\left\lfloor \frac{2k+1}{2} \right\rfloor=\left\lfloor \frac{x+1}{2} \right\rfloor$$


If $x$ is odd, then $x=2k+1$ where $k \in \mathbb{Z}$.

We then have $$x-\left\lfloor \frac{x}{2} \right\rfloor=2k+1-\left\lfloor k+{1\over 2} \right\rfloor=k+1=\left\lfloor k+1 \right\rfloor=\left\lfloor \frac{2k+2}{2} \right\rfloor=\left\lfloor \frac{x+1}{2} \right\rfloor$$

$\endgroup$
1
$\begingroup$

Case-1 (Even) write $x=2k$. Now$\left\lfloor \frac{x}{2} \right\rfloor =k$ so L.H.S is $2k-k=k$. now work with R.H.S, $\left\lfloor \frac{x+1}{2} \right\rfloor=\left\lfloor \frac{2k+1}{2} \right\rfloor=\left\lfloor k.5 \right\rfloor=k$.

Case 2) (Odd) Let $x=2k+1$ Similarly. I am in hurry, so i leave it on you. very easy.

Prove LHS=RHS= $k+1$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .