Open In App

Big O vs Theta Θ vs Big Omega Ω Notations

Last Updated : 15 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

1. Big O notation (O): 

It defines an upper bound on order of growth of time taken by an algorithm or code with input size. Mathematically, if f(n) describes the running time of an algorithm; f(n) is O(g(n)) if there exist positive constant C and n0 such that,

0 <= f(n) <= Cg(n) for all n >= n0

n = used to give upper bound a function. 
If a function is O(n), it is automatically O(n-square) as well. 

Graphic example for Big oh (O)



2. Big Omega notation (Ω) : It defines a lower bound on order of growth of time taken by an algorithm or code with input size. Let f(n) define running time of an algorithm;
f(n) is said to be Ω(g (n)) if there exists positive constant C and (n0) such that 

0 <= Cg(n) <= f(n) for all n >= n0

n = used to given lower bound on a function 
If a function is Ω(n-square) it is automatically Ω(n) as well. 

Graphical example for Big Omega (Ω)

3. Theta notation (Θ) : 

It defines exact order of growth of time taken by an algorithm or code with input size. Let f(n) define running time of an algorithm. f(n) is said to be Θ(g(n)) if f(n) is O(g(n)) and f(n) is Ω(g(n)).

Mathematically, 

0 <= f(n) <= C1g(n) for n >= n0
0 <= C2g(n) <= f(n) for n >= n0

Merging both the equation, we get :  

0 <= C2g(n) <= f(n) <= C1g(n) for n >= n0

The equation simply means there exist positive constants C1 and C2 such that f(n) is sandwich between C2 g(n) and C1g(n). 

Graphic example of Big Theta (Θ)




Difference Between Big oh, Big Omega and Big Theta : 

S.No.

Big OBig Omega (Ω)Theta (Θ)
1.It is like (<=) 
rate of growth of an algorithm is less than or equal to a specific value. 
It is like (>=) 
rate of growth is greater than or equal to a specified value.
It is like (==) 
meaning the rate of growth is equal to a specified value.
2.The upper bound of a function is represented by Big O notation. Only the time taken function is bounded by above. BThe lower bound of a function is represented by Omega notation. The bounding of a function from above and below is represented by theta notation. The exact asymptotic behavior is done by this theta notation.
3.Big O - Upper BoundBig Omega (Ω) - Lower BoundBig Theta (Θ) - Tight Bound
4.To find Big O notation of time/space,. we consider the case when an algorithm takes maximum time/space.To find Big Omega notation of time/space,. we consider the case when an algorithm takes minimum time/space.An algorithm's general time/space cannot be represented as Theta notation, if its order of growth varies with input.
5.Mathematically: Big Oh is 0 <= f(n) <= Cg(n) for all n >= n0Mathematically: Big Omega is 0 <= Cg(n) <= f(n) for all n >= n0Mathematically - Big Theta is 0 <= C2g(n) <= f(n) <= C1g(n) for n >= n0

For more details, please refer: Design and Analysis of Algorithms.


Similar Reads