Feedback vertex sets #
FeedbackVertexSet is Karp's problem FEEDBACK NODE SET [Kar72], problem GT7 of
Garey and Johnson for directed graphs: given a directed graph G and a number
k, some set of at most k declared vertices meets every directed cycle; that is, removing it
leaves an acyclic graph (Cslib.Complexity.mem_FeedbackVertexSet_iff_forall_isDirCycle). Graphs
are read as directed graphs on their declared vertices (Cslib.Complexity.Graph.IsDirCycle), so a
self-loop is a cycle of length one, and instances are encoded with the graph (encGraph) and k
in binary (encNat) (Cslib.Complexity.FeedbackVertexSetInstance, encoded by
Cslib.Complexity.encFeedbackVertexSet).
NP membership uses a list of numbers as the witness, read along the vertex list
(Cslib.Complexity.colorOf): the vertices numbered 0 are removed, at most k of them, and
every arc between remaining vertices must increase the number. Such a numbering exists exactly
when removing the vertices numbered 0 leaves an acyclic graph, by topological numbering
(Cslib.Complexity.Graph.isDirAcyclic_iff_exists_rank), and it can be taken at most the number of
declared vertices.
Hardness is Karp's reduction from VertexCover (VertexCover.toFeedbackVertexSet): every edge
between distinct vertices becomes two opposite arcs (VertexCover.bidirect), so the directed
cycles of length two are the edges, every directed cycle contains an edge, and the feedback vertex
sets are the vertex covers. Since VertexCover rejects targets above the number of distinct
declared vertices, such targets are mapped to a fixed graph without feedback vertex set of size
0.
Main definitions #
Cslib.Complexity.FeedbackVertexSetInstance,Cslib.Complexity.encFeedbackVertexSet.Cslib.Complexity.FeedbackVertexSet.Cslib.Complexity.VertexCover.bidirect,Cslib.Complexity.VertexCover.toFeedbackVertexSet.
Main results #
Cslib.Complexity.mem_FeedbackVertexSet_iff_forall_isDirCycle: the removed vertices meet every directed cycle.Cslib.Complexity.FeedbackVertexSet.mem_NP:FeedbackVertexSet ∈ NP encFeedbackVertexSet.Cslib.Complexity.VertexCover.toFeedbackVertexSet_mem_iff,Cslib.Complexity.VertexCover.computableInPolyTime_toFeedbackVertexSet,Cslib.Complexity.polyTimeReducible_VertexCover_FeedbackVertexSet: Karp's reduction.Cslib.Complexity.FeedbackVertexSet_npHard,Cslib.Complexity.FeedbackVertexSet_npComplete:FeedbackVertexSetisNP-complete.
References #
Instances For
Instances For
Encoding of FeedbackVertexSetInstance as a pair (graph, bound).
Instances For
Feedback vertex set [Kar72] Garey and Johnson, Problem GT7: the
directed graphs with a number k such that removing some set of at most k declared vertices
leaves no directed cycle.
Instances For
Membership in FeedbackVertexSet through cycles: at most k declared vertices meet every
directed cycle.
Membership in NP #
FeedbackVertexSet belongs to NP, with a listed numbering as the witness.
Reduction from vertex covers #
Both arcs of every edge between distinct vertices: the directed graph whose cycles of length two are the edges.
Instances For
Karp's reduction from VertexCover: keep the target and make every edge two opposite
arcs, or produce a self-loop with target 0 when the target exceeds the number of distinct
declared vertices.
Instances For
Vertex covers are feedback vertex sets of the bidirected graph.
Karp's reduction is polynomial-time: the number of distinct declared vertices is computed in unary and compared with the binary target.
VertexCover reduces to FeedbackVertexSet in polynomial time [Kar72].
Feedback vertex set is NP-complete, for directed graphs with the target in binary [Kar72].