Meaning and conditions
Step-by-step reasoning
Level j contains a^j subproblems of size n/b^j. For f(n)=n^d their combined work is n^d(a/b^d)^j. With n=b^h, level h contains leaf work a^h; it fits the same summation because T(1)=1.[1][2]
Exact sum for the bounded model type.[1]
For q=a/b^d>1 the geometric sum grows toward the leaves; q=1 gives h+1 equal terms; q<1 leaves a bounded sum after factoring out n^d. This explains the three polynomial cases. In the general theorem, case 3 needs more than a size comparison: a regularity condition is also required.[1][2]
Equal work on four discrete levels
Equal work on four discrete levels
Free with a Quanta account. Your download stays ready after registration.
Two fully worked original examples
Balanced levels for mergesort
- Given
- T(n)=2 T(n/2)+n for n=2^h; T(1)=1. Calculate T(8).
- Find
- Distinguish asymptotic order from exact model count.
d=p is the balanced case.
Each internal level costs 8, as does the leaf level.
Sum four levels including leaf work.
Result: Exactly T(8)=32 under this counting convention; asymptotically Θ(n log n).
Check: Direct check: T(2)=4,T(4)=12,T(8)=2·12+8=32.
Quadratic overhead makes the root dominate
- Given
- T(n)=2 T(n/2)+n2,n=2^h,T(1)=1.
- Find
- Determine the case and exact value at n=8.
Each successive level costs half as much.
The last 8 is the leaf work of eight leaves.
The finite geometric sum gives the exact model value.
Result: T(8)=120; asymptotically Θ(n2), with no extra log n factor.
Check: T(2)=6,T(4)=28,T(8)=2·28+64=120. Also 120<2·64.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five exercises with solutions
Calculate · Application
Use a=4,b=2,d=0,h=3. Find n, level work and T(n).
Show hint
Subproblem count quadruples; local work is 1.
Learning goal: Recognize leaf dominance from concrete discrete costs.
Rearrange · Foundation
Starting at n=81 with division factor b=3, divide down to size 1. What is tree depth?
Show hint
Solve 81/3^h=1.
Learning goal: Distinguish depth from number of levels.
Interpret · Application
Why does T(n)=2 T(n/2)+n produce log n while T(n)=2 T(n/2)+n2 does not?
Show hint
Compare constant work per level with a decreasing geometric series.
Learning goal: Justify the extra logarithmic factor using the level sum.
Error analysis · Application
A solution approximates b=1 for T(n)=T(n−1)+n and applies the master theorem. Correct it.
Show hint
The theorem requires fixed b>1, not a decrement of one.
Learning goal: Check the theorem’s assumptions before choosing a case.
Transfer · Application
An algorithm solves three subproblems of size n/3 and uses n2 additional work. Write and classify its recurrence.
Show hint
Both branch count and shrink factor are 3.
Learning goal: Build a valid recurrence model from an algorithm description.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Model limits and next steps
Unequal subproblems, variable a or b, negative local costs and T(n−1) forms are outside this calculator. Rounding and other base cases need their own justification; an asymptotic formula does not predict seconds.[1][2]
Runtime recurrences define the model. Big O explains upper bounds; binary search supplies a simple halving special case.
Sources for this explanation
Quanta · Updated November 9, 2026
- MIT6.006 Spring2020 Recitation3 — PDFS.5–6: Master Theorem; polynomial special case; Exercises
- Oregon State: 1.9 Master Theorem and Common Recurrences — General Form; Work Per Level; Three Cases; Caveats; table
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Created a DE/EN author draft with a bounded model, original graphic, two examples and varied solved exercises.
Cite this reference page
Quanta. Master theorem for recurrences. Updated November 9, 2026. https://quanta-study.de/en/formula-sheet/master-theorem-rekurrenzen
When citing a specific scientific statement, also cite the specialist source linked to that statement.