Comparing time complexities

381 Views Asked by At

I'm trying to understand which of the following functions is strictly faster growing ($\Omega$, $o$-notation or $\theta$-notation). Not sure how to approach the following equations:

$$\bf{n^{0.3} \ \text{or}\ \ n^{\cos n}}$$

I understand that $\cos n = O(1)$ but how do I incorporate that knowledge in solving for the time complexity when it is $n^{\cos n}$? Is it valid to say that no asymptotic notation can be applied to identify the relationship?

1

There are 1 best solutions below

0
On

As $n\to\infty$, $\sin n$ and $\cos n$ oscillate between $-1$ and $1$. As $n$ ranges over the positive integers, $\sin n$ and $\cos n$ get arbitrarily close to each element of the interval $[-1,1]$; see Sine function dense in $[-1,1]$ for a formal statement of this.

That implies in particular that for arbitrarily large $n$ you will have $n^{\cos n}>n^{0.9}$, and for arbitrarly large $n$ you will have $n^{\cos n}<n^{-0.9}$ (not the same $n$ of course). Conclude what you may from this.