Documentation

CslibFrontier.Computability.Complexity.Problems.CliqueCover

Clique cover #

CliqueCover is Karp's problem CLIQUE COVER [Kar72]: given a graph G and a number l, the declared vertices of G are the union of at most l cliques of the graph induced on them (Cslib.Complexity.Graph.CoveredByCliques). Instances (Cslib.Complexity.CliqueCoverInstance) are encoded by Cslib.Complexity.encCliqueCover, as for Cslib.Complexity.ChromaticNumber.

The cliques of a cover may be taken to be the color classes of a coloring of the complement (SimpleGraph.exists_cliqueCover_iff_colorable_compl), so complementing the graph on its declared vertices (Cslib.Complexity.Graph.compl) reduces CliqueCover and ChromaticNumber to each other. Karp's reduction from CHROMATIC NUMBER maps ⟨G, k⟩ to the complement of G with k cliques (Cslib.Complexity.Graph.compl_mem_CliqueCover_iff); the converse reduction gives NP membership.

Main definitions #

Main results #

References #

An instance (graph, cliques) of Clique Cover.

  • graph : Graph

    The graph whose declared vertices are to be covered.

  • cliques : ℕ

    The maximum number of cliques allowed in the cover.

Instances For
    theorem Cslib.Complexity.encCliqueCover_graph_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → CliqueCoverInstance} :
    Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ encCliqueCover S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (a : γ✝) => (g✝ a).graph) encIn✝ encGraph S✝
    theorem Cslib.Complexity.encCliqueCover_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Graph} {T0 S0 x1 T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn encGraph T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encNat T1 S1) :
    Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { graph := x0 x, cliques := x1 x }) encIn encCliqueCover (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
    @[reducible, inline]

    The tuple of the fields of encCliqueCover.

    Instances For
      theorem Cslib.Complexity.encCliqueCover_cliques_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → CliqueCoverInstance} :

      Encoding of CliqueCoverInstance as a pair (graph, cliques).

      Instances For
        theorem Cslib.Complexity.encCliqueCover_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → Graph} {x1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn encGraph budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encNat budget) :
        Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { graph := x0 x, cliques := x1 x }) encIn encCliqueCover budget

        The declared vertices of G are the union of at most l cliques of the graph induced on them.

        Instances For

          Clique cover [Kar72]: the graphs whose declared vertices are the union of at most the given number of cliques.

          Instances For
            @[simp]
            theorem Cslib.Complexity.mem_CliqueCover_iff {G : Graph} {l : ℕ} :
            { graph := G, cliques := l } ∈ CliqueCover ↔ G.CoveredByCliques l

            Membership in CliqueCover unfolds to Graph.CoveredByCliques.

            theorem Cslib.Complexity.Graph.mem_CliqueCover_iff_compl {G : Graph} {l : ℕ} :
            { graph := G, cliques := l } ∈ CliqueCover ↔ { graph := G.compl, colors := l } ∈ ChromaticNumber

            A graph has a cover by l cliques exactly when its complement is l-colorable.

            theorem Cslib.Complexity.Graph.compl_mem_CliqueCover_iff {G : Graph} {k : ℕ} :
            { graph := G.compl, cliques := k } ∈ CliqueCover ↔ { graph := G, colors := k } ∈ ChromaticNumber

            Karp's reduction from ChromaticNumber. A graph is k-colorable exactly when its complement is covered by k cliques.

            Clique cover is NP-complete, with the number of cliques in binary [Kar72].