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.

138 NUMBER THEORY<br />

(We must add 1 to O(n) because of the final fraction $.) The sum in (4.59)<br />

looks difficult, but we can determine m(x) indirectly by observing that<br />

(4.60)<br />

<strong>for</strong> all real x 3 0. Why does this identity hold? Well, it’s a bit awesome yet<br />

not really beyond our ken. There are 5 Lx]11 + x] basic fractions m/n with<br />

0 6 m < n < x, counting both reduced and unreduced fractions; that gives<br />

us the right-hand side. The number of such fractions with gcd(m,n) = d<br />

is @(x/d), because such fractions are m//n’ with 0 < m’ < n’ 6 x/d after<br />

replacing m by m’d and n by n’d. So the left-hand side counts the same<br />

fractions in a different way, and the identity must be true.<br />

Let’s look more closely at the situation, so that equations (4.59) and<br />

(4.60) become clearer. The definition of m(x) implies that m,(x) = @(lx]);<br />

but it turns out to be convenient to define m,(x) <strong>for</strong> arbitrary real values, not (This extension to<br />

just <strong>for</strong> integers. At integer values we have the table<br />

real values is a use-<br />

ful trick <strong>for</strong> many<br />

n 0 12 3 4 5 6 7 8 9 10 11 12<br />

recurrences that<br />

arise in the analysis<br />

v(n) -112 2 4 2 6 4 6 4 10 4 of algorithms.)<br />

o(n)<br />

0 1 2 4 6 10 12 18 22 28 32 42 46<br />

and we can check (4.60) when x = 12:<br />

@,(12) + D,(6) +@(4) f@(3) + O(2) + m,(2) +6.@,(l)<br />

= 46+12+6+4+2+2+6 = 78 = t.12.13.<br />

Amazing.<br />

Identity (4.60) can be regarded as an implicit recurrence <strong>for</strong> 0(x); <strong>for</strong><br />

example, we’ve just seen that we could have used it to calculate CD (12) from<br />

certain values of D(m) with m < 12. And we can solve such recurrences by<br />

using another beautiful property of the Mobius function:<br />

g(x) = x f(x/d)<br />

da1<br />

tr’ (4.61)<br />

This inversion law holds <strong>for</strong> all functions f such that tk,da, If(x/kd)I < 00;<br />

we can prove it as follows. Suppose g(x) = td3, f(x/d). Then<br />

t Ad)g(x/d) = x Ad) x f(x/kd)<br />

d>l d>l k>l<br />

= x f(x/m) x vL(d)[m=kdl<br />

lTt>l d,kal

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

Saved successfully!

Ooh no, something went wrong!