Motivation
MIN-MAX MULTICENTER (P126) from Garey & Johnson, A2 ND50. A classical NP-complete facility location problem, also known as the p-center problem. Given a graph with vertex weights and edge lengths, the goal is to place K service centers (points on the graph) so as to minimize the maximum weighted distance from any vertex to its nearest center. Arises in emergency facility location, network design, and service coverage optimization. Closely related to the dominating set problem: on unweighted unit-length graphs, a set of K vertices is a dominating set if and only if it is a K-center solution with radius 1.
Associated reduction rules:
- As target: R70 (DOMINATING SET -> MIN-MAX MULTICENTER)
Definition
Name: MinMaxMulticenter
Canonical name: p-Center Problem; also: Min-Max Multicenter, Vertex k-Center Problem
Reference: Garey & Johnson, Computers and Intractability, A2 ND50
Mathematical definition:
We implement the vertex-restricted variant (also NP-complete; see Slater, 1976), where centers must be chosen from V rather than arbitrary points on edges. The full GJ formulation allows centers on edge interiors, but the vertex-restricted version is standard in the combinatorial optimization literature and maps naturally to binary variables.
INSTANCE: Graph G = (V,E), weight w(v) ∈ Z_0^+ for each v ∈ V, length l(e) ∈ Z_0^+ for each e ∈ E, positive integer K ≤ |V|, positive rational number B.
QUESTION: Is there a subset S ⊆ V with |S| = K such that if d(v) is the length of the shortest path from v to the closest vertex in S, then max{d(v)·w(v): v ∈ V} ≤ B?
This is a decision (satisfaction) problem: given K and B, determine feasibility. Metric = bool, implementing SatisfactionProblem.
Variables
- Count: n = |V| binary variables (one per vertex), representing candidate center locations (vertex-restricted variant).
- Per-variable domain: binary {0, 1} — whether vertex v is selected as a center
- Meaning: variable x_v = 1 if vertex v is chosen as a center location. Exactly K variables must be set to 1. The configuration is valid if max{d(v)·w(v): v ∈ V} ≤ B, where d(v) is the shortest weighted-path distance from v to the nearest selected center.
Schema (data type)
Type name: MinMaxMulticenter<G, W>
Variants: graph type parameter G, weight type parameter W
| Field |
Type |
Description |
graph |
G |
The underlying graph G = (V, E) |
vertex_weights |
Vec<W> |
Non-negative weight w(v) for each vertex v |
edge_lengths |
Vec<W> |
Non-negative length l(e) for each edge e |
k |
usize |
Number of centers to place (K) |
bound |
W |
The distance bound B |
Size fields: num_vertices() (= |V|), num_edges() (= |E|), num_centers() (= K)
Notes:
- This is a satisfaction (decision) problem:
Metric = bool, implementing SatisfactionProblem.
Complexity
- Decision complexity: NP-complete (Kariv and Hakimi, 1979; transformation from DOMINATING SET). Remains NP-complete even with unit weights and unit edge lengths, and also for the vertex-restricted variant (Slater, 1976).
- Best known exact algorithm: The vertex p-center problem on general graphs can be solved by binary search over O(|V|^2) distance thresholds, each requiring a dominating set feasibility check on a threshold graph (Minieka, 1970). Using the best dominating set algorithm O*(1.4969^
num_vertices) (van Rooij and Bodlaender, 2011), the overall complexity is O*(1.4969^num_vertices) with polynomial overhead.
- Polynomial cases: Solvable in polynomial time for fixed K (Kariv and Hakimi, 1979), and for arbitrary K if G is a tree (Kariv and Hakimi, 1979). For the continuous variant, Drezner (1984) gives O(n^{2K+1}).
- Approximation: 2-approximation is optimal unless P=NP; no (2-epsilon)-approximation exists for any epsilon > 0 (Hsu and Nemhauser, 1979).
declare_variants! complexity string: "1.4969^num_vertices" — via binary search over distance thresholds + iterated dominating set (van Rooij & Bodlaender, 2011).
- References:
- O. Kariv, S. L. Hakimi (1979). "An Algorithmic Approach to Network Location Problems. I: The p-Centers." SIAM J. Appl. Math., 37(3):513-538.
- W. L. Hsu, G. L. Nemhauser (1979). "Easy and hard bottleneck location problems." Discrete Appl. Math., 1(3):209-216.
- J. M. W. van Rooij, H. L. Bodlaender (2011). "Exact algorithms for dominating set." Discrete Appl. Math., 159(17):2147-2164.
- E. Minieka (1970). "The m-Center Problem." SIAM Review, 12(1):138-139.
- Z. Drezner (1984). "The p-centre problem — heuristic and optimal algorithms." Journal of the Operational Research Society, 35(8):741-748.
- P. J. Slater (1976). "R-domination in graphs." Journal of the ACM, 23(3):446-450.
Specialization
- This is a special case of: General facility location / bottleneck covering problems
- Known special cases:
- Vertex k-center: centers restricted to vertices (also NP-complete) — this is the variant we implement
- Unweighted unit-length variant: w(v)=1, l(e)=1 (NP-complete, equivalent to minimum dominating set)
- Tree graphs: polynomial-time solvable (Kariv and Hakimi, 1979)
- Fixed K: polynomial-time solvable
Extra Remark
Full book text:
INSTANCE: Graph G = (V,E), weight w(v) ∈ Z_0^+ for each v ∈ V, length l(e) ∈ Z_0^+ for each e ∈ E, positive integer K ≤ |V|, positive rational number B.
QUESTION: Is there a set P of K "points on G" (where a point on G can be either a vertex in V or a point on an edge e ∈ E, with e regarded as a line segment of length l(e)) such that if d(v) is the length of the shortest path from v to the closest point in P, then max{d(v)·w(v): v ∈ V} ≤ B?
Reference: [Kariv and Hakimi, 1976a]. Transformation from DOMINATING SET.
Comment: Also known as the "p-center" problem. Remains NP-complete if w(v) = 1 for all v ∈ V and l(e) = 1 for all e ∈ E. Solvable in polynomial time for any fixed K and for arbitrary K if G is a tree [Kariv and Hakimi, 1976a]. Variant in which we must choose a subset P ⊆ V is also NP-complete but solvable for fixed K and for trees [Slater, 1976].
How to solve
Example Instance
Graph G with 6 vertices {0, 1, 2, 3, 4, 5} and 7 edges, unit weights and lengths:
- Edges: {0,1}, {1,2}, {2,3}, {3,4}, {4,5}, {0,5}, {1,4}
- K = 2, B = 1
Shortest path distances (unit edge lengths):
All edge lengths l(e) = 1, all vertex weights w(v) = 1.
Optimal 2-center: Place centers at vertices {1, 4}.
- d(0) = dist(0, {1,4}) = dist(0,1) = 1. w(0)·d(0) = 1 ≤ 1 ✓
- d(1) = 0 (center). ✓
- d(2) = dist(2, {1,4}) = min(dist(2,1), dist(2,4)) = min(1, 2) = 1. ✓
- d(3) = dist(3, {1,4}) = min(dist(3,1), dist(3,4)) = min(2, 1) = 1. ✓
- d(4) = 0 (center). ✓
- d(5) = dist(5, {1,4}) = min(dist(5,1), dist(5,4)) = min(2, 1) = 1. ✓
- max{d(v)·w(v)} = 1 ≤ B = 1 ✓
Note: This is equivalent to asking whether {1, 4} is a dominating set of G (since unit weights and lengths). Indeed, N[1] = {0,1,2,4} and N[4] = {1,3,4,5}, so N[1] ∪ N[4] = V. ✓
Motivation
MIN-MAX MULTICENTER (P126) from Garey & Johnson, A2 ND50. A classical NP-complete facility location problem, also known as the p-center problem. Given a graph with vertex weights and edge lengths, the goal is to place K service centers (points on the graph) so as to minimize the maximum weighted distance from any vertex to its nearest center. Arises in emergency facility location, network design, and service coverage optimization. Closely related to the dominating set problem: on unweighted unit-length graphs, a set of K vertices is a dominating set if and only if it is a K-center solution with radius 1.
Associated reduction rules:
Definition
Name:
MinMaxMulticenterCanonical name: p-Center Problem; also: Min-Max Multicenter, Vertex k-Center Problem
Reference: Garey & Johnson, Computers and Intractability, A2 ND50
Mathematical definition:
We implement the vertex-restricted variant (also NP-complete; see Slater, 1976), where centers must be chosen from V rather than arbitrary points on edges. The full GJ formulation allows centers on edge interiors, but the vertex-restricted version is standard in the combinatorial optimization literature and maps naturally to binary variables.
INSTANCE: Graph G = (V,E), weight w(v) ∈ Z_0^+ for each v ∈ V, length l(e) ∈ Z_0^+ for each e ∈ E, positive integer K ≤ |V|, positive rational number B.
QUESTION: Is there a subset S ⊆ V with |S| = K such that if d(v) is the length of the shortest path from v to the closest vertex in S, then max{d(v)·w(v): v ∈ V} ≤ B?
This is a decision (satisfaction) problem: given K and B, determine feasibility.
Metric = bool, implementingSatisfactionProblem.Variables
Schema (data type)
Type name:
MinMaxMulticenter<G, W>Variants: graph type parameter G, weight type parameter W
graphGvertex_weightsVec<W>edge_lengthsVec<W>kusizeboundWSize fields:
num_vertices()(= |V|),num_edges()(= |E|),num_centers()(= K)Notes:
Metric = bool, implementingSatisfactionProblem.Complexity
num_vertices) (van Rooij and Bodlaender, 2011), the overall complexity is O*(1.4969^num_vertices) with polynomial overhead.declare_variants!complexity string:"1.4969^num_vertices"— via binary search over distance thresholds + iterated dominating set (van Rooij & Bodlaender, 2011).Specialization
Extra Remark
Full book text:
INSTANCE: Graph G = (V,E), weight w(v) ∈ Z_0^+ for each v ∈ V, length l(e) ∈ Z_0^+ for each e ∈ E, positive integer K ≤ |V|, positive rational number B.
QUESTION: Is there a set P of K "points on G" (where a point on G can be either a vertex in V or a point on an edge e ∈ E, with e regarded as a line segment of length l(e)) such that if d(v) is the length of the shortest path from v to the closest point in P, then max{d(v)·w(v): v ∈ V} ≤ B?
Reference: [Kariv and Hakimi, 1976a]. Transformation from DOMINATING SET.
Comment: Also known as the "p-center" problem. Remains NP-complete if w(v) = 1 for all v ∈ V and l(e) = 1 for all e ∈ E. Solvable in polynomial time for any fixed K and for arbitrary K if G is a tree [Kariv and Hakimi, 1976a]. Variant in which we must choose a subset P ⊆ V is also NP-complete but solvable for fixed K and for trees [Slater, 1976].
How to solve
Example Instance
Graph G with 6 vertices {0, 1, 2, 3, 4, 5} and 7 edges, unit weights and lengths:
Shortest path distances (unit edge lengths):
All edge lengths l(e) = 1, all vertex weights w(v) = 1.
Optimal 2-center: Place centers at vertices {1, 4}.
Note: This is equivalent to asking whether {1, 4} is a dominating set of G (since unit weights and lengths). Indeed, N[1] = {0,1,2,4} and N[4] = {1,3,4,5}, so N[1] ∪ N[4] = V. ✓