Substitution Method for Recurrences: Step-by-Step Proofs and Worked Examples
Substitution turns a recurrence guess into a valid induction proof by closing constants, base cases, and inequalities, including hypothesis repair and rounded inputs.
KnowledgeGate Team
Exam prep & CS education

Expanding a recurrence may suggest an answer, but the pattern remains a guess. Substitution turns that guess into an induction proof by choosing constants, checking base cases, and closing every inequality.
Substitution method: what the method proves
The substitution method is induction applied to a recurrence. Guess a bound, assume it for every smaller input the recurrence needs, substitute it, and prove the same bound for n. Plugging in n = 2, 4, 8 may suggest a formula, but it cannot prove the pattern continues.
Target | Claim to prove | Required result |
|---|---|---|
Upper bound |
|
|
Lower bound |
|
|
Tight bound | Both inequalities |
|
The constants and starting value n_0 belong to the proof. Expansions, a recursion tree, or the Master Theorem may suggest the guess, but none replaces inductive closure. If the notation feels uncertain, revise it with these Time Complexity MCQs.
Substitution method checklist: guess, hypothesise, close, check
Use the same five-step process each time:
State the base case and the domain, including any powers-of-two restriction.
Guess the asymptotic form that the recurrence appears to follow.
Write the induction hypothesis for the smaller arguments.
Substitute it and solve the resulting conditions on the constants.
Check the base case, then conclude only the upper, lower, or tight bound proved.
For T(n) = aT(n/b) + f(n), apply the hypothesis to n/b, not to n. A Theta claim needs both inequalities. A failed attempt may mean the hypothesis is too weak, not that the order is wrong. A correction such as cn - d or cn log n + dn can provide the missing slack.
Worked substitution proof: T(n) = 2T(n/2) + n
Let T(1) = 1 and T(n) = 2T(n/2) + n for powers of two. Expand actual values first:
T(2) = 2(1) + 2 = 4T(4) = 2(4) + 4 = 12T(8) = 2(12) + 8 = 32
These values suggest the exact formula T(n) = n log_2 n + n.
For the base case n = 1, the formula gives 1 log_2 1 + 1 = 1. Now assume
T(n/2) = (n/2)log_2(n/2) + n/2.
Since log_2(n/2) = log_2 n - 1, substitution gives
T(n) = 2[(n/2)(log_2 n - 1) + n/2] + n
= 2[(n/2)log_2 n] + n
= n log_2 n + n.
The induction closes exactly. At n = 8, the formula gives 8(3) + 8 = 32, matching the recurrence calculation. For n >= 2,
n log_2 n <= T(n) <= 2n log_2 n,
because n <= n log_2 n. The matching bounds prove T(n) = Theta(n log n).

Failed induction hypothesis: why T(n) <= cn needs repair
Now take T(1) = 1 and T(n) = 2T(n/2) + 1 for powers of two. The values T(2) = 3, T(4) = 7, and T(8) = 15 suggest linear growth.
Suppose the upper-bound hypothesis is only T(n/2) <= c(n/2). Substitution produces
T(n) <= 2[c(n/2)] + 1 = cn + 1.
That does not establish T(n) <= cn. The extra 1 defeats this hypothesis, not the Theta(n) answer.
Strengthen the claim to T(n) <= cn - d. Then
T(n) <= 2[c(n/2) - d] + 1 = cn - 2d + 1.
For this to be at most cn - d, the constants must satisfy d >= 1. Choose d = 1 and c = 2. The base case is T(1) = 1 <= 2(1) - 1, while the induction step closes at T(n) <= 2n - 1.
For the lower bound, assume T(n/2) >= n/2. Then T(n) >= n + 1 >= n, with equality at the base T(1) = 1. Thus T(n) = Theta(n). The exact check is T(8) = 15 = 2(8) - 1.

