Is it true that for any positive $x, y$ that if $x \leq y$ then $\lfloor \frac{x}{2} \rfloor \leq \lfloor \frac{y}{2} \rfloor$?
How would I go about proving this?
Is it true that for any positive $x, y$ that if $x \leq y$ then $\lfloor \frac{x}{2} \rfloor \leq \lfloor \frac{y}{2} \rfloor$?
How would I go about proving this?
On
Contrapositive:
If $\lfloor \frac x2\rfloor\gt \lfloor \frac y2\rfloor,$ then, since these are integers, $\lfloor\frac x2\rfloor \ge \lfloor \frac y2\rfloor+1.$
But $\frac x2\ge\lfloor \frac x2\rfloor$ and $\lfloor \frac y2\rfloor\gt\frac y2-1.$
That means $\frac x2>\frac y2$; i.e., $x>y$.
On
Given that, $ x \leq y $, where x, y $\in R^+$, which implies $ x/2 \leq y/2 $
Splitting x and y to integer and fractional part, $ \left \lfloor x/2 \right \rfloor $ + { $x/2$ } $ \leq \left \lfloor y/2 \right \rfloor $ + {$ y/2 $}
Rearranging terms, $ \left \lfloor x/2 \right \rfloor $ - $ \left \lfloor y/2 \right \rfloor \leq $ {$ y/2 $} - { $ x/2 $}
Now since $0 \leq x/2, y/2 < 1$, we have -1 < { $ y/2 $ } - {$ x/2 $} < 1 ,
Replacing R.H.S., using the above observation, we get $ \left \lfloor x/2 \right \rfloor - \left \lfloor y/2 \right \rfloor < 1$
Since LHS is an integer function and it should be less than 1, the value it can achieve is maximum 0, so we can write the above equation as $ \left \lfloor x/2 \right \rfloor - \left \lfloor y/2 \right \rfloor \leq 0$
which gives, $ \left \lfloor x/2 \right \rfloor \leq \left \lfloor y/2 \right \rfloor $
Hence proved
On
Notice that it sufficies to show $x \leq y$ implies $\lfloor x \rfloor \leq \lfloor y \rfloor$ (why?). So let $m=\lfloor x \rfloor$, $n=\lfloor y \rfloor$. Since $m,n$ are integers, we have three options, either $m \geq n+1$, $m=n$ or $m \leq n-1$.
First notice we cannot have $m \geq n+1$, for then $x \geq \lfloor x \rfloor=m \geq n+1=\lfloor y \rfloor + 1 > y$, impossible.
Next, note $m=n$ implies $\lfloor x \rfloor = \lfloor y \rfloor$, we are done.
Lastly if $m\leq n-1$, then $\lfloor x \rfloor=m\leq n-1 = \lfloor y \rfloor - 1 \leq \lfloor y \rfloor$.
Hint: The floor function is defined as $$\lfloor x\rfloor = \mathrm{max}\{k\in\mathbb Z : k\leq x\}$$ for $x\in\mathbb R$.