All Topics  
Polynomial time

 

   Email Print
   Bookmark   Link






 

Polynomial time



 
 
In computational complexity theory
Computational complexity theory

Computational complexity theory, as a branch of the theory of computation in computer science, investigates the problems related to the Computational resource required for the execution of algorithms , and the inherent difficulty in providing efficient algorithms for specific computational problems....
, polynomial time refers to the computation time
Computation time

In computational complexity theory, computation time is a measure of how many steps are used by some abstract machine in a particular computation....
 of a problem where the run time
Run time

Run time or runtime may refer to:*Run time, the length of a film or television program in minutes, usually with end credits included*Runtime, in computer science, the duration of a computer program's execution, from beginning to termination...
, , is no greater than a polynomial function of the problem size
Problem size

In the fields of Analysis of algorithms and computational complexity theory, the running time or space requirements of an algorithm are expressed as a function of the problem size....
, n.

Written mathematically using big O notation
Big O notation

In mathematics, big O notation describes the asymptotic analysis of a function when the argument tends towards a particular value or infinity, usually in terms of simpler functions....
, this states that for some natural number . For example, the quicksort
Quicksort

Quicksort is a well-known sorting algorithm developed by C. A. R. Hoare that, average performance, makes comparisons to sort n items. However, in the Best, worst and average case, it makes comparisons....
 sorting algorithm on n integers performs at most operations for some constant . Thus it runs in time and is a polynomial time algorithm.

The class is mathematically defined as follows

Mathematicians sometimes use the notion of "polynomial time on the length of the input" as a definition of a "fast" or "feasible" computation (see Cobham's thesis
Cobham's Thesis

Cobham's thesis asserts that computational problems can be feasibly computed on some computational device only if they can be computed in polynomial time; that is, if they lie in the complexity class P ....
), as opposed to sub-exponential time
Sub-exponential time

In computational complexity theory, sub-exponential time algorithms are those that run in time greater than polynomial time , but less than exponential time....
 (also super-polynomial time), which is anything slower than that.






Discussion
Ask a question about 'Polynomial time'
Start a new discussion about 'Polynomial time'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computational complexity theory
Computational complexity theory

Computational complexity theory, as a branch of the theory of computation in computer science, investigates the problems related to the Computational resource required for the execution of algorithms , and the inherent difficulty in providing efficient algorithms for specific computational problems....
, polynomial time refers to the computation time
Computation time

In computational complexity theory, computation time is a measure of how many steps are used by some abstract machine in a particular computation....
 of a problem where the run time
Run time

Run time or runtime may refer to:*Run time, the length of a film or television program in minutes, usually with end credits included*Runtime, in computer science, the duration of a computer program's execution, from beginning to termination...
, , is no greater than a polynomial function of the problem size
Problem size

In the fields of Analysis of algorithms and computational complexity theory, the running time or space requirements of an algorithm are expressed as a function of the problem size....
, n.

Written mathematically using big O notation
Big O notation

In mathematics, big O notation describes the asymptotic analysis of a function when the argument tends towards a particular value or infinity, usually in terms of simpler functions....
, this states that for some natural number . For example, the quicksort
Quicksort

Quicksort is a well-known sorting algorithm developed by C. A. R. Hoare that, average performance, makes comparisons to sort n items. However, in the Best, worst and average case, it makes comparisons....
 sorting algorithm on n integers performs at most operations for some constant . Thus it runs in time and is a polynomial time algorithm.

The class is mathematically defined as follows

Mathematicians sometimes use the notion of "polynomial time on the length of the input" as a definition of a "fast" or "feasible" computation (see Cobham's thesis
Cobham's Thesis

Cobham's thesis asserts that computational problems can be feasibly computed on some computational device only if they can be computed in polynomial time; that is, if they lie in the complexity class P ....
), as opposed to sub-exponential time
Sub-exponential time

In computational complexity theory, sub-exponential time algorithms are those that run in time greater than polynomial time , but less than exponential time....
 (also super-polynomial time), which is anything slower than that. Exponential time
Exponential time

In computational complexity theory, exponential time is the computation time of a problem where the time to complete the computation, m, is bounded by an exponential function of the problem size, n....
 is one example of a super-polynomial time.

The complexity class
Complexity class

