Search campus ecosystem...Ctrl K
Allen Career Institute
GATE 2024 CS: Time complexity of recurrence T(n) = 2T(n/2) + n log n using Master Theorem Extended Case?
Asked Oct 23, 2026•Viewed 1,420 times•Solutions 2 verified+50 Bounty Coins
37
In standard Cormen (CLRS), the Master Theorem covers recurrences of the form:
$$T(n) = aT(n/b) + f(n)$$
Here we have:
* $a = 2$, $b = 2$
* $n^{\log_b a} = n^{\log_2 2} = n^1 = n$
* $f(n) = n \log n$
Since $f(n) = \Theta(n^{\log_b a} \cdot \log^k n)$ where $k = 1$:
Can we directly conclude $T(n) = \Theta(n \log^2 n)$ using the extended Master Theorem case? How does this differ from the Akra-Bazzi method?
#GATE-CS#Algorithms#Master-Theorem#Asymptotic-Analysis#PYQ
Aryan SharmaGOLD MASTER • 2845 Karma
2 Academic Solutions
Sorted by Peer & Faculty ScoreOfficially Endorsed by FacultyProf. Alok Verma (Ex-IIT Kanpur Senior Faculty • Allen HOD)
45
Accepted
### Definitive Proof via Extended Master Theorem & Recursion Tree
**Yes, the extended Master Theorem directly applies.**
When $f(n) = \Theta(n^{\log_b a} \log^k n)$ with $k \ge 0$:
$$T(n) = \Theta(n^{\log_b a} \log^{k+1} n)$$
#### Step-by-Step Derivation:
1. $a = 2, b = 2 \implies n^{\log_2 2} = n$.
2. Here $f(n) = n \log n = n^1 \log^1 n$, so $k = 1$.
3. Substituting into the formula:
$$T(n) = \Theta(n^1 \log^{1+1} n) = \mathbf{\Theta(n \log^2 n)}$$
#### Verification via Akra-Bazzi:
$$p = 1 \implies g(u) = u \log u$$
$$T(x) = \Theta\left(x^p \left( 1 + \int_1^x \frac{g(u)}{u^{p+1}} du \right)\right) = \Theta\left(x \left( 1 + \int_1^x \frac{u \log u}{u^2} du \right)\right)$$
$$\int_1^x \frac{\log u}{u} du = \frac{1}{2} \log^2 x$$
Hence $T(n) = \Theta(n \log^2 n)$. Perfect agreement!
Prof. Alok VermaFACULTY • 12450 Karma
16
Alternatively, using the recursion tree method:
* Level $i$ has $2^i$ subproblems, each of size $n/2^i$.
* Work at level $i$: $2^i \cdot \left(\frac{n}{2^i} \log\frac{n}{2^i}\right) = n \log(n/2^i) = n(\log n - i)$.
* Summing from $i=0$ to $\log n$:
$$\sum_{i=0}^{\log n} n(\log n - i) = n \log^2 n - n \frac{\log n(\log n + 1)}{2} = \frac{1}{2} n \log^2 n + O(n \log n)$$
Giving $\Theta(n \log^2 n)$.
Kartik IyerTA • 4180 Karma
Submit Your Academic Solution
Provide derivations, mathematical proofs, or clear code logic. Verified solutions earn +10 to +25 Karma points.
Discussion Metadata
Total Upvotes38
Total Downvotes1
Total Views1420
Faculty StatusEndorsed
Related Discussions
Recommended Masterclass
JEE Advanced & GATE Foundation Physics & Algorithms Cohort
Master complete theoretical derivations, recurrence trees, and rotational dynamics with live faculty doubt support.
Explore Course Syllabus
