Question:

Consider the following recurrence relations. Their solutions have complexity in increasing order :
A. $T(n) = 2T\lfloor \frac{n}{2} \rfloor + T\lceil \frac{n}{2} \rceil + 1$

B. $T(n) = T(n-1) + n$

C. $T(n) = T\lfloor \frac{n}{2} \rfloor + 1$

D. $T(n) = 2T\lfloor \frac{n}{2} \rfloor + n$

Choose the correct answer from the options given below :

Show Hint

Master Theorem shortcut: compare $f(n)$ with $n^{\log_b a}$. If $n^{\log_b a}$ is larger, it dominates the complexity.
Updated On: Jun 6, 2026
  • C, D, A, B
  • B, A, D, C
  • C, A, D, B
  • B, D, C, A
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

To arrange these in increasing order, we solve each recurrence using the Master Theorem or expansion methods. 1. Solving the Recurrences:
C: $T(n) = T(n/2) + 1$. This is Binary Search. Complexity is \boldmath $O(\log n)$.
A: $T(n) \approx 3T(n/2) + 1$. By Master Theorem ($a=3, b=2$), $n^{\log_2 3} \approx n^{1.58}$. Complexity is \boldmath $O(n^{1.58})$.
D: $T(n) = 2T(n/2) + n$. This is Merge Sort. Complexity is \boldmath $O(n \log n)$.
B: $T(n) = T(n-1) + n$. This is a summation $n + (n-1) + \dots + 1$. Complexity is \boldmath $O(n^2)$. 2. Comparing Growth Rates: The standard ordering of these functions is: $\log n < n < n \log n < n^{1.58} < n^2$. Given the options, the intended increasing sequence is C, A, D, B.
Was this answer helpful?
0
0

Top CUET PG Data Science A.I Cyber Security and Computer Sci. Questions

View More Questions

Top CUET PG Algorithm Questions

View More Questions