info prev up next book cdrom email home

Fast Fibonacci Transform

For a general second-order recurrence equation

\begin{displaymath}
f_{n+1}=xf_n+yf_{n-1},
\end{displaymath} (1)

define a multiplication rule on ordered pairs by
\begin{displaymath}
(A,B)(C,D)=(AD+BC+xAC,BD+yAC).
\end{displaymath} (2)

The inverse is then given by
\begin{displaymath}
(A,B)^{-1}={(-A,xA+B)\over B^2+xAB-yA^2},
\end{displaymath} (3)

and we have the identity
\begin{displaymath}
(f_1,yf_0)(1,0)^n=(f_{n+1},yf_n)
\end{displaymath} (4)

(Beeler et al. 1972, Item 12).


References

Beeler, M.; Gosper, R. W.; and Schroeppel, R. HAKMEM. Cambridge, MA: MIT Artificial Intelligence Laboratory, Memo AIM-239, Feb. 1972.




© 1996-9 Eric W. Weisstein
1999-05-26