Suppose x,y $ \in \mathbb{Z}^+ $
Prove $\lceil x/y \rceil = \lfloor (x-1)/y \rfloor + 1$
I was considering using the definition of floor and ceiling to prove this. But this does not seem like a valid proof to me as I assume the right hand side is already equal to the left hand side.
This is what I have so far:
Let n$ \in \mathbb{Z} $
$\lceil x/y \rceil = n \iff n-1 < x/y \leq n $
$\lfloor (x-1)/y \rfloor = n -1 \iff n-1 \leq (x-1)/y < n $
Then $\lfloor (x-1)/y \rfloor +1 = n \iff n-1 \leq (x-1)/y < n + 1 $Then both sides are equivalent.
Would a better way be to prove using a contradiction by assuming both sides are not equal?
Best Answer
If $y$ divides $x$ then:
Hence $\lceil\frac{x}{y}\rceil=\lfloor\frac{x-1}{y}\rfloor+1$
If $y$ does not divide $x$ then:
Hence $\lceil\frac{x}{y}\rceil=\lfloor\frac{x-1}{y}\rfloor+1$