-
Notifications
You must be signed in to change notification settings - Fork 3
Description
name: Problem
about: Propose a new problem type
title: "[Model] StrongConnectivityAugmentation"
labels: model
assignees: ''
Motivation
STRONG CONNECTIVITY AUGMENTATION (P95) from Garey & Johnson, A2 ND19. An NP-complete directed graph augmentation problem studied by Eswaran and Tarjan (1976). Given a directed graph with weighted potential arcs, the goal is to add a minimum-weight set of arcs so that the resulting digraph is strongly connected (every vertex is reachable from every other vertex). The unweighted version is polynomial-time solvable in linear time, but the weighted version is NP-complete. Fundamental to robust communication network design.
This issue covers the decision (satisfaction) version. A separate issue for the optimization version (MinimumStrongConnectivityAugmentation, minimizing total arc weight subject to strong connectivity) is planned.
Associated rules:
- R40: HAMILTONIAN CIRCUIT -> STRONG CONNECTIVITY AUGMENTATION (ND19)
Definition
Name: StrongConnectivityAugmentation
Canonical name: Strong Connectivity Augmentation (also: Weighted Strong Connectivity Augmentation)
Reference: Garey & Johnson, Computers and Intractability, A2 ND19
Mathematical definition:
INSTANCE: Directed graph G = (V,A), weight w(u,v) in Z+ for each ordered pair (u,v) in V x V \ A, positive integer B.
QUESTION: Is there a set A' of ordered pairs of vertices from V \ A such that sum_{a in A'} w(a) <= B and such that the graph G' = (V, A union A') is strongly connected?
Variables
- Count:
arc_weights.len()binary variables (one per potential directed arc not already in A) - Per-variable domain: binary {0, 1} -- whether arc (u,v) is added to A'
- Meaning: variable x_{u,v} = 1 if the arc (u,v) is added to A'. The configuration must satisfy: G' = (V, A union A') is strongly connected and sum(w(u,v) * x_{u,v}) <= B.
Schema (data type)
Type name: StrongConnectivityAugmentation
Variants: graph topology (directed graph type parameter)
| Field | Type | Description |
|---|---|---|
graph |
petgraph::Graph<(), (), Directed> |
The initial directed graph G = (V, A), using petgraph's DiGraph directly |
arc_weights |
Vec<(usize, usize, W)> |
List of potential arcs (u, v, weight) not in A |
budget |
W |
Maximum total weight B for added arcs |
Key getter methods: num_vertices() (= |V|), num_arcs() (= |A|), num_potential_arcs() (= arc_weights.len()).
Notes:
- This is a satisfaction (decision) problem:
Metric = bool, implementingSatisfactionProblem. - The
graphfield usespetgraph::Graph<(), (), Directed>(i.e.,DiGraph<(), ()>) directly rather than a custom wrapper type. This avoids the need for a separateDirectedGraphabstraction.
Complexity
- Decision complexity: NP-complete (Eswaran and Tarjan, 1976; transformation from HAMILTONIAN CIRCUIT). Remains NP-complete when all weights are 1 or 2 and A is empty. Solvable in polynomial time when all weights are equal (reduces to unweighted case).
- Best known exact algorithm: No specialized exact algorithm with a tight bound is known for the weighted directed case. Brute-force enumeration over all subsets of potential arcs gives
2^num_potential_arcswherenum_potential_arcs()returnsself.arc_weights.len(). - Approximation: 2-approximation via minimum cost branching/arborescence. The (1.5+epsilon)-approximation of Traub and Zenklusen (2023) applies to the related undirected connectivity augmentation; the directed weighted case remains harder to approximate.
- References:
- K.P. Eswaran, R.E. Tarjan (1976). "Augmentation Problems." SIAM Journal on Computing, 5(4):653-665.
- S. Raghavan (2005). "A Note on Eswaran and Tarjan's Algorithm for the Strong Connectivity Augmentation Problem." The Next Wave in Computing, Optimization, and Decision Technologies, pp. 19-26.
Extra Remark
Full book text:
INSTANCE: Directed graph G = (V,A), weight w(u,v) in Z+ for each ordered pair (u,v) in V x V, positive integer B.
QUESTION: Is there a set A' of ordered pairs of vertices from V such that sum_{a in A'} w(a) <= B and such that the graph G' = (V,A union A') is strongly connected?
Reference: [Eswaran and Tarjan, 1976]. Transformation from HAMILTONIAN CIRCUIT.
Comment: Remains NP-complete if all weights are either 1 or 2 and A is empty. Can be solved in polynomial time if all weights are equal.
How to solve
- It can be solved by (existing) bruteforce. Enumerate all subsets of potential arcs, check if adding them achieves strong connectivity and total weight <= B.
- It can be solved by reducing to integer programming. Binary variable per potential arc, minimize total weight subject to strong connectivity constraints (flow-based formulation).
- Other: For the unweighted case, linear-time algorithm based on SCC decomposition. The minimum number of arcs to add is max(s, p), where s and p are the number of sources and sinks in the condensation DAG.
Example Instance
Directed path graph G with 5 vertices {0, 1, 2, 3, 4} and 4 arcs:
Existing arcs A:
- (0→1), (1→2), (2→3), (3→4) — a directed path
Every vertex can reach those ahead of it, but vertex 4 is a sink with no outgoing arcs. The graph is not strongly connected.
Candidate arcs with weights:
candidate_arcs = [
(4,0,10), // direct fix, too expensive
(4,3,3), // 4-escape to dead end
(4,2,3), // 4-escape to dead end
(4,1,3), // correct 4-escape
(3,0,7), // too expensive to combine
(3,1,3), // dead-end intermediate
(2,0,7), // too expensive to combine
(2,1,3), // dead-end intermediate
(1,0,5), // the closing arc
]
9 candidate arcs (binary variables), search space = 2^9 = 512.
Budget B = 8:
The unique satisfying augmentation selects (4→1, w=3) + (1→0, w=5) with total weight 3+5 = 8 = B. Adding these arcs creates the cycle 0→1→2→3→4→1→0, making every vertex reachable from every other. Answer: YES.
Budget B = 0:
Cannot add any arcs. Vertex 4 cannot reach any other vertex. Answer: NO.
Why this is non-trivial: All 9 candidate arcs are individually within budget. Alternative escape arcs from v4 (to v3 at w=3, or to v2 at w=3) look equally attractive, but they land on vertices from which reaching v0 within the remaining budget is impossible — all paths from v3 or v2 to v0 cost 7+, exceeding what remains after the first arc. The solver must find the specific two-step relay through v1 (the vertex closest to v0) to close the cycle within budget.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status