Solve linear recurrence relations with constant coefficients
| n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| an | 0 | 1 | 1 | 2 | 3 | 5 | 8 | 13 | 21 | 34 | 55 |
A recurrence relation is an equation that recursively defines a sequence, where the next term is a function of the previous terms.
Key concepts:
Common recurrence relations:
Fibonacci Sequence:
\( a_n = a_{n-1} + a_{n-2} \)
With \( a_0 = 0, a_1 = 1 \)
Solution: \( a_n = \frac{\phi^n - (-\phi)^{-n}}{\sqrt{5}} \)
Geometric Sequence:
\( a_n = r \cdot a_{n-1} \)
With \( a_0 = c \)
Solution: \( a_n = c \cdot r^n \)
Arithmetic Sequence:
\( a_n = a_{n-1} + d \)
With \( a_0 = a \)
Solution: \( a_n = a + n \cdot d \)
Tower of Hanoi:
\( a_n = 2a_{n-1} + 1 \)
With \( a_1 = 1 \)
Solution: \( a_n = 2^n - 1 \)
A recurrence relation is an equation that defines a sequence where each term is defined as a function of the preceding terms. The relation must include initial conditions to have a unique solution.
For example, the Fibonacci sequence is defined by:
\( a_n = a_{n-1} + a_{n-2} \) with \( a_0 = 0, a_1 = 1 \)
Recurrence relations are used in:
Homogeneous recurrence relations have the form:
\( a_n = c_1 a_{n-1} + c_2 a_{n-2} + \cdots + c_k a_{n-k} \)
where the right-hand side depends only on previous terms of the sequence.
Nonhomogeneous recurrence relations have an additional term:
\( a_n = c_1 a_{n-1} + c_2 a_{n-2} + \cdots + c_k a_{n-k} + f(n) \)
where \( f(n) \) is a function of n that is not identically zero.
Solving nonhomogeneous relations involves:
To solve a linear homogeneous recurrence relation with constant coefficients:
For \( a_n = c_1 a_{n-1} + c_2 a_{n-2} + \cdots + c_k a_{n-k} \)
The characteristic equation is: \( r^k - c_1 r^{k-1} - c_2 r^{k-2} - \cdots - c_k = 0 \)
Solve for r in the characteristic equation
If roots are distinct: \( a_n = A_1 r_1^n + A_2 r_2^n + \cdots + A_k r_k^n \)
If a root r has multiplicity m: \( (A_1 + A_2 n + \cdots + A_m n^{m-1}) r^n \)
Use the initial conditions to solve for the constants \( A_1, A_2, \ldots, A_k \)
Recurrence relations have numerous applications: