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.

We started with a<br />

t in the recurrence,<br />

and worked<br />

hard to get rid of it.<br />

But then after applying<br />

a summation<br />

factor, we came up<br />

with another t.<br />

Are sums good, or<br />

bad, or what?<br />

But your spelling is<br />

a/wrong.<br />

The solution, according to (2.10), is there<strong>for</strong>e<br />

C, = 2(n + 1) f 1.<br />

k=l k+l<br />

2.2 SUMS AND RECURRENCES 29<br />

The sum that remains is very similar to a quantity that arises frequently<br />

in applications. It arises so often, in fact, that we give it a special name and<br />

a special notation:<br />

H, = ,+;+...+; r f;.<br />

k=l<br />

(2.13)<br />

The letter H stands <strong>for</strong> “harmonic”; H, is a harmonic number, so called<br />

because the kth harmonic produced by a violin string is the fundamental<br />

tone produced by a string that is l/k times as long.<br />

We can complete our study of the quicksort recurrence (2.12) by putting<br />

C, into closed <strong>for</strong>m; this will be possible if we can express C, in terms of H,.<br />

The sum in our <strong>for</strong>mula <strong>for</strong> C, is<br />

We can relate this to H, without much difficulty by changing k to k - 1 and<br />

revising the boundary conditions:<br />

t 1<br />

= ( l

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

Saved successfully!

Ooh no, something went wrong!