previous up next
Previous: 3 Sequences of squared Up: Is the Fibonacci Sequence Next: 5 Using generating functions

Subsections


4 Complements

4.1 Fast computation of the Fibonacci numbers

It is well known that a straightforward implementation of the recurrence formula leads to a very bad algorithm, whose complexity is maths big integer operations. On the other hand, combining maths with a fast exponentiation algorithm leads to a complexity in maths big floating point operations. In the (genuine) Fibonacci case, the fact that maths leads to the even simpler result :

maths

We will see now that the former results can be used to obtain an algorithm whose complexity is maths big integer operations. The expansion Eq. 12 allows to consider only the (generalized) Fibonacci sequence. From Eq. 16, this specific sequence verifies :

maths (18)

leading to Algorithm 1, that describes a "divide and conquer" algorithm for computing a given Fibonacci number. Obviously, this algorithm must deal with pairs of consecutive Fibonacci numbers in order to be actually logarithmic [3].


maths

4.2 Another sight over the duplication formulae

Another way to derive these divide and conquer formulae can be obtain when prooving :

Proposition 5  

Let maths and maths be respectively any solution of Eq. 4 and the associated Fibonacci sequence. Then, for all indices, we have :

maths maths maths (19)
maths maths maths (20)

Proof. Translated in terms of generating function, we obtain the easily checked :
maths maths maths (21)
maths maths maths  

maths

em If we substitute maths in Proposition 5, both Eq. 19 and Eq. 20 turn into :

maths (22)

and lead again to Eq. 18 when taking maths and maths. In terms of generating function, this becomes :

maths (23)

Equating the coefficients of maths in this expression, this leads to :

maths (24)

Taking maths, we obtain what looks like a "linearization", but this doesn't contradicts the negative result stated in sub:Essentially-different-relations since the sum Eq. 24 doesn't involves a fixed number of terms. On the other hand, taking maths, then maths and substracting gives another proof of the well known Eq. 9.


4.3 The case maths

The special case maths has been escaped until here. Let us now describe how to deal with this special case. Concerning the generating finction, the substitution maths into Eq. 6 followed by a first order Taylor expansion in maths leads to  :

maths

One can test afterwards the correctness of the process by recognizing the geometric sequence maths... and the (generalized) Fibonacci sequence in the second term.

Applying the same method to the squared sequence, we obtain :

maths (25)

and similar results for maths and maths. The same happens with the even and odd series. For example : french

maths (26)

Therefore, maths, maths and maths, maths, maths have a different expression, in a different canonical basis, than in the maths case. But nevertheless, when expanding maths, maths in the maths, maths, maths basis the relation stated in thm:even-odd holds again. In fact, this theorem states that a sequence of polynomials in the maths are all vanishing, and this fact remains true by continuity when maths.


previous up next
Previous: 3 Sequences of squared Up: Is the Fibonacci Sequence Next: 5 Using generating functions


douillet@ensait.fr
2005-03-18