Metric k-center is NP-hard to approximate within a factor below 2 #
A polynomial-time algorithm for metric k-center whose radius is always within a factor ρ < 2 of
the optimum decides the NP-complete dominating set problem, so it gives P = NP
([WS11], Theorem 2.4, attributed there to [HN79]). A graph G becomes
the k-center instance domMatrix G on its distinct declared vertices, at distance 0 from
themselves, 1 from adjacent vertices and 2 from the other vertices. When G has a dominating
set of at most k vertices the optimal radius is 1, and a radius below 2 · 1 is a radius of
1, so the centers that the algorithm chooses dominate G; this is the gap
Cslib.Algorithms.Lean.KCenter.isDominatingSet_of_radius_le_mul. The decider checks whether they
do. Gonzalez's algorithm (CslibFrontier.Algorithms.Lean.KCenter.Gonzalez) meets the hypotheses
with ρ = 2 apart from running time, which is not certified there, so the factor 2 is the
threshold.
Model #
An instance is a matrix D of natural distances, given as a list of rows, and a number k of
centers, both in binary: KCenter.encKCenter pairs the matrix encoding KCenter.encDistMatrix
(a framed list of framed lists of binary entries) with encNat. The points are the row
indices. The metric
instances (KCenter.IsInstance) are the square matrices with zero diagonal, symmetric and
satisfying the triangle inequality: the model of Section 2.2 of [WS11], with
natural distances. The algorithm A returns a list of point indices; KCenter.centers D l is
the set of points named by l, so out-of-range indices and repetitions are ignored.
The hypotheses on A are required only on metric instances with 1 ≤ k ≤ D.length, the
instances of Section 2.2, where k centers are chosen among the points:
- it chooses at most
kcenters (implied by(A (D, k)).length ≤ k, seeKCenter.card_centers_le); withk ≤ D.lengthpoints, adding centers does not increase the radius, so this matches thekcenters of the source; - its radius is at most
ρ * rfor every boundron the optimal radius, with distances inℝ. Withk ≥ 1the optimum is finite, so this is radius≤ ρ · OPT, stated as inCslib.Algorithms.Lean.KCenter.isDominatingSet_of_radius_le_mulwithout multiplication inWithTop ℝ.
Natural distances and these restrictions only weaken the hypotheses, so the theorem implies the
corresponding statement for algorithms on instances with real distances and any k.
NP-hardness of dominating set on the library's encoded graphs is
Cslib.Complexity.DominatingSet_npComplete, through a reduction from vertex cover; Williamson and
Shmoys take it from the literature.
Main definitions #
Cslib.Complexity.KCenter.IsInstance: metric k-center instances.Cslib.Complexity.KCenter.centers: the centers named by a list of indices.Cslib.Complexity.KCenter.domMatrix: the{0, 1, 2}distance matrix of a graph.Cslib.Complexity.KCenter.decideDominatingSet: the decider built from a k-center algorithm.
Main results #
Cslib.Complexity.KCenter.isInstance_domMatrix,Cslib.Complexity.KCenter.computableInPolyTime_domMatrix: the distance matrix of a graph is a metric instance, computable in polynomial time.Cslib.Complexity.KCenter.decideDominatingSet_iff: the decider decidesDominatingSet.Cslib.Complexity.KCenter.computableInPolyTime_decideDominatingSet: it is polynomial-time when the algorithm is.Cslib.Complexity.P_eq_NP_of_kCenter_approx: Theorem 2.4: a polynomial-timeρ-approximation algorithm for metric k-center withρ < 2givesP = NP.
References #
A metric k-center instance: a square matrix of natural distances, with rows indexed by the
points 0, …, D.length - 1, zero on the diagonal, symmetric and satisfying the triangle
inequality ([WS11], Section 2.2).
Every row lists the distances to all the points.
Every point is at distance
0from itself.- isMetric : TSP.IsMetric D
The distances are symmetric and satisfy the triangle inequality.
Instances For
The decider for DominatingSet built from a k-center algorithm A: accept x when
x.bound is at most the number of distinct vertices of x.graph, x.bound > 0 unless x.graph
has no vertices, and the vertices named by the centers that A chooses on
(domMatrix x.graph, x.bound) dominate x.graph.
Instances For
The distance matrix of a graph is a metric k-center instance.
The decider is correct ([WS11], Theorem 2.4): if, on metric instances
with 1 ≤ k ≤ D.length, A returns at most k centers with a radius within a factor ρ < 2 of
the optimum, then decideDominatingSet A decides DominatingSet.
The distance matrix of a graph is computable in polynomial time, with binary entries.
The decider built from a polynomial-time k-center algorithm is polynomial-time.
No ρ-approximation for metric k-center with ρ < 2 unless P = NP
([WS11], Theorem 2.4; [HN79]). Let A be a polynomial-time algorithm
that, on every metric instance (D, k) with 1 ≤ k ≤ D.length, chooses at most k centers whose
radius is at most ρ times every bound on the optimal radius, with ρ < 2. Then P = NP.
Distances are natural numbers in binary; see the module docstring for why the restrictions only
strengthen the statement.