๐ Linear Recurrences โ A Ground-Up Guide
A recurrence relation defines each term of a sequence using previous terms.
Itโs like a recipe: to get the next value, mix earlier ones in a fixed way.
Example:
$$ a_n = a_{n-1} + a_{n-2} $$This says: โTo get term $a_n$, add the two previous terms.โ
๐ง What Makes It Linear?
A recurrence is linear if:
- Each term appears to the first power
- Terms are not multiplied together
- No functions like $\log(a_{n-1})$ or $\sqrt{a_{n-2}}$
Example of linear:
$$ a_n = 2a_{n-1} - 3a_{n-2} $$Nonlinear (not allowed):
$$ a_n = a_{n-1}^2 + 1 $$๐ What Are Constant Coefficients?
The recurrence has constant coefficients if the numbers multiplying each term donโt change with $n$.
Example:
$$ a_n = 5a_{n-1} - 6a_{n-2} $$Here, 5 and โ6 are constants.
โ Why This Class Is Special
If a recurrence is:
- Linear
- Homogeneous (no extra terms like $+f(n)$)
- Has constant coefficients
Then we can always solve it using a method called the characteristic equation.
๐ The Characteristic Equation Method
- Assume a solution of the form $a_n = r^n$
- Substitute into the recurrence
- Simplify to get a polynomial in $r$
- Solve for the roots $r_1, r_2, \dots$
- Build the general solution using those roots
- Apply initial conditions to find constants
๐งฎ Example
Recurrence:
$$ a_n - 3a_{n-1} + 2a_{n-2} = 0 $$Step 1: Assume $a_n = r^n$
Step 2: Plug in:
$$ r^n - 3r^{n-1} + 2r^{n-2} = 0 $$Divide by $r^{n-2}$:
$$ r^2 - 3r + 2 = 0 $$Solve:
$$ r = 1,\quad r = 2 $$General solution:
$$ a_n = C_1 \cdot 1^n + C_2 \cdot 2^n = C_1 + C_2 \cdot 2^n $$Use initial values to solve for $C_1$, $C_2$.
๐ Why Use $r^n$?
Because exponential sequences $r^n$ are eigenfunctions of the recurrence operator.
They preserve their form under the recurrenceโjust like special vectors that donโt rotate under a matrix.
๐ง Summary
| Concept | Meaning |
|---|---|
| Linear | Terms appear to the first power |
| Constant Coefficients | Multipliers donโt change with $n$ |
| Homogeneous | No extra $f(n)$ on the right-hand side |
| Characteristic Equation | Polynomial whose roots build the solution |
| Exponential Basis | $r^n$ sequences span the solution space |