Documentation

DescriptiveComplexity.Problems.SetFamily.Defs

Set Cover, Hitting Set and Set Packing: definitions #

The three classical problems on set systems (Karp 1972), as decision problems on FirstOrder.Language.setSystem-structures: a universe carrying two unary marks separating the ground elements from the sets of a family, a binary incidence relation between them, and a third unary mark carrying the numeric threshold k in the unary representation of DescriptiveComplexity.Numbers.Unary (the threshold is the cardinality Set.ncard of the marked set, order-free and isomorphism-invariant for free).

They are the set-system counterparts of the clique family (DescriptiveComplexity.Problems.CliqueFamily), and are organized the same way: the semantics is carried by generic properties of predicates on a type – DescriptiveComplexity.CoversOn, its transpose DescriptiveComplexity.HitsOn (elements and sets exchanged, incidence read backwards) and DescriptiveComplexity.PacksOn – which the isomorphism-invariance proofs and the reductions share. Set Cover and Hitting Set being literally one property read in two directions is what makes them inter-reducible by a single interpretation (DescriptiveComplexity.Problems.SetFamily.Reductions), just as complementation relates Clique and Independent Set.

Two conventions worth stating once:

As with the clique family, cardinality thresholds are only meaningful on finite structures, so finiteness of the universe is part of the yes-instances; by DescriptiveComplexity.ComplexityClass.mem_congr_finite this does not affect any complexity-theoretic statement.

Relation symbols of the language of set systems.

