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.

Into a Big Oh.<br />

9.3 0 MANIPULATION 447<br />

This may look worse than the sum we began with, but it’s actually a step <strong>for</strong>ward,<br />

because we have very good approximations <strong>for</strong> the harmonic numbers.<br />

Still, we hold back and try to simplify some more. No need to rush into<br />

asymptotics. Summation by parts allows us to group the terms <strong>for</strong> each value<br />

of HnmPi that we need to approximate:<br />

Sn = xH,k-, ($ - &).<br />

k21<br />

For example, H,z ~ I is multiplied by 1 /22 and then by -1 /32. (We have used<br />

the fact that H,,o-, = Ho = 0.)<br />

Now we’re ready to expand the harmonic numbers. Our experience with<br />

estimating (n - 1 )! has taught us that it will be easier to estimate H,,k than<br />

H,kP1, since the (n” - 1 )‘s will be messy; there<strong>for</strong>e we write<br />

HnkP, = Hnk -- $ = lnnk +y+ & + O(h) - -$<br />

Our sum now reduces to<br />

= klnn+y-&+0(A).<br />

S, = ~(klnn+y-~+o(~))($-~)<br />

kal<br />

= (1nn)tl +yE2 - t&(n) + O(t3(n2)). (9.53)<br />

There are four easy pieces left: El, X2, Es(n), and ,Xs(n’).<br />

Let’s do the ,Xx’s first, since ,X3(n2) is the 0 term; then we’ll see what<br />

sort of error we’re getting. (There’s no sense carrying out other calculations<br />

with perfect accuracy if they will be absorbed into a 0 anyway.) This sum is<br />

simply a power series,<br />

X3(x) = t (j$ - &)x-kt<br />

k21<br />

and the series converges when x 3 1 so we can truncate it at any desired point.<br />

If we stop t3(n2) at the term <strong>for</strong> k = 1, we get I13(n2) = O(nP2); hence (9.53)<br />

has an absolute error of O(ne2). (To decrease this absolute error, we could<br />

use a better approximation to Hnk; but O(nP2) is good enough <strong>for</strong> now.) If<br />

we truncate ,X3(n) at the term <strong>for</strong> k = 2, we get<br />

t3(n) = in-’ +O(nP2);<br />

this is all the accuracy we need.

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

Saved successfully!

Ooh no, something went wrong!