Skip to content

[Model] DisjointConnectingPaths #297

@isPANN

Description

@isPANN

name: Problem
about: Propose a new problem type
title: "[Model] DisjointConnectingPaths"
labels: model
assignees: ''

Motivation

DISJOINT CONNECTING PATHS (P116) from Garey & Johnson, A2 ND40. A classical NP-complete problem useful for reductions. It models the fundamental routing/interconnection problem: given a set of terminal pairs in a network, can all pairs be simultaneously connected by vertex-disjoint paths? This has applications in VLSI design, network routing, and wire layout.

Associated reduction rules:

  • As source: None found in current rule set.
  • As target: R61 (3SAT to DISJOINT CONNECTING PATHS)

Definition

Name: DisjointConnectingPaths
Canonical name: Disjoint Connecting Paths (also: Vertex-Disjoint Paths Problem, Node-Disjoint Paths, Interconnection Problem)
Reference: Garey & Johnson, Computers and Intractability, A2 ND40

Mathematical definition:

INSTANCE: Graph G = (V,E), collection of disjoint vertex pairs (s_1,t_1),(s_2,t_2),...,(s_k,t_k).
QUESTION: Does G contain k mutually vertex-disjoint paths, one connecting s_i and t_i for each i, 1 <= i <= k?

Variables

Let k = |terminal_pairs| denote the number of terminal pairs.

  • Count: |E| binary variables (one per edge).
  • Per-variable domain: {0, 1} — whether edge e is included in any of the k paths.
  • Meaning: A valid configuration selects edges that form exactly k vertex-disjoint paths, one connecting s_i to t_i for each i, 1 ≤ i ≤ k. The metric is bool: True if such paths exist, False otherwise.

Schema (data type)

Type name: DisjointConnectingPaths
Variants: graph topology (graph type parameter G)

Field Type Description
graph SimpleGraph The undirected graph G = (V, E)
terminal_pairs Vec<(usize, usize)> The k disjoint terminal pairs (s_i, t_i)

Notes:

  • This is a satisfaction (decision) problem: Metric = bool, implementing SatisfactionProblem.
  • No weight type is needed.
  • Key getter methods: num_vertices() (= |V|), num_edges() (= |E|), num_pairs() (= k).
  • The terminal vertices must be pairwise disjoint (no vertex appears in more than one pair).

Complexity

  • Decision complexity: NP-complete (Knuth 1974, Karp 1975, Lynch 1974; transformation from 3SAT). Remains NP-complete for planar graphs (Lynch 1975).
  • Fixed-parameter tractability: For fixed k (number of terminal pairs), the problem is solvable in polynomial time:
    • O(n^3) by Robertson and Seymour's graph minor algorithm (1995), as part of their Graph Minors series.
    • O(n^2) by Kawarabayashi, Kobayashi, and Reed (2012), improving the cubic bound.
    • However, the constant factor is enormous (tower of exponentials in k), making these algorithms impractical.
  • Best known exact algorithm (general k): Brute force enumeration of all possible edge subsets. No faster exact algorithm is known for the general case.
  • Complexity string (for general k): "2^num_edges" (brute force over all possible edge subsets; no faster exact algorithm is known for general k)
  • References:
    • N. Robertson and P.D. Seymour (1995). "Graph Minors. XIII. The Disjoint Paths Problem." Journal of Combinatorial Theory, Series B, 63(1):65-110. Polynomial algorithm for fixed k.
    • K. Kawarabayashi, Y. Kobayashi, B. Reed (2012). "The disjoint paths problem in quadratic time." Journal of Combinatorial Theory, Series B, 102(2):424-435.

Extra Remark

Full book text:

INSTANCE: Graph G = (V,E), collection of disjoint vertex pairs (s_1,t_1),(s_2,t_2),...,(s_k,t_k).
QUESTION: Does G contain k mutually vertex-disjoint paths, one connecting s_i and t_i for each i, 1 <= i <= k?
Reference: [Knuth, 1974c], [Karp, 1975a], [Lynch, 1974]. Transformation from 3SAT.
Comment: Remains NP-complete for planar graphs [Lynch, 1974], [Lynch, 1975]. Complexity is open for any fixed k >= 2, but can be solved in polynomial time if k = 2 and G is planar or chordal [Perl and Shiloach, 1978]. (A polynomial time algorithm for the general 2 path problem has been announced in [Shiloach, 1978]). The directed version of this problem is also NP-complete in general and solvable in polynomial time when k = 2 and G is planar or acyclic [Perl and Shiloach, 1978].

How to solve

  • It can be solved by (existing) bruteforce. Enumerate all possible assignments of paths for each terminal pair and check vertex-disjointness.
  • It can be solved by reducing to integer programming. Introduce binary variables for edge usage per path, add flow conservation constraints, and vertex-disjointness constraints.
  • Other: For fixed k, Robertson-Seymour O(n^3) or Kawarabayashi-Kobayashi-Reed O(n^2). For k = 2, polynomial algorithms exist (Shiloach 1978).

Example Instance

Instance 1 (YES — disjoint paths exist):
Graph G with 6 vertices {0, 1, 2, 3, 4, 5} and 7 edges:

0 — 1 — 3
|   |   |
2 — 4 — 5
  • Edges: {0,1}, {1,3}, {0,2}, {1,4}, {2,4}, {3,5}, {4,5}
  • Terminal pairs: (0, 3), (2, 5)

Vertex-disjoint paths:

  • P1: 0 → 1 → 3 (connecting 0 to 3, using vertices {0, 1, 3})
  • P2: 2 → 4 → 5 (connecting 2 to 5, using vertices {2, 4, 5})
  • The paths are vertex-disjoint: {0, 1, 3} ∩ {2, 4, 5} = ∅
  • Answer: YES

Instance 2 (NO — no disjoint paths):
Graph G with 6 vertices {0, 1, 2, 3, 4, 5} and 5 edges:

  • Edges: {0,2}, {1,2}, {2,3}, {3,4}, {3,5}
  • Terminal pairs: (0, 4), (1, 5)
  • Vertex 2 and vertex 3 are cut vertices; any path from 0 to 4 must pass through 2 and 3, and any path from 1 to 5 must also pass through 2 and 3. Since both paths must share vertices 2 and 3, no vertex-disjoint solution exists.
  • Answer: NO

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoodAn issue passed all checks.modelA model problem to be implemented.

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions