Big-Omega & Big-Theta

Big-Oh Gives Upper Bounds

For f,g functions NR+\N \rightarrow \R^+,
f(n)=Ω(g(n))f(n) = \Omega(g(n)) means there are c,n0>0c,n_0 > 0 s.t. n>n0f(n)c×g(n)\forall n>n_0\quad f(n) \geq c \times g(n)

i.e. f is asymptotically bounded from below by g

(A graph with two lines. f is a blue line with a wobbly, but mostly linear movement upwards. c times g is a red line which has a similar trajectory, but end up just slightly below the blue line.)

Note: We may have C<<1C << 1

or f grows asymptotically at least as fast as g.

Big-Oh & Big-Omega are Duals

Fact: f(n)=Ω(g(n))g(n)=O(f(n))f(n) = \Omega(g(n)) \leftrightarrow g(n) = O(f(n))

Pf: f(n)=Ω(g(n))f(n) = \Omega(g(n)):

So: f grows at least as fast as g     \iff g grows at most as fast as f.

Examples: Worse-case times

Operation O(1)O(1) Ω(1)\Omega(1) O(logn)O(\log n) (highlighted) Ω(logn)\Omega(\log n) (highlighted) O(n)O(n) Ω(n)\Omega(n) O(nlogn)O(n \log n) Ω(nlogn)\Omega(n \log n)
stack push/pop (highlighted) ✓ (green) ✓ (green) ❌ (blue) ❌ (blue) ❌ (blue)
unqueue/dequeue ✓ (green) ✓ (green) ❌ (blue) ❌ (blue) ❌ (blue)
heap insert or extract min ❌ (pink) ✓ (green) ✓ (green) ❌ (blue) ❌ (blue)
AVL-tree find, insert, remove ❌ (pink) ✓ (green) ✓ (green) ❌ (blue) ❌ (blue)
make_heap ❌ (pink) ❌ (pink) ✓ (green) ✓ (green) ❌ (blue)
BST find, insert, remove ❌ (pink) ❌ (pink) ✓ (green) ✓ (green) ❌ (blue)
Sorting ❌ (pink) ❌ (pink) ❌ (pink) ✓ (green) ✓ (green) ? (red)

Big-Theta Expresses “Tight Bounds”

For f,g functions NR+\N \rightarrow \R^+, f(n)=Θ(g(n))f(n) = \Theta(g(n)) means there are c1,c2,n0>0 s.t. n>n0    c1g(n)f(n)c2g(n)c_1, c_2,n_0 > 0 \text{ s.t. } n>n_0 \implies c_1\cdot g(n) \leq f(n) \leq c_2\cdot g(n)

i.e. f asymptotically bounded from above and below by g

(Diagram with three lines, wobbly but roughly linear, with them stacked in the following order from top to bottom:

or f grows asymptotically the same as g.

“Grows the same as” is systemetic

Fact: f(n)=Θ(g(n))    g(n)=Θ(f(n))f(n) = \Theta(g(n)) \iff g(n) = \Theta(f(n))

i.e. f grows the same as g     \iff g grows the same as f.

P.f.: $$f(n) = \Theta(g(n))

End