Big O notation and Proofs

108 Views Asked by At

If $f \in O(h) $, does that mean there will always be some $c$, such that $f(n) \leq ch(n) $ is always true for all $n \geq 1$? That is, assuming $f$ and $h$ are always $>0$.

2

There are 2 best solutions below

3
On

No. The big O notation means that, for sufficiently large values of $x$, $f(x)$ and $g(x)$ behaves similar up to a constant, that is:

$$ f=O(h) \Longleftrightarrow \exists M\in\mathbb R^* : \lim_{x\to\infty} f(x) = M \lim_{x\to\infty} g(x) \Longleftrightarrow\\ \Longleftrightarrow M\in\mathbb R^* \mbox{ and } x_0\in R^+: f(x) \leq Mg(x) \; \forall x\geq x_0 . $$

3
On

$f=O(h)$ means that there exists a constant $c$ such that $|f(n)|\leq c|h(n)|$ holds for all sufficiently large $n$.