2

For $A \geq B$, both are strictly positive integers, what is the relationship between $A$ and $B$ such that the following is true? $$A - \lfloor A/B \rfloor - \lceil A/B \rceil \leq \lfloor A/B \rfloor \times (B+1)$$

Previously I asked this question can be here, and a counterexample has been shown to disprove it. Now I'd like to ask whether we can find the conditions (an expression in terms of $A$ and $B$) such that the above is true.

One thing I noticed (a generalisation from @Clement Yung's answer in my original post - thanks!) is that if $B = \lceil A/k \rceil$ (for any constant $k$), then the above is false. I wonder if there are any other cases such that it's false, or if better if there's condition(s) for when it is always true.

Nick
  • 167
  • Note that, for example, if $A=10$ and $B=4$, we are in the case $B=\lceil A/k\rceil$ because $4=\lceil 10/3 \rceil$. However, the inequality is true since you have $\lfloor 10/4\rfloor=2$, $\lceil 10/4\rceil=3$, and then $10-2-3<2 \cdot 5$. – Anatoly Aug 20 '20 at 15:03

2 Answers2

1

Consider firstly the case in which $A=B$ and then $A/B=1$. In this case, $\lfloor A/B\rfloor=\lceil A/B\rceil=1$, so that the inequality of the OP would reduce to

$$A-3\lfloor A/B \rfloor \leq B \lfloor A/B \rfloor$$ $$A-3\leq A $$

which is trivially true.

If $A/B>1$, then $\lfloor A/B\rfloor+1=\lceil A/B\rceil$, so that the inequality becomes

$$A-3\lfloor A/B \rfloor -1\leq B \lfloor A/B \rfloor$$ $$A-(B+3)\lfloor A/B \rfloor -1\leq 0$$ $$\lfloor A/B \rfloor\geq \frac{A-1}{B+3}$$

This is the condition needed to satisfy the initial inequality of the OP.


For example, if $A=5$ and $B=2$, then the condition is satisfied since $$\lfloor 5/2 \rfloor=2 > \frac{5-1}{2+3}=\frac 45$$

Accordingly, for these values the initial inequality holds, as it gives

$$5-2-3\leq 2\cdot 3$$ $$0\leq 6$$

As another example, if $A=12$ and $B=7$, then the condition is not satisfied since $$\lfloor 12/7 \rfloor=1 < \frac{12-1}{7+3}=\frac {11}{10}$$

Accordingly, for these values the initial inequality does not hold, since it would give

$$12-1-2\leq 1\cdot 7$$ $$9\leq 7$$

Anatoly
  • 17,079
0

$ \newcommand{\f}[1]{\left\lfloor #1 \right\rfloor} \newcommand{\c}[1]{\left\lceil #1 \right\rceil} $ Consider writing $A = NB + k$ for some $N \in \Bbb{Z}^+$ and $0 \leq k < B$. We consider two cases.

If $k = 0$ (i.e. $A$ is a multiple of $B$), then we can rewrite the inequality as: \begin{align*} A - \f{A/B} - \c{A/B} \leq \f{A/B}(B + 1) &\iff NB - 2N \leq N(B + 1) \\ &\iff -2N \leq N \\ &\iff N \geq 0 \end{align*} which always holds. If $k > 0$, then: \begin{align*} A - \f{A/B} - \c{A/B} \leq \f{A/B}(B + 1) &\iff (NB + k) - N - (N + 1) \leq N(B + 1) \\ &\iff k - 2N - 1 \leq N \\ &\iff 3N + 1 \geq k \end{align*} For a fixed $B \in \Bbb{Z}^+$, we can now classify all integers $A$ such that the inequality is satisfied by considering the value of $k$ (i.e. the remainder of $A$ when divided by $B$, which takes finitely many possible values). In particular, if $3N + 1 \geq B - 1$, then the inequality is immediately satisfied.

Clement Yung
  • 8,347