Dominating sets #
DominatingSet is problem GT2 of Garey and Johnson. Its instances
(Cslib.Complexity.DominatingSetInstance, encoded by Cslib.Complexity.encDominatingSet) pair a
graph, given by a list of vertices and a list of edges, with a number k. An instance is in the
problem when some k declared vertices dominate the graph: every declared vertex is chosen or is
adjacent to a chosen one. Graphs are read on their declared vertices through
Cslib.Complexity.Graph.induced, and domination through SimpleGraph.IsDominatingSet, as for
VertexCover. Edges with an undeclared endpoint and self-loops are therefore ignored, and
repeated vertex entries count once.
The dominating set has exactly k distinct vertices, matching VertexCover and
IndependentSet. A set of declared vertices containing a dominating set is dominating, so this
agrees with the textbook formulation "a dominating set of at most k vertices" for every k up to
the number n of distinct declared vertices. DominatingSet rejects every k > n
(mem_DominatingSet_iff_exists_card_le).
NP membership uses a subset witness (Cslib.Complexity.mem_NP_of_subsetWitness): the certificate
selects declared vertices, and DominatingSet.isDominating checks domination.
The reduction from vertex cover #
VertexCover.toDominatingSet maps (G, k) to ⟨VertexCover.dominationGraph G, k + 1⟩. The graph
dominationGraph G has:
- a copy
2vof every declared vertexvofG; - a hub
1adjacent to every copy, and a pendant3adjacent only to the hub; - for every edge
eofGbetween distinct declared vertices (VertexCover.properEdges), a vertexVertexCover.edgeVertex e = 2 * Nat.pair e.1 e.2 + 5adjacent to the copies of the two endpoints ofe.
The hub dominates every copy, and either the hub or the pendant must be chosen to dominate the
pendant. Choosing the hub costs one vertex. The vertex of an edge is then dominated exactly when
an endpoint's copy, or the edge's own vertex, is chosen. Replacing the vertex of an edge by an
endpoint reads a dominating set of k + 1 vertices back as a vertex cover of at most k vertices,
and a vertex cover of k vertices with the hub is a dominating set of k + 1 vertices. Since
VertexCover asks for exactly k vertices, instances with k > n are sent to the target 0. No
dominating set of 0 vertices dominates the hub.
Garey and Johnson cite a transformation from VERTEX COVER for GT2 (locator from secondary
sources). The common textbook version
keeps the edges of G, adds a vertex for every edge and keeps k, but it must account separately
for isolated vertices of G: they impose nothing on a cover and must be chosen in a dominating set.
The hub and pendant used here dominate every copy, including isolated ones, at a fixed cost of one
vertex. So the reduction needs neither the number of isolated vertices nor the edges of G
between copies.
Main definitions #
Cslib.Complexity.DominatingSetInstance,Cslib.Complexity.encDominatingSet.Cslib.Complexity.DominatingSet.Cslib.Complexity.DominatingSet.isDominating: the executable domination test.Cslib.Complexity.VertexCover.properEdges,Cslib.Complexity.VertexCover.edgeVertex,Cslib.Complexity.VertexCover.dominationGraph,Cslib.Complexity.VertexCover.toDominatingSet: the reduction fromVertexCover.
Main results #
Cslib.Complexity.mem_DominatingSet_iff,Cslib.Complexity.mem_DominatingSet_iff_exists_card_le: dominating sets of exactlykvertices versus dominating sets of at mostkvertices.Cslib.Complexity.DominatingSet.isDominating_eq_true_iff,Cslib.Complexity.DominatingSet.computableInPolyTime_isDominating,Cslib.Complexity.DominatingSet.mem_NP:DominatingSet ∈ NP encDominatingSet.Cslib.Complexity.VertexCover.toDominatingSet_mem_iff,Cslib.Complexity.VertexCover.computableInPolyTime_toDominatingSet,Cslib.Complexity.polyTimeReducible_VertexCover_DominatingSet: the reduction.Cslib.Complexity.DominatingSet_npHard,Cslib.Complexity.DominatingSet_npComplete:DominatingSetisNP-complete.
References #
Instances For
Instances For
Encoding of DominatingSetInstance as a pair (graph, bound).
Instances For
The graphs with a dominating set of k of their vertices Garey and Johnson, Problem
GT2: k declared vertices such that every declared vertex is chosen or adjacent
to a chosen one.
Instances For
Membership in DominatingSet as a finite set of k declared vertices such that every declared
vertex is chosen or adjacent to a chosen one.
DominatingSet through dominating sets of at most k vertices: (G, k) ∈ DominatingSet
exactly when k is at most the number of distinct declared vertices and some dominating set has
at most k vertices.
Membership in NP #
isDominating G C holds exactly when C dominates the declared vertices of G.
The domination test is polynomial-time.
DominatingSet belongs to NP: the certificate selects distinct declared vertices, and the
verifier checks their number and isDominating.
Reduction from vertex covers #
The vertex of the edge e in dominationGraph: an odd number at least 5.
Instances For
Distinct edges have distinct vertices.
The graph of the reduction from VertexCover to DominatingSet: a copy 2v of every
declared vertex v, a hub 1 adjacent to every copy, a pendant 3 adjacent to the hub, and for
every proper edge e a vertex edgeVertex e adjacent to the copies of the endpoints of e.
Instances For
The vertices of dominationGraph G.
The reduction from VertexCover to DominatingSet: the graph dominationGraph G with the
target k + 1, or the unsatisfiable target 0 when k exceeds the number of distinct declared
vertices.
Instances For
Vertex covers of G are dominating sets of dominationGraph G with the hub.
Listing the proper edges is polynomial-time.
The vertex of an edge is computable in polynomial time from the binary endpoints.
The graph of the reduction is computable in polynomial time. The four lists are certified
separately: fun_prop alone times out on the whole graph.
The reduction toDominatingSet is polynomial-time: the binary target is compared with the
number of distinct declared vertices, computed in unary.
VertexCover reduces to DominatingSet in polynomial time via
VertexCover.toDominatingSet.
DominatingSet is NP-hard.
DominatingSet is NP-complete Garey and Johnson, Problem GT2, with the
target in binary.