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โ=c1โanโ1โ+c2โanโ2โ+โฆ+ckโanโ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โ=c1โanโ1โ+โฆ+ckโanโ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โ=c1โanโ1โ+โฆ+ckโanโ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โ=a1โrnโ1
Sum formula:Snโ=a1โ1โ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โ=c1โr1nโ+c2โr2nโ+โฆ
Repeated rootr with multiplicity m: contributes terms c1โrn+c2โnrn+c3โn2rn+โฆ+cmโnmโ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โโanโxn, 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โ1โCiโCnโ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
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 nlogbโa, which represents the cost if all the work were done at the leaves of the recursion tree.
Case 1: If f(n)=O(nlogbโaโฯต) for some ฯต>0, the leaf work dominates: T(n)=ฮ(nlogbโa)
Case 2: If f(n)=ฮ(nlogbโa), work is evenly spread across levels: T(n)=ฮ(nlogbโalogn)
Case 3: If f(n)=ฮฉ(nlogbโa+ฯต) 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 nlog2โ2=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.