Beginner
Discrete Mathematics & Math
Q35 / 100
What is the floor and ceiling function?
Correct! Well done.
Incorrect.
The correct answer is B) ⌊x⌋ (floor): greatest integer ≤ x; ⌈x⌉ (ceiling): smallest integer ≥ x
B
Correct Answer
⌊x⌋ (floor): greatest integer ≤ x; ⌈x⌉ (ceiling): smallest integer ≥ x
Explanation
⌊3.7⌋ = 3, ⌈3.2⌉ = 4, ⌊-1.3⌋ = -2, ⌈-1.3⌉ = -1. Used in algorithm analysis (e.g., ⌊log₂ n⌋ + 1 = bits to represent n), hashing (⌊n/m⌋ for bucketing), and pagination.
Progress
35/100