Documentation

DescriptiveComplexity.Counting.DecisionClasses

Decision classes defined by counting #

The classes of decision problems whose answer is a property of the number of witnesses of an existential second-order sentence – classically, of the number of accepting runs of a nondeterministic polynomial-time machine:

Each is DescriptiveComplexity.countClass S R for a side condition S and a relation R on two numbers: a problem is in the class when, on nonempty finite ordered structures, S holds of the two witness counts and the answer is R of them (DescriptiveComplexity.CountDefinable). The witness counts are those of DescriptiveComplexity.SharpPDefinable, read over the ordered expansion; the two-number form is the characterization of these classes by GapP functions, differences of two #P functions (Fenner, Fortnow, Kurtz 1994), which needs no integer-valued problem.

Closure under first-order reductions is the pullback of the two kernels through the interpretation, as for #P (DescriptiveComplexity.CountDefinable.of_orderedReduction); hardness is cofinal, as for every class of the library. A problem of the class is given by two counting problems of #P (DescriptiveComplexity.mem_countClass_of_sharpP), which is how memberships are proved.

Inclusions: UP ⊆ NP, UP ⊆ ⊕P, NP ⊆ PP, coNP ⊆ PP; ⊕P and PP are closed under complement, by adding one witness to a kernel (DescriptiveComplexity.pairKernel with the kernel ⊤ over the block without variables). Whether C₌P is closed under complement is open. The complete problems are in DescriptiveComplexity.Problems.Sat.CountingDecision.

Problems defined by a relation between two witness counts #

A decision problem is defined by the relation R between two witness counts under the side condition S if, on nonempty finite ordered structures, the two counts satisfy S and the problem holds exactly when they satisfy R.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Dependency graph
    theorem DescriptiveComplexity.CountDefinable.congr {L : FirstOrder.Language} [L.IsRelational] {S R : ℕ → ℕ → Prop} {P Q : DecisionProblem L} (h : ∀ (A : Type) [inst : L.Structure A] [Finite A], P.Holds A ↔ Q.Holds A) (hP : CountDefinable S R P) :
    Dependency graph

    Closure under ordered first-order reductions: both kernels are pulled back through the interpretation, extended with the lexicographic order.

    Dependency graph

    Closure under first-order reductions.

    Dependency graph

    The classes #

    noncomputable def DescriptiveComplexity.countClass (S R : ℕ → ℕ → Prop) :

    The class of the problems defined by the relation R between two witness counts under the side condition S, with cofinal hardness.

    Equations
    Instances For
      Dependency graph

      ⊕P: the number of witnesses is odd.

      Equations
      Instances For
        Dependency graph

        Mod_k P: the number of witnesses is not a multiple of k.

        Equations
        Instances For
          Dependency graph

          PP: the first number of witnesses exceeds the second – classically, more runs accept than reject.

          Equations
          Instances For
            Dependency graph

            C₌P: the two numbers of witnesses are equal.

            Equations
            Instances For
              Dependency graph

              UP: at most one witness, and the answer is whether there is one. No complete problem is known for it, and the question does not relativize (Hartmanis, Hemachandra 1988); the class is here for its inclusions.

              Equations
              Instances For
                Dependency graph
                theorem DescriptiveComplexity.mem_countClass_of_sharpP {L : FirstOrder.Language} [L.IsRelational] {S R : ℕ → ℕ → Prop} {C D : CountingProblem L} (hC : SharpP.Mem C) (hD : SharpP.Mem D) {P : DecisionProblem L} (h : ∀ (A : Type) [inst : L.Structure A] [Finite A] [Nonempty A], S (C.Count A) (D.Count A) ∧ (P.Holds A ↔ R (C.Count A) (D.Count A))) :
                (countClass S R).Mem P

                A problem of the class, from two counting problems of #P. Registered in the Lax archive as Lax175070.CountClassMembership.mem_countClass_of_sharpP.

                Dependency graph

                Inclusions needing no arithmetic on the kernels #

                UP ⊆ ⊕P: at most one witness, and one is an odd number of them. Registered in the Lax archive as Lax175070.CountClassInclusions.UP_subset_parityP.

                Dependency graph

                UP ⊆ NP: a problem with at most one witness is a problem with a witness, and the order the kernel reads is re-quantified. Registered in the Lax archive as Lax175070.CountClassInclusions.UP_subset_NP.

                Dependency graph

                NP ⊆ PP: a problem with a witness has more witnesses than the kernel ⊥ has, namely none. Registered in the Lax archive as Lax175070.CountClassInclusions.NP_subset_PP.

                Dependency graph

                ⊕P is closed under complement: a number is even exactly when its successor is odd. Registered in the Lax archive as Lax175070.CountClassComplements.compl_mem_parityP.

                Dependency graph

                PP is closed under complement: ¬ (d < c) is c < d + 1, with the counts swapped. Registered in the Lax archive as Lax175070.CountClassComplements.compl_mem_PP.

                Dependency graph
                Dependency graph