1

I'm still having trouble understanding more complex proofs when determining if one function is big-o of another function, e.g. (f(n) = O(g(n)).

Example:

F(n) http://upurs.us/image/63058.gif

G(n) http://upurs.us/image/63059.gif

I realize that we want the proof to be satisfied under the conditions, S.T f(n) <= C1 * g(n) when n > b. I've watched countless tutorials and can't grasp this concept. In the listed example, how would I go about choosing the constant and using that information to finalize the proof? Thank you.

ryan
  • 625
  • 3
  • 10
  • 23

2 Answers2

2

All you have to do is consider the big terms of f(n) and g(n) as n goes to infinity.

Now consider f(n):

fn

and g(n): gn

now the conclusion:
enter image description here

dsharew
  • 10,377
  • 6
  • 49
  • 75
0

I think there's really two parts to this question. The first is determining which function (if either) has greater asymptotic growth. The second is proving that what you determined is correct.

As for the first part, I recommend simply looking at the highest powered terms in the sequence. Both f and g have terms of order 2.5 (5n^2 * sqrt(n) and 6n^2 * sqrt(n), respectively). After dropping the coefficients, which one is grows more quickly as n goes to infinity? As it turns out, dropping the coefficients results in the same exact function (namely n^2 * sqrt(n)) so the functions have equal asymptotic growth. This means that we can prove both f = O(g) and g = O(f).

To prove the first, we just need to find some C and k such that for all n > k, we have that C * g(n) > f(n). I think that one of the easiest ways to do this is by proof by contradiction. That is, assume that for all C and k, f(n) > C * g(n) for all n > k. Then, after reducing the expression, we can just choose large values for C and k to prove this assumption wrong.

mackorone
  • 1,056
  • 6
  • 15
  • The previous responder said the answer would be O(g(n)) and O(f(n)) both ways. This would then prove that the function is big-theta of the function, correct? – ryan Jan 20 '15 at 18:33
  • Well it would certainly indicate that f = Theta(g) and vice versa. To prove it, you'd have to show that f = O(g) and f = Omega(g), as well as the other way around. See http://stackoverflow.com/questions/10376740/big-theta-notation-what-exactly-does-big-theta-represent. – mackorone Jan 20 '15 at 21:28