Originally Posted by

**tonio** $\displaystyle f(n)=\left\{\begin{array}{cc}2&\,\mbox { if }n\mbox{ is even}\\1&\,\mbox { if }n\mbox{ is odd}\end{array}\right.$

$\displaystyle g(n)=\left\{\begin{array}{cc}3&\,\mbox { if }n\mbox{ is even}\\4&\,\mbox { if }n\mbox{ is odd}\end{array}\right.$ , so for example:

$\displaystyle \frac{f(n)}{g(n)}=\left\{\begin{array}{cc}\frac{2} {3}&\,\mbox { if }n\mbox{ is even}\\{}\\\frac{1}{4}&\,\mbox { if }n\mbox{ is odd}\end{array}\right.$ $\displaystyle \Longrightarrow\,f=O (g)$

Tonio