0
$\begingroup$

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?

  • 0
    It seems okay,though you can't quite take $c=15$ as $15 n^3< 15n^3+9n$ for every $n>0$ though you can take $c=16$.2017-01-30
  • 0
    how did you determine that?2017-01-30
  • 0
    Well $c=15$ doesn't fit,the inequality should be trivial(though if it's not feel free to ask).Taking next $c=16$ we can see that for large enough $n$ we have that $n^3>9n$ you can see that for $n>3$ the inequality is satisfied.Another way would be to chose $c=24$ and make $15n^3+9n^3>15n^3+9n$ since $9n^3>n^3$ for every $n>1$.2017-01-30
  • 0
    $f=O(g(n))$ as $n\to \infty$ does NOT require that $f(n)\geq 0$ for all sufficiently large $n.$ The correct def'n is that there exist $c,k$ such that $\forall n\geq k\;(|f(n)|\leq c|g(n)|).$.... And you must specify that it is as $n\to \infty.$.....$ f(x)=O(g(x))$ as $x\to 0$ means that there exist $r>0, $ and $c,$ such that $\forall x\;(|x|\leq r\implies |f(x)|\leq c|g(x)|).$2017-01-30

1 Answers 1

0

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$. )