Instances For
    Dependency graph
    Dependency graph
    def FirstOrder.Language.instDecidableEqSetSystemRel.decEq {a✝ : } (x✝ x✝¹ : setSystemRel a✝) :
    Decidable (x✝ = x✝¹)
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph

      The relational language of set systems: a bipartite incidence structure between ground elements and sets of a family, together with a marked subset of the universe whose cardinality serves as threshold.

      Equations
      Instances For
        Dependency graph
        Dependency graph
        @[reducible, inline]

        The ground-element symbol of set systems.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The family symbol of set systems.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The incidence symbol of set systems.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]

              The mark symbol of set systems.

              Equations
              Instances For
                Dependency graph

                The generic covering property #

                The property underlying both problems, for arbitrary unary predicates Ep (ground elements), Fp (sets of the family) and Kp (marks), and an arbitrary binary predicate Mp (incidence) on a type.

                def DescriptiveComplexity.CoversOn {A : Type} (Ep Fp : AProp) (Mp : AAProp) (Kp : AProp) :

                Some subfamily of the Fp-sets covers every Ep-element and is at most as large as the number encoded by the Kp-marked elements: “some cover is at most as large as the marked set”.

                Equations
                Instances For
                  Dependency graph
                  def DescriptiveComplexity.HitsOn {A : Type} (Ep Fp : AProp) (Mp : AAProp) (Kp : AProp) :

                  Some set of Ep-elements meets every Fp-set and is at most as large as the number encoded by the Kp-marked elements: “some hitting set is at most as large as the marked set”. This is DescriptiveComplexity.CoversOn with the roles of elements and sets exchanged and the incidence relation transposed.

                  Equations
                  Instances For
                    Dependency graph
                    def DescriptiveComplexity.PacksOn {A : Type} (Ep Fp : AProp) (Mp : AAProp) (Kp : AProp) :

                    Some subfamily of the Fp-sets is pairwise disjoint – no Ep-element belongs to two distinct members – and is at least as large as the number encoded by the Kp-marked elements: “some packing is at least as large as the marked set”.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Dependency graph
                      def DescriptiveComplexity.ExactlyCoversOn {A : Type} (Ep Fp : AProp) (Mp : AAProp) :

                      Some subfamily of the Fp-sets covers every Ep-element exactly once: it covers, and no element belongs to two distinct members. Unlike the three properties above this one carries no threshold – exactness is the whole constraint.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Dependency graph
                        theorem DescriptiveComplexity.exactlyCoversOn_iff_unique {A : Type} (Ep Fp : AProp) (Mp : AAProp) :
                        ExactlyCoversOn Ep Fp Mp ∃ (G : AProp), (∀ (s : A), G sFp s) ∀ (x : A), Ep x∃! s : A, G s Mp x s

                        Exactness in the “exactly one” form: covering plus disjointness is one covering set per element.

                        Dependency graph
                        def DescriptiveComplexity.SplitsOn {A : Type} (Ep Fp : AProp) (Mp : AAProp) :

                        Some two-colouring of the ground elements splits every set of the family: no set is monochromatic. Like DescriptiveComplexity.ExactlyCoversOn this property carries no threshold.

                        Equations
                        Instances For
                          Dependency graph

                          The threshold as an injection #

                          On a finite universe, comparing the decoded numbers is comparing sizes, so the threshold condition can equivalently be read as the existence of an injection. This is the form the second-order definitions guess.

                          theorem DescriptiveComplexity.coversOn_iff_embedding {A : Type} [Finite A] (Ep Fp : AProp) (Mp : AAProp) (Kp : AProp) :
                          CoversOn Ep Fp Mp Kp ∃ (G : AProp), (∀ (s : A), G sFp s) (∀ (x : A), Ep x∃ (s : A), G s Mp x s) Nonempty ({ s : A // G s } { x : A // Kp x })

                          The cover threshold as an injection of the cover into the marked set.

                          Dependency graph
                          theorem DescriptiveComplexity.hitsOn_iff_embedding {A : Type} [Finite A] (Ep Fp : AProp) (Mp : AAProp) (Kp : AProp) :
                          HitsOn Ep Fp Mp Kp ∃ (H : AProp), (∀ (x : A), H xEp x) (∀ (s : A), Fp s∃ (x : A), H x Mp x s) Nonempty ({ x : A // H x } { x : A // Kp x })

                          The hitting-set threshold as an injection of the hitting set into the marked set.

                          Dependency graph
                          theorem DescriptiveComplexity.packsOn_iff_embedding {A : Type} [Finite A] (Ep Fp : AProp) (Mp : AAProp) (Kp : AProp) :
                          PacksOn Ep Fp Mp Kp ∃ (G : AProp), (∀ (s : A), G sFp s) (∀ (s s' : A), G sG s's s'∀ (x : A), Ep x¬(Mp x s Mp x s')) Nonempty ({ x : A // Kp x } { s : A // G s })

                          The packing threshold as an injection of the marked set into the packing: a lower bound, so the injection runs the other way round.

                          Dependency graph
                          theorem DescriptiveComplexity.CoversOn.of_equiv {A B : Type} (u : B A) {EB FB KB : BProp} {MB : BBProp} {EA FA KA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) (hK : ∀ (b : B), KB b KA (u b)) (h : CoversOn EB FB MB KB) :
                          CoversOn EA FA MA KA

                          CoversOn transports along an equivalence commuting with the four predicates.

                          Dependency graph
                          theorem DescriptiveComplexity.CoversOn.equiv_iff {A B : Type} (u : B A) {EB FB KB : BProp} {MB : BBProp} {EA FA KA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) (hK : ∀ (b : B), KB b KA (u b)) :
                          CoversOn EB FB MB KB CoversOn EA FA MA KA

                          CoversOn transports along an equivalence, iff version.

                          Dependency graph
                          theorem DescriptiveComplexity.HitsOn.equiv_iff {A B : Type} (u : B A) {EB FB KB : BProp} {MB : BBProp} {EA FA KA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) (hK : ∀ (b : B), KB b KA (u b)) :
                          HitsOn EB FB MB KB HitsOn EA FA MA KA

                          HitsOn transports along an equivalence, iff version.

                          Dependency graph
                          theorem DescriptiveComplexity.PacksOn.of_equiv {A B : Type} (u : B A) {EB FB KB : BProp} {MB : BBProp} {EA FA KA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) (hK : ∀ (b : B), KB b KA (u b)) (h : PacksOn EB FB MB KB) :
                          PacksOn EA FA MA KA

                          PacksOn transports along an equivalence commuting with the four predicates.

                          Dependency graph
                          theorem DescriptiveComplexity.ExactlyCoversOn.of_equiv {A B : Type} (u : B A) {EB FB : BProp} {MB : BBProp} {EA FA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) (h : ExactlyCoversOn EB FB MB) :

                          ExactlyCoversOn transports along an equivalence commuting with the three predicates.

                          Dependency graph
                          theorem DescriptiveComplexity.SplitsOn.of_equiv {A B : Type} (u : B A) {EB FB : BProp} {MB : BBProp} {EA FA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) (h : SplitsOn EB FB MB) :
                          SplitsOn EA FA MA

                          SplitsOn transports along an equivalence commuting with the three predicates.

                          Dependency graph
                          theorem DescriptiveComplexity.SplitsOn.equiv_iff {A B : Type} (u : B A) {EB FB : BProp} {MB : BBProp} {EA FA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) :
                          SplitsOn EB FB MB SplitsOn EA FA MA

                          SplitsOn transports along an equivalence, iff version.

                          Dependency graph
                          theorem DescriptiveComplexity.ExactlyCoversOn.equiv_iff {A B : Type} (u : B A) {EB FB : BProp} {MB : BBProp} {EA FA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) :

                          ExactlyCoversOn transports along an equivalence, iff version.

                          Dependency graph
                          theorem DescriptiveComplexity.PacksOn.equiv_iff {A B : Type} (u : B A) {EB FB KB : BProp} {MB : BBProp} {EA FA KA : AProp} {MA : AAProp} (hE : ∀ (b : B), EB b EA (u b)) (hF : ∀ (b : B), FB b FA (u b)) (hM : ∀ (b b' : B), MB b b' MA (u b) (u b')) (hK : ∀ (b : B), KB b KA (u b)) :
                          PacksOn EB FB MB KB PacksOn EA FA MA KA

                          PacksOn transports along an equivalence, iff version.

                          Dependency graph

                          The two problems #

                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph

                          A set system admits a cover at most as large as its marked set. (Finiteness of the universe is part of the property: cardinality thresholds are only meaningful on finite structures.)

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

                            A set system admits a hitting set at most as large as its marked set.

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

                              A set system admits a packing at least as large as its marked set.

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

                                A set system admits an exact cover: a subfamily covering every ground element exactly once. There is no threshold here, so no finiteness assumption either.

                                Equations
                                Instances For
                                  Dependency graph
                                  Dependency graph

                                  Isomorphism-invariance and the bundled problems #

                                  Dependency graph
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph

                                  SET COVER, as a problem on set systems: is there a subfamily covering every ground element, at most as large as the marked set?

                                  Equations
                                  Instances For
                                    Dependency graph

                                    HITTING SET, as a problem on set systems: is there a set of ground elements meeting every set of the family, at most as large as the marked set?

                                    Equations
                                    Instances For
                                      Dependency graph

                                      SET PACKING, as a problem on set systems: is there a pairwise disjoint subfamily at least as large as the marked set?

                                      Equations
                                      Instances For
                                        Dependency graph

                                        EXACT COVER, as a problem on set systems: is there a subfamily covering every ground element exactly once? The marked set plays no role – exactness replaces the threshold.

                                        Equations
                                        Instances For
                                          Dependency graph

                                          SET SPLITTING, as a problem on set systems: is there a two-colouring of the ground elements leaving no set of the family monochromatic? (Also known as hypergraph 2-colourability.)

                                          Equations
                                          Instances For
                                            Dependency graph