[TOC]
This note summarizes linear recurrence relations with constant coefficients and the common methods used to solve them in discrete mathematics: the characteristic-equation method for homogeneous recurrences, techniques for nonhomogeneous recurrences (method of undetermined coefficients and annihilators), and generating functions. It also recalls the Master theorem for many divide-and-conquer recurrences and a few useful analytic facts.
- A linear homogeneous recurrence relation of degree k with constant coefficients has the form
$$a_n = c_1 a_{n-1} + c_2 a_{n-2} + \cdots + c_k a_{n-k},$$ where the coefficients$c_1,\dots,c_k$ are constants and$c_k\neq0$ . - A linear nonhomogeneous recurrence adds a forcing term
$F(n)$ :$$a_n = c_1 a_{n-1} + \cdots + c_k a_{n-k} + F(n).$$ - The ordinary generating function of a sequence $(a_n){n\ge0}$ is the formal power series $$G(x)=\sum{n=0}^{\infty} a_n x^n.$$
Form the characteristic polynomial
If a root
Example: the Fibonacci recurrence
If
Method of undetermined coefficients: when
Example: for
Generating functions turn recurrences into algebraic equations for
Example: Fibonacci generating function
For recurrences of the form
- If
$f(n)=O(n^{\alpha-\epsilon})$ for some$\epsilon>0$ , then$T(n)=\Theta(n^{\alpha})$ . - If
$f(n)=\Theta(n^{\alpha})$ , then$T(n)=\Theta(n^{\alpha}\log n)$ . - If
$f(n)=\Omega(n^{\alpha+\epsilon})$ for some$\epsilon>0$ and a regularity condition holds (e.g.,$af(n/b)\leq c f(n)$ for some$c<1$ ), then$T(n)=\Theta(f(n))$ .
The Master theorem is a practical tool for analyzing many divide-and-conquer algorithms (merge sort, some versions of quicksort, binary tree recurrences).
- Extended binomial coefficients: for real
$u$ and integer$k\ge0$ ,$$\binom{u}{k}=\frac{u(u-1)\cdots(u-k+1)}{k!},\qquad \binom{u}{0}=1.$$ The extended binomial series (valid for$|x|<1$ ) is$$(1+x)^u=\sum_{k=0}^\infty \binom{u}{k} x^k.$$ - Operations on generating functions: if
$F(x)=\sum a_n x^n$ and$H(x)=\sum b_n x^n$ , then$$F(x)+H(x)=\sum (a_n+b_n)x^n,\qquad F(x)H(x)=\sum\left(\sum_{j=0}^n a_j b_{n-j}\right)x^n.$$
- For methods such as annihilators, convolution, or combinatorial generating functions, see detailed treatments in Rosen and in standard algorithm analysis texts.
- Common pitfalls: always check multiplicities of characteristic roots when guessing particular solutions; use initial conditions to solve for constants.
[1] Kenneth H. Rosen. Discrete Mathematics and Its Applications. 8th Edition.