0

How would I tackle this equation? $$10n^3 +3n = \Theta(n^3)$$

I know I have to solve Big $O$ and Big $\Omega$ but have no idea how to do this. I got as far as

$$10n^3+3n \leq c_1n^3$$

$$0 \leq c_1n^3 \leq 10n^3+3n \leq c_2n^3$$

dkaeae
  • 5,057
  • 1
  • 17
  • 31
Pythonlover
  • 9
  • 1
  • 3

2 Answers2

2

You may find the limit definitions much more simpler. So let $f(n) = 10n^3 + 3n$. You want to prove that

(i) $f(n) = \lim_{n \to \infty} f(n) / n^3 < \infty$, and that

(ii) $f(n) = \lim_{n \to \infty} f(n) / n^3 > 0$.

Now you only need to apply elementary algebra.

Juho
  • 22,905
  • 7
  • 63
  • 117
0

The definition of $f(n) = O(g(n))$ (for $n \to \infty$) is that there are $N_0, c$ such that for $N \geq N_0$ it is $f(n) \leq c g(n)$.

In your case, pick e.g. $N_0 = 2$, then you have $10 n^3 + 3 n < 10 n^3 + 3 n^3 = 13 n^3$, and $c = 13$ works.

The definition of $f(n) = \Omega(g(n))$ (for $n \to \infty$) is that there are $N_0, c$ such that for $N \geq N_0$ it is $f(n) \geq c g(n)$.

Pick e.g. $N_0 = 5$, so $10 n^3 + 3 n > 10 n^3$, and $c = 10$ works.

Now, $f(n) = \Theta(g(n))$ if both $f(n) = O(g(n))$ and $f(n) = \Omega(g(n))$, and you are done.

Note the $N_0$, $c$ don't have to be the same (usually at least $c$ is different).

vonbrand
  • 14,204
  • 3
  • 42
  • 52