5
$\begingroup$

how can be prove that $\max(f(n),g(n)) = \Theta(f(n)+g(n))$

though the big O case is simple since $\max(f(n),g(n)) \leq f(n)+g(n)$

edit : where $f(n)$ and $g(n)$ are asymptotically nonnegative functions.

  • 0
    @Jonas Yes.they are non negative.2010-12-22

1 Answers 1

1

Hint...: $2 + 100 \le 100 + 100$

For the sake of completeness:

Use the fact that: $\max(f,g) \le f + g \le 2\max(f,g)$ when $f,g$ are non-negative

  • 1
    @Bunny: Glad it helped. If the constant is same for lower and upper bound, then they both have to be equal! So you can rule that out :-)2010-12-22