I am unsure how to formally prove the Big O Rule of Sums, i.e.:
f1(n) + f2(n) is O(max(g1(n)),g2(n))
So far, I have supposed the following in my effort:
Let there be two constants c1
and c2
such that c2 > c1
. By Big O definition:
f1(n) <= c1g1(n) and f2(n) <= c2g2(n)
How should I proceed? Is it reasonable to introduce numerical substitutions for the variables at this step to prove the relationship? Not knowing g
or f
, that is the only way I can think to approach.