2081 9

Discrete Structures20815 marksNumerical: solving recurrence relationSolving Recurrence Relations

Solve the recurrence relation an = an-1 + 2an-2 with initial conditions a0 = 2 and a1 = 7.

Solve the recurrence relation $a_n = a_{n-1} + 2a_{n-2}$ with initial conditions $a_0 = 2$ and $a_1 = 7$. [5]

  • Recurrence: $an = a{n-1} + 2a{n-2}$ - Initial conditions: $a0 = 2$, $a1 = 7$ --- This is a linear homogeneous recurrence with constant coefficients. Assume $an = r^n$: $$r^n = r^{n-1} + 2r^{n-2}$$ Divide by $r^{n-2}$: $$r^2 = r + 2 \implies r^2 - r - 2 = 0$$ $$r^2 - r - 2 = (r-2)(r+1) = 0$$ $$r...
Up nextWhat is network flow? Give an example of saturated edge, unsaturated edge, and slack.