Is $| \lceil \frac{a}{2} \rceil – \lceil \frac{b}{2} \rceil |\geq \lfloor |\frac{a – b}{2}| \rfloor $

elementary-number-theoryinequalitynumber theory

Let $a$ and $b$ be integers. Is it true that

$$
\left | \left \lceil \frac{a}{2} \right \rceil – \left \lceil \frac{b}{2} \right \rceil \right |\geq \left \lfloor \left | \frac{a – b}{2} \right |\right \rfloor
$$

Where $\lceil \cdot \rceil$ is the ceiling function, $\lfloor \cdot \rfloor$ the floor function and $|\cdot|$ is the absolute function.

The inequality seems to be true when I check it programatically but I would like to get a proof (or disproof) for this inequality.

Best Answer

Yes, it is true.

$$ \left | \left \lceil \frac{a}{2} \right \rceil - \left \lceil \frac{b}{2} \right \rceil \right |\geq \left \lfloor \left | \frac{a - b}{2} \right |\right \rfloor \tag1$$

In the following, $m,n$ are integers.

Case 1 : If $a=2m,b=2n$, then both sides of $(1)$ equal $|m-n|$.

Case 2 : If $a=2m,b=2n+1$, then $$(1)\iff |m-n-1|\ge \left\lfloor\left |m-n-\frac 12\right|\right\rfloor\tag2$$

If $m-n-\frac 12\ge 0$, then $m-n-1\ge 0$, so$$(2)\iff m-n-1\ge m-n-1$$which is true.

If $m-n-\frac 12\lt 0$, then $m-n-1\lt 0$, so$$(2)\iff -m+n+1\ge -m+n$$which is true.

Case 3 : If $a=2m+1, b=2n$, then $$(1)\iff |m-n+1|\ge \left\lfloor\left|m-n+\frac 12\right|\right\rfloor\tag3$$

If $m-n+\frac 12\ge 0$, then $m-n+1\ge 0$, so$$(3)\iff m-n+1\ge m-n$$which is true.

If $m-n+\frac 12\lt 0$, then $m-n+1\lt 0$, so$$(3)\iff -m+n-1\ge -m+n-1$$which is true.

Case 4 : If $a=2m+1,b=2n+1$, then both sides of $(1)$ equal $|m-n|$.

Related Question