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.

446 ASYMPTOTICS<br />

Problem 5: An infinite sum.<br />

We turn now to an asymptotic question posed by Solomon Golomb [122]:<br />

What is the approximate value of<br />

s,,=x ’<br />

k>, kNn(k)’ ’<br />

(9.51)<br />

where N,(k) is the number of digits required to write k in radix n notation?<br />

First let’s try again <strong>for</strong> a ballpark estimate. The number of digits, N,(k),<br />

is approximately log, k = log k/log n; so the terms of this sum are roughly<br />

(logn)‘/k(log k)‘. Summing on k gives z (logn)’ J& l/k(log k)‘, and this<br />

sum converges to a constant value because it can be compared to the integral<br />

O” dx 1 O” 1<br />

~ =<br />

.I 2 x(lnx)2 l n x , =ln2’<br />

There<strong>for</strong>e we expect S, to be about C(logn)‘, <strong>for</strong> some constant C.<br />

Hand-wavy analyses like this are useful <strong>for</strong> orientation, but we need better<br />

estimates to solve the problem. One idea is to express N,,(k) exactly:<br />

N,(k) = Llog,kJ + 1 . (9.52)<br />

Thus, <strong>for</strong> example, k has three radix n digits when n2 6 k < n3, and this<br />

happens precisely when Llog, kj = 2. It follows that N,,(k) > log, k, hence<br />

S, = tkal l/kN,(k)’ < 1 + (logn)’ &2 l/Wgk)‘.<br />

Proceeding as in Problem 1, we can try to write N,(k) = log,, k + 0( 1)<br />

and substitute this into the <strong>for</strong>mula <strong>for</strong> S,. The term represented here by 0 (1)<br />

is always between 0 and 1, and it is about i on the average, so it seems rather<br />

well-behaved. But still, this isn’t a good enough approximation to tell us<br />

about S,; it gives us zero significant figures (that is, high relative error) when<br />

k is small, and these are the terms that contribute the most to the sum. We<br />

need a different idea.<br />

The key (as in Problem 4) is to use our manipulative skills to put the<br />

sum into a more tractable <strong>for</strong>m, be<strong>for</strong>e we resort to asymptotic estimates. We<br />

can introduce a new variable of summation, m = N,(k):<br />

[n”-’ < k < n”‘]<br />

= t km2<br />

k,mZl

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

Saved successfully!

Ooh no, something went wrong!