Polynomial time
From Wikipedia, the free encyclopedia
In computational complexity theory, polynomial time refers to the computation time of a problem where the time, m(n), is no greater than a polynomial function of the problem size, n. Any given abstract machine will have a complexity class corresponding to the problems which can be solved in polynomial time on that machine.
Written mathematically, m(n) = O(nk) where k is a constant (which may depend on the problem).
Mathematicians sometimes use the notion of "polynomial time on the length of the input" as a definition of a "fast" computation, as opposed to "super-polynomial time", which is anything slower than that. Exponential time is one example of a super-polynomial time.
The complexity class of decision problems that can be solved on a deterministic sequential machine in polynomial time is known as P. The class of decision problems that can be verified in polynomial time is known as P. Equivalently, NP is the class of decision problems that can be solved in polynomial time on a non-deterministic Turing machine (NP stands for Nondeterministic Polynomial time).
Polynomial time is the smallest time-complexity class on a deterministic machine which is robust in terms of machine model changes, and is the smallest class closed under composition of subproblems.
Strongly polynomial time means further that the running time is independent of the numerical data size and thus depends only on the inherent dimensions of the problem.
[edit] Subclasses of polynomial time
- Constant time: O(1)
- Linear time: O(n)
- Quadratic time: O(n2)
- Cubic time: O(n3)