0

So I'm completely lost on big-oh notation.

In my assignment I am supposed to prove or disprove the following using the formal definition.

3n³ - 7n² + 100n - 36 is in O(n³)

and

n²/log(n) + 3n is in O(n²)

Can someone help me with these and tell me how to go about proving or disproving.

AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66
Kevin
  • 5
  • 3
  • 3
    This might be suitable for math.stackexchange.com, because you are asking how to perform a proof by induction. – JamesENL Mar 16 '15 at 04:27

1 Answers1

0

The definition of Big-O is

f(n) ∈ O(g(n)) ⇔ lim supn → ∞ | f(n)/g(n) | < ∞

Since your f(n) and g(n) are polynomials lim sup and lim are the same. So you have to proof:

  1. limn → ∞ |(3n³ - 7n² + 100n - 36) / n³| < ∞
    limn → ∞ |(3n³ - 7n² + 100n - 36) / n³| 
     = limn → ∞ |n³(3 - 7/n + 100/n² - 36/n³) / n³|
     = limn → ∞ |3 - 7/n + 100/n² - 36/n³|
     = 3 < ∞
    
  2. lim supn → ∞ |(n²/log(n) + 3n) / n²| < ∞
    lim supn → ∞ |(n²/log(n) + 3n) / n²| 
     = lim supn → ∞ |n²(1/log(n) + 3/n) / n²|
     = lim supn → ∞ |1/log(n) + 3/n|
     = 0 < ∞
    
    here you can also see that n²/log(n) + 3n is also in o(n²).
AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66