Sum of Floors Not Greater Than Floor of Sums

From ProofWiki
Jump to: navigation, search

Theorem

Let $\left \lfloor {x} \right \rfloor$ be the floor function.


Then:

$\left \lfloor {x} \right \rfloor + \left \lfloor {y} \right \rfloor \le \left \lfloor {x + y} \right \rfloor$


The equality holds:

$\left \lfloor {x} \right \rfloor + \left \lfloor {y} \right \rfloor = \left \lfloor {x + y} \right \rfloor$

iff:

$x \,\bmod\, 1 + y \,\bmod\, 1 < 1$

where $x \,\bmod\, 1$ denotes the modulo operation.


Proof

From the definition of the modulo operation, we have that:

$x = \left \lfloor {x}\right \rfloor + \left({x \, \bmod \, 1}\right)$

from which we obtain:


\(\displaystyle \) \(\displaystyle \) \(\displaystyle \) \(\displaystyle \left \lfloor {x + y} \right \rfloor\) \(=\) \(\displaystyle \left \lfloor {\left \lfloor {x}\right \rfloor + \left({x \, \bmod \, 1}\right) + \left \lfloor {y}\right \rfloor + \left({y \, \bmod \, 1}\right)} \right \rfloor\) \(\displaystyle \) \(\displaystyle \) \(\displaystyle \)                    
\(\displaystyle \) \(\displaystyle \) \(\displaystyle \) \(\displaystyle \) \(=\) \(\displaystyle \left \lfloor {x}\right \rfloor + \left \lfloor {y}\right \rfloor + \left \lfloor {\left({x \, \bmod \, 1}\right) + \left({y \, \bmod \, 1}\right)} \right \rfloor\) \(\displaystyle \) \(\displaystyle \) \(\displaystyle \)          as $\left \lfloor {x + n}\right \rfloor = \left \lfloor {x}\right \rfloor + n$: Definition of Floor Function          

Hence the inequality.


The equality holds iff:

$\left \lfloor {\left({x \, \bmod \, 1}\right) + \left({y \, \bmod \, 1}\right)} \right \rfloor = 0$

that is, iff:

$x \,\bmod\, 1 + y \,\bmod\, 1 < 1$.


$\blacksquare$

Personal tools
Namespaces
Variants
Actions
Navigation
ProofWiki.org
ToDo
Toolbox
Google AdSense