Skip to content

[Model] OptimumCommunicationSpanningTree #906

@isPANN

Description

@isPANN

Motivation

OPTIMUM COMMUNICATION SPANNING TREE (ND7) from Garey & Johnson, A2. Given a complete weighted graph with communication requirements between vertex pairs, find a spanning tree that minimizes the total weighted communication cost. NP-hard even when all requirements are equal. Polynomial when all edge weights are equal (Hu 1974, solved by the Gomory-Hu tree). Fundamental in communication network design, where edge weights represent link costs and requirements represent traffic demands.

Definition

Name: OptimumCommunicationSpanningTree
Reference: Garey & Johnson, Computers and Intractability, A2 ND7; Johnson, Lenstra, and Rinnooy Kan 1978

Mathematical definition:

INSTANCE: Complete graph G = (V, E), weight w(e) ∈ Z₀⁺ for each e ∈ E, requirement r({u,v}) ∈ Z₀⁺ for each pair {u,v} of vertices from V.
OBJECTIVE: Find a spanning tree T for G that minimizes Σ_{u,v ∈ V} [W_T({u,v}) · r({u,v})], where W_T({u,v}) denotes the sum of the weights of the edges on the unique path joining u and v in T.

Variables

  • Count: m = |E| = n(n-1)/2 (one binary variable per edge of the complete graph)
  • Per-variable domain: {0, 1}
  • Meaning: Whether each edge is included in the spanning tree. The selected n-1 edges must form a spanning tree minimizing the total weighted communication cost.

Schema

Type name: OptimumCommunicationSpanningTree
Variants: weight: i32

Field Type Description
num_vertices usize Number of vertices n
edge_weights Vec<Vec<W>> Symmetric weight matrix w(i,j) for each edge
requirements Vec<Vec<W>> Symmetric requirement matrix r(i,j) for each vertex pair

Complexity

  • Best known exact algorithm: NP-hard (Johnson, Lenstra, and Rinnooy Kan 1978). Solved exactly by enumerating all labeled spanning trees (Cayley's formula: n^{n-2} trees) and evaluating communication cost for each. No known sub-exponential exact algorithm.
  • Special cases:
    • All requirements equal: still NP-hard. Equivalent to minimum routing cost spanning tree (MRCT).
    • All weights equal: polynomial time, solved by the Gomory-Hu tree (Hu 1974).

Extra Remark

Full book text:

INSTANCE: Complete graph G = (V, E), a weight w(e) ∈ Z₀⁺ for each e ∈ E, a requirement r({u,v}) ∈ Z₀⁺ for each pair {u,v} of vertices from V, and a bound B ∈ Z₀⁺.
QUESTION: Is there a spanning tree T for G such that, if W({u,v}) denotes the sum of the weights of the edges on the path joining u and v in T, then Σ_{u,v ∈ V} [W({u,v}) · r({u,v})] ≤ B?

Reference: [Johnson, Lenstra, and Rinnooy Kan, 1978]. Transformation from X3C.
Comment: Remains NP-complete even if all requirements are equal. Can be solved in polynomial time if all edge weights are equal [Hu, 1974].

Note: The original G&J formulation is a decision problem with bound B. We use the equivalent optimization formulation: minimize total communication cost.

How to solve

  • It can be solved by (existing) bruteforce. (Enumerate all spanning trees, compute path costs for all vertex pairs, evaluate the objective.)
  • It can be solved by reducing to integer programming. (ILP with binary edge variables, multi-commodity flow for path cost computation, minimize weighted sum.) See companion issue [Rule] OptimumCommunicationSpanningTree to ILP #967.
  • Other:

Reduction Rule Crossref

Example Instance

Input:
Complete graph K_4 with V = {v0, v1, v2, v3} (n = 4).

Edge weights w(i,j):

v0 v1 v2 v3
v0 0 1 3 2
v1 1 0 2 4
v2 3 2 0 1
v3 2 4 1 0

Requirements r(i,j) (varying, not all equal):

v0 v1 v2 v3
v0 0 2 1 3
v1 2 0 1 1
v2 1 1 0 2
v3 3 1 2 0

Optimal tree T: edges {(v0,v1), (v0,v3), (v2,v3)}, weights 1, 2, 1.
Path costs W_T:

  • W(v0,v1) = 1, W(v0,v2) = 2+1 = 3, W(v0,v3) = 2
  • W(v1,v2) = 1+2+1 = 4, W(v1,v3) = 1+2 = 3, W(v2,v3) = 1

Total cost = W·r = 1·2 + 3·1 + 2·3 + 4·1 + 3·1 + 1·2 = 2+3+6+4+3+2 = 20

Suboptimal tree: edges {(v0,v1), (v1,v2), (v2,v3)}, cost = 24.
Worst tree: edges {(v0,v2), (v1,v2), (v1,v3)}, cost = 58.

Expected Outcome

Optimal value: Min(20) — the minimum total communication cost is 20. Out of 16 spanning trees of K_4, there are 10 distinct cost values ranging from 20 to 58. The varying requirements (high r(v0,v3) = 3) favor trees where v0 and v3 are close, which drives the optimal tree to include the direct edge (v0,v3).

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