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

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Recurrence Relation
Click For Summary
SUMMARY

The discussion confirms the proof that $T(n)=4 T \left ( \frac{n}{2}\right )+n^2 \lg n$ is indeed $O(n^2 \lg^2 n)$. The method involves assuming $T(k) \leq c k^2 \lg^2 k$ for all $k PREREQUISITES

  • Understanding of recurrence relations in algorithm analysis
  • Familiarity with Big O notation and asymptotic analysis
  • Knowledge of logarithmic functions and their properties
  • Basic mathematical induction techniques
NEXT STEPS
  • Study the Master Theorem for solving recurrence relations
  • Learn about advanced asymptotic notations beyond Big O, such as Big Theta and Big Omega
  • Explore the implications of logarithmic growth in algorithm complexity
  • Investigate other methods of proving algorithmic bounds, such as the substitution method
USEFUL FOR

Computer scientists, algorithm analysts, and students studying algorithm complexity who seek to deepen their understanding of recurrence relations and their applications in performance analysis.

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)
 

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
4K
  • · Replies 1 ·
Replies
1
Views
2K