3.1.7 · D5Complexity Analysis

Question bank — Master theorem — solving recurrences T(n) = aT(n - b) + f(n)

1,578 words7 min readBack to topic

Remember the one ruler the whole theorem races on: compare against . " polynomially smaller (i.e. for some ) → leaves win", " equal → tie, add a ", " polynomially bigger → root wins". Every trap below is a way that ruler gets misread.


True or false — justify

Master Theorem applies to .
False. The two subproblems have different sizes ( and ), so there is no single pair. Use Recursion Trees or the Akra–Bazzi method instead.
depends on the input size .
False. and are fixed constants from the recurrence, so is a single number computed once — it never varies with .
If is bigger than , the answer is always .
False. "Bigger" must be polynomially bigger () and the regularity condition , , must hold. A mere factor bigger falls in the gap and is not Case 3.
In Case 2, the extra comes from the number of levels in the tree.
True. Every level costs about and there are levels, so total level-cost number of floors, giving an extra .
is Case 3 because is large.
False. Here , so , which equals . It is Case 2 with (no log rides on ): , not Case 3.
The number of leaves in the recursion tree is .
True. There are leaves, and the log identity rewrites this as the leaf cost .
Case 1 requires the regularity condition.
False. Only Case 3 (root wins) needs regularity (, ) to guarantee the geometric series converges to the root. Case 1's series is dominated by the leaves and converges automatically.
Master Theorem can handle that is sometimes negative.
False. The derivation sums level costs as positive work; must be positive asymptotically for the geometric-series comparison to make sense.
For , the answer is .
False. beats only by a factor, not polynomially, so it is not Case 3. Extended Case 2 with gives .
If two recurrences have the same and but different , they can land in different cases.
True. fix , but which case wins depends entirely on how compares to it, so different can give Case 1, 2, or 3.

Spot the error

", and since grows, root dominates → ."
Wrong: , so the leaf cost beats . This is Case 1: .
" is Case 1 because is tiny."
Wrong: , so , which equals . It is a tie → Case 2 → , not .
"For Case 3 I only need ; regularity is optional detail."
Wrong: without (), a badly oscillating can make the series not converge to the root, so the conclusion can fail.
"."
Wrong: it is — base (the shrink factor), argument (the branching count). Swapping them inverts the exponent and breaks every case.
" is a tie because both have degree 2 somewhere."
Wrong: , so leaf cost is , while . That is polynomially bigger, and regularity holds (), so it is Case 3: .
"Karatsuba gives , matching schoolbook multiplication."
Wrong: , and Case 1 gives — strictly faster than the schoolbook ; that speedup is the whole point of Karatsuba Multiplication.

Why questions

Why do we compare specifically to and not to or ?
Because is the exact total cost of the leaves; the whole recurrence is a race between leaf work and root work, so that is the meaningful yardstick.
Why does a "log gap" (like vs ) escape the basic theorem?
The three cases are built from a geometric series that needs a polynomial ratio to decide direction; a factor changes the ratio too slowly to force convergence either way, leaving a gap.
Why does Case 2 need (both and ) rather than just or ?
A tie means matches from both sides; being only or only would push it toward Case 1 or Case 3 instead.
Why do the leaves dominate in Case 1?
When shrinks faster going up the tree, the per-level costs form a series that increases toward the bottom, so the sum is controlled by the huge number of tiny leaf subproblems (see Geometric Series).
Why is the number of levels?
The size shrinks by factor each level and bottoms out at 1, so — that is how many times you can divide by before reaching 1.
Why does Case 3's answer drop the levels entirely?
When the root dominates, the level costs form a decreasing geometric series whose sum is a constant multiple of the first term , so the lower levels contribute only a constant factor, not a .
Why is the regularity condition automatically satisfied for polynomial ?
For , , and being in Case 3 forces , so works directly.

Edge cases

What happens when ?
Then and the leaf cost is ; you have a single shrinking chain (like Binary Search), so you compare against a constant.
What happens when or negative asymptotically?
The theorem does not apply — the derivation sums positive work per level, so a non-positive breaks the geometric-series argument entirely.
What if or is not a constant (e.g. depends on )?
Master Theorem is invalid; its whole structure assumes fixed branching and shrink factors, so you must fall back to Recursion Trees or Akra–Bazzi method.
What if ?
Also invalid — with the input never shrinks and with it grows, so there is no finite tree of depth ; the precondition is essential.
What if sits exactly on the boundary but with (i.e. with negative , like )?
The basic Case 2 does not cover it; this needs the finer extended results (or Akra–Bazzi), because the negative-power log changes how the series sums.
Is Case 3, given that is close to ?
Yes, Case 3 — , and any fixed positive gap () makes polynomially bigger; closeness to doesn't matter, only that the gap is positive and constant, so the root wins with .
Does Master Theorem tell you the constant factor hidden in ?
No — it only gives the asymptotic growth class; the leading constant depends on the exact costs and is outside what the theorem resolves.

Connections

  • Recursion Trees — the picture every "why" answer here points back to.
  • Akra–Bazzi method — the escape hatch for unequal subproblems and non-constant splits.
  • Big-O, Big-Omega, Big-Theta — the language every trap is phrased in.
  • Geometric Series — why "increasing / flat / decreasing" is the real classifier.
  • Merge Sort, Binary Search, Karatsuba Multiplication — the applications the traps quietly test.