0
$\begingroup$

Is there a number $x$ such that $$\lceil\frac{n}{b}\rceil \leq\frac{n+x}{b}$$

For example, we can have:

$$\lceil\frac{10}{3}\rceil \leq \frac{10+2}{3}=\frac{12}{3}$$

We can have:

$$\lceil\frac{20}{7}\rceil \leq \frac{20+1}{3}=\frac{21}{3}$$

We can have:

$$\lceil\frac{7}{3}\rceil \leq \frac{7+2}{3}=\frac{9}{3}$$

What is the way to find this $x$ such that we have $\lceil\frac{n}{b}\rceil \leq\frac{n+x}{b}$

If I gave you an arbitary $n$ and $b$, how would you find $x$?

$\endgroup$
  • 1
    $\begingroup$ $b\lceil\frac{n}{b}\rceil-n$? $\endgroup$ – Marja Aug 7 '17 at 19:33
0
$\begingroup$

Think about what the left hand side does: It rounds $n/b$ up to the nearest integer.

Now think about what the right hand side does: It just computes $n/b$ and then increases it by $x/b$.

So the difference (not accounting for the increase) in the outputs is less than $1$. This should suggest a good choice of $x/b$, or alternatively a good choice of $x$, given $b$.

But note that $x$ must depend on $b$; if it's too small relative to $b$, it will not work.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.