On a discrete mathematics past paper, I must prove that
$$\left\lceil \frac{n}{m} \right\rceil = \left\lfloor \frac{n+m-1}{m} \right\rfloor$$
for all integers $n$ and all positive integers $m$.
I have started a proof by induction thus:
Let $P(m,n)$ be the statement that
$$\left\lceil \frac{n}{m} \right\rceil = \left\lfloor \frac{n+m-1}{m} \right\rfloor$$
for all integers $n$ and all positive integers $m$.
Then, according to the technique described here, I must prove the following:
- Base case: I have already proved that $P(a,b)$, where $a=1$ and where $b$ is the smallest value where $n$ is valid. (Note that this is equivalent to proving that $\lceil n \rceil = \lfloor n \rfloor \space \forall\space n\in\mathbb{Z}.$)
- Induction over $m$: I must show that $P(k,b) \implies P(k+1,b)$ for some positive integer $k$. THIS IS THE STAGE AT WHICH I AM STUCK.
- Induction over $n$: I must show that $P(h,k) \implies P(h,k+1)$ for some positive integer $m$ and for some integer $k$ (I think that I must account for the fact that $k$ could be negative OR non-negative).
I will explain why I am stuck.
My inductive hypothesis is that $P(k,b)$ - that is, $\left\lceil \frac{b}{k}\right\rceil = \left\lfloor \frac{b+k-1}{k}\right\rfloor$.
I want to show that this implies $P(k+1,b)$. I have tried to do this by attempting to express $\lceil \frac{b}{k+1} \rceil$ in terms of $\left\lceil \frac{b}{k} \right\rceil$, but have not succeeded.
Any hints would be appreciated.
Hint:
Let $k$ be the (unique) integer with: $n=km+r$ with $r\in\left\{ 0,1,\dots,m-1\right\} $.
Then $\lceil\frac{n}{m}\rceil=k+\lceil\frac{r}{m}\rceil$ and $\lfloor\frac{n+m-1}{m}\rfloor=k+1+\lfloor\frac{r-1}{m}\rfloor$.
So it remains to be shown that $\lceil\frac{r}{m}\rceil=1+\lfloor\frac{r-1}{m}\rfloor$ for $r\in\left\{ 0,1,\dots,m-1\right\} $.
Discern the cases $r=0$ and $r\in\left\{ 1,\dots,m-1\right\} $.