0
$\begingroup$

I've been trying to prove the following, for $A \geq B$, both are strictly positive integers: $$A - \lfloor A/B \rfloor - \lceil A/B \rceil \leq (\lfloor A/B \rfloor + 1) \times B$$ Not sure if it's true. Can't find a counterexample so far. Anyone has an idea?

$\endgroup$
1
$\begingroup$

$ \newcommand{\f}[1]{\left\lfloor #1 \right\rfloor} \newcommand{\c}[1]{\left\lceil #1 \right\rceil} $ Note that $\f{A/B} \leq \c{A/B}$, so: $$ A - \f{A/B} - \c{A/B} \leq A - 2\f{A/B} \\ (\f{A/B} + 1)B = \f{A/B}B + B \geq (A/B - 1)B + B = A $$ Thus the inequality clearly holds as $\f{A/B} > 0$.

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

$A\ge B\implies\lfloor A/B \rfloor\ge 1$ and $\lceil A/B \rceil\ge 1$ $$A-\lfloor A/B\rfloor - \lceil A/B \rceil <A=A/B\times B\le \lceil A/B\rceil \times B \le (\lfloor A/B \rfloor +1)\times B$$

where the last inequality holds since $\lceil A/B \rceil = \lfloor A/B \rfloor $ if $A$ is divisible by $B$, otherwise $A/B$ is not an integer and $\lceil A/B \rceil = \lfloor A/B \rfloor +1$.

| cite | improve this answer | |
$\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.