GATE CS 2024 Set 1 — Question 42
MCQ+2 / -0.67MediumSubstitution MethodAsymptotic AnalysisAlgorithmsRecursion Tree Method
Algorithms → Asymptotic Analysis → Recursion Tree Method
Last updated
Question
Consider the following recurrence relation:Which one of the following options is CORRECT?
A.
B.
C.
D.
Correct answer
(A) T(n) = Θ(n log log n)
Solution
The given recurrence relation is:To solve this, we can use the substitution method.
Let , which implies . Then .
Substituting these into the recurrence:Divide the entire equation by :Let . The recurrence becomes:This is a standard recurrence relation (similar to binary search complexity) whose solution is:Now, substitute back and :Thus, option (A) is correct.
Let , which implies . Then .
Substituting these into the recurrence:Divide the entire equation by :Let . The recurrence becomes:This is a standard recurrence relation (similar to binary search complexity) whose solution is:Now, substitute back and :Thus, option (A) is correct.
More questions on Asymptotic Analysis
2024 Set 1 Q17Given an integer array of size , we want to check if the array is sorted (in either ascending or…2024 Set 2 Q35Let be an array containing integer values. The distance of is defined as the minimum number…2024 Set 1 Q45Let be a directed graph and a depth first search (DFS) spanning tree in that is rooted…2024 Set 2 Q59The number of distinct minimum-weight spanning trees of the following graph is _________ [figure]
Practice GATE CS PYQs with adaptive difficulty
Timed practice, skill tracking, and AI explanations — free to start.
Start practicing free