Complexity of algorithms

From Citizendium
Revision as of 16:11, 21 February 2007 by imported>Nick Johnson
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In computer science, Big O Notation is a notation for expressing the worst-case execution time for an algorithm.

It is generally written as is a function of zero or more parameters of the system. It roughly states that in the aymptotic case (i.e. as one or more of the system parameters extend towards their extremes), the actual execution time of the algorithm is bounded by --- Constant time --- the time necessary to perform the algorithm does not change in response to the size of the problem.

    • --- Linear time --- the time grows linearly with the size (n) of the problem.
    • --- Quadratic time --- the time grows quadratically with the size (n) of the problem. Please note that, by convention, one only writes the highest-degree term for polynomial time.
  • Sub-polynomial time algorithms (grow slower than polynomial time algorithms).
  • -- Logarithmic time
  • Super-polynomial time algorithsm (grow faster than polynomial time algorithms).


Despite the examples, Big O Notation can express execution time as a function of multiple examples.


See Also