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

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)
 
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Thread 'Detail of Diagonalization Lemma'
The following is more or less taken from page 6 of C. Smorynski's "Self-Reference and Modal Logic". (Springer, 1985) (I couldn't get raised brackets to indicate codification (Gödel numbering), so I use a box. The overline is assigning a name. The detail I would like clarification on is in the second step in the last line, where we have an m-overlined, and we substitute the expression for m. Are we saying that the name of a coded term is the same as the coded term? Thanks in advance.
Back
Top