Consider the following recurrence relation.
Which one of the following options is correct?
GATE CSE 2021Algorithms › Growth of Functions & Complexity AnalysisVerified
(C) T ( n ) = Θ ( n ) T(n)=\Theta (n) T ( n ) = Θ ( n )
Use the recursion-tree method. At every fully active level, the sum of subproblem sizes is multiplied by 1/2 + 2/5 = 9/10 < 1, so the non-recursive work 7n forms a decreasing geometric series. The root work dominates, giving Θ(n).
The recurrence has two recursive calls of sizes n/2 and 2n/5, whose fractions sum to 9/10 < 1. Therefore the work per level decreases geometrically, and the total work is dominated by the root level, giving T(n) = Θ(n).
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.