The statement you’re referring to is a fundamental result in asymptotic analysis, specifically about the relationship between Big-O, Big-Omega, and Big-Theta notations. Here’s the formal statement and its proof:
Statement:
For any two functions ( f(n) ) and ( g(n) ),
[
f(n) = \Theta(g(n)) \quad \text{if and only if} \quad f(n) = O(g(n)) \text{ and } f(n) = \Omega(g(n)).
]
Proof
Direction 1:
If ( f(n) = \Theta(g(n)) ), then ( f(n) = O(g(n)) ) and ( f(n) = \Omega(g(n)) ).
Definition of (\Theta):
( f(n) = \Theta(g(n)) ) means there exist positive constants ( c_1 ), ( c_2 ), and ( n_0 ) such that:
[
c_1 \cdot g(n) \leq f(n) \leq c_2 \cdot g(n) \quad \text{for all } n \geq n_0.
]
- The upper bound ( f(n) \leq c_2 \cdot g(n) ) directly implies ( f(n) = O(g(n)) ).
- The lower bound ( c_1 \cdot g(n) \leq f(n) ) directly implies ( f(n) = \Omega(g(n)) ).
Thus, if ( f(n) = \Theta(g(n)) ), then both ( f(n) = O(g(n)) ) and ( f(n) = \Omega(g(n)) ) hold.
Direction 2:
If ( f(n) = O(g(n)) ) and ( f(n) = \Omega(g(n)) ), then ( f(n) = \Theta(g(n)) ).
Definition of ( O ):
( f(n) = O(g(n)) ) means there exist positive constants ( c_2 ) and ( n_1 ) such that:
[
f(n) \leq c_2 \cdot g(n) \quad \text{for all } n \geq n_1.
]
Definition of ( \Omega ):
( f(n) = \Omega(g(n)) ) means there exist positive constants ( c_1 ) and ( n_2 ) such that:
[
f(n) \geq c_1 \cdot g(n) \quad \text{for all } n \geq n_2.
]
Combining these two inequalities, for all ( n \geq \max(n_1, n_2) ), we have:
[
c_1 \cdot g(n) \leq f(n) \leq c_2 \cdot g(n).
]
This is precisely the definition of ( f(n) = \Theta(g(n)) ).
Conclusion
We have shown both directions of the equivalence:
- ( f(n) = \Theta(g(n)) ) implies ( f(n) = O(g(n)) ) and ( f(n) = \Omega(g(n)) ).
- ( f(n) = O(g(n)) ) and ( f(n) = \Omega(g(n)) ) imply ( f(n) = \Theta(g(n)) ).
Thus, the statement is proven:
[
\boxed{f(n) = \Theta(g(n)) \iff f(n) = O(g(n)) \text{ and } f(n) = \Omega(g(n))}
]