Independent sets #
IndependentSet is the set of graphs, given by a list of vertices and a list of edges, together
with a number m, such that the graph has an independent set of m declared vertices Arora and
Barak, Section 2.4. Graphs are read on their declared vertices through
Cslib.Complexity.Graph.induced, and independent sets through SimpleGraph.IsNIndepSet.
The reduction SAT.toIndependentSet from SAT is Karp's: one vertex for each occurrence of a
literal, edges between occurrences in the same clause and between complementary occurrences, and
m the number of clauses [Kar72]. An independent set with one vertex in each clause picks a
literal in each clause without contradictions, which is exactly a satisfying assignment.
Vertices and target sizes use binary encoding (encNat). A certificate masks the declared vertex
list at first occurrences so duplicate vertex entries cannot inflate the selected set, and checks
the selected count in binary without unary expansion of m. The verifier is an instance of the
subset-witness verifier Cslib.Complexity.subsetVerifier, which handles the certificate length.
The same problem as a class of finite structures, closed under isomorphism and without an
encoding, with the target size given by a unary relation, is
Cslib.Logic.FO.sizedGraph.IndependentSet. There loops are ignored, edges need not be symmetric,
and the reductions between independent set, clique and vertex cover are quantifier-free
first-order interpretations.
Main definitions #
Cslib.Complexity.IndependentSetInstance,Cslib.Complexity.IndependentSet.Cslib.Complexity.IndependentSet.verifier.Cslib.Complexity.SAT.toIndependentSet.Cslib.Complexity.Graph.indepNum: the independence number (G.induced.indepNum).
Main results #
Cslib.Complexity.mem_IndependentSet_iff: independent sets as subsets ofℕcontained in the declared vertices.Cslib.Complexity.SAT.toIndependentSet_mem_iff:toIndependentSet φ ∈ IndependentSet ↔ φ ∈ SAT.Cslib.Complexity.SAT.exists_card_add_countUnsat_le: an independent set of Karp's graph gives an assignment satisfying as many clauses.Cslib.Complexity.Graph.le_indepNum_iff: the independence number is the largest target ofIndependentSet.Cslib.Complexity.SAT.computableInPolyTime_toIndependentSet: Karp's reduction is polynomial-time.Cslib.Complexity.IndependentSet.isVerifier,Cslib.Complexity.IndependentSet.mem_NP:IndependentSet ∈ NP encIndependentSetInstance.Cslib.Complexity.polyTimeReducible_SAT_IndependentSet,Cslib.Complexity.IndependentSet_npHard,Cslib.Complexity.IndependentSet_npComplete:IndependentSetisNP-complete.
References #
Instances For
Instances For
Framed encGraph followed by binary target encNat, encoding IndependentSetInstance.
Instances For
The graphs with an independent set of m of their vertices
Arora and Barak, Section 2.4.
Instances For
Membership in IndependentSet as a finite set of m declared vertices that is independent in
x.graph.toSimpleGraph.
Karp's reduction #
The vertex of an occurrence.
Instances For
Two occurrences conflict when they are in the same clause or are complementary.
Instances For
Karp's reduction from SAT to IndependentSet.
Instances For
In the graph of Karp's reduction, two occurrences are adjacent exactly when they conflict.
An independent set of Karp's graph gives an assignment satisfying as many clauses: the assignment making the chosen positive literals true satisfies the clause of every chosen occurrence, and distinct chosen occurrences lie in distinct clauses.
Correctness of Karp's reduction. A formula is satisfiable exactly when its graph has an independent set with as many vertices as the formula has clauses.
Polynomial-time reduction #
Computing the binary vertex label of an occurrence from its unary indices is polynomial-time.
Testing whether two occurrences conflict is polynomial-time.
Karp's reduction toIndependentSet is computable in polynomial time.
The verifier for IndependentSet: select distinct declared vertices from the certificate mask,
check that their count equals m, and check that no two distinct selected vertices are adjacent.
Instances For
IndependentSet.verifier verifies IndependentSet with certificates as long as the encoded
instance.
IndependentSet belongs to NP.
SAT reduces to IndependentSet in polynomial time via SAT.toIndependentSet.
The independence number #
The independence number of a graph: the largest number of declared vertices that are pairwise non-adjacent.
Instances For
Fewer vertices of an independent set are independent.
The independence number is the size of an independent set.
The independence number is the largest target of IndependentSet.