Memra

Problem set: recurrences & asymptotics

◈ 5 cards

Nine worked exam-style recurrences across all three methods, the master-theorem traps, and an empirical confirmation that T(n)=2T(n/2)+n is exactly n lg n + n.

The most-examined skill in the course

AU's exam nearly always asks you to solve a recurrence you have not seen and to prove or classify an asymptotic bound. This is a mechanical skill — drill it until you can do each of the nine below without hesitation.

Master-theorem classifications

Watershed ; compare to .

  1. . ; case 1.
  2. . ; case 2, .
  3. . ; , regularity holds () ⟶ case 3.
  4. . ; case 2, . (the trap: NOT n lg n)
  5. . ; case 2, . (binary search)
  6. (Strassen). ; case 1.

Recursion tree / substitution (master theorem doesn't apply)

  1. . Not a master recurrence (subtracts, not divides). Unroll: .
  2. ; . (subtract-one recurrences: linear vs exponential depending on the branching factor)
  3. . Unequal split — master theorem can't touch it. Every level sums to ; the longest path is levels ⟶ .

The substitution trap to never fall into

Proving by guessing : the step gives , which is not . The bound is simply false here (the true answer is ) — but students often 'rescue' it by writing , silently absorbing the into the . You may never fold the driving term into the hypothesis constant. The induction must reproduce the same exactly.

Empirical check

with has the exact closed form . So , which decreases toward 1 as grows — the lower-order term fading next to is exactly what predicts. The exercise below shows that ratio converging.

f vs WCaseExampleT(n)f poly below W14T(n/2)+nΘ(n²)f = Θ(W lg^k n)24T(n/2)+n²Θ(n² lg n)f poly above + reg34T(n/2)+n³Θ(n³)only a log apartgap2T(n/2)+n/lg nno caseCase 2 with k=1 — 2T(n/2)+n lg n — gives Θ(n lg² n), not Θ(n lg n).
Compare f to the watershed W = n^(log_b a); the comparison picks the case.
NORMAL ~/memra/learn/comp-372/recurrences-asymptotics-problem-set utf-8 LF