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\lceil \frac{n}{2} \rceil + 1 \)

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

Choose the correct answer from the options given below :

Show Hint

Compare the solutions: C is log n, D is n log n, A is about n^1.58, B is n^2.
Updated On: Oct 3, 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 A

Solution and Explanation

Step 1: Understanding the Question:

We have to arrange four recurrences in increasing order of the growth of their solutions.

Step 2: Detailed Explanation:


• C: \( T(n) = T(n/2) + 1 \) gives \( \Theta(\log n) \).

• D: \( T(n) = 2T(n/2) + n \) gives \( \Theta(n \log n) \) by the Master theorem.

• A: \( T(n) \approx 3T(n/2) + 1 \) gives \( \Theta(n^{\log_2 3}) \approx \Theta(n^{1.58}) \).

• B: \( T(n) = T(n-1) + n \) gives \( \Theta(n^2) \).

• Increasing order: \( \log n < n \log n < n^{1.58} < n^2 \), i.e. C, D, A, B.

Step 3: Final Answer:

The correct option is (A) C, D, A, 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