How to prove $f(n) ∈ Θ(g(n))$ and $g(n) ∈ O(h(n)) \implies f(n) ∈ Θ(h(n))$

263 Views Asked by At

I'm stuck at proving this formally. As far as I got is that I know that

$f(n) ∈ \Theta(g(n))$ means $c_1 g(n) \leq f(n) \leq c_2 g(n)$

$g(n) ∈ O(h(n))$ means $g(n) \leq c_3 h(n)$

$f(n) ∈ Θ(h(n))$ means $c_4 h(n) \leq f(n) \leq c_5 h(n)$

If I just look at it I can tell that it's false, but I cant prove it formally. My mind says if $f(n)$ grows the same as $g(n)$ and $g(n)$ grows less than $h(n)$, $f(n)$ obviously cant grow the same as $h(n)$, because $f(n)$ and $g(n)$ grow equally.

Somehow I cant express that formally.

I'm thankful for any help