We're asked to prove the above mentioned lemma but I having a hard time proving this rigorously.
We did prove that given $n$ values AVL's height is $\Theta\left (\log \left ( n \right ) \right )$ So I thought that after inserting a $\frac{n}{2}$ values the height of the tree will be at least $\Theta\left (\log \left ( \frac{n}{2} \right ) \right )$ which and because each isertion we make is now on a tree with at least $\frac{n}{2}$ and insertion is $\log \left (h \right ) $ where $h$ is the height of the tree.
So for a function $F$ using the previous logic:
$\begin{align} F &= \frac{n}{2} \times \log \left (h \right ) \\& \geq \frac{n}{2} \times \log \left (\frac{n}{2} \right ) \\&=\Omega\left( n\log \left (n \right ) \right) \end{align}$
But I have a few issues with this
- This does feel fishy to me don't know why but it doesn't feel like a good well defined calculus proof :)
- I'm not sure which way to take it in order to prove the upper boud i.e $\mathcal{O}$
If I haven't given all the required information I'd be glad to.