Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between lower bound and tight bound?

Tags:

big-o

With the reference of this answer, what is Theta (tight bound)?

Omega is lower bound, quite understood, the minimum time an algorithm may take. And we know Big-O is for upper bound, means the maximum time an algorithm may take. But I have no idea regarding the Theta.

like image 587
Adeel Ansari Avatar asked Jan 21 '09 04:01

Adeel Ansari


People also ask

What does it mean to have a tight bound?

A tight bound implies that both the lower and the upper bound for the computational complexity of an algorithm are the same.

What is a tight lower bound?

Tight bounds An upper bound is said to be a tight upper bound, a least upper bound, or a supremum, if no smaller value is an upper bound. Similarly, a lower bound is said to be a tight lower bound, a greatest lower bound, or an infimum, if no greater value is a lower bound.

What is tight bound notation?

Θ-notation (theta notation) is called tight-bound because it's more precise than O-notation and Ω-notation (omega notation). If I were lazy, I could say that binary search on a sorted array is O(n2), O(n3), and O(2n), and I would be technically correct in every case.

What does lower bound mean in statistics?

Lower bound: a value that is less than or equal to every element of a set of data. Upper bound: a value that is greater than or equal to every element of a set of data. Example: in {3,5,11,20,22} 3 is a lower bound, and 22 is an upper bound.


2 Answers

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).

like image 107
Chris Bunch Avatar answered Oct 12 '22 04:10

Chris Bunch


Θ-notation (theta notation) is called tight-bound because it's more precise than O-notation and Ω-notation (omega notation).

If I were lazy, I could say that binary search on a sorted array is O(n2), O(n3), and O(2n), and I would be technically correct in every case. That's because O-notation only specifies an upper bound, and binary search is bounded on the high side by all of those functions, just not very closely. These lazy estimates would be useless.

Θ-notation solves this problem by combining O-notation and Ω-notation. If I say that binary search is Θ(log n), that gives you more precise information. It tells you that the algorithm is bounded on both sides by the given function, so it will never be significantly faster or slower than stated.

like image 29
Bill the Lizard Avatar answered Oct 12 '22 03:10

Bill the Lizard