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 566 — #574<br />

566<br />

Chapter 14<br />

Sums and Asymptotics<br />

the leading term of H n is ln.n/. More precisely:<br />

Definition 14.4.2. For functions f; g W R ! R, we say f is asymptotically equal<br />

to g, in symbols,<br />

f .x/ g.x/<br />

iff<br />

lim f .x/=g.x/ D 1:<br />

x!1<br />

Although it is tempting to write H n ln.n/ C to indicate the two leading<br />

terms, this is not really right. According to Definition 14.4.2, H n ln.n/ C c<br />

where c is any constant. The correct way to indicate that is the second-largest<br />

term is H n ln.n/ .<br />

The reason that the notation is useful is that often we do not care about lower<br />

order terms. For example, if n D 100, then we can compute H.n/ to great precision<br />

using only the two leading terms:<br />

jH n ln.n/ j <br />

1<br />

ˇ200<br />

1<br />

120000 C 1<br />

120 100<br />

ˇˇˇˇ 4 < 1<br />

200 :<br />

We will spend a lot more time talking about asymptotic notation at the end of the<br />

chapter. But <strong>for</strong> now, let’s get back to using sums.<br />

14.5 Products<br />

We’ve covered several techniques <strong>for</strong> finding closed <strong>for</strong>ms <strong>for</strong> sums but no methods<br />

<strong>for</strong> dealing with products. Fortunately, we do not need to develop an entirely new<br />

set of tools when we encounter a product such as<br />

nŠ WWD<br />

nY<br />

i: (14.22)<br />

That’s because we can convert any product into a sum by taking a logarithm. For<br />

example, if<br />

nY<br />

P D f .i/;<br />

then<br />

ln.P / D<br />

iD1<br />

iD1<br />

nX<br />

ln.f .i//:<br />

iD1

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

Saved successfully!

Ooh no, something went wrong!