Documentation

DescriptiveComplexity.Complexity

Abstract complexity classes, the polynomial hierarchy, and NP-completeness #

Complexity classes are introduced abstractly: a ComplexityClass assigns to decision problems (over arbitrary vocabularies) a membership predicate and a hardness predicate, and is required to be closed under (ordered) first-order reductions – membership downward (P ≤ᶠᵒ Q and Q ∈ 𝒞 give P ∈ 𝒞), hardness upward (P ≤ᶠᵒ Q and P 𝒞-hard give Q 𝒞-hard). Since FO reductions are computable in AC⁰ ⊆ LOGSPACE ⊆ PTIME, every class from LOGSPACE up is closed in this sense, so this is a mild requirement. Note that closure must be part of the definition of a complexity class rather than an axiom quantified over all classes: arbitrary collections of problems need not be closed, and the quantified axiom would be inconsistent.

This file also defines the complement of a decision problem (DecisionProblem.compl, notation Pᶜ), and the observation that a reduction complements: the same interpretation reduces Pᶜ to Qᶜ (DescriptiveComplexity.FOReduction.compl).

The polynomial hierarchy itself – DescriptiveComplexity.SigmaP/DescriptiveComplexity.PiP, with levels k ≥ 1 defined by second-order quantifier alternation and level 0 left as an empty placeholder – lives in DescriptiveComplexity.Hierarchy; the Cook–Levin theorem (Cook 1971; Levin 1973) lives with the problem SAT in DescriptiveComplexity.Problems.Sat, and completeness theorems for other problems in their files under DescriptiveComplexity/Problems/ (e.g. DescriptiveComplexity.threeCol_NP_complete in DescriptiveComplexity.Problems.ThreeColorability).

An abstract complexity class: a collection of decision problems (its Membership predicate) together with a Hardness predicate, closed under (ordered) first-order reductions. Both predicates are left completely abstract; the closure requirements are sound for every class containing LOGSPACE, since (ordered) FO reductions are computable in AC⁰.

Instances For
    Dependency graph

    P ∈ 𝒞: the problem P belongs to the complexity class 𝒞. (This overloads the notation; the Membership class cannot be used here since the element type DecisionProblem L is not determined by ComplexityClass.)

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph
      theorem DescriptiveComplexity.ComplexityClass.ext {C₁ C₂ : ComplexityClass} (hMem : ∀ {L : FirstOrder.Language} (P : DecisionProblem L), C₁.Mem P C₂.Mem P) (hHard : ∀ {L : FirstOrder.Language} (P : DecisionProblem L), C₁.Hard P C₂.Hard P) :
      C₁ = C₂

      Two complexity classes with the same members and the same hard problems are equal: the remaining fields are proofs.

      Dependency graph

      The empty complexity class: no members, and every problem vacuously hard (there is nothing that would have to reduce to it). It is a placeholder for levels of a hierarchy that are not (yet) characterized logically.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        @[instance_reducible]

        Inclusion of complexity classes.

        Equations
        • One or more equations did not get rendered due to their size.
        Dependency graph

        A problem is complete for a class if it belongs to it and is hard for it.

        Equations
        Instances For
          Dependency graph
          Dependency graph
          Dependency graph

          The complement of a decision problem: its yes-instances are the no-instances of P.

          Equations
          Instances For
            Dependency graph
            Dependency graph
            Dependency graph

            Reductions complement: the very same interpretation reduces Pᶜ to Qᶜ, since the correctness of a reduction is an equivalence. This is what turns a hardness discharge for a Σ-level into one for the dual Π-level; see DescriptiveComplexity.taut_hard_of_piSODefinable.

            Equations
            Instances For
              Dependency graph

              Reductions complement: the very same interpretation reduces Pᶜ to Qᶜ, since the correctness of a reduction is an equivalence. This is what turns a hardness discharge for a Σ-level into one for the dual Π-level; see DescriptiveComplexity.taut_hard_of_piSODefinable.

              Equations
              Instances For
                Dependency graph