-1

$T(x) = \log(x2x!)$

use the property of log, $\log(x2x!)$ is equivalent to $\log(2x) + \log(x!)$

My approach is to prove big-$O$ and big-$\Omega$ for $T(x)$,then big-$\Theta$ just follows.

If I want to calculate big-$O$ and big-$\Omega$ for $T(x)$, can I treat $\log(2x)$ as a constant and ignore it since it's growth rate is so slow compare to $\log(x!)$?

Ben Millwood
  • 14,211
user59036
  • 1,525

2 Answers2

1

You may simply write $$ \log(x!) = \log(x)+ \log(x-1)+ \cdots+ \log(1) < x\log(x). $$

Then, $$ \log(2x)+ \log(x!) < (x+2) \log(x), $$

which is $O(x \log(x))$ as $x \to \infty$.

Berkheimer
  • 2,086
  • 17
  • 31
0

This is where Stirling's Approximation comes in handy. The result is that $$ \log(2x \cdot x!) = \Theta\left(x \log x + \log 2 + \log x\right) = \Theta\left(x \log x\right) $$

Jon Claus
  • 2,760