Understanding the most Compact Theta Notation

161 Views Asked by At

Find the most compact theta notation for the function, $\ 3n^3+4n^2+1\\$.

My proof goes as,

f(n) = $\ 3n^3+4n^2+1\\$ and let g(n) = $\ 3n^3+4n^3+n^3\\$

= $\ 3n^3+4n^2+1\\$ <= $\ 8n^3\\$

Therefore, f(n) <= O(g(n)) for n >= 1.

(Here is the part of the proof I'm unsure about)

Let g(n) = $\ 2n^3\\$ (Am I allowed to declare g(n) in this manner when proving omega? If not how would one approach an omega proof?)

Thus, f(n) > $\omega(g(n))\\$ for all n>=1.

Therefore, because there exists an f(n) > $\omega(g(n))\\$ and f(n) <= O(g(n)), f(n) = $\Theta(g(n))\\$ exists.

1

There are 1 best solutions below

0
On BEST ANSWER

Your proof is correct. $$3n^3 \leq 3n^3 + 4n^2 + 1 \leq 8n^3 \qquad \forall n \geq 1 $$ Therefore $$ 3n^3 + 4n^2 + 1 = \Theta(n^3) $$

All that is needed to show $f(n) = \Theta(g(n))$ is that the $c_1 g(n) \leq f(n) \leq c_2 g(n)$ for sufficiently large $n$.