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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

440 ASYMPTOTICS<br />

Notice how the 0 terms absorb one another until only one remains; this is<br />

typical, and it illustrates why O-notation is useful in the middle of a <strong>for</strong>mula.<br />

Problem 2: Perturbation of Stirling’s <strong>for</strong>mula.<br />

Stirling’s approximation <strong>for</strong> n! is undoubtedly the most famous asymptotic<br />

<strong>for</strong>mula of all. We will prove it later in this chapter; <strong>for</strong> now, let’s just<br />

try to get better acquainted with its properties. We can write one version of<br />

the approximation in the <strong>for</strong>m<br />

n ! = J&G 2<br />

()( e n l+~+~+o(n~3) > , as n-3 00, (9.40)<br />

<strong>for</strong> certain constants a and b. Since this holds <strong>for</strong> all large n, it must also be<br />

asymptotically true when n is replaced by n - 1:<br />

(n-l)! = dm(v)nP1<br />

x l+S+<br />

( & + O((n-1 lpi)) (9.41)<br />

We know, of course, that (n - l)! = n!/n; hence the right-hand side of this<br />

<strong>for</strong>mula must simplify to the right-hand side of (g.ao), divided by n.<br />

Let us there<strong>for</strong>e try to simplify (9.41). The first factor becomes tractable<br />

if we pull out the large part:<br />

J271(n-1) = &(l -np1)1’2<br />

= diik (1 - & - $ + O(nP3))<br />

Equation (9.35) has been used here.<br />

Similarly we have<br />

a<br />

- =<br />

n - l<br />

b<br />

(n - 1 )2<br />

t + 5 + O(nP3) ;<br />

= -$(l -n-le2 = $+O(np3);<br />

O((n- l)-") = O(np3(1 -n-1)-3) = O(nP3),<br />

The only thing in (9.41) that’s slightly tricky to deal with is the factor<br />

(n - l)nm ‘, which equals<br />

nl -1 n-l<br />

n (1-n 1<br />

= nn-l (1 -np')n(l + n-l + nP2 + O(nP3)) .

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

Saved successfully!

Ooh no, something went wrong!