Question
Which one of the following correctly determines the solution of the recurrence relation with ?
Official answer and solution
- Official answer
- A
- From
- Official GATE 2014 answer key
Solution
Apply the Master Theorem to solve T(n) = 2T(n/2) + log n.
Given recurrence:
with .
-
Identify Master Theorem Parameters ():
-
Compute Critical Exponent:
-
Compare with :
- .
- For any such that (for example, ):
- Thus, is polynomially smaller than .
-
By Case 1 of the Master Theorem:
This matches option A.
Final answer
A
Common trap
Confusing this recurrence with T(n) = 2T(n/2) + n, which yields Theta(n log n).
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2014 Computer Science and Information Technology (CS) Session 2
- Question
- 23 of 65, printed as CS Q.13
- 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.