1
$\begingroup$

(Using big-O notation)

Find two functions f(n) and g(n) such that $f\left(n\right)\notin O\left(g\left(n\right)\right)\:and\:\:g\left(n\right)\notin \:O\left(f\left(n\right)\right)$

$f\left(n\right)\notin O\left(g\left(n\right)\right)$: f(n) is not bigger than g(n)?

so can I just put like

$\left(4x\right)\notin O\left(g\left(5x^2\right)\right)$ ?

and other way around for the other equation?

1 Answers 1

0

No, because the question is asking for both cases to hold at the same time (notice the and).

The question is attempting to show that the trichotomy principle which holds for things like the real numbers does not hold for asymptotic notation. That is, it is not always true that exactly one of the following must hold between functions in asymptotic comparison, as is the case with $\mathbb{R}$.

  • $f < g$
  • $f = g$
  • $f > g$

So you have been tasked with finding asympotically incomparable functions. A hint would be to take the function $f(n) = n^{1+\sin{n}}$ and consider its oscillations in the exponent - what simple function will be crossed infinitely many times by those oscillations?

Here's a quick visualization of what was offered in the comments, taking $g(n) = n$.

enter image description here

  • 0
    like a f(n) = 32017-01-31
  • 0
    @TemurBakhriddinov Yes! Or more generally, take $g(n) = n$.2017-01-31