Big - O : $15n^3+9n \in O\left(n^3\right)$

54 Views Asked by At

Big-O: Formal Definition: f(n) = O(g(n)) means there are positive constants c and k, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ k. The values of c and k must be fixed for the function f and must not depend on n.

$15n^3+9n\:\xi \:\:\:O\left(n^3\right)$

for that; I used the limit theorem and got

$\lim _{x\to \infty }\left(\frac{15n^3+9n}{n^3}\right)$ ;

$\lim _{n\to \infty \:}\left(\frac{15n^3}{n^3}\right)+\lim _{x\to \infty }\left(\frac{9n}{n^3}\right)$ = 15 + 0

$\lim _{x\to \infty }\left(\frac{15n^3+9n}{n^3}\right)$ = 15

I believe the constant is 15, for any positive number

also through this video (the rules in that video),

https://www.youtube.com/watch?v=QhpfLwe-ERM

it says that if the limit is a constant, it turns out to be theta.

the part i'm sketch out is it it becoming theta.

can someone verify?

1

There are 1 best solutions below

0
On

For $n\geq 1$ we have $$|15n^3+9n|\leq 15|n^3|+9|n|\leq 15|n^3|+9|n^3|=24|n^3|.$$ Therefore $15n^3+9n=O(n^3)$ as $n\to \infty.$

To show that $f(n)=O(g(n))$ as $n\to \infty$ it is not necessary to have an accurate estimate of $f(n)/g(n)$ (when $g(n)\ne 0$), just an upper bound that's valid for all sufficiently large $n$. (In this case for $n\geq 1$. )