Recurrence relations describe sequences where each term depends on earlier terms, and they are central in discrete math, algorithms, and computer science. This cheat sheet helps students recognize common recurrence types and solve them efficiently. It is especially useful for analyzing recursive algorithms and proving growth rates.
The focus is on linear recurrences, characteristic equations, and divide-and-conquer running times.
For linear homogeneous recurrences, the main idea is to turn the recurrence into a characteristic equation and use its roots to build the general solution. Repeated roots add extra powers of , while nonhomogeneous terms require a particular solution. For algorithm analysis, the Master Theorem solves many recurrences of the form .
Comparing with determines the asymptotic growth.
Key Facts
- A linear homogeneous recurrence with constant coefficients has the form .
- The characteristic equation for is .
- If the characteristic equation has distinct roots , then .
- If a root has multiplicity , its contribution is .
- A nonhomogeneous recurrence has solution .
- The Master Theorem applies to recurrences of the form , where and .
- In the Master Theorem, the critical comparison function is .
- If with , then .
Vocabulary
- Recurrence Relation
- An equation that defines each term of a sequence using one or more earlier terms.
- Initial Conditions
- The starting values, such as and , needed to determine a unique solution to a recurrence.
- Characteristic Equation
- A polynomial equation formed from a linear homogeneous recurrence whose roots determine the closed-form solution.
- Homogeneous Recurrence
- A recurrence in which every term involves the sequence itself and there is no extra forcing term such as .
- Particular Solution
- One specific solution to a nonhomogeneous recurrence that accounts for the added term .
- Master Theorem
- A theorem that gives asymptotic bounds for many divide-and-conquer recurrences of the form .
Common Mistakes to Avoid
- Forgetting the initial conditions makes the solution incomplete, because constants such as and cannot be determined without them.
- Using for a repeated root only once is wrong, because a root of multiplicity requires terms.
- Writing the characteristic equation with the wrong signs changes the roots, so should give .
- Applying the Master Theorem to a recurrence not in the form is invalid unless it is first transformed into that form.
- Comparing to or instead of gives the wrong Master Theorem case, because the critical growth rate is the total work across recursion levels.
Practice Questions
- 1 Solve the recurrence with and .
- 2 Find the general solution of .
- 3 Use the Master Theorem to find an asymptotic bound for .
- 4 Explain why the comparison between and represents the balance between work done at the root and work done across recursive subproblems.