Documentation

DescriptiveComplexity.Counting.Class

Counting classes, the class #P, and its relation to NP #

A DescriptiveComplexity.CountingClass is to counting problems what a DescriptiveComplexity.ComplexityClass is to decision problems: a membership predicate and a hardness predicate, closed under reductions – here the parsimonious ones of DescriptiveComplexity.Counting, membership backward and hardness forward. As on the decision side, hardness also travels along the relativized reductions of DescriptiveComplexity.Counting.Relativized, whose target universe is definable, and hardness for a class is cofinality for those: a problem whose solutions span the universe can be hard in no other way.

Parsimonious hardness is not the hardness of the literature #

The hardness predicate is named ParsimoniousHard, and completeness ParsimoniousComplete, never plain “hard” and “complete”, because they are strictly stronger than what “#P-hard” and “#P-complete” mean in the literature, where the reductions are polynomial-time Turing (or one oracle call followed by arithmetic). Counting the satisfying assignments of a DNF formula, or the independent sets of a graph, is #P-complete in that sense, and it is not parsimoniously #P-hard unless NP ⊆ PTIME (DescriptiveComplexity.NP_subset_PTIME_of_sharpP_parsimoniousHard): a parsimonious reduction preserves “the count is positive”, so it carries the hardness of the decision problem along, and these problems have an easy one. The unqualified names are left free for the weaker notion.

Parsimonious completeness is the notion under which completeness says something about the decision problem underneath and about approximability (Arenas, Muñoz, Riveros 2020).

The class DescriptiveComplexity.SharpP is defined by witness counting (DescriptiveComplexity.SharpPDefinable), as NP is defined by existential second-order definability.

Relation to NP #

The decision problem underneath a counting problem is its support, “is the count positive?”. Three statements tie #P to NP through it:

Replacing the target of an ordered parsimonious reduction by a counting problem with the same values on finite structures.

Equations
Instances For
    Dependency graph

    An abstract counting class: a collection of counting problems (its Membership predicate) together with a ParsimoniousHardness predicate, closed under parsimonious reductions. Membership travels backward along them, hardness forward.

    Instances For
      Dependency graph

      C ∈ 𝒞: the counting problem C belongs to the counting class 𝒞.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        def DescriptiveComplexity.CountingClass.ofMem (Mem : {L₀ : FirstOrder.Language} → [inst : L₀.IsRelational] → CountingProblem L₀ → Prop) (mem_of_orderedParsimonious : ∀ {L₁ L₂ : FirstOrder.Language} [inst : L₁.IsRelational] [inst_1 : L₂.IsRelational] {C : CountingProblem L₁} {D : CountingProblem L₂} (a : OrderedParsimoniousReduction C D), Mem D → Mem C) (mem_congr_finite : ∀ {L₁ : FirstOrder.Language} [inst : L₁.IsRelational] {C D : CountingProblem L₁}, (∀ (A : Type) [inst_1 : L₁.Structure A] [Finite A], C.Count A = D.Count A) → (Mem C ↔ Mem D)) :

        The counting class with a given membership predicate, parsimonious hardness being cofinality for it: every member reduces to the problem, by a relativized ordered parsimonious reduction. Only the membership obligations have to be supplied.

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

          A counting problem is parsimoniously complete for a class if it belongs to it and every problem of the class parsimoniously reduces to it.

          Equations
          Instances For
            Dependency graph
            Dependency graph
            Dependency graph

            The class #P #

            The class #P: the counting problems that count the witnesses of an existential second-order sentence over ordered structures (Saluja, Subrahmanyam, Thakur 1995). It is closed under parsimonious reductions, and hardness for it is hardness under relativized ordered parsimonious reductions.

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

              Parsimonious #P-hardness, unfolded: every #P-definable counting problem reduces to C by a relativized ordered parsimonious reduction.

              Dependency graph

              Relation to NP #

              The support of a #P-definable counting problem is Σ₁-definable: a count of witnesses is positive exactly when there is a witness, and the order the kernel reads is re-quantified by the order elimination of DescriptiveComplexity.sigmaSODefinable_of_orderPull.

              Dependency graph

              The support of a problem of #P is in NP.

              Dependency graph

              NP is the class of supports of #P: a decision problem is in NP exactly when it is, on nonempty finite structures, the question whether some counting problem of #P is positive – the counting problem being the number of witnesses of the Σ₁ definition. Registered in the Lax archive as Lax366625.SharpPAndNP.mem_NP_iff_exists_sharpP_support.

              Dependency graph

              Every problem of NP reduces to the support of a parsimoniously #P-hard counting problem.

              Dependency graph

              The support of a parsimoniously #P-hard counting problem is NP-hard. Registered in the Lax archive as Lax366625.SharpPAndNP.NP_hard_support_of_sharpP_parsimoniousHard.

              Dependency graph

              A parsimoniously #P-hard counting problem with an easy decision version collapses NP into PTIME. This is why the counting problems whose support is in PTIME – satisfying assignments of a DNF or of a monotone 2-CNF formula, independent sets, worlds of a probabilistic database satisfying a monotone query – are not parsimoniously #P-complete unless NP ⊆ PTIME. Registered in the Lax archive as Lax366625.SharpPAndNP.NP_subset_PTIME_of_sharpP_parsimoniousHard.

              Dependency graph