Theta vs Big O
From charlesreid1
One of the things that you'll notice as you peruse algorithm and data structure textbooks is that there tend to be two camps: the Big O camp, and the Theta camp.
This page addresses some of the reasons why you would use one versus the other.
Why Big O
This is the more common concept, and is used because it is often easier to intuit about. The big O complexity class refers to an upper bound on the cost of the algorithm. It's a coarser and less rigorous way of comparing algorithms.
This is the approach you see in most textbooks, undergraduate material, etc.
Why Theta
Theta is a lower bound - a big-Theta cost of T(f(n)) says you can never do better than f(n) in terms of cost. This is a way of talking about the cost of the absolute best your algorithm will be able to do.
MIT lecturers often make use of Theta(n).
| Computer Science notes on computer science topics on the wiki, for educational and learning purposes
Part of the 2017 CS Study Plan.
Python/Exceptions · Python/Assertions · Python/Decorators Python/Os (os module) · Python/Strings Python/Splat · Python/Iterators · Python/Generators Python/Comparators · Python/Lambdas
Builtin features of Java: Java/Exceptions · Java/Assertions · Java/Memory · Java/Interfaces Java/Generics · Java/Decorators · Java/Diamond Notation Java/Iterators · Java/Iterable · Iterators vs Iterable Java/Comparators · Java/Comparable · Comparators vs Comparable Java/Numeric · Java/TypeChecking · Java/Testing · Java/Timing · Java/Profiling Documentation: Javadocs · Java/Documentation Tools and functionality: Java/URLs · Java/CSV External libraries: Guava · Fastutil · Eclipse Collections OOP: OOP Checklist · Java/Abstract Class · Java/Encapsulation · Java/Generics
|
See also: