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.

282 SPECIAL NUMBERS<br />

Fk < n < Fk+l; then we have 0 6 n - Fk < Fk+l -- Fk = Fk~ 1. If n is a<br />

Fibonacci number, (6.113) holds with r = 1 and kl = k. Otherwise n - Fk<br />

has a Fibonacci representation FkL +. + Fk,-, by induction on n; and (6.113)<br />

holds if we set kl = k, because the inequalities FkL < n - Fk < Fk 1 imply<br />

that k > kz.) Conversely, any representation of the <strong>for</strong>m (6.113) implies that<br />

h, < n < h,+l ,<br />

because the largest possible value of FkJ + . . . + Fk, when k >> kz >> . . . >><br />

k, >> 0 is<br />

Fk~2$.Fk~4+...+FkmodZf2 = Fk~m, -1, if k 3 2. (6.114)<br />

(This <strong>for</strong>mula is easy to prove by induction on k; the left-hand side is zero<br />

when k is 2 or 3.) There<strong>for</strong>e k1 is the greedily chosen value described earlier,<br />

and the representation must. be unique.<br />

Any unique system of representation is a number system; there<strong>for</strong>e Zeckendorf’s<br />

theorem leads to the Fibonacci number system. We can represent<br />

any nonnegative integer n as a sequence of O’s and 1 ‘s, writing<br />

n = (b,b,-1 . ..bl)F w n = bkhc . (6.115)<br />

This number system is something like binary (radix 2) notation, except that<br />

there never are two adjacent 1's. For example, here are the numbers from 1<br />

to 20, expressed Fibonacci-wise:<br />

1 = (000001)~ 6 = (OOIOO1)F 11 = (010100)~ 16 = (lOOIOO)F<br />

2 = (000010)~ 7 = (001010)~ 12 = (010101)~ 17= (100101)~<br />

3 = (000100)~ 8 = (OIOOOO)F 13= (100000)~ 18 = (lOIOOO)F<br />

4 = (000101)~ 9 = (010001)~ 14= (100001)~ 19 = (101001)~<br />

5 = (001000)~ 10 = (010010)~ 15= (100010)~ 20 = (101010)~<br />

The Fibonacci representation of a million, shown a minute ago, can be contrasted<br />

with its binary representation 219 + 218 + 2” + 216 + 214 + 29 + 26:<br />

(1000000)10 = (10001010000000000010100000000)~<br />

k=2<br />

= (11110100001001000000)~.<br />

The Fibonacci representation needs a few more bits because adjacent l's are<br />

not permitted; but the two representations are analogous.<br />

To add 1 in the Fibonacci number system, there are two cases: If the<br />

“units digit” is 0, we change it to 1; that adds F2 = 1, since the units digit

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

Saved successfully!

Ooh no, something went wrong!