Prove⌈a/b⌉ ≤ a/b + (b-1)/b

250 Views Asked by At

For integers $a, b > 0$,

Prove $⌈a/b⌉ ≤ (a + (b-1))/b$

RHS $= a/b + (b-1)/b $ where $ (b-1)/b $ is $[0,1)$

If $a/b$ is an integer, inequality holds true as we are adding non-negative term.

If $a/b$ is not an integer, $⌈a/b⌉ < (a/b) + 1$ -- Equation 1

How to demonstrate that switching 1 with some smaller number $(b-1)/b$ leads to the $<$ transforming to $≤$ in equation 1.

Similarly, prove $⌊a/b⌋ ≥ (a - (b-1))/b$

3

There are 3 best solutions below

2
On BEST ANSWER

Note $\left\lceil\dfrac{a}{b}\right\rceil=\dfrac{a}{b}+1-\left\{\dfrac{a}{b}\right\}$, where $\{\}$ is the fractional part of the number. So the question reduces to $$1-\left\{\dfrac{a}{b}\right\}\le\dfrac{b-1}{b}\iff \left\{\dfrac{a}{b}\right\}\ge\dfrac{1}{b}$$ This is so obvious. In case you don't know, then

Suppose $(a,b)=1$, then $\left\{\dfrac{a}{b}\right\}$ must be a fraction with denominator $b$. Now suppose $(a,b)>1$, then the fraction part is a fraction with denominator $d:=\dfrac{b}{(a,b)}$. Then it must be at least $\dfrac{1}{d}\ge\dfrac{1}{b}$.

0
On

Assuming $a$ and $b$ are positive integers, that's not a good approach for it.

Instead: write $a=qb+r$ with $0\leq r\lt b$. Then $$\left\lceil\frac{a}{b}\right\rceil = \left\{\begin{array}{ll} q &\text{if }r=0,\\ q+1 &\text{if }r\gt 0. \end{array}\right.$$ The case "if $\frac{a}{b}$ is an integer is the case $r=0$ and you are fine. In the second case, note that $$\left\lceil\frac{a}{b}\right\rceil = \frac{a}{b} + \frac{b-r}{b}.$$ Go from there.

Or you can deal with both cases simultaneously by just considering $\frac{a+(b-r)}{b}$.

Do something similar for $\left\lfloor \frac{a}{b}\right\rfloor$.


If $a$ and $b$ are not positive integers, then it is false. Take $a=0.1$, $b=0.2$. Then $\frac{a}{b}=\frac{1}{2}$, so $\left\lceil\frac{a}{b}\right\rceil = 1$. But $$\frac{a+(b-1)}{b} = \frac{0.3-1}{0.1} = -\frac{.7}{.1} = -7,$$ and $1$ is not less than or equal to $-7$.

0
On

$\lceil a/b \rceil$ is strictly less than $a/b+1$ and $b$ is positive, so that $$ b \left\lceil \frac ab \right\rceil < b \left( \frac ab + 1\right) = a + b \, . $$ The expressions on the left and on the right are both integers, and two distinct integers differ by at least $1$. It follows that $$ b \left\lceil \frac ab \right\rceil \le a + b - 1 \, , $$ which is the desired inequality.