Documentation

CslibFrontier.Foundations.Combinatorics.SimpleGraph.Crown

Crown decompositions and the linear kernel for vertex cover #

A crown of a graph G [CFJ04] [AKFLS07] [CyganEtAl2015, Section 2.3] is a pair (C, H) of finite vertex sets such that C is independent, H is the neighbourhood of C, and H matches into C (SimpleGraph.IsCrown); the remaining vertices R = (C ∪ H)ᶜ have no neighbour in C. The cited definitions require C to be nonempty; SimpleGraph.IsCrown allows C = ∅ (then H = ∅) so that crowns compose (SimpleGraph.IsCrown.union_map), and results that need a nonempty crown say so. A matching of A into B is recorded by the partner map m (SimpleGraph.IsMatchingInto); SimpleGraph.IsMatchingInto.exists_isMatching converts it to a Mathlib SimpleGraph.Subgraph.IsMatching.

Reduction rule. Some minimum vertex cover contains H and avoids C, so τ(G) = τ(G[R]) + |H| (SimpleGraph.IsCrown.vertexCoverNum_eq): G has a vertex cover of at most k vertices exactly when |H| ≤ k and G[R] has one of at most k - |H| vertices (SimpleGraph.IsCrown.vertexCoverNum_le_iff).

Crown lemma. If G has more than 3k vertices, then G has a matching of more than k edges, or a crown with C nonempty (SimpleGraph.exists_isMatchingInto_or_exists_isCrown); if G has no isolated vertices, then also H is nonempty (SimpleGraph.exists_isMatchingInto_or_exists_isCrown_of_forall_exists_adj). The proof takes a maximum matching M, of at most k edges. The unmatched vertices form an independent set I of more than k vertices. By Hall's theorem, either I matches into its neighbourhood, a matching of more than k edges, or some S ⊆ I has fewer neighbours than vertices; a subset of I of maximum surplus |Y| - |N(Y)| is then a crown (SimpleGraph.exists_isCrown_of_card_lt). Hall's theorem takes the place of Kőnig's theorem in the usual textbook argument.

Kernel. A crown with the largest C ∪ H leaves a residual graph without nonempty crowns (SimpleGraph.exists_isCrown_forall_isCrown_eq_empty). Applying the crown lemma to that residual gives the 3k kernel (SimpleGraph.exists_isMatchingInto_or_exists_isCrown_card_compl_le): a matching of more than k edges, or a crown with |H| ≤ k whose residual has at most 3 (k - |H|) vertices. By the reduction rule, (G - (C ∪ H), k - |H|) is then an equivalent instance with at most 3 (k - |H|) vertices.

A graph without nonempty crowns has at most 2 |S| vertices for every vertex cover S (SimpleGraph.card_le_two_mul_card_of_forall_isCrown_eq_empty), since the complement of S is an independent set at least as large as its neighbourhood. Hence a single crown leaves a residual of at most 2 (k - |H|) vertices for every k ≥ τ(G) (SimpleGraph.exists_isCrown_forall_card_compl_le). This matches the 2k size of the LP-based (Nemhauser–Trotter) kernel, whose relation to crowns is studied in [AKFLS07].

These are combinatorial existence statements about SimpleGraphs. They do not construct crowns algorithmically and do not give a polynomial-time kernelization (Cslib.Complexity.IsKernelization) of the encoded problem Cslib.Complexity.VertexCover; that needs a polynomial-time maximum matching or Kőnig cover in the machine model.

Main definitions #

Main results #

References #

structure SimpleGraph.IsMatchingInto {V : Type u_1} (G : SimpleGraph V) (A B : Finset V) (m : V → V) :

m matches A into B in G: it sends the vertices of A to distinct neighbours in B. When A and B are disjoint, as in every result below that counts edges, the edges {a, m a} for a ∈ A form a matching of |A| edges (SimpleGraph.IsMatchingInto.exists_isMatching); without disjointness two of them may coincide.

  • mapsTo (a : V) : a ∈ A → m a ∈ B

    Every vertex of A is matched into B.

  • adj (a : V) : a ∈ A → G.Adj a (m a)

    Every vertex of A is matched to a neighbour.

  • injOn : Set.InjOn m ↑A

    Distinct vertices of A have distinct partners.

