Questions tagged [ceiling-and-floor-functions]

This tag is for questions involving the greatest integer function (or the floor function) and the least integer function (or the ceiling function).

The greatest integer function, or the floor function, is usually denoted by $\lfloor\_\rfloor$ (although some authors prefer $[\_]$). For a real number $x$, $\lfloor x\rfloor$ is the largest integer that is less than or equal to $x$. For example, $\lfloor 2^{1000}\rfloor=2^{1000}$, $\lfloor\sqrt{105}\rfloor=10$, and $\lfloor -\pi\rfloor =-4$.

The least integer function, or the ceiling function, is usually denoted by $\lceil\_\rceil$. For a real number $x$, $\lceil x\rceil$ is the smallest integer that is greater than or equal to $x$. For example, $\lceil 2^{1000}\rceil=2^{1000}$, $\lceil\sqrt{105}\rceil=11$, and $\lceil -\pi\rceil =-3$.

2250 questions
37
votes
5 answers

How do the floor and ceiling functions work on negative numbers?

It's clear to me how these functions work on positive real numbers: you round up or down accordingly. But if you have to round a negative real number: to take $\,-0.8\,$ to $\,-1,\,$ then do you take the floor of $\,-0.8,\,$ or the ceiling? That is,…
Mirrana
  • 9,009
19
votes
6 answers

What is ⌊0.9 recurring ⌋?

For a ceiling and floor function, the number is taken to 0 decimal places. Does this process mean that 0.9 recurring inside a floor function would go to 0? Or would the mathematician take 0.9 recurring to be equal to 1, thus making the answer 1? And…
14
votes
1 answer

(floor function) sum of x: $\left\lfloor{\frac{x}{5}}\right\rfloor - \left\lfloor{\frac{x}{9}}\right\rfloor = \frac{x}{15}$

Find the sum of integers $x$ such that $$\left\lfloor{\frac{x}{5}}\right\rfloor - \left\lfloor{\frac{x}{9}}\right\rfloor = \frac{x}{15}$$ I don't have much experience in solving problems with the floor function involved. I have rewritten the…
user403458
  • 191
  • 5
7
votes
3 answers

A mathematical way for defining the $\operatorname{Floor}$ and $\operatorname{Ceiling}$ functions

Given: $\operatorname{Floor}(x)=\lfloor x \rfloor$ $\operatorname{Ceiling}(x)=\lceil x \rceil$ Where $x$ is a real number. Is there any other (mathematical) way for defining $\operatorname{Floor}(x)$ and…
barak manos
  • 43,109
6
votes
4 answers

Inequalities with floor function

I need some help with this exercise, I'm pretty new solving this exercises. $$ \lfloor x \rfloor + \lfloor y \rfloor \le \lfloor x + y \rfloor \le \lfloor x \rfloor + \lfloor y \rfloor + 1$$ I know that I had to use the formal definition of the…
6
votes
2 answers

How to solve $ \left \lfloor x^2 - x - 2 \right \rfloor = \left \lfloor x \right \rfloor $

I need some help to solve the next equation: $$ \left \lfloor x^2 - x - 2 \right \rfloor = \left \lfloor x \right \rfloor $$ Where $ \left \lfloor \cdot \right \rfloor $ is the floor function. What I've tried: $$ x^2 - x - 2 - x < 1 $$ $$ x^2 - x -…
5
votes
1 answer

How to solve a floor equation?

I am trying to solve the following equation, but I've found some difficulties. $$\lfloor\sqrt x\rfloor=\lfloor\sqrt[3] x\rfloor\quad\quad(x\in \mathbb R)$$
5
votes
2 answers

$[n \sqrt{2}] = [m (2+\sqrt{2})]$ for $m,n$ natural.

Does $[n \sqrt{2}] = [m (2+\sqrt{2})]$ for $m,n$ natural have no solution where $[x]$ is the floor function of $x$? I tried calculating some examples ($1,000,000$ examples on Python) and it seems as though the left and right hand side never equal…
4
votes
0 answers

Closed form solution for $\left \lfloor{\frac{a}{x}}\right \rfloor$ = $\left \lfloor{\frac{b}{x}}\right \rfloor$?

I need to find the smallest value of $x$ such that: $\left \lfloor{\frac{a}{x}}\right \rfloor$ = $\left \lfloor{\frac{b}{x}}\right \rfloor$ EDIT: where $0 < x < a < b$, and $x \in \mathbb{N}$ Is there a closed-form solution for this problem? Any…
mandy
  • 41
4
votes
3 answers

Evaluating $\lfloor (3 + \sqrt{5})^{34} \rfloor \pmod {100}$

The problem is to evaluate $\lfloor (3 + \sqrt{5})^{34} \rfloor \pmod {100}$ No calculators are allowed. I think I have to get rid of $\sqrt{5}$ somehow since it is irrational and would make it hard to find the floor without doing it numerically.…
user99185
  • 287
4
votes
2 answers

How to prove the ceiling relations stated in CLRS Introduction to Algorithms book?

In the book "Introduction to Algorithms", by CLRS, page 54, the following relations are stated (enumeration is mine): For any real number $x\geq 0$ and integers $a,b>0$, $$ \begin{aligned} (1)\qquad\left\lceil\dfrac{\lceil…
OldCrow
  • 103
4
votes
3 answers

If $x\Big\lfloor x \big\lfloor x\lfloor x \rfloor \big\rfloor \Big\rfloor=2018$, find $x$

If $x\Big\lfloor x \big\lfloor x\lfloor x \rfloor \big\rfloor \Big\rfloor=2018$, find $x$. My working: if $x$ is positive then by estimation it must be in $(6,7)$ and for this interval I : $x\Big\lfloor x \big\lfloor x\lfloor x \rfloor \big\rfloor…
Makar
  • 2,267
4
votes
5 answers

$\left\lfloor \frac{a-b}{2} \right\rfloor + \left\lceil \frac{a+b}{2} \right\rceil = a$ when $a,b$ are integers?

Let $a$ and $b$ be positive integers. If $b$ is even, then we have $$\left\lfloor \frac{a-b}{2} \right\rfloor + \left\lceil \frac{a+b}{2} \right\rceil = a$$ I think the equality also hold when $b$ is odd. What could be a proof for it?
Adam54
  • 301
4
votes
2 answers

Inverse floor function

studying a scientific article**, I ran into something I cannot explain: $$l := \left\lfloor{\frac{x+y}{2}}\right\rfloor ,\quad h := x - y \\ x = l + \left\lfloor{\frac{h+1}{2}}\right\rfloor, \quad y = l -…
4
votes
1 answer

Nested Floor/Ceiling Function for non-Integer Divisors

I am trying to figure out how to find the Floor and Ceiling of a nested Multiplication of fractions. I understand that $ \left\lceil{\frac{x}{mn}}\right \rceil= \left\lceil{\frac{\lceil{\frac{x}{m}}\rceil}{n}}\right\rceil $ works when x, m, n are…
1
2 3
13 14