Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$\max(f(n), g(n)) = O(f(n) + g(n))$

How do I prove this? Also I'd appreciate the markup being corrected, thanks.

share|cite|improve this question
I've never seen the notation O(f(n),g(n)), what does it mean for you? – Yuval Filmus Nov 14 '10 at 7:43
@Yuval Filmus: Thanks, that was an error. I've corrected it. – Matt Joiner Nov 14 '10 at 7:46

You can use $\max(f(n),g(n)) \leq f(n) + g(n)$, given that both functions are non-negative.

share|cite|improve this answer
Does this still hold now that I've changed the operator used? – Matt Joiner Nov 14 '10 at 13:53
@Matt: Now it's immediate. – Yuval Filmus Nov 14 '10 at 18:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.