What is the difference between Lower bound and Tight bound?

Technology CommunityCategory: Big-O NotationWhat is the difference between Lower bound and Tight bound?
VietMX Staff asked 3 years ago

Big O is the upper bound, while Omega is the lower bound. Theta requires both Big O and Omega, so that’s why it’s referred to as a tight bound (it must be both the upper and lower bound).

For example, an algorithm taking Omega(n log n) takes at least n log n time, but has no upper limit. An algorithm taking Theta(n log n) is far preferential since it takes at least n log n (Omega n log n) and no more than n log n (Big O n log n).