MHB Proving $T(n)=O(n^2 \lg^2 n)$ Using Recurrence Relation

Click For Summary
The discussion centers on proving that the recurrence relation $T(n) = 4 T(n/2) + n^2 \lg n$ is bounded by $O(n^2 \lg^2 n)$. The method involves assuming $T(k) \leq c k^2 \lg^2 k$ for all $k < n$ and deriving a condition for $c$. The calculations show that for the relation to hold, $c$ must be greater than or equal to 1/2. Participants confirm that the approach and calculations are correct, validating the proof strategy. The conversation concludes with affirmation of the method's correctness.
evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)

I want to prove that $T(n)=4 T \left ( \frac{n}{2}\right )+n^2 \lg n=O(n^2 \lg^2 n)$,where $T(n)$ is constant for $n \leq 8$, using the following method:

"We choose a specific function $f(n)$ and we try to show that for an appropriate $c>0$ and an appropriate $n_0 \in \mathbb{N}$, it stands that $T(n) \leq c f(n)$.
We suppose that $T(k) \leq c f(k), \forall k<n$ and we try to show that it stands for $n$."

That's what I have tried:

We suppose that :
$$T(k) \leq c k^2 \lg^2 k, \forall k<n$$

$$T(n)=4 T \left ( \frac{n}{2}\right )+n^2 \lg n \leq 4c \left ( \frac{n}{2}\right )^2 \lg^2 \left ( \frac{n}{2}\right )+n^2 \lg n=cn^2 (\lg n-1)^2+n^2 \lg n=cn^2(\lg^2 n-2 \lg n+1)+n^2 \lg n \Rightarrow c \geq \frac{-\lg n}{1-2 \lg n} \to \frac{1}{2}$$

So, the relation stands $\forall c \geq \frac{1}{2}$.

Is it right or have I done something wrong? (Thinking)
 
Last edited:
Physics news on Phys.org
evinda said:
Hello! (Wave)

I want to prove that $T(n)=4 T \left ( \frac{n}{2}\right )+n^2 \lg n=O(n^2 \lg^2 n)$,where $T(n)$ is constant for $n \leq 8$, using the following method:

"We choose a specific function $f(n)$ and we try to show that for an appropriate $c>0$ and an appropriate $n_0 \in \mathbb{N}$, it stands that $T(n) \leq c f(n)$.
We suppose that $T(k) \leq c f(k), \forall k<n$ and we try to show that it stands for $n$."

That's what I have tried:

We suppose that :
$$T(k) \leq c k^2 \lg^2 k, \forall k<n$$

$$T(n)=4 T \left ( \frac{n}{2}\right )+n^2 \lg n \leq 4c \left ( \frac{n}{2}\right )^2 \lg^2 \left ( \frac{n}{2}\right )+n^2 \lg n=cn^2 (\lg n-1)^2+n^2 \lg n=cn^2(\lg^2 n-2 \lg n+1)+n^2 \lg n \Rightarrow c \geq \frac{-\lg n}{1-2 \lg n} \to \frac{1}{2}$$

So, the relation stands $\forall c \geq \frac{1}{2}$.

Is it right or have I done something wrong? (Thinking)

Hi! (Smile)

It is right! (Nod)
 
I like Serena said:
Hi! (Smile)

It is right! (Nod)

Nice! Thank you! (Clapping)
 
If there are an infinite number of natural numbers, and an infinite number of fractions in between any two natural numbers, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and... then that must mean that there are not only infinite infinities, but an infinite number of those infinities. and an infinite number of those...

Similar threads

Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K