2

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?

  • Since $\cos(n)$ is periodic with period $\frac{-\pi}{2} + \pi x$, and takes on values between -1 and 1, then as n goes to infinity there will be an infinite number of n's such that $\cos(n) = -1$ and $n^{\cos(n)} = \frac{1}{n} < n^{0.3}.$ Similarly, there will be an infinite number of n's where $n^{\cos(n)} = n > n^{0.3}$. What does this tell you? – MattyZ Oct 01 '13 at 01:54
  • @Bitrex: What does period $\frac{-\pi}{2}+\pi x$ mean? The period of $\cos$ is $2\pi$. And if $n$ is restricted to integers, $\cos(n)$ will get arbitrarily close to $\pm 1$, but never quite equal them. – Jonas Meyer Oct 01 '13 at 03:00
  • @JonasMeyer Sorry, for some reason I was thinking of the zeros of $\cos(n)$ and typed that in instead. He doesn't specify that $n$ is restricted to the integers, if so, yes you're right. – MattyZ Oct 01 '13 at 03:25

1 Answers1

1

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.

Jonas Meyer
  • 53,602