-1

I'm studying for my discrete math class and I'm starting to grasp the idea of big O notations a little better and was successful in proofing a few question using the definition of f(x) is O(g(x)).

How do I proof that question is not big O using the definition. Please provide step by step answer as you would on a test to receive full marks and please explain why you did each step in simple terms!

Here are 2 example questions:

1) 1 is not big O(1/x)

2) e^x is not O(x^5) Big O

Newbie
  • 21
  • 2
  • If you are in a discrete math class, they are teaching you that. Do the homework, ask questions of the professor, and you'll learn how that works. Asking the internet for a ready-made solution is in general not up to academic ethics standards. As noted in your text book, the trick is to determine two functions: One that is a 'lower bound' and one that is a 'upper-bound'. If these bounding functions have the same Big O, then the bounded function does as well. It's all about ignoring the constants and focusing on how the function grows with very large x. – Chuck Walbourn May 03 '16 at 18:47
  • 1
    This sounds like you're asking for homework help... – yun May 03 '16 at 18:48
  • @ChuckWalbourn I'm in spring school and classes have not yet started. I have some previous knowledge about discrete math but I know big O is one of the main concepts so I'm trying to fully understand it. I'm doing practice questions from the text book and browsed through the web but found nothing that helped me understand the steps. If you're not answering my question then don't bother posting or commenting on the thread. This website is made to help one another and that's what I'm here for. – Newbie May 03 '16 at 18:51
  • Don't take it personally if long-time StackOverflow people are sensitive to the "do my homework" questions; not all knowledge is found in a YouTube video. Most math concepts really only make sense when you work them out yourself from some given principles. If you are just looking for examples with solutions, the classic *Schaum's Outline of Discrete Mathematics* is a good source for this kind of thing. The real challenge is getting a 'feel' for how a particular function will grow asymptotically, which you can really only do by working through problems. – Chuck Walbourn May 03 '16 at 18:53

1 Answers1

0

1) 1 is not big O(1/x)

To show that 1 is not O(1/x), we must show that for any constant c, there is no x_0 such that 1 <= c*1/x for all x >= x_0. Suppose 1 is big O of 1/x. We take c = c_0 > 0, a constant. Then we must have 1 <= c_0*1/x for x >= x_0. Assuming x > 0, we can solve and get x <= c_0. This cannot be true for all x >= x_0 (it fails for the first number that is greater than or equal to max(x_0, c_0)), so our assumption was wrong and the first is not big O of the second.

2) e^x is not O(x^5) Big O

To show that e^x is not O(x^5), we must show that for any constant c, there is no x_0 such that for all x >= x_0, e^x <= c*x^5. Suppose e^x is big O of x^5. We take c = c_0 > 0, a constant. Then we must have e^x <= c_0*x^5 for x >= x_0. We can rearrange this to obtain e^x / x^5 <= c_0 for all x >= x_0. However, the limit of e^x / x^5 as x -> +inf tends to +inf; we can see this by iterating l'Hopital's rule:

        e^x            e^x                  e^x
lim     ---  = lim     ---  = ... = lim     --- = +inf
x->+inf x^5    x->+inf 5x^4         x->+inf 120

This is a contradiction since there is no constant c_0 greater than or equal to infinity. Therefore, our assumption was wrong and the first is not big O of the second.

Note: I write lim = +inf to mean something like "the value of the expression grows without bound".

Patrick87
  • 27,682
  • 3
  • 38
  • 73