# Lecture 4: A Fast Algorithm to Compute Fibonacci Numbers

### Background Material

- Fibonacci Numbers
- Asymptotic Computing Time Analysis
- Matrix notation, eigenvalues, and eigenvectors
- Limits

### Reading

- Lecture 3 notes on Fibonacci numbers.
- Maple Help - LinearAlgebra package

### Topics

- Matrix interpretation of the Fibonacci recurrence.
- Alternative proof that the ratio of Fib_n/Fib_{n-1} approaches a limit.
- Binary powering algorithm (see power.mws)
- A fast algorithm to compute Fibonacci numbers
Use binary powering to compute F^n, where F = Matrix([[1,1],[0,1]]).

### Maple worksheets and documentation

- fib.mw - Maple worksheet investigating the Fibonacci
numbers. Also contains a recursive function to generate all configurations
of dominoes that fill a 2 X n rectangle.
- power.mw - Maple worksheet to compute powers.
Includes binary powering algorithm.

####

### Resources

Created: Oct. 20, 2005 by jjohnson@cs.drexel.edu