If $x \geq y>x/2$ then is it true that $x \pmod y < x/2$?

694 Views Asked by At

I'm not sure how to prove this statement, which I believe is true:

given $x,y \in Z$ such that $x \geq y > \frac {x}{2}$ then $x$ (mod $y$) < $\frac {x}{2}.$

Edit:

Would this be an acceptable sketch of the proof?

Suppose that $x \geq y \geq \frac{x}{2};$ consider the bounds where $y = x$ or $y = \frac{x}{2}$. In the case in which $x=y,$ then $x$ (mod $y$) = $x$ (mod $x) = 0$. On the other hand, if $y = \frac{x}{2},$ then $x$ (mod $y$) = $x$ (mod $\frac {x}{2}) = \frac {x}{2}$. Therefore, $0 \leq x$ (mod $y$) < $\frac {x}{2}$.

2

There are 2 best solutions below

1
On

This is true. Suppose that $0\leq \frac{x}{2} < y \leq x$. Long divide $x$ by $y$ by the Division Algorithm to write $x=yq+r$ where $0 \leq r <y$. Here, $r$ is your $x \bmod y$. We claim that $r < \frac{x}{2}$.

Suppose not, so that $r \geq \frac{x}{2}$. Then $x=yq+r \geq yq+\frac{x}{2}$. Subtracting $\frac{x}{2}$ from each side gives $\frac{x}{2} \geq yq$. But $y >\frac{x}{2}$ so this gives $\frac{x}{2} > \frac{x}{2}q$ so $q < 1$. Hence $q=0$ and $x=r < y \leq x$, a contradiction.

0
On

The answer to the title is yes.
Assuming $x > 0$, $x \ge y > x/2 \implies 1≤x/y<2$, so the remainder when $x$ is divided by $y$ is $x−y$ and also $x \ge y > x/2 \implies 0 \le x-y < x/2$.