Wednesday, October 22, 2008

Zeckendorf's theorem

Zeckendorf's theorem states that every positive integer can be represented in a unique way as the sum of one or more distinct Fibonacci numbers in such a way that the sum does not include any two consecutive Fibonacci numbers. More precisely, if N is any positive integer, there exist positive integers ci ≥ 2, with ci + 1 > ci + 1, such that

N = \sum_{i = 0}^k F_{c_i},

where Fn is the nth Fibonacci number. Such a sum is called the Zeckendorf representation of N.

For example, the Zeckendorf representation of 100 is

100 = 89 + 8 + 3

There are other ways of representing 100 as the sum of Fibonacci numbers - for example

100 = 89 + 8 + 2 + 1
100 = 55 + 34 + 8 + 3

but these are not Zeckendorf representations because 1 and 2 are consecutive Fibonacci numbers, as are 34 and 55.

For any given positive integer, a representation that satisfies the conditions of Zeckendorf's theorem can be found by using a greedy algorithm, choosing the largest possible Fibonacci number at each stage.


Proof of Zeckendorf's theorem

Zeckendorf's theorem has two parts:

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

The first part of Zeckendorf's theorem (existence) can be proved by induction. For n = 1, 2, 3 it is clearly true, for n = 4 we have 4 = 3 + 1. Now let each n \leq k have a Zeckendorf's representation. If k + 1 is a Fibonacci number then we're done, else there exists j such that Fj < k + 1 < Fj + 1. Now consider a = k + 1 − Fj. Since it is a < k, a has a Zeckendorf representation; moreover Fj + a < Fj + 1 then a < Fj − 1 so the Zeckendorf representation of a does not contain Fj − 1. Then k + 1 can be represented as a + Fj. Moreover, it is obvious that each Zeckendorf representation corresponds to only one integer.

The second part of Zeckendorf's theorem (uniqueness) requires the following lemma:

Lemma: The sum of any non-empty set of distinct, non-consecutive Fibonacci numbers whose largest member is Fj is strictly less than the next largest Fibonacci number Fj+1.

The lemma can be proved by induction on Fj.

Now take two non-empty sets of distinct non-consecutive Fibonacci numbers S and T which have the same sum. Eliminate common members to form two sets S' and T' with no members in common. We want to show that S' and T' are both empty i.e. that S=T.

First we show that at least one of S' and T' is empty. Assume the contrary i.e. that S' and T' are both non-empty. Let the largest member of S' be Fs and the largest member of T' be Ft. Without loss of generality, suppose Fs<Ft. Then by the lemma, the sum of S' is strictly less than Fs+1, and so is strictly less than Ft, whereas the sum of T' is clearly at least Ft. This means that S' and T' cannot have the same sum, and so S and T cannot have the same sum. So our assumption that S' and T' are both non-empty must be incorrect.

If S' is empty and T' is non-empty then S is a proper sub-set of T, and so S and T cannot have the same sum. Similarly we can eliminate the case where S' is non-empty and T' is empty. The only remaining case is that S' and T' are both empty, so S=T. We conclude that any two Zeckendorf representations that have the same sum must be identical (up to order).

[edit] Fibonacci multiplication

One can define the following operation a\circ b on natural numbers a, b: given the Zeckendorf representations a=\sum_{i=0}^kF_{c_i}\;(c_i\ge2) and b=\sum_{j=0}^lF_{d_j}\;(d_j\ge2) we define the Fibonacci product a\circ b=\sum_{i=0}^k\sum_{j=0}^lF_{c_i+d_j}.

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 \circ 4 = F_{3+4} + F_{3+2} = 13 + 5 = 18.

No comments: