Can flooring and ceiling thirds sum up to more than a whole? I'm working on a web layout which needs to divide an area into three columns, but do so using whole pixel values (due to subpixel rendering issues on some mobile devices). For this purpose I've decided to go with the following approach:


*

*The first two columns are rounded down (floored)

*The last column is rounded up (ceil)


Is there any numeric value for which using the above approach might break the layout? That is, does any integer $x$ exist which satisfies the following condition?
$$ \left \lfloor \frac{x}{3} \right \rfloor + \left \lfloor \frac{x}{3} \right \rfloor + \left \lceil \frac{x}{3} \right \rceil > x\\ 
x\in \mathbb{Z} $$
How would I approach disproving the existence of such a value?
 A: The answer is no:


*

*$x\equiv0\pmod3\implies\left\lfloor\frac{x}{3}\right\rfloor+\left\lfloor\frac{x}{3}\right\rfloor+\left\lceil\frac{x}{3}\right\rceil=\frac{x}{3}+\frac{x}{3}+\frac{x}{3}=\frac{3x}{3}=x$

*$x\equiv1\pmod3\implies\left\lfloor\frac{x}{3}\right\rfloor+\left\lfloor\frac{x}{3}\right\rfloor+\left\lceil\frac{x}{3}\right\rceil=\frac{x-1}{3}+\frac{x-1}{3}+\frac{x+2}{3}=\frac{3x-2+2}{3}=x$

*$x\equiv2\pmod3\implies\left\lfloor\frac{x}{3}\right\rfloor+\left\lfloor\frac{x}{3}\right\rfloor+\left\lceil\frac{x}{3}\right\rceil=\frac{x-2}{3}+\frac{x-2}{3}+\frac{x+1}{3}=\frac{3x-4+2}{3}<x$
A: No, there are no integer solutions to what you've posed.
Case #1: $x$ is a multiple of $3$.
Then we have $x = 3l$ where $l$ is an integer, and so the result is trivially $x$ on both sides of the inequality.
Case #2: $x$ is congruent to $1$ mod $3$.
Then we have $x = 3l + 1$.
Thus, the floor and ceiling of $\frac{3l + 1}{3}$ is the floor and ceiling of $l + \frac{1}{3}$. The ceiling is $l+1$, the floor is $l$.
Thus, we have $l + l + l + 1$, or $3l + 1 = x$ 
Again, the result is $x$ on both sides of the equality.
I'll leave the last case to you. 
A: For any real number $y$, write


*

*$\lfloor y \rceil = y - \lfloor y \rfloor$, such that $y = \lfloor y \rfloor + \lfloor y \rceil$, and

*$\lceil y \rfloor = y - \lceil y \rceil$, such that $y = \lceil y \rceil + \lceil y \rfloor$.


Then for any $x ∈ ℤ$, verify that $\lfloor x/3 \rceil + \lfloor x/3 \rceil + \lceil x/3 \rfloor ≥ 0$ by case differentiation.¹ Then
\begin{align}
x &= x/3 + x/3 + x/3 \\
 &= \lfloor x/3 \rfloor + \lfloor x/3 \rfloor + \lceil x/3 \rceil\\
 &+ \lfloor x/3\rceil  + \lfloor x/3 \rceil + \lceil x/3 \rfloor.
\end{align}
¹: It’s either $0 + 0 + 0$ or $1/3 + 1/3 - 2/3$ or $2/3 + 2/3 - 1/3$.
