Question
Consider the following recurrence relation.
Which one of the following options is correct?
Official answer and solution
- Official answer
- C
- From
- Official GATE 2021 answer key
Solution
Apply the recursion tree method or the Akra-Bazzi method to determine the asymptotic complexity of the divide-and-conquer recurrence.
The given recurrence is for , with base case .
Let us examine the total non-recursive work performed at each level of the recursion tree:
- Level 0 (root):
- Level 1:
- Level 2:
- Level :
Because the branch sum factor , the work per level forms a strictly decreasing geometric series dominated by the root level:
Alternatively, applying the Akra-Bazzi theorem, is the solution to . Since , . Because grows strictly faster than , .
Hence, , matching option C.
C
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2021 Computer Science and Information Technology (CS, Set-1)
- Question
- 40 of 65, printed as CS Q.30
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.