in Algorithms edited by
2,207 views
2 votes
2 votes
If $T1(n) = \Theta(f(n))$

&

$T2(n) = \Theta(f(n))$

Then, Is $T1(n) + T2(n) = O(f(n))$

If yes, then how?
in Algorithms edited by
2.2k views

3 Answers

1 vote
1 vote

Big-O is an upper bound.

Big-Theta is a tight bound, i.e. upper and lower bound.

so you can say Ɵ implies O, 

Therefore:  T1(n)+T2(n) = Ɵ(f(n)) = O(f(n))

for a good read: 

https://stackoverflow.com/questions/3230122/big-oh-vs-big-theta

0 votes
0 votes
T1(n) = ϴ(f(n)) means T1(n) and f(n) are asymptotically equal.  

similarly, T2(n) = ϴ(f(n)) means T2(n) and f(n) are asymptotically equal.  

so T1(n) + T2(n) is also asymptotically equal to f(n). which is allowed in big Oh.

T1(n) + T2(n) = ϴ(f(n)) and

T1(n) + T2(n) = O(f(n)) both statements are true
0 votes
0 votes

 

 T1(n) + T2(n) = max ( T1, T2 ) i.e when two functions are merged then final time complexity becomes the maximum of the time complexity of two functions

hence  T1(n)+T2(n) = 0(f(n))

Related questions