<?xml version="1.0" encoding="UTF-8"?>

<record version="5" id="309">
 <title>time complexity</title>
 <name>TimeComplexity</name>
 <created>2001-10-18 01:16:56</created>
 <modified>2005-04-18 06:58:25</modified>
 <type>Definition</type>
 <creator id="2" name="akrowne"/>
 <author id="2" name="akrowne"/>
 <classification>
	<category scheme="msc" code="68Q15"/>
 </classification>
 <defines>
	<concept>polynomial time</concept>
	<concept>polynomial-time</concept>
	<concept>exponential time</concept>
	<concept>exponential-time</concept>
	<concept>complexity classes</concept>
	<concept>meta-complexity classes</concept>
 </defines>
 <preamble>\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{xypic}</preamble>
 <content>\section{Time Complexity} 

\emph{Time complexity} refers to a function describing how much time it will take an algorithm to execute, based on the parameters of its input.  The exact value of this function is usually ignored in favour of its order, expressed in the so-called Big-O notation (this is based on the limit of the time complexity function as the values of its parameters increase without bound.)

\emph{Complexity classes} are equivalence classes of time complexities which are ``equal'' in Big-O notation.  Further, there are meta-complexity classes\footnote{This term has been invented for use in this entry.} of time complexities which have Big-O expressions that differ only by some specific parameter.  For instance, $O(n^2)$ and $O(n^3)$ are both \emph{polynomial time} complexity classes, similarly $O(2^n)$ and $O(3^n)$ are \emph{exponential time} complexity classes.

\section{Example}

All comparison-based sorting has time complexity no better than $O(n \log n)$, where $n$ is the number of elements to be sorted. The exact expression for time complexity of a particular sorting algorithm may be something like $T(n)= a n \log  n + b$, with $a$ and $b$ constants, which still is order $O(n \log n)$.</content>
</record>
