What are some real life application of ceiling and floor functions? Googling this shows some trivial applications.
Ceiling and floor functions
5.5k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 4 best solutions below
On
One example is the formula for the the number of derangements $d_n$, which satisfies $$d_n=\left\lfloor \frac{n!}{e}+\frac{1}{2} \right\rfloor.$$ Here it would be difficult to rewrite the equation without the floor function.
However, in many cases, the role floor and ceiling functions play is merely to make equations look more succinct. There's many formulas involving these functions, but the important part for these formulas will not the ceiling or floor parts.
One such case is for the Legendre symbol, which satisfies some identity involving floors, e.g. $$\left(\frac{3}{p}\right)=(-1)^{\lfloor(p-1)/6\rfloor}$$ for odd primes $p$. Instead of using a floor function, we could split it into cases, one for each residue class of $p-1$ modulo $6$ (actually, since $p$ is an odd prime, we could separate the $p=3$ and $p \equiv \pm 1 \pmod 6$ cases).
On
If you need 11 foos, and they are sold in packages of 3, you need to buy $\lceil \frac{11}3 \rceil$ packages.
On
Prime-counting or "prime-generating" functions often use these functions. See, for example, http://en.wikipedia.org/wiki/Prime-counting_function#Algorithms_for_evaluating_.CF.80.28x.29 and similar.
Unfortunately, these don't often make the calculations any more efficient or effective — they simply make it algebraically clear what's happening.
The floor function is, among other things, of great use for arithmetic functions, like the Moebius $\mu$-function, or Mangoldt $\Lambda$-function. We have $$ \sum_{n\le x}\mu(n)\left\lfloor \frac{x}{n}\right\rfloor =1,\quad \sum_{n\le x}\Lambda(n)\left\lfloor \frac{x}{n}\right\rfloor =\log (\lfloor x\rfloor !) $$ for example, and there are numerous similar results using floor and ceiling function. (Here $\mu(p)=-1$ for primes $p$, and $\mu(p_1\ldots p_r)=(-1)^r$ for $r$ different primes, and $\mu(n)=0$ if $n$ is not squarefree).