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.

“inventive genius<br />

requires pleasurable<br />

mental activity as<br />

a condition <strong>for</strong> its<br />

vigorous exercise.<br />

‘Necessity is the<br />

mother of invention’<br />

is a silly proverb.<br />

‘Necessity is the<br />

mother of futile<br />

dodges’is much<br />

nearer to the truth.<br />

The basis of the<br />

growth of modern<br />

invention is <strong>science</strong>,<br />

and <strong>science</strong> is almost<br />

wholly the<br />

outgrowth of pleasurable<br />

intellectual<br />

curiosity.”<br />

-A. N. Whitehead<br />

[303]<br />

then n/3 and 2n/3 are integers, so the sum is<br />

3.5 FLOOR/CEILING SUMS 91<br />

If n mod 3 = 1 then (n - 1)/3 and (2n - 2)/3 are integers, so we have<br />

Again this last step follows from (3.26), this time with m = 3. And finally, if<br />

n mod 3 = 2 then<br />

The left hemispheres of our brains have finished the case m = 3, but the<br />

right hemispheres still can’t recognize the pattern, so we proceed to m = 4:<br />

At least we know enough by now to consider cases based on n mod m. If<br />

n mod 4 = 0 then<br />

Andifnmod4=1,<br />

The case n mod 4 = 3 turns out to give the same answer. Finally, in the case<br />

n mod 4 = 2 we get something a bit different, and this turns out to be an<br />

important clue to the behavior in general:<br />

This last step simplifies something of the <strong>for</strong>m [y/2] + [(y + 1)/2J, which<br />

again is a special case of (3.26).

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

Saved successfully!

Ooh no, something went wrong!