0

I am an undergraduate student in Computer Engineering 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 in n in a neighborhood of infinity. How exactly would I proceed with this?

pingOfDoom
  • 111
  • 1

1 Answers1

1

$$5\log_2(2n)+7=5\log_2 n+5\log_2 2+7=5\log_2 n +12$$ Since for example $12\le 12\log_2 n$ for $n\ge 2$, it follows that $$5\log_2 n +12\le 5\log_2 n +12\log_2 n=17\log_2 n $$ for $n\ge 2$. This yields $O(\log n) $.

Danny
  • 994
  • 4
  • 10