Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when is Big-Oh(n) = Omega(n) ? Is it same as theta(n)?

This question looks simple to me, but just wanted to see whether i am moving in the right direction.

Is it as simple as saying when n =1 ??

like image 579
pa1geek Avatar asked Jan 20 '26 22:01

pa1geek


1 Answers

Yes, you are correct, if f is BigO(g) and f is Omega(g) then f is BigTheta(g). In fact, this is exactly the definition of BigTheta.

To apply that to algorithms, if an algorithm is both BigO(n^2) and Omega(n^2) for example, then it is BigTheta(n^2). And if it is BigTheta(n^2) then is is BigO(n^2) and Omega(n^2).

like image 63
sch Avatar answered Jan 23 '26 20:01

sch