If T(n) = O(f(n)) and f(n) = O(g(n)), then T(n) = O(g(n)).

I have to prove this and need direction. Any tips?

Printable View

- Feb 16th 2011, 02:20 PMstatman101Big Oh
If T(n) = O(f(n)) and f(n) = O(g(n)), then T(n) = O(g(n)).

I have to prove this and need direction. Any tips? - Feb 16th 2011, 07:07 PMtonio
$\displaystyle T(n)=O(f(x))==> |T(n)|\leq M_1|f(n)|\,\,as\,\,n\rightarrow \infty$ ,

$\displaystyle f(n)=O(g(n))\Longrightarrow |f(n)|\leq M_2|g(n)|\,\,as\,\,n\rightarrow\infty$ ,

$\displaystyle M_1,M_2$ constants, so

$\displaystyle |T(n)|\leq M_1M_2|g(n)|$...and etc.

Tonio