Floor and Ceiling Functions
Introduction to Floor and Ceiling Functions
The topic will cover exercises and definitions associated with the floor and ceiling functions. This is a brief examination intended for a practical understanding rather than a separate lecture.
Definitions of Floor and Ceiling Functions
Ceiling Function
The ceiling function is denoted by Ceiling(x), often depicted with upside-down L's (⎡x⎤).
Definition: The ceiling function takes a real number and rounds it up to the nearest integer.
Examples:
Ceiling of 0.99:
Calculation: Rounds 0.99 up to 1.
Result:
Ceiling of 2.1:
Calculation: Rounds 2.1 up to 3.
Result:
Floor Function
The floor function is denoted by Floor(x), often depicted with right-side-up L's (⌊x⌋).
Definition: The floor function takes a real number and rounds it down to the nearest integer.
Examples:
Floor of 2.1:
Calculation: Rounds 2.1 down to 2.
Result:
Floor of 0.1:
Calculation: Rounds 0.1 down to 0 (but since it's still below 0, it moves down further).
Result: (Confirmed to be incorrect; it actually rounds to -1.)
Clarification: Referencing the number line, 0.1 is located before 0, therefore, rounding down to -1:
Result:
Number Line Representation
On a number line:
Zero is at 0, -1 is to the left of zero.
If placing 1 on the number line, it would be to the right of 0, showing the nature of moving left for floor and right for ceiling:
Floor function moves left.
Ceiling function moves right.
Example Computation with Floor and Ceiling
Problem: Calculate .
First, calculate the ceiling of :
Result:
.Now calculate the floor of :
We first need to find the floor:
(since )
The floor of is equal to 1.
Thus:
.
Formal Definitions of Floor and Ceiling
Floor Definition
If (where X is a real number and n is an integer), then:
and .
This remains correct as long as X is strictly less than n + 1.
Ceiling Definition
If , then:
is less than or equal to n and strictly greater than n - 1.
Proof on Floor Function
Claim: For any real number x and any integer m, .
Assumption: Assume , implying:
orall nX ext{ is such that } >= n< n + 1 n + m ext{ (is ≤ to)} X + m ext{ (is < to)} n + m + 1 ext{Floor}(X + m) = n + m ext{Floor}(X + m) = ext{Floor}(X) + m$$.
Additional Information
While this video discussed the floor function, viewers are encouraged to attempt the same proof for the ceiling function as an exercise to enhance understanding.
Additional proofs can be found online, and there are many more applications of floor and ceiling functions beyond this content.