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:
      extCeiling(0.99)=1ext{Ceiling}(0.99) = 1

    • Ceiling of 2.1:

    • Calculation: Rounds 2.1 up to 3.

    • Result:
      extCeiling(2.1)=3ext{Ceiling}(2.1) = 3

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:
      extFloor(2.1)=2ext{Floor}(2.1) = 2

    • Floor of 0.1:

    • Calculation: Rounds 0.1 down to 0 (but since it's still below 0, it moves down further).

    • Result: extFloor(0.1)=0ext{Floor}(0.1) = 0 (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:
        extFloor(0.1)=−1ext{Floor}(0.1) = -1

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 extFloor(rac23)+extCeiling(rac12)ext{Floor}\bigg( rac{2}{3}\bigg) + ext{Ceiling}\bigg( rac{1}{2}\bigg) .

    • First, calculate the ceiling of rac12rac{1}{2}:

    • Result:
      extCeiling(rac12)=1ext{Ceiling}\bigg( rac{1}{2}\bigg) = 1.

    • Now calculate the floor of rac23+1rac{2}{3} + 1:

    • We first need to find the floor:

      • extFloor(rac23+1)=extFloor(rac53)ext{Floor}\bigg( rac{2}{3} + 1\bigg) = ext{Floor}\bigg( rac{5}{3}\bigg) (since rac23+1=rac53rac{2}{3} + 1 = rac{5}{3})

    • The floor of rac53ext(approximately1.666)rac{5}{3} ext{ (approximately 1.666)} is equal to 1.

    • Thus:
      extFloor(rac53)=1ext{Floor}\bigg( rac{5}{3}\bigg) = 1.

Formal Definitions of Floor and Ceiling

Floor Definition

  • If extFloor(X)=next{Floor}(X) = n (where X is a real number and n is an integer), then:

    • Xextissuchthatnextorallnextisaninteger,X ext{ is such that } n ext{ } orall n ext{ is an integer, } nextextisdefinedas>=nn ext{ } ext{is defined as } > = n and <n+1< n + 1.

    • This remains correct as long as X is strictly less than n + 1.

Ceiling Definition

  • If extCeiling(X)=next{Ceiling}(X) = n, then:

    • XX 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, extFloor(X+m)=extFloor(X)+mext{Floor}(X + m) = ext{Floor}(X) + m.

  • Assumption: Assume extFloor(X)=next{Floor}(X) = n, implying:

    • nextisorallnextwheren ext{ is } orall n ext{ where } orall nX ext{ is such that } >= nandand< n + 1.</p></li></ul></li><li><p>Addingmtoeachendpointoftheinequality,wehave:</p><ul><li><p>.</p></li></ul></li><li><p>Adding m to each endpoint of the inequality, we have:</p><ul><li><p> n + m ext{ (is ≤ to)} X + m ext{ (is < to)} n + m + 1.</p></li></ul></li><li><p>Thisestablishedpatternleadsustoconclude:</p><ul><li><p>.</p></li></ul></li><li><p>This established pattern leads us to conclude:</p><ul><li><p> ext{Floor}(X + m) = n + m</p></li></ul></li><li><p>Therefore,confirming:</p><ul><li><p></p></li></ul></li><li><p>Therefore, confirming:</p><ul><li><p> 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.