structure SimpleGraph.IsCrown {V : Type u_1} (G : SimpleGraph V) (C H : Finset V) :

(C, H) is a crown of G [CyganEtAl2015, Section 2.3]: C is an independent set, H is its neighbourhood, and H matches into C. Unlike the cited definition, C may be empty.

  • isIndepSet : G.IsIndepSet ↑C

    The crown C is an independent set.

  • mem_head_iff (v : V) : v ∈ H ↔ ∃ c ∈ C, G.Adj c v

    The head H is the neighbourhood of C.

  • exists_isMatchingInto : ∃ (m : V → V), G.IsMatchingInto H C m

    The head H matches into C.

Instances For
    theorem SimpleGraph.IsMatchingInto.card_le_encard_inter {V : Type u_1} {G : SimpleGraph V} {A B : Finset V} {m : V → V} (hm : G.IsMatchingInto A B m) (hAB : Disjoint A B) {S : Set V} (hS : G.IsVertexCover S) :
    ↑A.card ≤ (S ∩ (↑A ∪ ↑B)).encard

    A vertex cover S contains at least |A| vertices of A ∪ B: one endpoint of each matching edge.

    theorem SimpleGraph.IsMatchingInto.card_le_vertexCoverNum {V : Type u_1} {G : SimpleGraph V} {A B : Finset V} {m : V → V} (hm : G.IsMatchingInto A B m) (hAB : Disjoint A B) :

    Matchings bound vertex covers: a matching of A into a disjoint B has |A| edges, so every vertex cover has at least |A| vertices.

    theorem SimpleGraph.IsMatchingInto.exists_isMatching {V : Type u_1} {G : SimpleGraph V} {A B : Finset V} {m : V → V} (hm : G.IsMatchingInto A B m) (hAB : Disjoint A B) :
    ∃ (M : G.Subgraph), M.verts = ↑A ∪ m '' ↑A ∧ M.IsMatching

    A matching of A into a disjoint B is a Mathlib matching on A ∪ m '' A.

    theorem SimpleGraph.IsCrown.disjoint {V : Type u_1} {G : SimpleGraph V} {C H : Finset V} (h : G.IsCrown C H) :

    The head and the crown are disjoint.

    theorem SimpleGraph.IsCrown.vertexCoverNum_eq {V : Type u_1} {G : SimpleGraph V} {C H : Finset V} (h : G.IsCrown C H) :
    G.vertexCoverNum = (induce (↑C ∪ ↑H)ᶜ G).vertexCoverNum + ↑H.card

    Crown reduction: removing a crown (C, H) decreases the vertex cover number by |H|. Some minimum vertex cover contains H and avoids C.

    theorem SimpleGraph.IsCrown.vertexCoverNum_le_iff {V : Type u_1} {G : SimpleGraph V} {C H : Finset V} (h : G.IsCrown C H) {k : ℕ} :
    G.vertexCoverNum ≤ ↑k ↔ H.card ≤ k ∧ (induce (↑C ∪ ↑H)ᶜ G).vertexCoverNum ≤ ↑(k - H.card)

    The crown reduction rule [CyganEtAl2015, Section 2.3]: G has a vertex cover of at most k vertices exactly when |H| ≤ k and the residual graph G - (C ∪ H) has one of at most k - |H| vertices.

    theorem SimpleGraph.IsCrown.head_nonempty {V : Type u_1} {G : SimpleGraph V} {C H : Finset V} (h : G.IsCrown C H) (hC : C.Nonempty) (hadj : ∀ c ∈ C, ∃ (v : V), G.Adj c v) :

    A nonempty crown whose vertices are not isolated has a nonempty head.

    The empty crown.

    theorem SimpleGraph.IsMatchingInto.union {V : Type u_1} {G : SimpleGraph V} [DecidableEq V] {A B A' B' : Finset V} {m m' : V → V} (hm : G.IsMatchingInto A B m) (hm' : G.IsMatchingInto A' B' m') (hBB' : Disjoint B B') :
    ∃ (m'' : V → V), G.IsMatchingInto (A ∪ A') (B ∪ B') m''

    Matchings into disjoint sets combine.

    theorem SimpleGraph.IsMatchingInto.map_subtype {V : Type u_1} {G : SimpleGraph V} {R : Set V} {A B : Finset ↑R} {m : ↑R → ↑R} (hm : (induce R G).IsMatchingInto A B m) :
    ∃ (m' : V → V), G.IsMatchingInto (Finset.map (Function.Embedding.subtype fun (x : V) => x ∈ R) A) (Finset.map (Function.Embedding.subtype fun (x : V) => x ∈ R) B) m'

    A matching in an induced subgraph is a matching in the graph.

    Hall's theorem and crowns #

    theorem SimpleGraph.exists_isMatchingInto_or_exists_card_lt {V : Type u_1} {G : SimpleGraph V} [Fintype V] [DecidableEq V] [DecidableRel G.Adj] (A B : Finset V) :
    (∃ (m : V → V), G.IsMatchingInto A B m) ∨ ∃ S ⊆ A, ((S.biUnion fun (v : V) => G.neighborFinset v) ∩ B).card < S.card

    Hall's dichotomy: either A matches into B, or some S ⊆ A has fewer neighbours in B than vertices.

    theorem SimpleGraph.exists_isCrown_of_card_lt {V : Type u_1} {G : SimpleGraph V} [Fintype V] [DecidableEq V] [DecidableRel G.Adj] {I : Finset V} (hI : G.IsIndepSet ↑I) (hlt : (I.biUnion fun (v : V) => G.neighborFinset v).card < I.card) :
    ∃ (C : Finset V) (H : Finset V), C ⊆ I ∧ C.Nonempty ∧ G.IsCrown C H

    An independent set with fewer neighbours than vertices contains a nonempty crown: a subset of maximum surplus |Y| - |N(Y)|.

    theorem SimpleGraph.isCrown_iff_forall_card_le {V : Type u_1} {G : SimpleGraph V} [Fintype V] [DecidableEq V] [DecidableRel G.Adj] {C H : Finset V} :
    G.IsCrown C H ↔ G.IsIndepSet ↑C ∧ (∀ (v : V), v ∈ H ↔ ∃ c ∈ C, G.Adj c v) ∧ ∀ S ⊆ H, S.card ≤ ((S.biUnion fun (v : V) => G.neighborFinset v) ∩ C).card

    Hall's criterion for crowns: (C, H) is a crown exactly when C is independent, H is its neighbourhood, and every S ⊆ H has at least |S| neighbours in C.

    @[instance_reducible]
    theorem SimpleGraph.IsCrown.union_map {V : Type u_1} {G : SimpleGraph V} [DecidableEq V] {C H : Finset V} (h : G.IsCrown C H) {C' H' : Finset ↑(↑C ∪ ↑H)ᶜ} (h' : (induce (↑C ∪ ↑H)ᶜ G).IsCrown C' H') :
    G.IsCrown (C ∪ Finset.map (Function.Embedding.subtype fun (x : V) => x ∈ (↑C ∪ ↑H)ᶜ) C') (H ∪ Finset.map (Function.Embedding.subtype fun (x : V) => x ∈ (↑C ∪ ↑H)ᶜ) H')

    Crowns compose.

    theorem SimpleGraph.exists_isCrown_forall_isCrown_eq_empty {V : Type u_1} {G : SimpleGraph V} [Finite V] :
    ∃ (C : Finset V) (H : Finset V), G.IsCrown C H ∧ ∀ (C' H' : Finset ↑(↑C ∪ ↑H)ᶜ), (induce (↑C ∪ ↑H)ᶜ G).IsCrown C' H' → C' = ∅

    A crown with the largest C ∪ H leaves a residual graph G - (C ∪ H) whose crowns are all empty.

    theorem SimpleGraph.card_le_two_mul_card_of_forall_isCrown_eq_empty {V : Type u_1} {G : SimpleGraph V} [Fintype V] (hfree : ∀ (C H : Finset V), G.IsCrown C H → C = ∅) {S : Finset V} (hS : G.IsVertexCover ↑S) :

    A graph whose crowns are all empty has at most 2 |S| vertices for every vertex cover S: otherwise the independent set Sᶜ has fewer neighbours than vertices.

    theorem SimpleGraph.exists_isMatchingInto_or_exists_isCrown {V : Type u_1} {G : SimpleGraph V} [Fintype V] {k : ℕ} (hk : 3 * k < Fintype.card V) :
    (∃ (A : Finset V) (B : Finset V) (m : V → V), Disjoint A B ∧ G.IsMatchingInto A B m ∧ k < A.card) ∨ ∃ (C : Finset V) (H : Finset V), C.Nonempty ∧ G.IsCrown C H

    Crown lemma, existence form of a variant of [CyganEtAl2015, Section 2.3]: a graph with more than 3k vertices has a matching of more than k edges or a crown with C nonempty. Isolated vertices are allowed, and H may be empty.

    theorem SimpleGraph.exists_isMatchingInto_or_exists_isCrown_of_forall_exists_adj {V : Type u_1} {G : SimpleGraph V} [Fintype V] (hadj : ∀ (v : V), ∃ (w : V), G.Adj v w) {k : ℕ} (hk : 3 * k < Fintype.card V) :
    (∃ (A : Finset V) (B : Finset V) (m : V → V), Disjoint A B ∧ G.IsMatchingInto A B m ∧ k < A.card) ∨ ∃ (C : Finset V) (H : Finset V), C.Nonempty ∧ H.Nonempty ∧ G.IsCrown C H

    Crown lemma [CyganEtAl2015, Section 2.3], existence form: a graph without isolated vertices and with more than 3k vertices has a matching of more than k edges or a crown with C and H nonempty. The cited lemma also finds one of them in polynomial time; this one does not.

    theorem SimpleGraph.exists_isMatchingInto_or_exists_isCrown_card_compl_le {V : Type u_1} {G : SimpleGraph V} [Fintype V] [DecidableEq V] (k : ℕ) :
    (∃ (A : Finset V) (B : Finset V) (m : V → V), Disjoint A B ∧ G.IsMatchingInto A B m ∧ k < A.card) ∨ ∃ (C : Finset V) (H : Finset V), G.IsCrown C H ∧ H.card ≤ k ∧ (C ∪ H)ᶜ.card ≤ 3 * (k - H.card)

    The 3k kernel for vertex cover [CyganEtAl2015, Section 2.3], existence form: G has a matching of more than k edges, so no vertex cover of at most k vertices, or a crown (C, H) with |H| ≤ k whose residual graph G - (C ∪ H) has at most 3 (k - |H|) vertices. By SimpleGraph.IsCrown.vertexCoverNum_le_iff, (G - (C ∪ H), k - |H|) is then an equivalent instance. The crown is not constructed in polynomial time.

    theorem SimpleGraph.exists_isCrown_forall_card_compl_le {V : Type u_1} {G : SimpleGraph V} [Fintype V] [DecidableEq V] :
    ∃ (C : Finset V) (H : Finset V), G.IsCrown C H ∧ ∀ (k : ℕ), G.vertexCoverNum ≤ ↑k → H.card ≤ k ∧ (C ∪ H)ᶜ.card ≤ 2 * (k - H.card)

    The 2k bound: some crown (C, H) leaves a residual graph G - (C ∪ H) of at most 2 (k - |H|) vertices for every k with τ(G) ≤ k, the size of the Nemhauser–Trotter kernel.