Difference between revisions of "Floor function"

m
(Examples)
(12 intermediate revisions by 8 users not shown)
Line 1: Line 1:
The '''greatest integer function''', also known as the "floor function," gives the greatest integer less than or equal to its argument.  The floor of <math>x</math> is usually denoted by <math>\lfloor x \rfloor</math> or <math>[x]</math>.
+
The greatest integer function, also known as the '''floor function''', gives the greatest integer less than or equal to its argument.  The floor of <math>x</math> is usually denoted by <math>\lfloor x \rfloor</math> or <math>[x]</math>.  The action of this function is the same as "rounding down."  On a [[positive]] argument, this function is the same as "dropping everything after the decimal point," but this is ''not'' true for negative values.
  
For example:
+
== Properties ==
 +
* <math>\lfloor a+b\rfloor\ge \lfloor a\rfloor+\lfloor b \rfloor</math> for all real <math>(a,b)</math>.
 +
* [[Hermite's Identity]]: <cmath>\lfloor na\rfloor = \left\lfloor a\right\rfloor+\left\lfloor a+\frac{1}{n}\right\rfloor+\ldots+\left\lfloor a+\frac{n-1}{n}\right\rfloor</cmath>
 +
 
 +
==Examples==
  
 
*<math>\lfloor 3.14 \rfloor = 3</math>
 
*<math>\lfloor 3.14 \rfloor = 3</math>
  
*<math>\lfloor -2.7 \rfloor = -3</math>
+
*<math>\lfloor 5 \rfloor = 5</math>
 +
 
 +
*<math>\lfloor -3.2 \rfloor = -4</math>
 +
 
 +
A useful way to use the floor function is to write <math>\lfloor x \rfloor=\lfloor y+k \rfloor</math>, where y is an integer and k is the leftover stuff after the decimal point. This can greatly simplify many problems.
 +
 
 +
==Alternate Definition==
 +
 
 +
Another common definition of the floor function is
 +
 
 +
<cmath>\lfloor x \rfloor = x-\{x\}</cmath>
 +
 
 +
where <math>\{x\}</math> is the fractional part of <math>x</math>.
 +
 
 +
== Olympiad Problems ==
 +
* [1981 USAMO #5] If <math>x</math> is a positive real number, and <math>n</math> is a positive integer, prove that
 +
<cmath>[nx] \geq \frac{[x]}{1} + \frac{[2x]}{2} + \frac{[3x]}{3} + ... + \frac{[nx]}{n},</cmath>
 +
where <math>[t]</math> denotes the greatest integer less than or equal to <math>t</math>.
 +
 
 +
[http://www.mathlinks.ro/viewtopic.php?t=174312 AoPS discussion 1]
  
*<math>\lfloor 5 \rfloor = 5</math>
+
[http://www.mathlinks.ro/viewtopic.php?t=101711 AoPS discussion 2]
 +
 
 +
* [1968 IMO #6] Let <math>[x]</math> denote the integer part of <math>x</math>, i.e., the greatest integer not exceeding <math>x</math>. If <math>n</math> is a positive integer, express as a simple function of <math>n</math> the sum <cmath>\left[\frac{n+1}{2}\right]+\left[\frac{n+2}{4}\right]+...+\left[\frac{n+2^k}{2^{k+1}}\right]+\ldots</cmath>
  
 
==See Also==
 
==See Also==
*[[Least integer function]]
+
*[[Ceiling function]]
 +
 
 +
*[[Fractional part]]
 +
 
 +
[[Category:Functions]]

Revision as of 18:08, 19 September 2020

The greatest integer function, also known as the floor function, gives the greatest integer less than or equal to its argument. The floor of $x$ is usually denoted by $\lfloor x \rfloor$ or $[x]$. The action of this function is the same as "rounding down." On a positive argument, this function is the same as "dropping everything after the decimal point," but this is not true for negative values.

Properties

Examples

  • $\lfloor 3.14 \rfloor = 3$
  • $\lfloor 5 \rfloor = 5$
  • $\lfloor -3.2 \rfloor = -4$

A useful way to use the floor function is to write $\lfloor x \rfloor=\lfloor y+k \rfloor$, where y is an integer and k is the leftover stuff after the decimal point. This can greatly simplify many problems.

Alternate Definition

Another common definition of the floor function is

\[\lfloor x \rfloor = x-\{x\}\]

where $\{x\}$ is the fractional part of $x$.

Olympiad Problems

  • [1981 USAMO #5] If $x$ is a positive real number, and $n$ is a positive integer, prove that

\[[nx] \geq \frac{[x]}{1} + \frac{[2x]}{2} + \frac{[3x]}{3} + ... + \frac{[nx]}{n},\] where $[t]$ denotes the greatest integer less than or equal to $t$.

AoPS discussion 1

AoPS discussion 2

  • [1968 IMO #6] Let $[x]$ denote the integer part of $x$, i.e., the greatest integer not exceeding $x$. If $n$ is a positive integer, express as a simple function of $n$ the sum \[\left[\frac{n+1}{2}\right]+\left[\frac{n+2}{4}\right]+...+\left[\frac{n+2^k}{2^{k+1}}\right]+\ldots\]

See Also