Floors, ceilings and inputs that are not powers of two
Powers of two keep every recursive input integral, but that assumption must be stated. For general integers, floors and ceilings affect the boundary depth and any exact formula.
For T(1) = 1 and T(n) = T(floor(n/2)) + 1 when n >= 2, trace
13 -> 6 -> 3 -> 1.
There are three recursive steps, so T(13) = 1 + 3 = 4. This matches floor(log_2 13) + 1 = 3 + 1 = 4.
For T(n) = T(ceil(n/2)) + 1, the trace is
13 -> 7 -> 4 -> 2 -> 1.
Now there are four steps, so T(13) = 1 + 4 = 5. This matches ceil(log_2 13) + 1 = 4 + 1 = 5.
State the integer domain and base condition before manipulating a rounded argument. For a Theta(log n) result, sandwiching the input between nearby powers of two is valid. Removing the rounding and claiming an exact answer is not.
Substitution method mistakes that lose marks
Mistake | Why the proof breaks | Repair |
|---|---|---|
Guessing without induction | A pattern is not a proof for every allowed | State and close an induction hypothesis. |
Applying the hypothesis to a non-smaller argument | Induction only supplies results already below | Identify each recursive argument explicitly. |
Dropping | The discarded term may stop the inequality closing. | Retain every term until the bound is established. |
Choosing constants without checking the base | A closing step can still fail at the starting input. | Verify the proposed |
Proving only | A tight bound also needs a matching lower bound. | Prove both directions separately. |
The inequality cn + 1 does not establish cn, whereas 2n - 1 closes. Here T(8) = 15, not 16. Also, log(n/2) = log n - 1 only for base 2.
Constants may be absorbed after proving an asymptotic bound. Recurrence terms cannot be discarded mid-proof merely because they look smaller.
How exams test the substitution method
Common questions ask you to select an inductive hypothesis that closes, find the wrong algebraic step in a proposed proof, or prove a bound for a recurrence containing floors or ceilings.
For a quick checkpoint, assume T(n/2) <= c(n/2) - d in 2T(n/2) + 1. Substitution gives cn - 2d + 1. Comparison with cn - d requires d >= 1. The base condition 1 <= c - d then requires c >= d + 1, so the smallest simple pair is d = 1, c = 2.
For operation counts, loop patterns, and recursion-tree analysis, work through Time Complexity Analysis of Algorithms. Substitution addresses a different step: closing the inductive claim, repairing a hypothesis that lacks slack, and handling rounded recurrence inputs. For timed recurrence and asymptotic-analysis practice, use the GATE Test Series.
Substitution method: the short version and next step
Keep this four-line sequence in memory:
Obtain a plausible form.
State the induction hypothesis precisely.
Substitute until the constant conditions are visible.
Check the base case and claim only the bound actually proved.
Without notes, reproduce both n = 8 results: 32 for 2T(n/2) + n, and 15 for 2T(n/2) + 1. If either result is unclear, return to its proof instead of memorising the final order.
Use GATE Guidance by Sanchit Sir for the full Algorithms learning sequence. Use the GATE CS Exam Preparation category to place Algorithms alongside the rest of the subject plan.
Keep learning
Substitution Method MCQs: 12 Solved GATE and ISRO Questions with Explanations
Work through 12 published GATE and ISRO PYQs on subtract-and-conquer, geometric growth, square-root recurrences, recursive code, and asymptotic matching.
Logical Sequence of Words: Step-by-Step Method, Shortcuts and Solved Examples
Learn to identify the relation and direction in word-sequencing questions, join forced pairs, and verify every link through four worked patterns.
Transportation Problem Optimality Test with the MODI Method: Step-by-Step Worked Example
Follow one balanced transportation problem from a north-west corner solution costing 80 through one MODI improvement loop to a unique optimum costing 50.
Data Sufficiency: A 5-Step Method, Shortcuts and Solved Examples
Learn to test each statement independently, prove insufficiency with two valid cases, and stop as soon as the target becomes unique. Three worked problems make the method concrete.





