Discrete Structure20805 marksCeiling and floor functions
State ceiling function and floor function with examples. How mathematical induction can be used to prove the correctness of recursive algorithm? Illustrate with an example.
State ceiling function and floor function with examples. How mathematical induction can be used to prove the correctness of recursive algorithm? Illustrate with an example.[5]
--- Definition: The floor function of a real number $x$, denoted $\lfloor x \rfloor$, is the greatest integer less than or equal to $x$. $$\lfloor x \rfloor = \max{n \in \mathbb{Z} \mid n \leq x}$$ Examples: - $\lfloor 4.7 \rfloor = 4$ - $\lfloor 3 \rfloor = 3$ - $\lfloor -2.3 \rfloor = -3$ ---...