0

As the question stated, can I find any two functions $f(n)$ and $g(n)$ such that they satisfy:

  1. $f(n) \not\in O(g(n))$
  2. $g(n) \not\in O(f(n))$
Bi Ao
  • 223

1 Answers1

3

$$f(n) = \begin{cases} 0 & \text{ if } n \text{ is odd}\\ n & \text{ otherwise} \end{cases}$$

$$g(n) = \begin{cases} 0 & \text{ if } n \text{ is even}\\ n & \text{ otherwise} \end{cases}$$