Taking a class in discrete math and going through one of the textbook examples, I am asked to prove that
$T(n)$ is $O(\log{}n)$
Where $T(n)= 5\log_{2} (2n) +7$. I understand that this means that I must prove that $5\log_{2} 2n +7 \leq\lambda \log(n)$ for some $\lambda$, for $n$ in a neighborhood of infinity. How exactly would I proceed with this?
You can use some simple rules to work with
O
.First rewrite $T(n)$ as $5(1+\log n)+7=5\log n+12$. Then combine these rules:
Detailed computations:
$12<\log n$ for $n>2^{12}=4096$, hence $T(n)<6\log n$ for $n>4096$.