Hochbaum–Shmoys threshold 2-approximation for metric k-center #
This module formalizes the parametric threshold 2-approximation algorithm for metric k-center
following the bottleneck threshold method of [HS85] (see also the chapter notes of
[WS11], Chapter 2).
Algorithm and source mapping #
For a candidate threshold r, the threshold graph thresholdGraph d r connects distinct vertices
at distance at most r in both directions. Under symmetry and d v v ≤ r, a set of centers has
radius at most r exactly when it dominates thresholdGraph d r
(radius_le_coe_iff_isDominatingSet).
Given a list P of points, thresholdPacking d r P scans P and greedily adds a vertex whenever
it lies strictly farther than 2 * r from all previously selected centers; thresholdCenters d P r
is its underlying Finset. Thus thresholdCenters d P r is a maximal independent set of
thresholdGraph d (2 * r) (both independent and dominating under symmetry) and an independent set
of the square of thresholdGraph d r by the triangle inequality
(not_common_neighbor_thresholdCenters). The original presentation of [HS85]
computes a maximal independent set of the graph square (thresholdGraph d r)² directly; the
greedy 2r-packing variant formalized here satisfies the same two guarantees:
- Covering (
radius_thresholdCenters_le): every vertex is within2 * rofthresholdCenters d P r(whenever∀ v, d v v ≤ 2 * r). - Packing lower bound (
card_thresholdCenters_le_of_radius_le,lt_optRadius_of_lt_card_thresholdCenters): if any set of at mostkcenters achieves radius at mostr, then(thresholdCenters d P r).card ≤ k, vialength_le_card_of_pairwise_lt.
Finally, hochbaumShmoys d P k evaluates thresholdCenters d P r across all pairwise distances
d u v (u, v ∈ P) and returns the centers for the smallest feasible threshold r with
(thresholdCenters d P r).card ≤ k (or ∅ if none is feasible). Because the finite optimum
optRadius d k is attained at some pairwise distance d v c, the chosen threshold is at most the
optimum, yielding a 2-approximation (hochbaumShmoys_approx) using only symmetry and the
triangle inequality.
Limitations #
The algorithm is a pure Lean function over a list of points; no machine-level Word-RAM running
time is certified (tracked in #9248). As noted above, the threshold subroutine uses a greedy
2r-packing rather than constructing the explicit graph square (thresholdGraph d r)².
Main definitions #
Cslib.Algorithms.Lean.KCenter.thresholdGraph: the threshold graph at distancer.Cslib.Algorithms.Lean.KCenter.thresholdPacking: greedy2r-packing as a list.Cslib.Algorithms.Lean.KCenter.thresholdCenters: theFinsetof centers chosen at thresholdr.Cslib.Algorithms.Lean.KCenter.hochbaumShmoys: the parametric threshold2-approximation.
Main results #
thresholdGraph_adj_iff,radius_le_coe_iff_isDominatingSet: characterization of the threshold graph and domination equivalence with radius≤ r.pairwise_thresholdPacking,thresholdPacking_subset,thresholdPacking_cover_or_mem: separation, membership, and2r-covering of the greedy packing.isIndepSet_thresholdCenters,isDominatingSet_thresholdCenters,not_common_neighbor_thresholdCenters: graph-theoretic properties ofthresholdCenters.radius_thresholdCenters_le: every vertex lies within2 * rofthresholdCenters d P r.card_thresholdCenters_le_of_radius_le,lt_optRadius_of_lt_card_thresholdCenters: packing bound and infeasibility certificate.card_hochbaumShmoys_le,hochbaumShmoys_approx: feasibility (≤ kcenters) and2-approximation againstoptRadius.
References #
Threshold graph #
The threshold graph at radius r: distinct vertices u and v are adjacent when
d u v ≤ r and d v u ≤ r. Under symmetry this reduces to u ≠ v ∧ d u v ≤ r
(thresholdGraph_adj_iff).
Under a symmetric distance, adjacency in thresholdGraph d r is u ≠ v ∧ d u v ≤ r.
On a finite nonempty space with symmetric distance satisfying d v v ≤ r, a set of centers
has radius at most r exactly when it dominates thresholdGraph d r.
Greedy 2r-packing and threshold centers #
Greedy 2r-packing of P: scan P and select a vertex whenever it is strictly farther
than 2 * r from all previously selected vertices.
The set of centers chosen by the greedy 2r-packing at threshold r.
Every vertex selected by thresholdPacking belongs to P.
Consecutive and pairwise entries of thresholdPacking d r P are strictly farther than 2 * r
apart.
Every point v ∈ P is either selected by thresholdPacking d r P or within 2 * r of a
selected point.
Under a symmetric distance, thresholdCenters d P r is an independent set of
thresholdGraph d (2 * r).
Under a symmetric distance on a list covering all points, thresholdCenters d P r dominates
thresholdGraph d (2 * r) (so it is a maximal independent set of thresholdGraph d (2 * r)).
Independence in the square of thresholdGraph d r: under symmetry and the triangle
inequality, two distinct centers in thresholdCenters d P r share no common neighbor in
thresholdGraph d r.
Covering at threshold r: if P contains every vertex and d v v ≤ 2 * r, then
thresholdCenters d P r has radius at most 2 * r.
Packing bound at threshold r ([HS85]): if any set S of at most k
centers achieves radius at most r, then thresholdCenters d P r has at most k centers.
Infeasibility certificate: if thresholdCenters d P r has more than k centers, then
every set of at most k centers has radius strictly greater than r.
Parametric threshold 2-approximation #
Hochbaum–Shmoys parametric threshold algorithm ([HS85]): searches all
pairwise distances d u v (u, v ∈ P) for the smallest threshold r whose greedy 2r-packing
uses at most k centers, and returns thresholdCenters d P r (or ∅ if no threshold is
feasible).
Feasibility: hochbaumShmoys d P k returns at most k centers.
Hochbaum–Shmoys threshold algorithm is a 2-approximation for k-center
([HS85]; [WS11], Section 2.2): on a finite space with a symmetric
distance satisfying the triangle inequality, run on a list P of all the points, the chosen
centers have radius at most 2 * r for every bound r on the optimal radius.