Polynomial time

related topics
{math, number, function}

In computer science, the time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the size of the input to the problem. The time complexity of an algorithm is commonly expressed using big O notation, which suppresses multiplicative constants and lower order terms. When expressed this way, the time complexity is said to be described asymptotically, i.e., as the input size goes to infinity. For example, if the time required by an algorithm on all inputs of size n is at most 5n3 + 3n, the asymptotic time complexity is O(n3).

Time complexity is commonly estimated by counting the number of elementary operations performed by the algorithm, where an elementary operation takes a fixed amount of time to perform. Thus the amount of time taken and the number of elementary operations performed by the algorithm differ by at most a constant factor.

Since an algorithm may take a different amount of time even on inputs of the same size, the most commonly used measure of time complexity, the worst-case time complexity of an algorithm, denoted as T(n), is the maximum amount of time taken on any input of size n. Time complexities are classified by the nature of the function T(n). For instance, an algorithm with T(n) = O(n) is called a linear time algorithm, and an algorithm with T(n) = O(2n) is said to be an exponential time algorithm.

Contents

Full article ▸

related documents
Heaviside step function
Intersection (set theory)
Magma (algebra)
NP-hard
Separated sets
CLU (programming language)
Twin prime conjecture
Euler's criterion
BPP
Topological ring
Goldbach's weak conjecture
Decision problem
Partial fractions in integration
Alternative algebra
Kernel (category theory)
Regular space
Real line
Whittaker–Shannon interpolation formula
Amicable number
Ordered field
Metrization theorem
C*-algebra
Syntactic sugar
Regular language
Graded algebra
T1 space
Algebraic number
Lipschitz continuity
Stirling number
Dyadic rational