Discrete Structure20825 marksNumerical: solving recurrence relationSolving recurrence relations with initial conditions
Solve the recurrence relation an = an-1 + an-2 with initial conditions a0 = 0 and a1 = 1.
Solve the recurrence relation $a_n = a_{n-1} + a_{n-2}$ with initial conditions $a_0 = 0$ and $a_1 = 1$. [5]
- Recurrence: $an = a{n-1} + a{n-2}$ - Initial conditions: $a0 = 0$, $a1 = 1$ --- This is a linear homogeneous recurrence with constant coefficients. Assume $an = r^n$: $$r^n = r^{n-1} + r^{n-2}$$ Divide by $r^{n-2}$: $$r^2 = r + 1 \implies r^2 - r - 1 = 0$$ --- $$r = \frac{1 \pm \sqrt{1 + 4}}{2}...