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.

A loerarchy?<br />

7<br />

that includes entries like this:<br />

9.1 A HIERARCHY 427<br />

1 -x log logn 4 logn + n’ + nc 4 nlogn 4 cn 4 nn 4 ccn<br />

(Here c and c are arbitrary constants with 0 < E < 1 < c.)<br />

All functions listed here, except 1, go to infinity as n goes to infinity.<br />

Thus when we try to place a new function in this hierarchy, we’re not trying<br />

to determine whether it becomes infinite but rather how fast.<br />

It helps to cultivate an expansive attitude when we’re doing asymptotic<br />

analysis: We should THINK BIG, when imagining a variable that approaches<br />

infinity. For example, the hierarchy says that logn + n”.ooo’; this might<br />

seem wrong if we limit our horizons to teeny-tiny numbers like one googol,<br />

n = 10’O”. For in that case, logn = 100, while no.ooo’ is only loo.” z 1.0233.<br />

But if we go up to a googolplex, n = 1 O”“‘, then logn = 10”’ pales in<br />

comparison with no.ooo’ = 10’Oq6.<br />

Even if e is extremely small (smaller than, say, l/lO'"'oo), the value<br />

of logn will be much smaller than the value of n’, if n is large enough. For<br />

if we set n = 10102k, where k is so large that e 3 10pk, we have logn = 10Zk<br />

but n’ 3 1 O'@. The ratio (logn)/n” there<strong>for</strong>e approaches zero as n + co.<br />

The hierarchy shown above deals with functions that go to infinity. Often,<br />

however, we’re interested in functions that go to zero, so it’s useful to have<br />

a similar hierarchy <strong>for</strong> those functions. We get one by taking reciprocals,<br />

because when f(n) and g(n) are never zero we have<br />

1 1<br />

f(n) 4 g(n) H - -<br />

g(n) + f(n) ’<br />

Thus, <strong>for</strong> example, the following functions (except 1) all go to zero:<br />

1<br />

-+&+- .-&-&+<br />

nlog n<br />

1 1<br />

-+log<br />

n log log n 4 1.<br />

(9.5)<br />

Let’s look at a few other functions to see where they fit in. The number<br />

rr(n) of primes less than or equal to n is known to be approximately n/inn.<br />

Since 1 /ne + 1 /Inn 4 1, multiplying by n tells us that<br />

n”’ + 7r(n) + n .<br />

We can in fact generalize (9.4) by noticing, <strong>for</strong> example, that<br />

na’ (logn)az(loglogn)a3 4 nB’(logn)PZ(loglogn)83<br />

w (xl,a2,a3) < (b1,62,p3). (9.6)<br />

Here ‘(LX’, 012,013) < (p’, (32, (33)’ means lexicographic order (dictionary order);<br />

in other words, either a’ < p’, or 0~’ = (3’ and CX~ < f12, or a’ = (3’<br />

and a2 = 62 and 0~3 -C 83.

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

Saved successfully!

Ooh no, something went wrong!