Necessary and sufficient so that $\left\lfloor {\frac{a}{N}} \right\rfloor = \left\lfloor {\frac{b}{N}} \right\rfloor$

39 Views Asked by At

Given a positive integer $N$, find the sufficient and necessary conditions for any non-negative integers $a,b$ so that $$\left\lfloor {\frac{a}{N}} \right\rfloor = \left\lfloor {\frac{b}{N}} \right\rfloor$$

In fact, I'm trying to lineairise this equation for my bigger problem where $a,b$ must stay in the same segment of length $N$.

It is easy to see that $a - b \le N - 1$ and $a - b \ge -N + 1$, but I'm still unable to eliminate the case where $a,b$ are on the opposite side of $kN$, for example $a = N-1, b=N + 1$.

PS: I already know creating another integer $k$ so that $kN \le a, b < (k + 1) N$ but I'd like find another way without creating new unknown.