Suppose that the $\lim_{n\to\infty} \frac{h(n)}{\max\{f(n), g(n)\}} < \infty$. Show that $h(n)=O(f(n)+g(n))$

39 Views Asked by At

Not really sure where to start on this problem. From my understanding its saying $h(n)$ is increasing at the same rate or slower then the max of $f(n)$ and $g(n)$. In other words $O(h(n)) = \max\{f(n), g(n)\}$. I know that $f(n) + g(n)$ will be larger than the max of the $2$.

1

There are 1 best solutions below

2
On

Let $$L= \lim_n \frac{h(n)}{\max \{ (f(n), g(n) \}}$$

Then eventually you have $$h(n) \le (L +1) \max \{ (f(n), g(n) \} \le (L+1) (f(n) + g(n))$$ i.e. $h(n) =O(f(n) + g(n))$.