0
$\begingroup$

Before asking this question, I tried checked many sources on the internet but couldn't find an answer for my question.

What does it mean that a notation has a total order ?

For example, if we have f(n) = ϴ g(n), that includes g(n) = ϴ f(n) which means that the "ϴ" notation has a total order.

But to prove the opposite for "Big-Oh" notation, I can't think about 2 functions where f(n) is not equal to O g(n) and at the same time g(n) is not equal to O f(n).

Because if we calculate the limits of 2 functions and the result is an R positive, that includes that f(n) = O g(n) AND g(n) = O f(n), doesn't that already prove that big Oh is total order ? ( Works in both directions )

  • 1
    You need to start by reviewing the definition of "total order."2017-01-17
  • 0
    Consider for example $f:x\mapsto x\sin(x)$ and $g:x\mapsto 1$. As $x\to+\infty$, we do not have neither $f(x)=O(g(x))$ nor $g(x)=O(f(x))$.2017-01-17
  • 0
    Please do not vandalize you post. My answer does not make sense without reference to the question that prompted it. We hope that others will find your question and be helped by the answer without asking again. I have rolled it back.2017-01-17

1 Answers 1

3

To have two incomparable functions, you need $f$ to be larger than $g$ by more and more sometimes and $g$ to be larger than $f$ by more and more sometimes. Let me define two functions from the naturals to the naturals. $$f(n)=\begin {cases} 1&n\text{ even}\\n&n\text{ odd} \end {cases}\\ g(n)=\begin {cases} n&n\text{ even}\\1&n\text{ odd} \end {cases}$$ You can verify that neither one is bounded by a constant times the other. This demonstrates that big O is not a total order.

  • 0
    Ok for instance if we have f(x) = 1+n+n(-1)^n and g(n)= 1+n-n(-1)^n We can see that they alternate between 1 and 2n+1. But how to prove it mathematically? If we use the basic method which is calculating the limits of f(n)/g(n) when n goes to infinity, we will get either 0 or infinity which means that when we get 0, f(n) = O g(n) and when we get infinity g(n) = O f(n). Will it be correct to reverse the results ? Like when we get 0, I can say that g(n) is not equal to O f(n) ? and the same thing goes to the next result so I can conclude ?2017-01-17
  • 0
    A total order requires that every pair of elements, here functions, are comparable. If big O were a total order, for every pair of functions one would be big O of another. Here both $\frac {f(n)}{g(n)}$ and $\frac {g(n)}{f(n)}$ are unbounded. If you look at the definition, that means that $f$ is not $O(g)$ and neither is $g\ O(f)$. This means you don't have a total order as we have found two incomparable elements of your set.2017-01-17