Recurrence relations describe sequences where each term depends on previous ones. They show up everywhere in discrete math, from counting problems to algorithm analysis. You're expected to recognize different types of recurrences, choose the right solving technique, and connect these structures to combinatorial interpretations like partitions, paths, and counting arguments.
Don't just memorize formulas. For each concept below, know what type of recurrence it represents, which solving method applies, and what combinatorial structures it counts. Exam questions often ask you to set up a recurrence from a word problem, solve it using an appropriate technique, or explain why a particular sequence satisfies a given relation.
Foundational Structures: Linear Recurrences
These are the core recurrences where each term is a linear combination of previous terms. Linearity means solutions can be added together to form new solutions (superposition), which is what makes the characteristic equation method work.
Linear Recurrence Relations
General form:an=c1an−1+c2an−2+…+ckan−k where the coefficients ci are constants
Order refers to how many previous terms are used. A second-order recurrence uses an−1 and an−2
Initial conditions must be specified for the first k terms to uniquely determine the sequence. Without them, you get a family of solutions, not a specific one
Homogeneous Recurrence Relations
A homogeneous recurrence has the form an=c1an−1+…+ckan−k with nothing extra added on the right side. The word "homogeneous" just means there's no standalone function of n tacked on.
Characteristic polynomial is your primary solving tool: find its roots to construct the general solution
General solution is a linear combination of terms based on those roots, adjusted for multiplicity if roots repeat (more on this below)
Non-Homogeneous Recurrence Relations
An additional function f(n) appears on the right: an=c1an−1+…+ckan−k+f(n).
Solution structure combines the homogeneous solution (solve as if f(n)=0) with a particular solution that accounts for f(n)
Method of undetermined coefficients works when f(n) is polynomial, exponential, or a combination. You guess a form for the particular solution, plug it in, and solve for the unknown constants. If your guess overlaps with a homogeneous solution, multiply by n until it no longer does
Compare: Homogeneous vs. Non-homogeneous: both use the characteristic equation for the "core" solution, but non-homogeneous requires an extra particular solution. If you see a recurrence with a constant or polynomial term added, immediately identify it as non-homogeneous and plan for both solution components.
Simple Patterns: Arithmetic and Geometric Sequences
These are special cases of first-order linear recurrences with clean closed forms. They're the building blocks you'll recognize inside more complex recurrences.
Arithmetic Sequences
Constant differenced between consecutive terms: an=an−1+d, with closed form an=a1+(n−1)d
Sum formula:Sn=2n(2a1+(n−1)d), which comes from pairing the first and last terms
The closed form is a linear function of n, so if you plot the sequence, you get a straight line
Geometric Sequences
Constant ratior between consecutive terms: an=r⋅an−1, with closed form an=a1rn−1
Sum formula:Sn=a11−r1−rn for r=1
Growth is exponential: the sequence grows if ∣r∣>1 and decays if ∣r∣<1
Compare: Arithmetic vs. Geometric: arithmetic adds a constant (linear growth), geometric multiplies by a constant (exponential growth). Recognizing these patterns helps you guess particular solutions for non-homogeneous cases. For instance, if f(n) is a constant, try an arithmetic-style guess; if f(n)=3n, try a geometric-style guess.
Solving Techniques: From Equations to Closed Forms
These methods transform recurrences into explicit formulas. Each technique has its sweet spot, and knowing when to apply which method is half the battle.
Characteristic Equation Method
This is the go-to method for constant-coefficient linear homogeneous recurrences.
Substitutean=rn into the recurrence and divide through by the lowest power of r. This gives you a polynomial equation in r (the characteristic equation).
Solve the characteristic polynomial for its roots.
Build the general solution based on root types:
Distinct real rootsr1,r2,…: solution is an=c1r1n+c2r2n+…
Repeated rootr with multiplicity m: contributes terms c1rn+c2nrn+c3n2rn+…+cmnm−1rn
Complex rootsα±βi: yield terms involving ∣modulus∣ncos(nθ) and ∣modulus∣nsin(nθ)
Apply initial conditions to solve for the constants ci
Generating Functions for Solving Recurrences
Power series encoding: define G(x)=∑n=0∞anxn, then use the recurrence to turn this into an algebraic equation in G(x)
Solve for G(x) as a closed-form expression (usually a rational function)
Extract coefficients via partial fractions or known series expansions to recover the sequence terms
This approach is powerful for recurrences where the characteristic method gets messy, especially convolution-type recurrences like the one for Catalan numbers.
Solving Recurrences Using Iteration
Unroll the recurrence step-by-step: substitute the expression for an−1, then for an−2, and so on
Spot the pattern that emerges, then write a conjectured closed form
Prove your conjecture by induction
This method is best for simple cases or for building intuition before applying a more formal technique. For example, unrolling T(n)=2T(n−1)+1 quickly reveals a geometric series.
Compare: Characteristic equation vs. Generating functions: characteristic equations work cleanly for constant-coefficient linear recurrences, while generating functions handle variable coefficients and convolution-type recurrences more flexibly. For exams, try the characteristic equation first; switch to generating functions if the structure doesn't fit.
Combinatorial Counting Sequences
These recurrences arise from counting problems and have deep combinatorial interpretations. Understanding why the recurrence holds is often more important than memorizing the formula.
Fibonacci Sequence
Recurrence:Fn=Fn−1+Fn−2 with F0=0, F1=1
Binet's formula:Fn=5ϕn−ψn where ϕ=21+5 and ψ=21−5, derived via the characteristic equation with roots ϕ and ψ
Combinatorial interpretation:Fn counts the number of ways to tile a 1×n board with 1×1 squares and 1×2 dominoes. The recurrence follows because the first piece is either a square (leaving n−1 spaces) or a domino (leaving n−2 spaces)
Catalan Numbers
Recurrence:Cn=∑i=0n−1CiCn−1−i with C0=1. This is a convolution-type recurrence, reflecting how a structure splits into two independent substructures
Closed form:Cn=n+11(n2n)
Counts many things: valid arrangements of n pairs of parentheses, full binary trees with n+1 leaves, triangulations of a convex (n+2)-gon, non-crossing partitions, and Dyck paths of length 2n. Know at least three of these
Binomial Coefficients Recurrence
Pascal's identity:(kn)=(k−1n−1)+(kn−1)
Combinatorial proof: to choose k items from n, pick a specific element. Either it's included (then choose k−1 from the remaining n−1) or it's excluded (choose all k from the remaining n−1)
Base cases:(0n)=(nn)=1 anchor the recursion
Stirling Numbers Recurrence
Stirling numbers of the second kindS(n,k) count the number of ways to partition a set of n elements into exactly k non-empty subsets.
Recurrence:S(n,k)=k⋅S(n−1,k)+S(n−1,k−1)
Why it works: consider element n. Either it joins one of the k existing subsets (k choices, applied to a partition of the first n−1 elements into k subsets) or it forms a new singleton subset (partition the first n−1 elements into k−1 subsets)
Base cases:S(0,0)=1, S(n,0)=0 for n>0, S(n,n)=1
Compare: Binomial coefficients vs. Stirling numbers: both satisfy additive recurrences reflecting "include or exclude" logic for a distinguished element. But binomial coefficients count subsets (order doesn't matter, elements are just in or out), while Stirling numbers count partitions into groups (unordered groupings where every element must go somewhere). Exam questions love asking you to derive these recurrences from first principles.
Algorithm Analysis: Divide-and-Conquer
These recurrences describe computational complexity and appear at the intersection of combinatorics and computer science. The structure of the recurrence reflects how an algorithm breaks a problem into subproblems.
Divide-and-Conquer Recurrences
Standard form:T(n)=aT(n/b)+f(n), meaning the algorithm splits the problem into a subproblems each of size n/b, with f(n) work to split and combine
Analysis goal: determine asymptotic growth. Is it O(n), O(nlogn), or O(n2)?
Master Theorem
The Master Theorem gives you a shortcut for recurrences of the form T(n)=aT(n/b)+f(n). The key quantity is nlogba, which represents the cost if all the work were done at the leaves of the recursion tree.
Case 1: If f(n)=O(nlogba−ϵ) for some ϵ>0, the leaf work dominates: T(n)=Θ(nlogba)
Case 2: If f(n)=Θ(nlogba), work is evenly spread across levels: T(n)=Θ(nlogbalogn)
Case 3: If f(n)=Ω(nlogba+ϵ) for some ϵ>0 (and a regularity condition holds), the top-level work dominates: T(n)=Θ(f(n))
For merge sort, a=2, b=2, so nlog22=n. Since f(n)=O(n), this is Case 2, giving T(n)=Θ(nlogn).
Tower of Hanoi Recurrence
Recurrence:T(n)=2T(n−1)+1 with T(1)=1. The logic: move n−1 disks off the largest, move the largest, then move n−1 disks back on top
Closed form:T(n)=2n−1, which you can derive by iteration (unrolling reveals a geometric series 1+2+4+…+2n−1) or by the characteristic equation method
This is a classic example of a subtractive recurrence (T(n−1), not T(n/b)) with an exponential solution
Compare: Tower of Hanoi vs. typical divide-and-conquer: Tower of Hanoi has T(n−1) (subtractive), while divide-and-conquer has T(n/b) (divisive). This difference is why the Tower of Hanoi grows exponentially while divide-and-conquer recurrences typically grow polynomially (or nlogn). If you see subtraction in the argument, expect exponential growth. The Master Theorem does not apply to subtractive recurrences.
Quick Reference Table
Concept
Best Examples
Second-order linear recurrence
Fibonacci sequence, Tower of Hanoi
Characteristic equation solving
Fibonacci (distinct roots), any constant-coefficient linear
Both the Fibonacci sequence and the Tower of Hanoi satisfy second-order recurrences. What structural difference explains why Fibonacci grows roughly as ϕn/5 (where ϕ≈1.618) while the Tower of Hanoi grows as 2n? (Hint: look at the characteristic roots.)
Given the recurrence an=3an−1−2an−2+5, identify whether it's homogeneous or non-homogeneous, and outline which solving technique you'd apply first.
Compare and contrast Pascal's identity for binomial coefficients with the Stirling numbers recurrence. What combinatorial principle underlies both, and how do their interpretations differ?
If you need to find a closed form for Cn (Catalan numbers) starting from the recurrence, which solving method would you choose and why? What makes this recurrence harder than Fibonacci?
The Master Theorem applies to recurrences of the form T(n)=aT(n/b)+f(n). Explain why it cannot be directly applied to the Tower of Hanoi recurrence, and describe what alternative approach you'd use instead.