I have to prove that
$$\left\lceil\frac{x}y\right\rceil=\left\lfloor\frac{x-1}y\right\rfloor+1\;?$$
For any positive integers $x, y$.
Can anyone help me?
I have to prove that
$$\left\lceil\frac{x}y\right\rceil=\left\lfloor\frac{x-1}y\right\rfloor+1\;?$$
For any positive integers $x, y$.
Can anyone help me?
On
As @6005 clearly said, you need to agree that the $x,y$ are positive integers with the constraint $y \gt 0$.
This is a hint regarding the right side of the inequality:
$$\left\lceil\frac{x}y\right\rceil=\left\lfloor\frac{x-1}y\right\rfloor+1=\left\lfloor\frac{x-1}y+1\right\rfloor=\left\lfloor\frac{x-1+y}y\right\rfloor=\left\lfloor\frac{x}{y} + \frac{y-1}y\right\rfloor=\left\lfloor\frac{x}{y} + 1 - \frac{1}y\right\rfloor$$
On
Let $x=py+q$, with $0\le q<y$.
Then if $q=0$, $$\left\lceil\frac{x}y\right\rceil=p,\left\lfloor\frac{x-1}y\right\rfloor+1=p+\left\lfloor\frac{y-1}y\right\rfloor+1=p.$$ and if $q>0$,
$$\left\lceil\frac{x}y\right\rceil=p+1,\left\lfloor\frac{x-1}y\right\rfloor+1=p+\left\lfloor\frac{q-1}y\right\rfloor+1=p+1.$$
For this to be true, you need to specify that $\boldsymbol{x,y \in \mathbb{Z}}$ and $\boldsymbol{y > 0}$.
Then: if $$ \left\lceil \frac{x}{y} \right\rceil = m $$ then $$ m - 1 < \frac{x}{y} \le m $$ which means $$ my - y < x \le my. $$ which we can rewrite $$ my -y \le x - 1 < my $$ since $x$ is an integer and both bounds are integers.
Can you finish? You need to reach the conclusion that $$ \left\lfloor \frac{x-1}{y} \right\rfloor = m - 1. $$