Skip to content

[Model] PathConstrainedNetworkFlow #291

@isPANN

Description

@isPANN

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

Motivation

PATH CONSTRAINED NETWORK FLOW (P110) from Garey & Johnson, ND34. A variant of network flow where flow must be routed along a given collection of specified s-t paths (rather than being decomposed freely). This constraint makes the problem NP-complete even when all arc capacities equal 1. The non-integral version is equivalent to linear programming, but the integrality gap question (whether the best integral flow matches the best rational flow) is itself NP-complete.

Associated reduction rules:

  • As source: None found in the current rule set.
  • As target: R55: 3SAT -> PATH CONSTRAINED NETWORK FLOW

Definition

Name: PathConstrainedNetworkFlow

Canonical name: PATH CONSTRAINED NETWORK FLOW (also: Integer Multicommodity Flow on Prescribed Paths, Unsplittable Flow on Paths)
Reference: Garey & Johnson, Computers and Intractability, ND34

Mathematical definition:

INSTANCE: Directed graph G = (V,A), specified vertices s and t, a capacity c(a) ∈ Z^+ for each a ∈ A, a collection P of directed paths in G, and a requirement R ∈ Z^+.
QUESTION: Is there a function g: P -> Z_0^+ such that if f: A -> Z_0^+ is the flow function defined by f(a) = Sum_{p in P(a)} g(p), where P(a) is the set of all paths in P containing the arc a, then f is such that
(1) f(a) <= c(a) for all a ∈ A,
(2) for each v ∈ V - {s,t}, flow is conserved at v, and
(3) the net flow into t is at least R?

Variables

  • Count: |P| integer variables (one per path in the collection P), representing the amount of flow sent along each path.
  • Per-variable domain: {0, 1, ..., M_p} where M_p = min_{a in p} c(a) is the bottleneck capacity of path p -- the maximum flow that can be sent along path p without violating any arc capacity on that path alone.
  • Meaning: The variable assignment encodes the flow decomposition. g(p) is the amount of flow sent along path p. A satisfying assignment has total flow (sum over all paths of g(p)) into t at least R, while respecting all arc capacity constraints.

Dims

[M_1+1, M_2+1, ..., M_{|P|}+1] where M_i = min_{a in p_i} c(a) is the bottleneck capacity of the i-th path. For the common all-capacities-1 case: [2; num_paths] (binary variables).

Schema (data type)

Type name: PathConstrainedNetworkFlow
Variants: None (directed graph with integer types)

Field Type Description
num_vertices usize Number of vertices
arcs Vec<(usize, usize)> Directed arcs (u, v) in A
source usize Index of source vertex s
sink usize Index of sink vertex t
capacities Vec<u64> Capacity c(a) for each arc
paths Vec<Vec<usize>> Collection P of directed s-t paths (each path is a sequence of arc indices)
requirement u64 Flow requirement R

Notes:

  • This is a satisfaction (decision) problem: Metric = bool, implementing SatisfactionProblem.
  • Each path in P is a directed path from s to t in G.
  • The flow on each arc is the sum of flows on all paths using that arc.
  • Flow conservation is automatically satisfied when flow is decomposed into s-t paths.
  • The key constraint is integrality of the path flows g(p).

Size Fields

Getter name Meaning
num_vertices Number of vertices
num_arcs Number of arcs
num_paths Number of prescribed paths
max_capacity Maximum arc capacity max_a c(a)
requirement Flow requirement R

Complexity

  • Best known exact algorithm: NP-complete, so no polynomial-time algorithm is known. Brute-force: enumerate all non-negative integer assignments to |P| paths such that arc capacities are satisfied and total flow >= R. This is bounded by O((max_capacity + 1)^num_paths).
  • Concrete bound for declare_variants!: "(max_capacity + 1)^num_paths"
  • Special cases: With non-integral flows allowed, equivalent to linear programming (polynomial). With all c(a) = 1, still NP-complete.
  • NP-completeness: NP-complete by transformation from 3SAT. Private communication from Prömel to Garey & Johnson (1979), cited as [Promel, 1978] in G&J ND34. Published proof: Büsing & Stiller (2011).
  • Related problems: The integrality gap problem (does the best rational flow exceed the best integral flow?) is also NP-complete.
  • References:
    • H.J. Prömel (1978). Private communication to Garey & Johnson. Transformation from 3SAT.
    • C. Büsing, S. Stiller (2011). "Line planning, path constrained network flow and inapproximability." Networks, 57(1):106-113.
    • C. Barnhart, C.A. Hane, P.H. Vance (2000). "Using branch-and-price-and-cut to solve origin-destination integer multicommodity flow problems." Operations Research, 48(2):318-326.

