Top Qs
Timeline
Chat
Perspective

Complement (complexity)

From Wikipedia, the free encyclopedia

Remove ads

In computational complexity theory, the complement of a decision problem is the decision problem resulting from reversing the yes and no answers.[1] Equivalently, if we define decision problems as sets of finite strings, then the complement of this set over some fixed domain is its complement problem.[2]

For example, one important problem is whether a number is a prime number. Its complement is to determine whether a number is a composite number (a number that is not prime). Here the domain both the original problem and of the complement is the set of all natural numbers.[3]

There is a Turing reduction from every problem to its complement problem.[4] The complement operation is an involution, meaning it "undoes itself", or the complement of the complement is the original problem.

One can generalize this to the complement of a complexity class, called the complement class, which is the set of complements of every problem in the class.[5] If a class is called C, its complement is conventionally labelled co-C. Notice that this is not the complement of the complexity class itself as a set of problems, which would generally contain a great deal more problems.

A class is said to be closed under complement if the complement of any problem in the class is still in the class.[6] Because there are Turing reductions from every problem to its complement, any class that is closed under Turing reductions is closed under complement. Any class that is closed under complement is equal to its complement class. However, under many-one reductions, many important classes, especially NP, are believed to be distinct from their complement classes (although this has not been proven).[7]

The closure of any complexity class under Turing reductions is a superset of that class that is closed under complement. The closure under complement is the smallest such class. If a class is intersected with its complement, we obtain a (possibly empty) subset that is closed under complement.

Every deterministic complexity class (DTIME(f(n)), DSPACE(f(n)), for any f(n)) is closed under complement,[8] because one can simply add a last step to the algorithm that reverses the answer. This doesn't work for nondeterministic complexity classes, because if there exist both computation paths that accept and paths that reject a particular instance, and all the paths reverse their answer, there will still be paths that accept and paths that reject consequently, both the original machine and the modified machine accept the instance.

Similarly, probabilistic classes such as BPP, ZPP, BQP or PP that are defined symmetrically with regard to their yes and no instances are closed under complement, whereas classes such as RP and co-RP that define their probabilities with one-sided error are not (currently known to be) closed under complement.

Some of the most surprising complexity results shown to date showed that the complexity classes NL and SL are in fact closed under complement (see Immerman–Szelepcsényi theorem), whereas before it was widely believed they were not. The latter has become less surprising now that we know SL equals L, which is a deterministic class.

Every class that is low for itself is closed under complement.

Remove ads

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads