complexity class


If f⁢(n) is any function and T is a Turing machineMathworldPlanetmath (of any kind) which halts on all inputs, we say that T is time bounded by f⁢(n) if for any input x with length |x|, T halts after at most f⁢(|x|) steps.

For a decision problemMathworldPlanetmath L and a class K of Turing machines, we say that L∈K⁢T⁢I⁢M⁢E⁢(f⁢(n)) if there is a Turing machine T∈K bounded by f⁢(n) which decides L. If R is a search problem then R∈K⁢T⁢I⁢M⁢E⁢(f⁢(n)) if L⁢(R)∈K⁢T⁢I⁢M⁢E⁢(f⁢(n)). The most common classes are all restricted to one read-only input tape and one output/work tape (and in some cases a one-way, read-only guess tape) and are defined as follows:

  • •

    D is the class of deterministic Turing machines. (In this case K⁢T⁢I⁢M⁢E is written D⁢T⁢I⁢M⁢E.)

  • •

    N is the class of non-deterministic Turing machines (and so K⁢T⁢I⁢M⁢E is written N⁢T⁢I⁢M⁢E).

  • •

    R is the class of positive one-sided error Turing machines and c⁢o⁢R the class of negative one-sided error machines

  • •

    B⁢P is the class of two-sided error machines

  • •

    P is the class of minimal error machines

  • •

    Z⁢P is the class of zero error machines

Although K⁢T⁢I⁢M⁢E⁢(f⁢(n)) is a time complexity class for any f⁢(n), in actual use time complexity classes are usually the union of K⁢T⁢I⁢M⁢E⁢(f⁢(n)) for many f. If Φ is a class of functions then K⁢T⁢I⁢M⁢E⁢(Φ)=⋃f∈ΦK⁢T⁢I⁢M⁢E⁢(f⁢(n)). Most commonly this is used when Φ=𝒪⁢(f⁢(n)).

The most important time complexity classes are the polynomial classes:

K⁢𝒫=⋃i∈ℕK⁢T⁢I⁢M⁢E⁢(ni)

When K=D this is called just 𝒫, the class of problems decidable in polynomial time. One of the major outstanding problems in mathematics is the question of whether 𝒫=𝒩⁢𝒫.

We say a problem π∈K⁢S⁢P⁢A⁢C⁢E⁢(f⁢(n)) if there is a Turing machine T∈K which solves π, always halts, and never uses more than f⁢(n) cells of its output/work tape. As above, if Φ is a class of function then K⁢S⁢P⁢A⁢C⁢E⁢(Φ)=⋃f∈ΦK⁢S⁢P⁢A⁢C⁢E⁢(f⁢(n))

The most common space complexity classes are K⁢ℒ=K⁢S⁢P⁢A⁢C⁢E⁢(𝒪⁢(log⁡n)). When K=D this is just called ℒ.

If 𝒞 is any complexity class then π∈c⁢o⁢𝒞 if π is a decision problem and π¯∈𝒞 or π is a search problem and L⁢(π)∈c⁢o⁢𝒞. Of course, this coincides with the definition of c⁢o⁢R above. Clearly c⁢o⁢(c⁢o⁢𝒞)=𝒞.

Since a machine with a time complexity f⁢(n) cannot possibly use more than f⁢(n) cells, K⁢T⁢I⁢M⁢E⁢(f⁢(n))⊆K⁢S⁢P⁢A⁢C⁢E⁢(f⁢(n)). If K⊆K′ then K⁢T⁢I⁢M⁢E⁢(f⁢(n))⊆K′⁢T⁢I⁢M⁢E⁢(f⁢(n)) and similarly for space.

The following are all trivial, following from the fact that some classes of machines accept and reject under stricter circumstances than others:

D⊆Z⁢P=R∩c⁢o⁢R
R∪c⁢o⁢R⊆B⁢P∩N
B⁢P⊆P
Title complexity class
Canonical name ComplexityClass
Date of creation 2013-03-22 13:01:59
Last modified on 2013-03-22 13:01:59
Owner Henry (455)
Last modified by Henry (455)
Numerical id 4
Author Henry (455)
Entry type Definition
Classification msc 68Q15