Worked Example 1: Solving the Fibonacci Recurrence
Find a closed-form formula for the sequence defined by $a_0 = 0$, $a_1 = 1$, and $a_n = a_{n-1} + a_{n-2}$ for $n \ge 2$ using ordinary generating functions.
Multiplying the recurrence by $x^n$ and summing over all $n \ge 2$ transforms the recurrence into an algebraic equation for $A(x) = \sum_{n=0}^{\infty} a_n x^n$.
- 1Define the Generating Function: Let $A(x) = \sum_{n=0}^{\infty} a_n x^n = a_0 + a_1 x + a_2 x^2 + \dots = x + \sum_{n=2}^{\infty} a_n x^n$.
- 1Apply the Recurrence: Substitute $a_n = a_{n-1} + a_{n-2}$ into the sum:
- 1Solve for $A(x)$:
- 1Partial Fraction Decomposition: Factoring $1 - x - x^2 = (1 - \phi x)(1 - \hat{\phi} x)$ where $\phi = \frac{1+\sqrt{5}}{2}$ and $\hat{\phi} = \frac{1-\sqrt{5}}{2}$:
- 1Conclusion: Extracting the coefficient of $x^n$ yields Binet's formula: $a_n = \frac{1}{\sqrt{5}}\left(\left(\frac{1+\sqrt{5}}{2}\right)^n - \left(\frac{1-\sqrt{5}}{2}\right)^n\right)$.
.png)