Asymptotic Analysis & Recurrences

Answer & solution
Official answer: A, B
Givens and goal
All base cases are T(1)=1. Which recurrences give Θ(n)? A T(n)=T(n−1)+1; B T(n)=2T(n/2)+1; C T(n)=2T(n/2)+n; D T(n)=T(n−1)+n. For halving recurrences use powers of two or conventional rounding.
Approach
Unroll decrement recurrences and sum levels in divide-and-conquer trees.
Step-by-step solution
1. A makes n−1 unit increments above its base: T(n)=1+(n−1)=n. It is Θ(n).
2. For B, n=2h gives a full binary recursion tree with n leaves. The leaves contribute n; its n−1 internal nodes each contribute 1. Thus T(n)=2n−1=Θ(n).
3. For C, level j has 2j subproblems of size n/2j, so its nonrecursive work is 2j(n/2j)=n. There are log₂n internal levels and n units at the leaves. Therefore T(n)=n log₂n+n=Θ(n log n).
4. D unrolls into 1+2+…+n=n(n+1)/2=Θ(n²). Unlike A, its added work grows with the current input size.
5. Only A and B are linear. Matching recursion shape alone is insufficient: B and C have the same branching but different work per node.