Skip to content

[Model] MinimumCapacitatedSpanningTree #901

@isPANN

Description

@isPANN

Motivation

MINIMUM CAPACITATED SPANNING TREE (ND5) from Garey & Johnson, A2. Given a weighted graph with a designated root, vertex requirements, and an edge capacity, find a spanning tree rooted at a designated vertex that minimizes total edge weight, subject to subtree capacity constraints. NP-hard in the strong sense, even with all requirements equal to 1 and capacity equal to 3. A fundamental model in capacitated network design and facility location.

Definition

Name: MinimumCapacitatedSpanningTree
Reference: Garey & Johnson, Computers and Intractability, A2 ND5; Papadimitriou 1978

Mathematical definition:

INSTANCE: Graph G = (V, E), weight function w: E → Z⁺, designated root vertex v₀ ∈ V, requirement function r: V \ {v₀} → Z⁺, positive integer c (capacity).
OBJECTIVE: Find a spanning tree T = (V, E') for G that minimizes Σ_{e ∈ E'} w(e), subject to: for each edge e ∈ E', if U(e) denotes the set of vertices whose unique path to v₀ in T passes through e, then Σ_{u ∈ U(e)} r(u) ≤ c.

Variables

  • Count: m = |E| (one binary variable per edge)
  • Per-variable domain: {0, 1}
  • Meaning: Whether each edge is included in the spanning tree. The selected edges must form a spanning tree rooted at v₀, every edge must carry at most capacity c worth of requirements from its subtree, and the total weight is minimized.

Schema

Type name: MinimumCapacitatedSpanningTree
Variants: graph: SimpleGraph, weight: i32

Field Type Description
graph SimpleGraph The input graph G = (V, E)
weights Vec<W> Edge weights w(e) for each edge e ∈ E
root usize The designated root vertex v₀
requirements Vec<W> Requirement r(v) for each vertex v (r(v₀) = 0)
capacity W::Sum The edge capacity bound c

Complexity

  • Best known exact algorithm: NP-hard in the strong sense (Papadimitriou, "The complexity of the capacitated tree problem," Networks 8, 217–230, 1978), so no pseudo-polynomial algorithm unless P = NP. Exact methods use branch-and-bound or branch-and-cut with ILP formulations. No known improvement over O*(2^num_edges) for general instances.
  • Special cases:
    • All requirements = 1, capacity = 3: still NP-hard (Papadimitriou 1978).
    • Capacity ≥ Σ r(v): reduces to minimum spanning tree (polynomial).

Extra Remark

Full book text:

INSTANCE: Graph G = (V, E), a weight w(e) ∈ Z⁺ for each e ∈ E, a "root" vertex v₀ ∈ V, a requirement r(v) ∈ Z₀⁺ for each v ∈ V - {v₀}, and positive integers c ("capacity") and B ("bound").
QUESTION: Is there a spanning tree T = (V, E') for G such that Σ_{e ∈ E'} w(e) ≤ B and such that for each e ∈ E', if U(e) is the set of vertices whose paths to v₀ pass through e, then Σ_{u ∈ U(e)} r(u) ≤ c?

Reference: [Papadimitriou, 1976c]. Transformation from 3-SATISFIABILITY.
Comment: NP-complete in the strong sense, and remains so even if all requirements are 1 and c = 3.

Note: The original G&J formulation is a decision problem with weight bound B. We use the equivalent optimization formulation: minimize total edge weight subject to capacity constraints.

How to solve

  • It can be solved by (existing) bruteforce. (Enumerate all spanning trees, root each at v₀, compute subtree requirement sums for every edge, check capacity constraints, track minimum weight.)
  • It can be solved by reducing to integer programming. (ILP with binary edge variables, multi-commodity flow for routing, capacity constraints on each edge, minimize total weight.) See companion issue [Rule] MinimumCapacitatedSpanningTree to ILP #966.
  • Other:

Reduction Rule Crossref

Example Instance

Input:
Graph G with V = {v0, v1, v2, v3, v4} (n = 5), root v₀ = v0, capacity c = 3.
Requirements: r(v1) = 1, r(v2) = 1, r(v3) = 1, r(v4) = 1.

Edges with weights:

  • (v0,v1): w=2, (v0,v2): w=1, (v0,v3): w=4
  • (v1,v2): w=3, (v1,v4): w=1
  • (v2,v3): w=2, (v2,v4): w=3
  • (v3,v4): w=1

Optimal tree T: edges {(v0,v1), (v0,v2), (v1,v4), (v3,v4)}, total weight = 2+1+1+1 = 5.
Rooted at v0, the tree structure is: v0→v1→v4→v3 and v0→v2.

  • Edge (v0,v1): subtree {v1, v4, v3}, Σr = 3 ≤ 3 ✓
  • Edge (v0,v2): subtree {v2}, Σr = 1 ≤ 3 ✓
  • Edge (v1,v4): subtree {v4, v3}, Σr = 2 ≤ 3 ✓
  • Edge (v3,v4): subtree {v3}, Σr = 1 ≤ 3 ✓

Suboptimal feasible tree: edges {(v0,v1), (v0,v2), (v1,v4), (v2,v3)}, weight = 2+1+1+2 = 6.

  • Edge (v0,v1): subtree {v1, v4}, Σr = 2 ≤ 3 ✓
  • Edge (v0,v2): subtree {v2, v3}, Σr = 2 ≤ 3 ✓

Infeasible tree: edges {(v0,v2), (v1,v2), (v2,v3), (v3,v4)}, weight = 1+3+2+1 = 7.

  • Edge (v0,v2): subtree {v2, v1, v3, v4}, Σr = 4 > 3 ✗ (all non-root vertices route through this edge)

Expected Outcome

Optimal value: Min(5) — the minimum total weight of a feasible capacitated spanning tree is 5. Out of 45 spanning trees, 21 are feasible with 8 distinct weight values (5, 6, 7, 8, 9, 10, 11, 12).

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