Vertex-disjoint paths in directed acyclic graphs

Lax528502.DisjointPaths · concepts/Lax528502/DisjointPaths.lean · lax-528502

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural 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
    9 concepts; 2 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    In the paper

    • page 16 of this submission's paper

    Lean source view on GitHub

    1import Lax528502.ColoringInstances
    2import Lax429075.Reductions
    3import Mathlib.Data.List.Chain
    4
    5/-!
    6---
    7title: Vertex-disjoint paths in directed acyclic graphs
    8type: theorem
    9---
    10Given an acyclic digraph and a list of ordered pairs of distinct terminals,
    11decide whether there are pairwise vertex-disjoint directed paths joining the
    12prescribed pairs. The number of pairs is part of the input. This problem is
    13NP-complete by Ganian, Hliněný, Kneis, Langer, Obdržálek, and Rossmanith,
    14Theorem 4.8(b). The vertices below are numbered in a topological order.
    15-/
    16
    17namespace Lax528502.DisjointPaths
    18
    19open Lax434930.PolynomialTime Lax429075.Reductions
    20
    21structure 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. -/
    30noncomputable 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
    34def 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
    40def language : Language := {w | ∃ I : Instance, I.bits = w ∧ I.Routable}
    41
    42/-- The source problem for the coloring reduction. -/
    43axiom np_complete : NPComplete language
    44
    45end Lax528502.DisjointPaths
    46
    Show Proof

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…