Extra Remark

Full book text:

INSTANCE: Directed graph G = (V,A), specified vertices s and t, a capacity c(a) ∈ Z^+ for each a ∈ A, a collection P of directed paths in G, and a requirement R ∈ Z^+.
QUESTION: Is there a function g: P -> Z_0^+ such that if f: A -> Z_0^+ is the flow function defined by f(a) = Sum_{p in P(a)} g(p), where P(a) is the set of all paths in P containing the arc a, then f is such that
(1) f(a) <= c(a) for all a ∈ A,
(2) for each v ∈ V - {s,t}, flow is conserved at v, and
(3) the net flow into t is at least R?
Reference: [Promel, 1978]. Transformation from 3SAT.
Comment: Remains NP-complete even if all c(a) = 1. The corresponding problem with non-integral flows is equivalent to LINEAR PROGRAMMING, but the question of whether the best rational flow fails to exceed the best integral flow is NP-complete.

How to solve

  • It can be solved by (existing) bruteforce -- enumerate all integer flow assignments on paths and verify capacity and requirement constraints.
  • It can be solved by reducing to integer programming -- ILP with variables g(p) for each path, capacity constraints on arcs, and flow requirement.
  • Other: LP relaxation (non-integral) is equivalent to linear programming and solvable in polynomial time.

Example Instance

Instance 1 (YES -- feasible integral flow exists):
Directed graph with 8 vertices {s=0, 1, 2, 3, 4, 5, 6, t=7} and 10 arcs:

  • Arcs (with capacities):
    • (0,1) c=2, (0,2) c=1, (1,3) c=1, (1,4) c=1, (2,4) c=1
    • (3,5) c=1, (4,5) c=1, (4,6) c=1, (5,7) c=2, (6,7) c=1
  • Paths in P:
    • p_1: 0 → 1 → 3 → 5 → 7
    • p_2: 0 → 1 → 4 → 5 → 7
    • p_3: 0 → 1 → 4 → 6 → 7
    • p_4: 0 → 2 → 4 → 5 → 7
    • p_5: 0 → 2 → 4 → 6 → 7
  • R = 3

Arc-sharing conflicts:

  • p_1, p_2, p_3 share (0,1) with c=2 → at most 2 can carry flow
  • p_2, p_3 share (1,4) with c=1 → at most one of p_2, p_3
  • p_4, p_5 share (0,2) with c=1 → at most one of p_4, p_5
  • p_2, p_4 share (4,5) with c=1 → at most one of p_2, p_4
  • p_3, p_5 share (4,6) with c=1 → at most one of p_3, p_5

Optimal solution 1: g(p_1)=1, g(p_2)=1, g(p_3)=0, g(p_4)=0, g(p_5)=1.

  • Arc flows: f(0,1)=2≤2, f(0,2)=1≤1, f(1,3)=1≤1, f(1,4)=1≤1, f(2,4)=1≤1, f(3,5)=1≤1, f(4,5)=1≤1, f(4,6)=1≤1, f(5,7)=2≤2, f(6,7)=1≤1. All satisfied.
  • Net flow into t: 1 + 1 + 0 + 0 + 1 = 3 = R.

Optimal solution 2: g(p_1)=1, g(p_2)=0, g(p_3)=1, g(p_4)=1, g(p_5)=0.

  • Net flow: 1 + 0 + 1 + 1 = 3 = R.

Suboptimal solution: g(p_1)=1, g(p_2)=1, g(p_3)=0, g(p_4)=0, g(p_5)=0.

  • Net flow: 2 < 3 (does not meet requirement, but is feasible at R=2).

32 total configs (binary since all bottleneck capacities are 1), 14 capacity-feasible, 8 with flow≥2, 2 with flow=3.

  • Answer: YES

Instance 2 (NO -- no feasible integral flow achieving R):
Same graph and paths as Instance 1, but R = 4.

  • Maximum achievable integral flow is 3 (see Instance 1), so no assignment can reach R = 4.
  • The two solutions achieving flow=3 are the maximum: the arc-sharing conflicts between paths prevent activating more than 3 simultaneously.
  • 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