If f(x) is a real valued function does the following equation holds . Prove your answer. f(x)=O(f(x))

# Big oh notation

Page 1 of 1## 2 Replies - 1947 Views - Last Post: 15 June 2010 - 12:56 PM

##
**Replies To:** Big oh notation

### #2

## Re: Big oh notation

Posted 15 June 2010 - 06:14 AM

We're going to need to see some actual effort - we aren't here to solve homework from start to finish =p

Quote

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments.

This post has been edited by **xclite**: 15 June 2010 - 06:14 AM

### #3

## Re: Big oh notation

Posted 15 June 2010 - 12:56 PM

Eswar, on 14 June 2010 - 09:47 PM, said:

If f(x) is a real valued function does the following equation holds . Prove your answer. f(x)=O(f(x))

Well this is fairly easy to prove. We can just prove this result directly from the definition of big-oh notation.

If f(x) is in O(f(x)), then by definition, 0 <= f(x) <= c*f(x), for some constant c > 0, and for all n > n0. From there, the last step should be fairly obvious, as well as the final result. Dividing all parts of the inequality by f(x), (assuming f(x) is positive) then we get, 0 <= 1 <= c, for some c > 0, for all n > 0n. So it's easy to see that we can pick say... c = 2, and say n0 = 1. This gives that 0 <= 1 <= 2, for all n > 1. So the result is true, by definition.

Hope this helped =) - Feel free to post again if you don't understand what I did, but it's fairly simple, and the logic just follows from the definition.

Zach

This post has been edited by **Nizbel99**: 15 June 2010 - 12:56 PM

Page 1 of 1