In computational complexity theory, a complexity class is a set of problems of related complexity. A typical complexity class has a definition of the form:...
 of decision problem
Decision problem

In computability theory and computational complexity theory, a decision problem is a question in some formal system with a yes-or-no answer, depending on the values of some input parameters....
s that can be solved on a deterministic sequential machine in polynomial time is known as P
P (complexity)

In computational complexity theory, P, also known as PTIME or DTIME, is one of the most fundamental complexity classes. It contains all decision problems which can be solved by a deterministic Turing machine using a polynomial amount of computation time, or polynomial time....
. Equivalently, NP
NP (complexity)

In computational complexity theory, NP is one of the most fundamental complexity classes.The abbreviation NP refers to "Nondeterministic algorithm Polynomial time"....
 is the class of decision problems that can be solved in polynomial time on a non-deterministic Turing machine
Non-deterministic Turing machine

In theoretical computer science, a Turing machine is a theoretical machine that is used in thought experiments to examine the abilities and limitations of computers....
 (NP stands for Nondeterministic Polynomial time).

P is the smallest time-complexity class on a deterministic machine which is robust in terms of machine model changes. (For example, a change from a single-tape Turing machine
Turing machine

Turing machines are basic abstract symbol-manipulating devices which, despite their simplicity, can be adapted to simulate the logic of any computer algorithm....
 to a multi-tape machine can lead to a quadratic speedup, but any algorithm that runs in polynomial time
Polynomial time

In computational complexity theory, polynomial time refers to the computation time of a problem where the run time, , is no greater than a polynomial function of the problem size, n....
 under one model also does so on the other.) P is also the smallest class closed under composition of subproblems. Any given abstract machine
Abstract machine

An abstract machine, also called an abstract computer, is a theoretical model of a computer hardware or software system used in Automata theory....
 will have a complexity class
Complexity class

In computational complexity theory, a complexity class is a set of problems of related complexity. A typical complexity class has a definition of the form:...
 corresponding to the problems which can be solved in polynomial time
Polynomial time

In computational complexity theory, polynomial time refers to the computation time of a problem where the run time, , is no greater than a polynomial function of the problem size, n....
 on that machine.

Some texts use the term weakly polynomial run time
Run time

Run time or runtime may refer to:*Run time, the length of a film or television program in minutes, usually with end credits included*Runtime, in computer science, the duration of a computer program's execution, from beginning to termination...
. This means that run time
Run time

Run time or runtime may refer to:*Run time, the length of a film or television program in minutes, usually with end credits included*Runtime, in computer science, the duration of a computer program's execution, from beginning to termination...
 is polynomial
Polynomial time

In computational complexity theory, polynomial time refers to the computation time of a problem where the run time, , is no greater than a polynomial function of the problem size, n....
 not in the size of the input, but in the numerical value of the input, which may be exponentially larger. For example, the Euclidean Algorithm
Euclidean algorithm

In number theory, the Euclidean algorithm is an algorithm to determine the greatest common divisor of two elements of any Euclidean domain . Its major significance is that it does not require factorization the two integers, and it is also significant in that it is one of the oldest algorithms known, dating back to the ancient Greeks....
 is only weakly polynomial when implemented using subtraction.

Similarly, running in strongly polynomial time means that the algorithm's run time
Run time

Run time or runtime may refer to:*Run time, the length of a film or television program in minutes, usually with end credits included*Runtime, in computer science, the duration of a computer program's execution, from beginning to termination...
 is independent of the numerical data size and depends only on the inherent dimensions of the problem. For example, an algorithm which could sort n integers each less than k in time would be strongly polynomial, while an algorithm sorting them in time would be weakly polynomial
Polynomial time

In computational complexity theory, polynomial time refers to the computation time of a problem where the run time, , is no greater than a polynomial function of the problem size, n....
 (because an integer less than k can be represented in size logarithmic in k).

See also

  • Constant time
    Constant time

    In computational complexity theory, constant time, or Big O notation time, refers to the computation time of a problem when the time needed to solve that problem is bounded by a value that does not depend on the size of the data it is given as input....
  • Linear time
    Linear time

    In computational complexity theory, an algorithm is said to take linear time, or Big O notation time, if the asymptotic upper bound for the time it requires is proportional to the size of the input, which is usually denoted n....
  • Complexity classes P and NP