comparing Asymptotic functions $ 3^{{2}^{n}}$ and $n! \times n^{3}$

131 Views Asked by At

$f(n)= 3^{{2}^{n}}$

$g(n)=n! \times n^{3}$

$\text{which is asymptotically greater} ?$


My Approach-:

$$f(n)=e^{\log 4^{{3}^{n}} }$$ $$g(n)=e^{\log n! \times n^{3}}$$

i am comparing just the power of the functions

i.e

$$\log 3^{{2}^{n}}$$ and $$\log n! \times n^{3}$$

$$f_1(n)=\log 3^{{2}^{n}}=2^{n} \log 3$$

$$f_2(n)=\log (n! \times n^{3})=\log (n!) +\log (n^{3}) =n \log n+3 \log n$$

Again we can express $f_1(n) $ and $f_2(n)$ as

$f_1(n)=e^{\log( 2^n \log 3)}$ and $f_2(n)=e^{\log( n \log n)}$

Again comparing the powers,

$f_{11}(n)=\log (2^n \log 3)=n + \log \log 3$

$f_{12}=\log( n \log n)=\log n + \log \log n $

here $f_{11}(n) >f_{12}(n) \Rightarrow f_{1}(n)>f_{12}(n) \Rightarrow f(n)>g(n) $

here $>$ means asymptotically greater

Am i correct?

1

There are 1 best solutions below

0
On

You can do it easily by applying $\log$ function to $f(n)$ and $g(n)$.

$$\log(f(n)) = 2^n\log(3), \log(g(n)) = log(n!) + 3\log(n)$$

As we know $\log(n!) = \Theta(n\log(n))$, we have: $$g(n) = \Theta(n\log(n)), f(n) = \Theta(2^n)$$

Hence, $f(n)$ is greater than $g(n)$.