06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

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.

“mcs” — 2017/3/3 — 11:21 — page 568 — #576<br />

568<br />

Chapter 14<br />

Sums and Asymptotics<br />

Theorem 14.5.1 can be proved by induction (with some pain), and there are lots<br />

of proofs using elementary calculus, but we won’t go into them.<br />

There are several important things to notice about Stirling’s Formula. First, .n/<br />

is always positive. This means that<br />

nŠ > p n<br />

n<br />

2n<br />

(14.24)<br />

e<br />

<strong>for</strong> all n 2 N C .<br />

Second, .n/ tends to zero as n gets large. This means that<br />

nŠ p n<br />

n<br />

2n<br />

(14.25)<br />

e<br />

which is impressive. After all, who would expect both and e to show up in a<br />

closed-<strong>for</strong>m expression that is asymptotically equal to nŠ?<br />

Third, .n/ is small even <strong>for</strong> small values of n. This means that Stirling’s Formula<br />

provides good approximations <strong>for</strong> nŠ <strong>for</strong> most all values of n. For example, if<br />

we use<br />

p<br />

2n<br />

n<br />

e<br />

n<br />

as the approximation <strong>for</strong> nŠ, as many people do, we are guaranteed to be within a<br />

factor of<br />

e .n/ e 1<br />

12n<br />

of the correct value. For n 10, this means we will be within 1% of the correct<br />

value. For n 100, the error will be less than 0.1%.<br />

If we need an even closer approximation <strong>for</strong> nŠ, then we could use either<br />

p<br />

2n<br />

n<br />

e<br />

n<br />

e<br />

1=12n<br />

or<br />

p<br />

2n<br />

n<br />

e<br />

n<br />

e<br />

1=.12nC1/<br />

depending on whether we want an upper, or a lower, bound. By Theorem 14.5.1,<br />

we know that both bounds will be within a factor of<br />

e 1<br />

12n<br />

1<br />

1<br />

12nC1 D e 144n 2 C12n<br />

of the correct value. For n 10, this means that either bound will be within 0.01%<br />

of the correct value. For n 100, the error will be less than 0.0001%.<br />

For quick future reference, these facts are summarized in Corollary 14.5.2 and<br />

Table 14.1.

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

Saved successfully!

Ooh no, something went wrong!