Confusion on Big $O$

87 Views Asked by At

I am so confused on the intuitive idea behind Big $O$ notation.

$f(x)=O(g(x))$ iff there is a constant $C>0$ such that for large $x, |f(x)|\leq C|g(x)|$ and I have seen that in many places that this means "$f$ grows as fast as or faster than $g$ for large $x$."

But if $f(x)=x$ and $g(x)=2x$, we have $|f(x)|\leq |g(x)|$ for large $x$ and hence $f(x)=O(g(x))$ in this case. However, $f$ does not grow faster than $g$.

Can somebody please help me to resolve this?

Edit: Indeed I need the exact intuitive idea.. Not just definitions..

1

There are 1 best solutions below

1
On

Big O is up to a constant domination. If $f(x) = x, g(x) = 2x$, then $5*f(x) \geq g(x)$ for large $x$ (in fact, every $x>0$, but this is only an asymptotic statement with big O), for example. So, $g(x) = O(f(x))$. Similarly, $1 * g(x) \geq f(x)$ for large $x$ so we also have $f(x) = O(g(x))$.

In this case, we say $f(x) = \Theta(g(x))$.