Which is asymptotically larger $3n^{\sqrt{n}}$ or $2^{\sqrt{n}\log_{2} n}$?

784 Views Asked by At

Which is asymptotically larger $3n^{\sqrt{n}}$ or $2^{\sqrt{n}\log_{2} n}$?

What I have done is taken $log$ on both sides, which gives

$$ f(n) =\log (3n)^{\sqrt n} $$ and $$ g(n) = \log (2)^{\sqrt n \log_2{n}}$$

This can be simplified to $ f(n) =\sqrt n \log (3n) $ and $ g(n) = {\sqrt n \log_2{n}}\log (2)$.

In order to determine the asymptotically larger function, we can plug in,

$$\lim_{n\to\infty}\frac{f(n)}{g(n)}$$

How can this be simplified to determine the asymptotically larger function?

3

There are 3 best solutions below

3
On BEST ANSWER

Hint:

$$2^{\sqrt n\log_2n}=(2^{\log_2 n})^{\sqrt n}=n^{\sqrt n}$$

2
On

Both functions are of the form $Cn^{\sqrt n}$, hence are asymptotically equal.

0
On

To simplify your fraction, you can use the following basic facts about the logarithm:

  1. $\log_2 n = \frac{\log n}{\log 2}$, and hence $g(n) = \sqrt{n} \log n$,
  2. $\log(xy) = \log x + \log y$, so $f(n) = \sqrt{n}(\log n + \log 3)$.

Cancel the $\sqrt n$ factors and you're almost there.

However, as a commenter on your post points out, the asymptotic behaviour of the logarithm of your function does not tell you the asymptotic behaviour of your function in general. Consider as an example $f(x) = x$ and $g(x) = x^2$. The logarithms of $f$ and $g$ differ by only a constant multiplicative factor, so asymptotically we consider them the same, but in contrast $g$ itself grows asymptotically faster than $f$.

For the right way forward, I refer you to any of the other answers.