Xavier Holt edited begin_claim_The_algorithm_runs__.tex  about 8 years ago

Commit id: 21babfbe727302b41736d93ea13d8c252e16d4f1

deletions | additions      

       

\begin{align*}  R\left(n\right) &:= O\left(n\right) + 2R\left(\frac{n}{2}\right)+ O\left(\log n\right)\\  &= iO\left(n\right) + 2^iR\left(\frac{n}{2^i}\right) + \sum_{j=0}^{i-1} 2^j O\left(\log \frac{n}{2^i}\right) \frac{n}{2^j}\right)  \end{align*}  When our point set contains one point, it's clear that $R\left(1\right)$ requires a constant amount of work. This occurs when $\frac{n}{2^i}=1$ or equivalently $i=\log_2 n$. We substitute this value into our equation above.  \begin{align*}  R(n)&= \log_2 nO\left(n\right) + 2^{\log_2 n}R\left(1\right) + \sum_{j=0}^{\log_2 n-1} 2^j O\left(\log \frac{n}{2^i}\right) \frac{n}{2^j}\right)  \\ &= O\left(n\log n\right) + n^{\log_2 2}O\left(1\right) + \sum_{j=0}^{\log_2 n-1} 2^j O\left(\log n - \log{2^j}\right)\\   &= O\left(n\log n\right) + O\left(n\right) + \left(O\left(\log n\right)\sum_{j=0}^{\log_2 n-1} 2^j - \sum_{j=0}^{\log_2 n-1} O\left(2^j\log{2^j} \right)\right)\\   &=O\left(n\log n\right) + O\left(n\right) + \left(O\left(\log n\right) 2^{\log_2 n} - C\right) \tag{with $C\geq0$}\\