# How to prove $\left\lceil\frac{x}y\right\rceil=\left\lfloor\frac{x-1}y\right\rfloor+1$ for positive integers $x,y$? [closed]

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?

## closed as off-topic by Najib Idrissi, Joey Zou, Parcly Taxel, Watson, quid♦Sep 8 '16 at 9:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Najib Idrissi, Joey Zou, Parcly Taxel, Watson, quid
If this question can be reworded to fit the rules in the help center, please edit the question.

• Have you checked a few cases? Seen what happens? – Arthur Sep 7 '16 at 7:17
• The statement is false for $x=1,y=\frac12$ – 5xum Sep 7 '16 at 7:19
• Do you have to prove this for integer $x, y$? – 6005 Sep 7 '16 at 7:22
• You probably want to specify that $x,y\in\mathbb{Z}^{+}$. – barak manos Sep 7 '16 at 7:22
• @6005: Not true for all $x,y\in\mathbb{Z}^{-}$ (i.e., false for some $x,y\in\mathbb{Z}^{-}$). – barak manos Sep 7 '16 at 7:24

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

• oh i see, sorry – JonMark Perry Sep 7 '16 at 7:54

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

• The statement $\lceil x/y \rceil = \lfloor x/ y + 1\rfloor$ is only true if $x/y$ is not an integer. – 6005 Sep 7 '16 at 7:47
• Your modification did not fix it :) – 6005 Sep 7 '16 at 7:49
• @6005 you were right, thank you for the feedback! I have removed that part of the explanation, I am keeping the part that can help to study what happens with the right side term. – iadvd Sep 7 '16 at 7:54
• Well you were almost there before, if you just split into cases based on whether or not $\frac{x}{y}$ was an integer. – 6005 Sep 7 '16 at 7:55
• @6005 good hint for the OP, thank you again! – iadvd Sep 7 '16 at 7:56

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