Introduction
A recurrence relation defines each term of a sequence from earlier terms: , . Recurrences arise whenever a problem of size is reduced to smaller instances of itself: counting strings by their last symbol, counting moves in the Tower of Hanoi, or measuring the running time of a recursive algorithm.
The topics are modelling with recurrences and solving linear recurrences with constant coefficients exactly. Divide-and-conquer recurrences and the master theorem, which give asymptotic answers, are treated in Recurrences and the Master Theorem; Generating Functions give a second method for the recurrences here.
Prerequisites
- Counting: sum and product rules, binomial coefficients.
- Solving quadratic equations; geometric series for .
Core concepts
Terminology
- A recurrence of order expresses using . It determines the sequence uniquely once initial conditions (for example ) are given.
- Linear with constant coefficients: , with constants and .
- Homogeneous if ; otherwise non-homogeneous, and is the forcing term.
- A closed form gives directly as a function of .
Modelling: three standard recurrences
- Tower of Hanoi. To move discs, move discs aside, move the largest, then move the discs back on top: , . Closed form .
- Binary strings of length with no two consecutive 0s. A valid string ends in 1 (preceded by any valid string of length ) or in 10 (preceded by any valid string of length ): , , . So , with Fibonacci numbers .
- Regions formed by lines in general position (no two parallel, no three concurrent). The -th line crosses the other lines at distinct points and is cut into pieces, each splitting a region: , , so .
Method 1: unrolling (iteration)
For first-order recurrences, substitute repeatedly and sum.
and when . Similarly, gives .

Method 2: characteristic equation (homogeneous case)
For , try . Dividing by gives the characteristic equation
| Roots of the characteristic equation | General solution |
|---|---|
| Distinct roots | |
| Root of multiplicity | contributes |
| Simple conjugate pair (real coefficients) | ; multiplicity gives , with real polynomials of degree at most |
The constants (or ) are fixed by the initial conditions, which give linear equations.
Second-order summary. For with characteristic equation : distinct roots give ; a double root gives .
Fibonacci (Binet's formula). , , . Roots and :
Since , is the integer nearest to , so with .
Method 3: non-homogeneous recurrences
For :
where is the general solution of the homogeneous part and is any one particular solution. Apply the initial conditions after adding the two parts.
Trial forms for the particular solution, where is the multiplicity of as a characteristic root ( if is not a root):
| Forcing term | Try |
|---|---|
| Constant | with |
| Polynomial of degree | with |
The factor handles resonance, when the forcing term already solves the homogeneous recurrence.
Worked examples
Example 1: distinct roots
Solve , , .
Characteristic equation , roots 2 and 3, so . Initial conditions: and , so , :
Check: and .
Example 2: repeated root
Solve , , .
, double root 2, so . ; , so :
Check: .
Example 3: non-homogeneous, no resonance
Solve , .
Homogeneous: . Particular: try : , so , . General: ; , :
Check: .
Example 4: resonance
Solve , .
2 is a root of with multiplicity 1, so try : , giving , so . General: ; :
Example 5: polynomial forcing
, . Unrolling: . Likewise gives , and gives .
Example 6: a three-term counting recurrence
Count the ternary strings (digits 0, 1, 2) of length that do not contain "00". Ending in 1 or 2: . Ending in 0: the previous symbol is 1 or 2, giving . So , , ; then , . Roots .
Important properties and observations
- The solution space of a homogeneous linear recurrence of order is a vector space of dimension ; initial values pin down one solution.
- For a homogeneous linear recurrence with constant coefficients, if one root has strictly the largest modulus (every other root is smaller in modulus), has multiplicity , and the coefficient of is nonzero, then ; for a simple root this is . Example 2 gives . For a non-homogeneous recurrence, compare with the particular solution, which can dominate: Example 4 is although its only root 2 is simple, and Example 5 is although its only root 1 is simple. Example 1 has like , so the bound is stated for . With two roots of equal modulus, such as , terms can cancel: solves with nonzero coefficients, but for every odd , so it is not . Non-real roots of a real recurrence come in conjugate pairs of equal modulus, so a strictly dominant root is real. If the largest modulus belongs to a conjugate pair, the rule does not apply and the terms can oscillate: , , (roots ) gives 0, 1, 2, 2, 0, −4, −8, −8, 0.
- Linear recurrences with constant coefficients solve exactly. Divide-and-conquer recurrences such as are usually solved asymptotically (master theorem, recursion tree); substituting turns them into constant-coefficient recurrences in .
- Always verify a closed form against two or three terms computed directly from the recurrence.
GATE examination perspective
- Solve or evaluate. Find or a specific term; the characteristic equation is the standard route. Watch repeated roots.
- Modelling questions. Count strings or tilings by conditioning on the last symbol or block. Get the initial conditions right; check them carefully.
- Particular solutions. Use the trial table, multiplying by under resonance.
- Asymptotics. Assume and a nonnegative fixed base cost: is linear, is quadratic, is exponential.
- Trap: applying initial conditions to the homogeneous part before adding the particular solution.
Summary
Sources
- K. H. Rosen, Discrete Mathematics and Its Applications, 7th ed., McGraw-Hill, 2012: Sections 8.1 (Applications of Recurrence Relations), 8.2 (Solving Linear Recurrence Relations) and 8.3 (Divide-and-Conquer Algorithms and Recurrence Relations).