Intuition
A recurrence like is subtract-and-conquer: the argument decreases by a fixed amount , not by a dividing factor. The Master Theorem (built for ) does not apply. Instead, unroll level by level. The recursion has depth , and each level multiplies the count of subproblems by , so the leaf count is .
Result / Method
For (constant ):
- If : (just adding at each of levels).
- If : , exponential. The geometric sum is dominated by its largest term.
General pattern: gives if ... but for the konkur case the answer is exponential, .
Worked example (Q68)
Given , . Unroll:
T(n) = 2T(n-1) + d
= 4T(n-2) + 2d + d
= 8T(n-3) + 4d + 2d + d
= ...
= 2^(n-1) T(1) + d * (2^(n-1) - 1)
= (c+d) * 2^(n-1) - d
The geometric sum . Since are constants, .
Pitfall: Do not confuse (argument decreases by 1 -> , exponential) with (argument halved -> by the Master Theorem). The minus sign versus division completely changes the growth rate.