Vertex-disjoint paths in directed acyclic graphs
Lax528502.DisjointPaths · concepts/Lax528502/DisjointPaths.lean · lax-528502
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Given an acyclic digraph and a list of ordered pairs of distinct terminals, decide whether there are pairwise vertex-disjoint directed paths joining the prescribed pairs. The number of pairs is part of the input. This problem is NP-complete by Ganian, Hliněný, Kneis, Langer, Obdržálek, and Rossmanith, Theorem 4.8(b). The vertices below are numbered in a topological order.
Concept map
Evidence
Each proof establishes this claim relative to its assumptions.
In the paper
- page 16 of this submission's paper
Lean source view on GitHub
| 1 | import Lax528502.ColoringInstances |
| 2 | import Lax429075.Reductions |
| 3 | import Mathlib.Data.List.Chain |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Vertex-disjoint paths in directed acyclic graphs |
| 8 | type: theorem |
| 9 | --- |
| 10 | Given an acyclic digraph and a list of ordered pairs of distinct terminals, |
| 11 | decide whether there are pairwise vertex-disjoint directed paths joining the |
| 12 | prescribed pairs. The number of pairs is part of the input. This problem is |
| 13 | NP-complete by Ganian, Hliněný, Kneis, Langer, Obdržálek, and Rossmanith, |
| 14 | Theorem 4.8(b). The vertices below are numbered in a topological order. |
| 15 | -/ |
| 16 | |
| 17 | namespace Lax528502.DisjointPaths |
| 18 | |
| 19 | open Lax434930.PolynomialTime Lax429075.Reductions |
| 20 | |
| 21 | structure Instance where |
| 22 | n : ℕ |
| 23 | arc : Fin n → Fin n → Prop |
| 24 | forward : ∀ u v, arc u v → u < v |
| 25 | terminals : List (Fin n × Fin n) |
| 26 | nonempty : terminals ≠ [] |
| 27 | distinct : (terminals.flatMap fun p => [p.1, p.2]).Nodup |
| 28 | |
| 29 | /-- The order and arc matrix, then the count of terminal pairs and the pairs. -/ |
| 30 | noncomputable def Instance.bits (I : Instance) : Word := |
| 31 | ColoringInstances.binary (I.n :: ContractionInput.matrix I.n I.n I.arc ++ |
| 32 | [I.terminals.length] ++ I.terminals.flatMap fun (s, t) => [s.val, t.val]) |
| 33 | |
| 34 | def Instance.Routable (I : Instance) : Prop := |
| 35 | ∃ paths : Fin I.terminals.length → List (Fin I.n), |
| 36 | (∀ i, (paths i).head? = some (I.terminals.get i).1 ∧ |
| 37 | (paths i).getLast? = some (I.terminals.get i).2 ∧ (paths i).IsChain I.arc) ∧ |
| 38 | ∀ i j, i ≠ j → Disjoint (paths i).toFinset (paths j).toFinset |
| 39 | |
| 40 | def language : Language := {w | ∃ I : Instance, I.bits = w ∧ I.Routable} |
| 41 | |
| 42 | /-- The source problem for the coloring reduction. -/ |
| 43 | axiom np_complete : NPComplete language |
| 44 | |
| 45 | end Lax528502.DisjointPaths |
| 46 |
Used by
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments