Zeckendorf's theorem

From testwiki
Jump to navigation Jump to search

Template:Short description

The first 89 natural numbers in Zeckendorf form. Each rectangle has a Fibonacci number Template:Math as width (blue number in the center) and Template:Math as height. The vertical bands have width 10.

Zeckendorf's theorem, named after amateur mathematician Edouard Zeckendorf, is a result about the representation of integers as sums of Fibonacci numbers. It states that every positive integer can be represented uniquely as the sum of one or more Template:Em Fibonacci numbers in such a way that the sum does not include any two consecutive Fibonacci numbers. More precisely, if Template:Mvar is any positive integer, there exist positive integers Template:Math, with Template:Math, such that

N=∑i=0kFci,

where Template:Mvar is the Template:Mvarth Fibonacci number. Such a sum is called the Zeckendorf representation of Template:Mvar. The Fibonacci coding of Template:Mvar can be derived from its Zeckendorf representation.

For example, the Zeckendorf representation of 64 is

Template:Math.

There are other ways of representing 64 as the sum of Fibonacci numbers

Template:Math
Template:Math
Template:Math
Template:Math

but these are not Zeckendorf representations because 34 and 21 are consecutive Fibonacci numbers, as are 5 and 3.

For any given positive integer, its Zeckendorf representation can be found by using a greedy algorithm, choosing the largest possible Fibonacci number at each stage. For instance, 11 = 8 + 3, whereas 13 = 13 (not 8 + 5), and 31 = 21 + 8 + 2.

Proof

Zeckendorf's theorem has two parts:

  1. Existence: every positive integer Template:Mvar has a Zeckendorf representation.
  2. Uniqueness: no positive integer Template:Mvar has two different Zeckendorf representations.


The existence part of Zeckendorf's theorem can be proven by induction. The base case n=1 has the Zeckendorf representation n=1=F2. Assuming that all k<n have a Zeckendorf representation let j be such that Fj<n<Fj+1. Then, n−Fj<n. Therefore, there exists a Zeckendorf representation for n−Fj. The assumption Fj<n<Fj+1 also implies that Fj−1=Fj+1−Fj>n−Fj. Therefore, the largest Fibonacci number in the Zeckendorf representation of n−Fj must be strictly less than Fj−1. This implies that the Zenckendorf representation of n−Fj together with Fj is a valid Zeckendorf representation for n.

To prove uniqueness, one can use the identity

∑i=0⌊n/2⌋−1Fn−2i=Fn+1−1

This can be proven by induction, or by a counting argument in which one realizes both sides of the identity are two ways of counting the number of ways of writing n using sums of 1 and at least one 2.

To get a contradiction, assume that there are integers ci, for i=0,1,…,r, and di, for i=0,1,…,s, such that c0,d0≥2, ci+1>ci+1, di+1>di+1, and

∑i=0rFci=∑i=0sFdi

The lengths r and s can be assumed to be the smallest possible.

If cr=ds, that is if the largest terms Fcr and Fds of the two Zeckendorf representations are equal, then they can be deleted from both representations and obtain two new Zeckendorf representations that are equal and have fewer number of summands. This contradicts that r,s were the smallest possible. Therefore, cr≠ds. By swapping the names c and d, if necessary, one can assume that cr>ds. However, the sum

∑i=0sFdi≤∑i=0⌊ds/2⌋−1Fds−2i=Fds+1−1≤Fcr−1<Fcr

Here the first inequality compares the sum with that of the Zeckendorf representation, which largest term is Fds, and uses the largest Fibonaci numbers allowed. That is, using every second Fibonacci number descending from Fds and stopping at F2 or F3. The equation is the identity above. This shows that, even if the sum ∑i=0sFds uses all the largest Fibonacci numbers allowed, its sum is still strictly less than the largest term Fcr in the sum ∑i=0rFci. Therefore, one cannot have two different Zeckendorf representations giving the same sum.

Fibonacci multiplication

One can define the following operation a∘b on natural numbers Template:Mvar, Template:Mvar: given the Zeckendorf representations a=∑i=0kFci(ci≥2) and b=∑j=0lFdj(dj≥2) we define the Fibonacci product a∘b=∑i=0k∑j=0lFci+dj.

For example, the Zeckendorf representation of 2 is F3, and the Zeckendorf representation of 4 is F4+F2 (F1 is disallowed from representations), so 2∘4=F3+4+F3+2=13+5=18.

(The product is not always in Zeckendorf form. For example, 4∘4=(F4+F2)∘(F4+F2)=F4+4+2F4+2+F2+2=21+2⋅8+3=40=F9+F5+F2.)

A simple rearrangement of sums shows that this is a commutative operation; however, Donald Knuth proved the surprising fact that this operation is also associative.[1]

Representation with negafibonacci numbers

The Fibonacci sequence can be extended to negative index Template:Mvar using the rearranged recurrence relation

Fn−2=Fn−Fn−1,

which yields the sequence of "negafibonacci" numbers satisfying

F−n=(−1)n+1Fn.

Any integer can be uniquely represented[2] as a sum of negafibonacci numbers in which no two consecutive negafibonacci numbers are used. For example:

Template:Math, for example, so the uniqueness of the representation does depend on the condition that no two consecutive negafibonacci numbers are used.

This gives a system of coding integers, similar to the representation of Zeckendorf's theorem. In the string representing the integer Template:Mvar, the Template:Mvarth digit is 1 if Template:Mvar appears in the sum that represents Template:Mvar; that digit is 0 otherwise. For example, 24 may be represented by the string 100101001, which has the digit 1 in places 9, 6, 4, and 1, because Template:Math. The integer Template:Mvar is represented by a string of odd length if and only if Template:Math.

See also

References

Template:Reflist

Template:PlanetMath attribution