3

Integer Functions

Whole numbers constitute the backbone of discrete mathematics, and we often need to convert from fractions or arbitrary real numbers to integers. Our goal in this chapter is to gain familiarity and fluency with such conversions and to learn some of their remarkable properties.

3.1 Floors and Ceilings

Let’s look first at the floor (greatest integer) and ceiling (least integer) functions, which are defined for all real x as follows:

Image

Kenneth E. Iverson introduced this notation, as well as the names “floor” and “ceiling,” early in the 1960s [191, page 12]. He found that typesetters could handle the symbols by shaving the tops ...

Get Concrete Mathematics: A Foundation for Computer Science, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.