Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

$\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|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

1 Answer 1

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

share|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

 
discard

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.