Consider the following functions
$f(n) = 3n^{(n^{1/2})} $
$g(n) = 2^{(n^{1/2}) \log n }$ // here base of $\log n$ is 2
$h(n) = n !$
Which of the following is true?
$ h (n)$ is $O (f (n) ) $
$h (n)$ is $O (g (n)) $
$g (n)$ is not $O (f (n) ) $
$ f(n)$ is $O(g (n))$
I tried this way :
To check which function is large :
$3n^{(n^{1/2})}$ = taking log
$n^{1/2} \log 3n $
$g(n) = 2^{(n^{1/2}) \log n }$
by taking log :
$((n^{1/2})\log n )\log 2$ => $0.3 (n^{1/2})\log n $
$h(n) = n !$ => $n^n $
by taking log :
$n \log n $
So now comparing all these 3 functions I got following equality :
$f(n) < g(n) < h(n) $
So answer should be (4) but actually answer is (1).
Could anyone explain me where I am wrong ?