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.

The horizontal scale<br />

here is ten times the<br />

vertical scale.<br />

solution when a = 0, p = 1, y = -3, 6 = 3. Hence<br />

3D(n) - 3C(n) + B(n) = n3 ;<br />

2.5 GENERAL METHODS 45<br />

this determines D(n).<br />

We’re interested in the sum Cl,, which equals � -1 + n2; thus we get<br />

17, = R, if we set a = /3 = y = 0 and 6 = 1 in (2.41). Consequently<br />

El, = D(n). We needn’t do the algebra to compute D(n) from B(n) and<br />

C(n), since we already know what the answer will be; but doubters among us<br />

should be reassured to find that<br />

3D(n) = n3+3C(n)-B(n) = n3+3T-n = n(n+t)(n+I),<br />

Method 4: Replace sums by integrals.<br />

People who have been raised on calculus instead of discrete <strong>mathematics</strong><br />

tend to be more familiar with j than with 1, so they find it natural to try<br />

changing x to s. One of our goals in this book is to become so com<strong>for</strong>table<br />

with 1 that we’ll think s is more difficult than x (at least <strong>for</strong> exact results).<br />

But still, it’s a good idea to explore the relation between x and J, since<br />

summation and integration are based on very similar ideas.<br />

In calculus, an integral can be regarded as the area under a curve, and we<br />

can approximate this area by adding up the areas of long, skinny rectangles<br />

that touch the curve. We can also go the other way if a collection of long,<br />

skinny rectangles is given: Since Cl, is the sum of the areas of rectangles<br />

whose sizes are 1 x 1, 1 x 4, . . . , 1 x n2, it is approximately equal to the area<br />

under the curve f(x) = x2 between 0 and n.<br />

f(x 1 t<br />

123<br />

I<br />

i<br />

c<br />

n X<br />

The area under this curve is J,” x2 dx = n3/3; there<strong>for</strong>e we know that El, is<br />

approximately fn3.

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

Saved successfully!

Ooh no, something went wrong!