Q90.Marks: +2.0UGC NET Paper 2: Computer Science 2nd January 2026 Shift 1
Which of the following is correct solution of the given recurrence relation?
T(n) = 3T(n / 4) + n log(n)
1.\(\theta (n \log n)\)✓ Correct
2.\(\theta (n^2 \log n)\)
3.\(\theta (n (\log n)^2)\)
4.\(\theta (n \log \log n)\)
Solution
The correct answer is \(\theta (n \log n)\).
Key Points
The recurrence relation \(T(n) = 3T(n / 4) + n \log n\) can be solved using the Master Theorem.
In the recurrence relation, \(a = 3\), \(b = 4\), and \(f(n) = n \log n\).
Master Theorem states that for \(T(n) = aT(n / b) + f(n)\), the solution depends on the comparison between \(\log_b a\) and the growth rate of \(f(n)\).
Here, \(\log_b a = \log_4 3\), and \(f(n) = n \log n\) has a growth rate of \(n^{1 + \epsilon}\), where \(\epsilon = 0\).
Since \(f(n)\) dominates \(\log_4 3\), the solution is \(\theta (n \log n)\).
Step-by-Step Solution / Explanation
Step 1: Identify \(a\), \(b\), and \(f(n)\) in the recurrence relation \(T(n) = 3T(n / 4) + n \log n\).
Here, \(a = 3\), \(b = 4\), and \(f(n) = n \log n\).
Step 2: Compute \(\log_b a\), where \(b = 4\) and \(a = 3\).
\(\log_4 3 = \frac{\log 3}{\log 4}\).
Using approximation, \(\log 3 \approx 0.477\) and \(\log 4 \approx 0.602\).
\(\log_4 3 = \frac{0.477}{0.602} \approx 0.793.\)
Step 3: Compare \(\log_b a\) and the growth rate of \(f(n)\).
\(f(n) = n \log n\) has a growth rate of \(n^{1 + \epsilon}\), where \(\epsilon = 0\).
\(\log_4 3 \approx 0.793\), which is less than \(1\), indicating that \(f(n)\) dominates.
Step 4: Apply Master Theorem.
Since \(f(n)\) dominates \(\log_b a\), the solution to the recurrence relation is determined by \(f(n)\).
Thus, \(T(n) = \theta (n \log n)\).
Additional Information
Master Theorem Conditions:
The recurrence relation must be of the form \(T(n) = aT(n / b) + f(n)\).
\(a\) and \(b\) must be constants, and \(f(n)\) should be asymptotically positive.
Cases of Master Theorem:
If \(\log_b a < \text{growth rate of } f(n)\), solution depends on \(f(n)\).
If \(\log_b a = \text{growth rate of } f(n)\), solution includes logarithmic factors.
If \(\log_b a > \text{growth rate of } f(n)\), solution depends on \(\log_b a\).
Applications:
Master Theorem is widely used to solve divide-and-conquer algorithms such as quicksort, mergesort, and binary search.