0
$\begingroup$

I have a little question about giving an example for functions that fullfil the condition f(n)∈O(g(n)) ∧ g(n)∈O(f(n)) . From what I know, or think to know: First half of it means that f(n) ≤ c*g(n) and the same for the second half, just visa versa. This would be just to functions which have the same highest exponent, such as f(n) = n^4+2 and g(n) = n^4 +3

Another given condition was f(n)∈O(g(n)) ∧ g(n)∉O(f(n)). Same as above for the first half, but the second tells me that c*f(n) cant be smaller or equal than g(n). And this is were I am really struggling. And I dont even have a clue. Can anyone help? And this is where I am kind of clueless.

2 Answers 2

0

An example with $f(n)\in O(g(n))$ and $g(n)\notin O(f(n))$ would be $f(n)=n$ and $g(n) = n^2.$ We have $ n < n^2$ for sufficiently large $n$ but there's no constant $C>0$ such that $n^2 < Cn$ for all large $n$. Eventually the $n^2$ passes $Cn$ no matter how big you make $C.$

  • 0
    Yeah, doesnt sound hard. However, I was so stuck up trying things around that I didnt think of the simple things. thank you ;)2017-02-10
1

Finding a function that satisfies your criteria isn't hard. For example, we have $f(x)=0$ and $g(x)=x$. Clearly we have that $0 \le cx$ for any non-negative $c$, but there is no way that $0$ is going to outgrow $x$, i.e. that $x \le c\cdot0 = 0$. Whenever $x>0$ this does't hold.

Addendum:

Perhaps this picture will help you; it helps me tremendously

enter image description here

  • 0
    Yeah, was stuck up trying more difficult things i neglected simple ones. thank you :)2017-02-10
  • 0
    In this picture, the last column automatically assumes that the limit exists, which will often not be true2017-02-10
  • 0
    @Max It should actually be LimSup and LimInf but I thought the point might be above OP2017-02-10