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.

116 NUMBER THEORY<br />

A fraction m/n is in lowest terms if and only if m I n. Since we<br />

reduce fractions to lowest terms by casting out the largest common factor of<br />

numerator and denominator, we suspect that, in general,<br />

mlgcd(m,n) 1 n/gcd(m, n) ; (4.27)<br />

and indeed this is true. It follows from a more general law, gcd(km, kn) =<br />

kgcd(m, n), proved in exercise 14.<br />

The I relation has a simple <strong>for</strong>mulation when we work with the primeexponent<br />

representations of numbers, because of the gcd rule (4.14):<br />

mln min(m,,n,) = 0 <strong>for</strong> allp. (4.28)<br />

Furthermore, since mP and nP are nonnegative, we can rewrite this as The dot product is<br />

zero, like orthogonal<br />

mln mPnP = 0 <strong>for</strong>allp. (4.2g) vectors.<br />

And now we can prove an important law by which we can split and combine<br />

two I relations with the same left-hand side:<br />

klm a n d kin k I mn. (4.30)<br />

In view of (4.2g), this law is another way of saying that k,,mp = 0 and<br />

kpnp = 0 if and only if kP (mp + np) = 0, when mp and np are nonnegative.<br />

There’s a beautiful way to construct the set of all nonnegative fractions<br />

m/n with m I n, called the Stem-Brocot tree because it was discovered Interesting how<br />

independently by Moris Stern [279], a German mathematician, and Achille<br />

Brocot [35], a French clockmaker. The idea is to start with the two fractions<br />

mathematicians<br />

will say “discovered”<br />

when abso-<br />

(y , i) and then to repeat the following operation as many times as desired:<br />

Insert m+m’<br />

n+ between two adjacent fractions z and $ .<br />

The new fraction (m+m’)/(n+n’) is called the mediant of m/n and m’/n’.<br />

For example, the first step gives us one new entry between f and A,<br />

and the next gives two more:<br />

0 11 21<br />

7, 23 7, 7, 5 *<br />

The next gives four more,<br />

0 1 1 2 1 3 2 3 1<br />

7, 3, 2, 3, 7, 2, 7, 7, 8;<br />

lute/y anyone e/se<br />

would have said

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

Saved successfully!

Ooh no, something went wrong!