0

Show that $x^{3}$ = $O(x^{4})$ but that $x^{4}$ $\neq$ $O(x^{3})$.

2 Answers2

2

We say that a function $f$ is $O(g)$ if there exist constants $M$ and $C > 0$ such that $$ x > M \Longrightarrow f(x) \leq C g(x). $$

It shouldn't be too difficult to show that $x^3$ is $O(x^4)$ using the definition.


To show that $f$ is not $O(g)$ you need to show that for every $M$ and $C > 0$ there exists $x > M$ such that $f(x) > C g(x)$. While using this to refute "$x^4$ is $O(x^3)$" is a bit awkward, I think that it's a good exercise which is not too difficult.

Later on you might learn other ways of showing that $f$ is not $O(g)$. Very briefly, the idea of the other methods is a two-pronged attack:

  1. If $f$ is $O(g)$ then X.
  2. X is false.
  3. Therefore $f$ is not $O(g)$.

I'll let your professor give you examples of X.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
2

$x^{3}$ $\leq$ $x^{4}$ when x $>$ 0.

Let an integer k = 0 and a constant C=1 to show that $x^{3}$ is O($x^{4}$).

Let $x^{4}$ be O($x^{3}$).

Then there would exist some integer k and constant C such that $x^{4}$ $\leq$ C$x^{3}$ for all x $>$ k.

Dividing through by $x^{3}$ gives x $\leq$ C. But C is a constant, while x can be arbitrarily large, so no such C and k exist, therefore $x^{4}$ $\neq$ O($x^{3}$).