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

387 Views Asked by At

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?

2

There are 2 best solutions below

0
On BEST ANSWER

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$$

0
On

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$