09.12.2012 Views

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

68 INTEGER FUNCTIONS<br />

below the line f(x) = x:<br />

We see from the graph that., <strong>for</strong> example,<br />

lel = 2 ,<br />

Tel = 3,<br />

l-ej =-3,<br />

r-e] = -2,<br />

since e := 2.71828.. . .<br />

By staring at this illustration we can observe several facts about floors<br />

and ceilings. First, since the floor function lies on or below the diagonal line<br />

f(x) = x, we have 1x1 6 x; similarly [xl 3 x. (This, of course, is quite<br />

obvious from the definition.) The two functions are equal precisely at the<br />

integer points:<br />

lx] = x * x is an integer [xl = x.<br />

(We use the notation ‘H’ to mean “if and only if!‘) Furthermore, when<br />

they differ the ceiling is exactly 1 higher than the floor:<br />

[xl - 1x1 = [x is not an integer] . (3.2) Cute.<br />

By Iverson ‘s bracket<br />

If we shift the diagonal line down one unit, it lies completely below the floor<br />

function, so x - 1 < 1x1; similarly x + 1 > [xl. Combining these observations<br />

gives us<br />

conventions<br />

complete<br />

this is a<br />

equation.<br />

x-l < lx] 6 x 6 [xl < x+1. (3.3)<br />

Finally, the functions are reflections of each other about both axes:<br />

l-XJ = -[xl ; r-x.1 = -1xJ (3.4)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!