1.3. 4 Polynomial time computable functions in. ... A function or predicate is said to be polynomial time computable provided there exists a Turing machine M and a polynomial p(n), such that M computes the function or recognizes the predicate, and such that M runs in time ≤ p(n) for all inputs of length n.
Is exponential time polynomial?
O(n^2) is polynomial time. The polynomial is f(n) = n^2. On the other hand, O(2^n) is exponential time, where the exponential function implied is f(n) = 2^n. The difference is whether the function of n places n in the base of an exponentiation, or in the exponent itself.
How do you know if something is a polynomial time?
3 Answers. An algorithm is polynomial (has polynomial running time) if for some k,C>0, its running time on inputs of size n is at most Cnk. Equivalently, an algorithm is polynomial if for some k>0, its running time on inputs of size n is O(nk).