Clustering is a basic task in data analysis and machine learning, and the optimization of clustering objectives are well-studied optimization problems; amongst these, the \(k\)-Means objective is arguably the most well known. Given a collection of points in a metric space, the goal is to partition them into \(k\) clusters, each with an associated center, so as to minimize the sum of squared distances of points to their cluster centers. In this paper, we present a polynomial-time \(3+2\sqrt{2}+\varepsilon<5.83\)-approximation algorithm for \(k\)-Means in general metrics. This substantially improves on the current-best \((9+\varepsilon)\)-approximation in [Ahmadian, Norouzi-Fard, Svensson, Ward - FOCS’17, SICOMP’20], and even slightly improves on the \(5.92\)-approximation in [Cohen-Addad, Esfandiari, Mirrokni, Narayanan - STOC’22] for the Euclidean special case.
A natural approach for \(k\)-Means is to leverage Lagrangian Multiplier Preserving (LMP) approximations for the facility location problem. The previous best results for \(k\)-Means build upon an adaptation of an LMP \(3\)-approximation for facility location with metric connection costs in [Jain, Vazirani - J.ACM’01] based on a primal-dual method, rather than on the improved LMP greedy \(2\)-approximation for the same problem in [Jain, Mahdian, Markakis, Saberi, Vazirani - J.ACM’03]. The barrier to using the improved LMP algorithm was that no adaptation of this algorithm and its analysis to the case of squared metric connection costs was known (since squared distances violate triangle inequality). Our main contribution is overcoming this barrier by providing such an adaptation. This new LMP approximation algorithm is then combined with the framework recently introduced in [Cohen-Addad, Grandoni, Lee, Schwiegelshohn, Svensson - STOC’25] for the related (metric) \(k\)-Median problem.
In a generic clustering problem we are given a collection of points together with a dissimilarity measure (i.e. distance function) between pairs of points. The high-level goal is to partition the points into a “small” number of clusters so that similar points are clustered together while dissimilar ones are clustered separately. One of the most fundamental and best-studied clustering problems is \(k\)-Means. Here we are given a collection \(D\) of \(n\) points (or clients) and a collection \(F\) of centers (or facilities), as well as a integer \(k>0\). We are also given metric distances \(d:(D\cup F) \times (D\cup F)\rightarrow \mathbb{R}_{\geq 0}\). Our goal is to select a set \(S\) of \(k\) centers (the open centers) so as to minimize the sum of the squared distances from each client to the closest open center2, i.e., \[\sum_{j\in D}d^2(j,S)=\sum_{j\in D}\min_{i\in S}d^2(j,i).\] Observe that each feasible solution \(S\) naturally induces \(k\) clusters where the cluster associated with \(i\in S\) is given by the clients that are closer to \(i\) than to any other center in \(S\) (breaking ties arbitrarily). We next use \(\text{OPT}_k\) to denote a reference optimal solution and \(\text{opt}_k\) to denote its cost. When \(k\) is clear from the context, we simply use \(\text{OPT}\) and \(\text{opt}\).
\(k\)-Means is NP-hard and well-studied in terms of approximation algorithms. It is impossible to approximate it (in polynomial time) better than a factor \(1+8/e \approx 3.94\) [1]. The current-best (polynomial-time) approximation factor for this problem is \(9+\varepsilon\) for any constant \(\varepsilon>0\) by Ahmadian, Norouzi-Fard, Svensson, and Ward [2]. Their algorithm is based on a primal-dual Lagrangian Multiplier Preserving (LMP) \(9\)-approximation algorithm for facility location with squared metric connection costs (similar in spirit to a classical primal-dual \(3\)-approximation algorithm by Jain and Vazirani [3] for metric connection costs), plus a careful way to combine so-called bi-point solutions that introduces a \(1+\varepsilon\) factor only in the approximation (rather than a larger constant factor as in prior work). This improved on an earlier \(25\)-approximation by Gupta and Tangwongsan [4] based on local search: we will need this result later. Interestingly a \((1+8/e+\varepsilon)\)-approximation can be obtained in FPT time [5].
Very often in practice one considers the Euclidean special case of \(k\)-Means (which in the literature is often just called \(k\)-Means), where the clients are \(n\) points in the (\(d\)-dimensional) Euclidean space, with the respective distances. In this case one is allowed to select any point in the Euclidean space as a center. However known reductions [6]–[8] allow one to focus on a set of candidate centers \(F\) of size \(n^{O_\varepsilon(1)}\) while introducing a factor \(1+\varepsilon\) in the approximation for any constant \(\varepsilon>0\). Therefore one can (essentially) see the Euclidean case as a special case of the metric one. The best-known approximation factor for the Euclidean case is \(5.92\) by Cohen-Addad, Esfandiari, Mirrokni, Narayanan [9]. This improves on a sequence of increasingly better approximations for the problem: a \((9+\varepsilon)\)-approximation by Kanungo, Mount, Netanyahu, Piatko, Silverman, and Wu [10], a \(6.36\)-approximation by Ahmadian et al. [2], and a \(6.13\)-approximation by Grandoni, Ostrovsky, Rabani, Schulman, and Venkat [11].
Our main result is a \(5.83\)-approximation for (metric) \(k\)-Means. More precisely, we get the following:
Theorem 1. For any constant \(\varepsilon>0\), there is a polynomial-time randomized \((3+2\sqrt{2}+\varepsilon)\)-approximation for (metric) \(k\)-Means.
We remark that the above result not only substantially improves the current best \((9+\varepsilon)\)-approximation for the general metric case [2], but even slightly the current best \(5.92\)-approximation for the Euclidean case [9]. We overview our approach in Section 2.
\(k\)-Means belongs to the family of \(k\)-clustering problems where the target number of clusters \(k\) is fixed. Other famous examples are \(k\)-Center and \(k\)-Median. In \(k\)-Center one wishes to select a set \(S\) of \(k\) centers so as to minimize the maximum distance from any client to \(S\), i.e., the objective function to minimize is \(\max_{j\in D}d(j,S)\). This problem admits a simple greedy \(2\)-approximation which is best possible unless \(P=NP\) [12], [13]. \(k\)-Median is defined like \(k\)-Means, except that here one wishes to minimize the sum of the distances rather than squared distances, i.e., the objective function is \(\sum_{j\in D}d(j,S)\). \(k\)-Median is very close to \(k\)-Means in terms of results and techniques. \(k\)-Median is hard to approximate below a factor \(1 + 2/e\) [1]. For general metric distances, the first constant approximation was achieved by Charikar, Guga, Tardos and Shmoys [14]. After a very long sequence of improvements [15]–[21], the current-best \((2+\varepsilon)\)-approximation for this problem was very recently achieved by Cohen-Addad, Grandoni, Lee, Schwiegelshohn, and Svensson [22]. This is also the best result for the Euclidean case, improving on an earlier \(2.406\)-approximation [9].
At a very high level, our approach looks similar in spirit to the one leading to a recent \((2+\varepsilon)\)-approximation for the related \(k\)-Median problem by Cohen-Addad, Grandoni, Lee, Schwiegelshohn, and Svensson [22]. In more detail, we exploit a combination of two different algorithms. The first one is a bicriteria approximation algorithm with the desired approximation factor, which opens \(O(\log n/\varepsilon^2)\) more centers than the \(k\) allowed ones.
Theorem 2. For any constant \(\varepsilon\in (0,1/6)\), there is a polynomial-time algorithm for \(k\)-Means that returns a solution containing at most \(k+O(\log n/\varepsilon^2)\) centers and of cost at most \((3+2\sqrt{2}+\varepsilon)\text{opt}\).
The second algorithm is a radically different \((5+\varepsilon)\)-approximation algorithm that only works for instances which are stable in the following sense. We say that an instance of \(k\)-Means is \(\beta\)-stable if \(\text{opt}_{k-1}\geq (1+\beta)\text{opt}_k\), where \(\text{opt}_{k-1}\) is the optimal cost for the same instance but with the target number of centers being \(k-1\).
Theorem 3. For any constants \(\varepsilon,\zeta>0\), there is a polynomial-time randomized algorithm for \(k\)-Means that with high probability returns a solution of cost at most \((5+\varepsilon)\text{opt}\) assuming that the input instance is \((\zeta/\log n)\)-stable.
It is relatively easy to derive Theorem 1 from the above two theorems.
Proof of Theorem 1. We compute a set of feasible solutions, and return the cheapest one. Let \(\Delta\) be the maximum extra number of centers computed by the algorithm from Theorem 2 (this number is independent from \(k\)). Let \(k'=\max\{1,k-\Delta\}\). One solution is obtained by computing the optimum solution with one center if \(k'=1\), and otherwise by running the algorithm from Theorem 2 with target number of centers being \(k'\) (notice that it returns a solution with at most \(k\) centers, hence feasible). Furthermore, we run the algorithm from Theorem 3 for every integer \(k''\in (k',k]\) (thus obtaining solutions with \(k''\leq k\) centers, hence feasible).
If \(\text{opt}_{k'}\) is not much larger than \(\text{opt}_k\) (more precisely \(\text{opt}_{k'}\leq (1+\varepsilon)\text{opt}_k\)), the first solution is \((1+\varepsilon)(3+2\sqrt{2}+\varepsilon)\) approximate. Otherwise, notice that there exists an integer \(k''\in (k',k]\) such that \(\text{opt}_{k''}\leq (1+\varepsilon)\text{opt}_{k}\) and \(\text{opt}_{k''-1}\geq (1+\beta)\text{opt}_{k''}\) for \(\beta\in \Omega(\varepsilon/\Delta)=\Omega(\varepsilon^3/\log n)\). For that value of \(k''\) the corresponding instance is \(\beta\)-stable, hence the respective solution has cost at most \((5+\varepsilon)\text{opt}_{k''}\leq (1+\varepsilon)(5+\varepsilon)\text{opt}_k\). The claim follows by rescaling \(\varepsilon\) by a constant factor. ◻
It remains to describe how the above two theorems are obtained. The algorithm from Theorem 3 is rather complex and its analysis is highly non-trivial (see Section 6). However, it is a relatively easy adaptation of the \((2+\varepsilon)\)-approximation algorithm in [22] for a similar notion of stable \(k\)-Median instances. The main difference is that we have to carefully use an approximate form of triangle inequality (see Lemmas 2 and 3). This also explains why we get a higher approximation factor \(5+\varepsilon\).
The main contribution of this paper is our proof of Theorem 2. In more detail, we consider the related facility location problem (with uniform opening costs). Recall that here, instead of a bound \(k\) on the number of centers, we are given a uniform facility cost \(f\). We are now allowed to open an arbitrary number of centers/facilities \(S\), and the objective function is the total cost of the open facilities plus the squared distance from each client to the closest (open) facility in \(S\), i.e., \[\text{cost}_{FL}(S):=f|S|+\sum_{j\in D}d^2(j,S)\,.\] We say that an algorithm for the above problem is LMP \(\Gamma\)-approximate if it produces a feasible solution \(S\) such that \[\Gamma\cdot f|S|+\sum_{j\in D}d^2(j,S)\leq \Gamma\cdot \text{opt}_{LP}(f). \label{eq:LMP}\tag{1}\] where \(\text{opt}_{LP}(f)\leq \text{opt}\) is the optimal cost of a standard LP relaxation for the problem (see Section 3). In other words, the solution cost at most \(\Gamma \cdot \text{opt}\) even if we increase the facility cost of \(S\) by a factor \(\Gamma\).
Recall that the current-best \((9+\varepsilon)\)-approximation for (Metric) \(k\)-Means by Ahmadian et al. [2] builds upon a primal-dual LMP \(9\)-approximation for facility location (with squared metric connection costs), which is inspired by a classical primal-dual \(3\)-approximation by Jain and Vazirani [3] for the case of metric connection costs. Our main contribution is a greedy LMP \((3+2\sqrt{2})\)-approximation for facility location with squared metric connection costs which is a non-trivial (but relatively simple) variant of the classical greedy LMP \(2\)-approximation (JMMSV) for facility location with metric connection costs by Jain, Mahdian, Markakis, Saberi, and Vazirani [16]. It is instructive to recall how JMMSV works in order to see the differences.
The algorithm has a variable \(\alpha_j\) per client \(j\) (initialized to \(0\)), a set \(S\) of open facilities (initialized to \(\emptyset\)), and a set \(A\) of active clients (initialized to \(D\) ). At each point of time, the bid \(bid(j,i)\) of client \(j\) towards facility \(i\) is \([\alpha_j-d(j,i)]^+\) if \(j\) is active and \([d(j,S)-d(j,i)]^+\) otherwise3. The variables \(\alpha_j\) of active clients are increased uniformly until one of the following events happens:
For some client \(j\) and \(i\in S\), \(\alpha_j\geq d(j,i)\). In that case \(j\) is removed from \(A\) and we say that \(j\) is connected to \(i\);
For some (not open) facility \(i\notin S\), one has \(\sum_{j\in D}bid(j,i)=f\).4 In that case we open \(i\), i.e., we add \(i\) to \(S\). Furthermore, each \(j\in A\) with \(\alpha_j\geq d(j,i)\) is removed from \(A\) (and connected to \(j\)). Also, each inactive client \(j\in D-A\) with \(bid(j,i)>0\) is reconnected to \(i\).
The intuition behind the bids is as follows. On the one hand, the active clients \(j\) (which are not yet connected to an open facility) are willing to pay the difference \(\alpha_j-d(j,i)\) (if positive) to open \(i\), while reserving \(d(j,i)\) for their own connection cost to \(i\). On the other hand, the inactive clients \(j\in D-A\) which are already connected to the closest facility in \(S\), are willing to offer \(d(j,S)-d(j,i)\) (if positive) towards the opening of facility \(i\): if then \(i\) is actually opened, \(j\) reconnects to \(i\) which is closer (while altogether still spending \(\alpha_j\) in total). This also motivates the term greedy. Notice that at any point of time active clients \(j\) satisfy \(\alpha_j<{d}(j,S)\).
A naïve idea is to adapt the above algorithm to the case of squared distances by simply replacing \(d(\cdot,\cdot)\) with \(d^2(\cdot,\cdot)\). It is instructive to see why this attempt fails miserably (which also explains why prior work [2], [9] use variants of the Jain-Vazirani algorithm [3] instead, despite the worse approximation factor). Consider the example in Figure 1, where we have two facilities \(i\) and \(i'\), and two clients \(1\) and \(2\), all on a line, with distances specified in the figure. The facility opening cost is \(f\). Consider the following (hypothetical but valid) execution of the algorithm.
Time \(f/2+0.25-\varepsilon\): facility \(i'\) is open by client \(2\) and other clients not in the figure.
Time \(f/2+\sqrt{f/2} + 0.25\): facility \(i\) is open as the bid from client \(1\) becomes \(f/2+\sqrt{f/2} + 0.25 - 0.25 = f/2 + \sqrt{f/2}\).
To prove an LMP \(\Gamma\)-approximation, the dual constraint corresponding to a solution where \(1\) and \(2\) are connected to \(i\) (paying \(f\) for opening and \(2 \cdot 0.5^2 = 0.5\) for connecting) requires that \(\alpha_1+\alpha_2 \leq f + 0.5\Gamma\). Our \(\alpha_1+\alpha_2\) is \(f + \sqrt{f/2} + 0.5-\varepsilon\), which is only an LMP \(\Omega(\sqrt{f})\)-approximation.
In this example, client \(2\) contributes to the opening of some center far away from it, with a contribution much less than its \(\alpha\) value. Or equivalently, the connection cost \(d^2(2,i')\) is strictly but only slightly smaller than \(\alpha_2\). This is the key (and essentially the only) reason why this naïve variant of JMMSV does not work; one can see that any other assumption between \(\alpha_2\) and \(d^2(2, i')\) in the above example (realized by moving \(i'\) and clients not in the figure) would lead to a good LMP approximation as follows.
If \(d^2(2,i')=\alpha_2\), then \(2\)’s bid to \(i\) is \(\alpha_2 - 0.25\) even after the opening of \(i'\), so the fact that \(i\) was open at time \(\alpha_1-\varepsilon\) (for infinitesimally small \(\varepsilon> 0\)) implies \(\alpha_1+\alpha_2 \leq f + 0.5\).
If \(d^2(2,i')\leq (1-\delta)\alpha_2\) for some constant \(\delta > 0\), we could simply use an approximate version of the triangle inequality to prove a good LMP approximation. For example, if \(\delta=1/2\), we would have \(\alpha_1 \leq d^2(1,i') \leq 2d^2(2,i') + 4(d^2(1,i)+d^2(2,i)) \leq \alpha_2 + 2\). Since \(\alpha_2 \leq f/2+0.25\) in this example, this would give us \(\alpha_1+\alpha_2 = f + O(1)\).
This inspired us to construct a different variant of the JMMSV algorithm in the following spirit: if a client can contribute to the opening of a facility, its \(\alpha\) value must be much higher than its connection cost to the facility (e.g., at least twice as high as it). In more detail, our LMP algorithm uses the following different bidding strategy. Let \(\gamma>1\) be a parameter to be fixed later. The bid of active clients is \([\alpha_j-\gamma d^2(j,i)]^+\). In particular notice that \(j\) cannot contribute to the opening of \(i\) if \(\alpha_j<\gamma d^2(j,i)\) (while one might naturally expect it for \(\alpha_j>d^2(j,i)\)). However, whenever \(\alpha_j\geq d^2(j,i)\) for some already open facility \(i\in S\) and active clients \(j\), we still connect \(j\) to \(i\) and make \(j\) inactive. In the above case, if \(\gamma d^2(j,i)>\alpha_j\), we say that \(j\) is indirectly connected to \(i\) since \(j\) did not contribute to the opening of \(i\) with a positive bid. The inactive clients \(j\) that are connected to an open facility \(i\) whose opening they contributed to, are called directly connected. The bids for directly and indirectly connected clients in the later steps are different: they are \([\alpha_j-\gamma d^2(j,i)]^+\) for the indirectly connected ones and \([\gamma d^2(j,S)-\gamma d^2(j,i)]^+\) for the directly connected ones. When an indirectly connected client contributes to the opening of a facility, it becomes directly connected. For the above process, we are able to show that the final solution \(S\) satisfies: \[\sum_{j\in D}\alpha_j\geq f|S|+\sum_{j\in D}d^2(j,S),\] i.e., the cost of the solution is upper bounded by the sum of the variables \(\alpha_j\). Furthermore, we can establish the following inequality showing that \(\alpha_j\)’s, after scaling, form a dual-feasible solution. \[\sum_{j\in D} \left[\alpha_j - \left(\gamma+2+\frac{2}{\gamma-1}\right)d^2(j,i)\right]^+ \leq f,\quad \forall i\in F.\] The above equations together imply that the overall algorithm is an LMP \((\gamma+2+\frac{2}{\gamma-1})\)-approximation for the considered facility location problem. Fixing \(\gamma=1+\sqrt{2}\) gives the claim.
With the above LMP approximation for facility location at hand, we can now derive the result in Theorem 2 following an approach again close to [22]. A standard way to derive a \(\rho_{kMeans}\)-approximation algorithm for \(k\)-Means from an LMP \(\rho_{FL}\)-approximation for facility location with squared metric connection costs is to perform a binary search over the uniform facility cost \(f\) so as to obtain a solution with \(k_1<k\) open facilities for some facility cost \(f_1\), and a solution with \(k_2>k\) open facilities for some facility cost \(f_2<f_1\), where the difference between \(f_1\) and \(f_2\) is very tiny. This is called a bi-point solution. Then the two solutions are combined together to obtain a solution opening \(k\) facilities. This combination is typically costly, hence leading to a factor \(\rho_{kMeans}\) substantially larger than \(\rho_{FL}\)5. We instead carefully modify the mentioned LMP \((3+2\sqrt{2})\)-approximation for facility location (while increasing by \(\varepsilon\) the approximation factor) so that the variables \(\alpha_j\) are increased in a logarithmic number of rounds only (with a small multiplicative increase at each round). Exploiting this fact and the walking-between-solutions framework in [22], we are able to construct a bi-point solution where \(k_2\leq k+O(\log n/\varepsilon^2)\). This leads to Theorem 2. Again, the details are rather technical but they are similar in spirit to [22].
Given \((D, F, d)\), the standard LP relaxations for \(k\)-Means and facility location with squared distances and uniform opening cost \(f\) are as follows.
2 \[\begin{align} \min \quad & \sum_{i\in F,j\in D}d^2(i,j)x_{i,j} & (LP_{km})\\ s.t. \quad & \sum_{i\in F}x_{i,j}\geq 1 & \forall j\in D\\ & y_i - x_{i,j}\geq 0 & \forall j\in D,i\in F\\ & \sum_{i\in F} y_i \leq k \\ & x, y \geq 0. \end{align}\] \[\begin{align}\\ \min \quad & \sum_{i\in F,j\in D}d^2(i,j)x_{i,j} + f\cdot \sum_{i\in F}y_i & (LP_{FL}(f))\\ s.t. \quad & \sum_{i\in F}x_{i,j}\geq 1 & \forall j\in D \\ & y_i - x_{i,j}\geq 0 & \forall j\in D,i\in F \\ & x, y \geq 0. \end{align}\]
Let \(\text{opt}_{LP}(k)\) and \(\text{opt}_{LP}(f)\) be the optimal values for \(LP_{km}\) and \(LP_{FL}(f)\) respectively. Recall that \([a]^+ := \max(a, 0)\). The dual for \(LP_{FL}(f)\) is: \[\begin{align} \max \quad & \sum_{j\in D}\alpha_j & (DP_{FL}(f))\\ s.t. \quad & \sum_{j\in D} [\alpha_j - d^2(i,j)]^+ \leq f & \forall i\in F \\ & \alpha \geq 0. \end{align}\]
Thanks to standard reductions, we can assume that distances are integers in \([1,n^3/\varepsilon]\) while loosing a factor \(1+O(\varepsilon)\) in the approximation.
Lemma 1. For any constants \(\varepsilon> 0\) and \(\alpha>1\), given a polynomial-time \(\alpha\)-approximation algorithm for \(k\)-Means on instances with distances in \(\{1,\ldots,n^3/\varepsilon\}\), there exists a polynomial-time \(\alpha(1+O(\varepsilon))\)-approximation algorithm for \(k\)-Means on general instances.
Proof. Consider any input instance \((D{,} F,d)\) of \(k\)-Means. Assume that \(n:=|D|\) is large enough w.r.t. \(\alpha\), otherwise the problem can be solved by brute force in polynomial time. We guess \(M:=\max_{j\in D}d(j,\text{OPT})\), where \(\text{OPT}\) is some optimal \(k\)-Means solution, by trying all the polynomially-many possibilities. If \(M=0\), the problem can be solved optimally in polynomial time, hence assume \(M>0\). Next, for each \((i,j)\in F\times D\), define \(d'(j,i)=d'(i,j)=\max\{1,\lceil\frac{d(i,j)}{M}\frac{n}{\varepsilon}\rceil\}\) if \(d(i,j)\leq M\). Set all the remaining \(d'(a,b)\), \(a\neq b\), to \(\frac{n^3}{\varepsilon}\). Finally, replace the \(d'(i,j)\)’s with the corresponding metric closure. We run the given \(\alpha\)-approximation algorithm on the \(k\)-Means instance \((D{,} F,d')\), hence obtaining a solution \(S\). It is easy to check that \(S\) is a good enough approximation for the input instance. ◻
Given three distances \(d,d_1,d_2\) with \(d\leq d_1+d_2\), the following lemma provides a useful upper bound on \(d^2\) as a function of \(d_1\) and \(d_2\). The next lemma provides a similar upper bound in an analogous setting where \(d\leq d_1+d_2+d_3\).
Lemma 2. Let \(\gamma>1\) be any constant. For any \(x,y\) we have \(\gamma x^2+\frac{\gamma}{\gamma-1}y^2\geq (x+y)^2\).
Proof. Let us show for which values of \(b\) the inequality \(\gamma x^2+by^2\geq (x+y)^2\) holds. This is equivalent to requiring that the quadratic form \((\gamma-1) x^2+(b-1)y^2-2xy\) is non negative. This happens iff \(\gamma-1\geq 0\) (which is satisfied by assumption) and \((\gamma-1)(b-1)-1\geq 0\), which is satisfied for \(b\geq \frac{\gamma}{\gamma-1}\). ◻
Lemma 3. Let \(\gamma>1\) be any constant. For any \(x\), \(y\), \(z\), we have \(\gamma x^2+\left(2+\frac{2}{\gamma-1} \right)(y^2+z^2)\geq (x+y+z)^2\).
Proof. The proof of this lemma consists of a rearrangement of the LHS and applying the inequality of arithmetic and geometric means: \[\begin{align} {5} \gamma\cdot x^2+\left(2+\frac{2}{\gamma-1}\right)(y^2+z^2) & =x^2+y^2+z^2&&+\left(\frac{\gamma-1}{2}x^2+\frac{2}{\gamma-1}y^2\right) \\ &&&+\left(\frac{\gamma-1}{2}x^2+\frac{2}{\gamma-1}z^2\right)+(y^2+z^2)\\ & \geq x^2+y^2+z^2&&+2xy+2xz+2yz \\ &=(x+y+z)^2&&. \end{align}\] The inequality follows from the arithmetic-geometric mean inequality \(a^2+b^2\geq 2ab\) applied three times. ◻
We formally present the new greedy algorithm for facility location with squared distances outlined in 2. Let \(\gamma=1+\sqrt{2}\) and \(\Gamma = \gamma+2+\frac{2}{\gamma-1}\approx 5.828\) be the desired approximation ratio. Given an instance \((D, F, d, f)\) for facility location, let \(\hat{f}=\Gamma f\). The following is our new greedy algorithm6 achieving an LMP \(\Gamma\)-approximation (see Algorithm 2).
Figure 2:
.
We say that the clients in \(A\) are active, that the clients in \(IC\) are indirectly connected, and that the clients in \(DC\) are directly connected. The following standard lemma proves that these \(\alpha\) values are enough to pay the connection costs and the (augmented) opening costs.
Lemma 4 (Approximation Guarantee). At the end of the execution of Greedy Algorithm, we have \(\sum_{j\in D}\alpha_j\geq \sum_{j\in D}d^2(j, S) + |S|\hat{f}\).
Proof. It is sufficient to show that, at the end of the execution, we have \[\begin{gather} \sum_{j\in DC}\alpha_j \geq \sum_{j\in DC}\gamma d^2(j, S) + \sum_{i\in S}\hat{f}\,. \label{ineq:approxgamma} \end{gather}\tag{2}\] Indeed, at the end of the execution, \(A=\emptyset\), and for every \(j\in IC\), \(\alpha_j\geq d^2(j, S)\). Furthermore, \(\gamma>1\), therefore, 2 implies the lemma. To this end, we prove that at any point in the execution of Greedy Algorithm, 2 holds.
The equality is initially true since \(DC=\emptyset\) and \(S = \emptyset\). Furthermore, since whenever the \(\alpha\)-value of a client \(j\) reaches \(d^2(j, S)\) it stops growing, no client is added to \(DC\) outside of when a facility is opened.
We now consider what happens when we open a facility \(i\), i.e., add it to \(S\). Let \((\alpha,S, A, IC, DC)\) be the state right before opening \(i\), and set \(DC' = \{ j \in A\cup IC : \alpha_j \geq \gamma d^2(i, j) \}\), and \(X=\{j\in DC:d^2(j, i)<d^2(j,S)\}\). The change of cost of the right-hand side of 2 is at most \[\begin{align} \hat{f} &+ \sum_{j\in DC'} \gamma d^2(i,j) + \sum_{j \in X} \gamma (d^2(i,j) - d^2(j, S))\,. \end{align}\] Since the algorithm decided to open \(i\), we also have \[\begin{align} \hat{f} &\leq \sum_{j\in DC'}(\alpha_j - \gamma d^2(i, j)) + \sum_{j\in X}(\gamma d^2(j,S)-\gamma d^2(i,j))\,. \end{align}\] We thus get that the change of cost of the right-hand side is at most \(\sum_{j\in DC'} \alpha_j\), which is the change of the left-hand side. ◻
Let \((\alpha_j)_{j\in D}\) be the final vector of \(\alpha\) values. We following lemma is the core of our analysis: it implies that \(\alpha / \Gamma\) is a feasible solution for \(DP_{FL}(f)\). Combined with 4, it shows that our solution \(S\) satisfies \[\sum_{j \in D} d^2(j, S) + \Gamma |S| f \leq \sum_{j \in D} \alpha_j \leq \Gamma \cdot \text{opt}_{LP}(f) \leq \Gamma \cdot \text{opt}_{FL}(f),\] which finishes the proof of the LMP \(\Gamma\)-approximation.
Lemma 5 (Dual Feasibility). For every facility \(i\), we have \(\sum_{j\in D} [\alpha_j - \Gamma d^{2}(i,j)]^+ \leq \hat{f}\).
Proof. Consider a facility \(i\). Let \(D^*=\{j\in D: \alpha_j> \Gamma d^2(i, j)\}\). Since \(\alpha_j \leq \Gamma d^{2}(i,j)\) for any \(j\notin D^*\), it remains to show that \[\begin{align} \sum_{j\in D^*} \alpha_j \leq \hat{f} + \Gamma\cdot \sum_{j\in D^*} d^{2}(i,j)~. \label{eqn:dual-feasible-equiv} \end{align}\tag{3}\] Let \(s=|D^*|\) be the size of \(D^*\). Without loss of generality, we assume that \(D^*=[s]\) and it is sorted in non-decreasing order of \(\alpha_j\) values, namely, \(\alpha_1\leq \ldots \leq \alpha_s\).
For each \(j\in D^*\), let \(DC^j\) (resp., \(IC^j\)) be the set of clients \(j'\) in \([j-1]\) such that \(j'\in DC\) (resp., \(j'\in IC\cup A\)) at time \(\alpha_j-\varepsilon\), where the value of \(\varepsilon>0\) can be an arbitrary positive number such that \(\alpha_j-\varepsilon> \Gamma\cdot d^2(j,i)\) and such that no client becomes connected or no facility becomes open between \(\alpha_j-\varepsilon\) (inclusive) and \(\alpha_j\) (exclusive). Similarly, let \(S^j\) be the set \(S\) at time \(\alpha_j-\varepsilon\). Then, for any \(j\in D^*\) and \(j'\in DC^j\), the squared distance between \(j\) and the facility \(i'\) that \(j'\) connects to at time \(\alpha_j-\varepsilon\) should be strictly larger than \(\alpha_j-\varepsilon\). This is because otherwise we will stop growing \(\alpha_j\) at time \(\alpha_j-\varepsilon\). Since \(\varepsilon\) here can be arbitrarily small, we have \(d^2(j,i') \geq \alpha_j\). Further, applying 3, we have \[\begin{align} \forall j\in [s], j'\in DC^j, \quad \alpha_j &\leq d^2(j,i') \leq \left(d(j,i) + d(j',i) + d(j',i')\right)^2 \notag \\ & \leq \gamma \cdot d^2(j',i') + \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(j,i) + d^2(j',i)) \notag \\ & {=} \gamma \cdot d^2(j',S^j) + \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(j,i) + d^2(j',i))\,. \label{eqn:bound-of-alpha95i} \end{align}\tag{4}\] In the equality we used that \(d(j',i')=d(j',S^j)\) by the definition of \(i'\) and \(S^j\).
Note that \(\alpha_j-\varepsilon> \Gamma\cdot d^2(j,i) > \gamma \cdot d^2(j,i)\) for any \(j\in D^*\). At time \(\alpha_j-\varepsilon\), facility \(i\) is unopened, because otherwise client \(j\) should be directly connected to \(i\). Therefore, we have \[\begin{align} \sum_{j'\in DC^j} \left[\gamma d^2(j',S^i) - \gamma d^2(j',i)\right]^+ + \sum_{j'\in IC^j} \left[\alpha_{j'} - \gamma d^2(j',i)\right]^+ + \sum_{j\leq j'\leq s} \left[\alpha_{j} - \varepsilon- \gamma d^2(j',i)\right]^+ < \hat{f}~. \end{align}\] Again, since this \(\varepsilon\) can be arbitrarily small and \([v]^+\geq v\) for any value of \(v\), for any \(j\in D^*\), we have the following inequality: \[\begin{align} \sum_{j'\in DC^j} \left(\gamma d^2(j',S^i) - \gamma d^2(j',i)\right) + \sum_{j'\in IC^j} \left(\alpha_{j'} - \gamma d^2(j',i)\right) + \sum_{j\leq j'\leq s} \left(\alpha_{j} - \gamma d^2(j',i)\right) \leq \hat{f}~. \end{align}\] By applying 4 , we get \[\begin{align} {1} \sum_{j'\in DC^j} \left(\alpha_j - \left(2+\frac{2}{\gamma-1}\right) \cdot \left(d^2(j,i)+d^2(j',i)\right) - \gamma d^2(j',i)\right) &+ \sum_{j'\in IC^j} (\alpha_{j'} - \gamma d^2(j',i)) \\ &+ \sum_{j\leq j'\leq s} (\alpha_j - \gamma d^2(j',i)) \leq \hat{f}~, \end{align}\] and we can simplify it as (using the definition of \(\Gamma := \gamma + 2 + \frac{2}{\gamma-1}\)) \[\begin{align} \label{eqn:lambda-j} & (s-j+1+|DC^j|) \cdot \alpha_j + \sum_{j'\in IC^j} \alpha_{j'} \leq \hat{f} + \gamma \cdot \sum_{j'\in D^*} d^2(j',i) + \left(\Gamma-\gamma\right) \cdot \sum_{j'\in DC^j} (d^2(j,i)+d^2(j',i)) ~. _j} \end{align}\tag{5}\]
Next, we show that all 5 (for \(j\in D^*\)) together imply our objective 3 . Let \(A_{jj'}\) define the coefficient of \(\alpha_{j'}\) in 5 . That is, we have \[\begin{align} A_{jj'}=\begin{cases} \mathbb{1}(j'\in IC^j) & \text{if } j'<j;\\ s-j+1+|DC^j| & \text{if }j'=j;\\ 0 & \text{if }j'>j. \end{cases} \end{align}\] We can rewrite 5 as \[\begin{align} \label{eqn:lambda-j95bis} \sum_{j'\in [s]} A_{jj'} \alpha_{j'} \leq \hat{f} + \gamma \cdot \sum_{j'\in [s]} d^2(j',i) + \left(\Gamma-\gamma \right) \cdot \sum_{j'\in [j-1]} (1-A_{jj'})(d^2(j,i) + d^2(j',i)).'_j} \end{align}\tag{6}\] Let \(\beta_1,\ldots,\beta_s\) be some coefficients such that \(\sum_{j\in [s]} \beta_j \cdot \sum_{j'\in [s]} A_{jj'}\alpha_{j'} = \sum_{j\in [s]} \alpha_j\), for every possible value of the quantities \(\alpha_j\). In other words, we impose \[\label{eqn:formulabetaj} {\forall j\in [s]: 1 = \sum_{j'\in [s]}\beta_{j'}A_{j'j}=\sum_{j'\geq j}\beta_{j'}A_{j'j},}\tag{7}\] where the second equality comes from the fact that \(A_{j'j}=0\) for any \(j>j'\). Thus we can easily compute each \(\beta_j\) one by one, using the values of \(\beta_{j+1}, \dots, \beta_s\): \[\begin{align} \label{eqn:recurrence-for-beta} \beta_j = \frac{1}{A_{jj}} \cdot \left(1 - \sum_{j'>j} \beta_{j'} A_{j'j}\right)~. \end{align}\tag{8}\] Let us show that \(\beta_{j}\geq 0\) for all \(j\in [s]\). Using 8 and since \(A_{j'j}\in \{0,1\}\) for any \(j'>j\), it suffices to show that \(\sum_{j'>j} \beta_{j'}\leq 1\). Indeed, the following stronger fact holds.
Fix any \(j\in \{0\} \cup [s]\). We have \(\sum_{j'>j} \beta_{j'} \leq \frac{s-j}{s-j+|DC^{j}|}\), where we define \(DC^0:=\emptyset\).
Proof. Using 7 , we get \[\begin{align} \label{eqn:sum-of-A42beta} {s-j=\sum_{\ell>j}\sum_{j'\in [s]}\beta_{j'}A_{j'\ell}=\sum_{j'>j}\beta_{j'}\left(\sum_{\ell>j}A_{j'\ell}\right),} \end{align}\tag{9}\] where in the last equality we used the fact that, for \(j'\leq j<\ell\), \(A_{j'\ell}=0\).
Recall the definition of \(A_{j'\ell}\), where we have for any \(j'>j\), \[\begin{align} A_{j'j'} &= s-j'+1+|DC^{j'}| = s-j'+1 + \sum_{j<\ell<j'} \mathbb{1}(\ell \in DC^{j'}) + \sum_{\ell\leq j} \mathbb{1}(\ell \in DC^{j'})~, \\ A_{j'\ell} &= \mathbb{1}(\ell \in IC^{j'})\forall j<\ell<j'~. \end{align}\] For any \(j<\ell<j'\), we have either \(\ell\in DC^{j'}\) or \(\ell \in IC^{j'}\) (note that \(IC^{j'}\) includes active clients with index less than \(j'\) at time \(\alpha_{j'}-\varepsilon\)). Thus, \(\sum_{j<\ell<j'}(\mathbb{1}(\ell \in DC^{j'})+\mathbb{1}(\ell \in IC^{j'}))=(j'-1)-j\). Hence, for any \(j'>j\), we have \[\sum_{\ell>j} A_{j'\ell} = s-j'+1 + (j'-1)-j + \sum_{\ell\leq j} \mathbb{1}(\ell\in DC^{j'}) \geq s-j+|DC^{j}| ~,\] where the inequality results from the fact that \(DC^{j'} \cap[j-1] \supseteq DC^{j}\) for \(j'>j\). Applying this lower bound to 9 , we get \(s-j\geq (s-j+|DC^j|)\sum_{j'>j} \beta_{j'}\), which is equivalent to \(\sum_{j'>j} \beta_{j'}\leq \frac{s-j}{s-j+|DC^j|}\). ◻
Hence, we have \(\beta_j\geq 0\) for any \(j\in [s]\) according to our earlier discussions. Further, we have \[\begin{align} & \sum_{j\in [s]} \alpha_j = \sum_{j\in [s]} \beta_j \cdot \left(\sum_{j'\in [s]} A_{jj'}\alpha_{j'}\right) \notag \\ \overset{\ref{eqn:lambda-j95bis}}{\leq} & \left(\hat{f} + \gamma\cdot \sum_{j\in [s]} d^2(j,i)\right) \left(\sum_{j\in [s]} \beta_j\right) + \left(\Gamma-\gamma\right) \left(\sum_{j\in [s]} \beta_j \cdot \sum_{j'\in [j-1]} (1-A_{jj'})(d^2(j,i) + d^2(j',i))\right) \notag \\ \overset{\ref{fact:ub-for-sum-beta}}{\leq} & \left(\hat{f} + \gamma\cdot \sum_{j\in [s]} d^2(j,i)\right) + \left(\Gamma-\gamma\right) \left(\sum_{j\in [s]} \beta_j \cdot \sum_{j'\in [j-1]} (1-A_{jj'})(d^2(j,i) + d^2(j',i))\right)\;. \label{eqn:sum-of-alpha} \end{align}\tag{10}\] Finally, to finish the proof, we show that \[\begin{align} \sum_{j\in [s]} \beta_j \cdot \sum_{j'\in [j-1]} (1-A_{jj'})(d^2(j,i) + d^2(j',i)) \leq \sum_{j\in [s]} d^2(j,i)~. \label{eqn:additional-term-in-sum-of-alpha} \end{align}\tag{11}\] Rearranging the LHS of the inequality, we get \[\begin{align} \text{LHS of \ref{eqn:additional-term-in-sum-of-alpha}} &= \sum_{j\in [s]} \sum_{j'\in [j-1]} \beta_j \cdot (1-A_{jj'}) \cdot d^2(j,i) + \sum_{j\in [s]} \sum_{j'\in [j-1]} \beta_{j}\cdot (1-A_{jj'})\cdot d^2(j',i) \\ &= \sum_{j\in [s]} \left(\beta_j \cdot \sum_{j'\in [j-1]} (1-A_{jj'}) + \sum_{j'>j} \beta_{j'} \cdot (1-A_{j'j})\right) \cdot d^2(j,i) \\ &\leq \sum_{j\in [s]} \left(\beta_j \cdot \sum_{j'\in [j-1]} (1-A_{jj'}) + \sum_{j'>j} \beta_{j'}\right) \cdot d^2(j,i) \\ &\overset{\ref{fact:ub-for-sum-beta}}{\leq} \sum_{j\in [s]} \left(\beta_j \cdot \sum_{j'\in [j-1]} (1-A_{jj'}) + \frac{s-j}{s-j+|DC^j|} \right) \cdot d^2(j,i)\;, \end{align}\] where in the first inequality we used the fact that \(A_{j'j}\in \{0,1\}\) for \(j'>j\). By 8 , we have \(\beta_j\leq \frac{1}{A_{jj}} = \frac{1}{s-j+1+|DC^j|}\). Note that, for any \(j'<j\), \(A_{jj'}=0\) if and only if \(j'\notin IC^j\), i.e., \(j'\in DC^j\). Therefore, \(\sum_{j'\in [j-1]} (1-A_{jj'}) = |DC^j|\). We can further upper bound the above LHS by \[\begin{align} \text{LHS of \ref{eqn:additional-term-in-sum-of-alpha}} &\leq \sum_{j\in [s]} \left(\frac{|DC^j|}{s-j+1+|DC^j|} + \frac{s-j}{s-j+|DC^j|} \right) \cdot d^2(j,i) \\ &\leq \sum_{j\in [s]} \left(\frac{|DC^j|}{s-j+|DC^j|} + \frac{s-j}{s-j+|DC^j|} \right) \cdot d^2(j,i) = \sum_{j\in [s]} d^2 (j,i)\;. \end{align}\] Putting 10 11 together, we get \[\begin{align} \sum_{j\in [s]} \alpha_j \leq \hat{f} + \gamma \cdot \sum_{j\in [s]} d^2(j,i) + \left(\Gamma-\gamma\right) \cdot \sum_{j\in [s]} d^2(j,i) = \hat{f} + \Gamma \cdot \sum_{i\in [s]} d^2(j,i)~. & \qedhere \end{align}\] ◻
Let \(\gamma=1+\sqrt{2}\) and \(\Gamma = \gamma+2+\frac{2}{\gamma-1}\approx 5.828\). In this section, we present a polynomial-time algorithm that opens \(k + O(\log n/ \varepsilon^2)\) many centers and returns a solution of cost at most \((\Gamma + \varepsilon)\text{opt}\), proving 2.
This section is close to Section 3 of [22] that used the classical LMP 2-approximation [16] for a \((2+\varepsilon)\)-approximation for \(k\)-Median. Here, we start from the LMP \(\Gamma\)-approximation (with squared distances) presented in 4 instead. 5.1 presents a modified algorithm LogAdaptiveAlgorithm that runs in \(O(\log n / \varepsilon^2)\) adaptive steps (that we call phases) and 5.2 analyzes the algorithm. Finally, building on additional setups in 5.3, 5.4 presents our final algorithm MergeSolutions achieving the guarantee of 2.
We present the modified greedy algorithm that works in \(O(\log n / \varepsilon^2)\) phases. At high level, instead of considering the continuous time where \(\alpha\) values of the active clients are increased at unit rate, the idea is to consider discrete time steps (that we call phases), where the \(i\)th phase \((i \geq 0)\) corresponds to time \((1+\varepsilon^2)^i\). Then, since we assumed that the minimum nonzero distance is \(1\) and the maximum distance is \(\poly(n)\), the number of phases is \(O(\log(n)/\varepsilon^2)\).
We will ensure that the dual feasibility (5) will be satisfied without any slack, which could be violated if \(\alpha\) values of the active clients discretely jump from one value to a strictly larger value. In order to deal with this issue, [22] uses two ideas, namely (1) scaling down the metric by a factor of \((1-\delta)\) with \(\delta = 3\varepsilon\) and (2) allowing clients extremely close to a facility \(i\) to continuously increase their \(\alpha\) values in order to open \(i\). We use a similar definition adapted to our new greedy algorithm for squared distances and its analysis. A key ingredient is the following technical definition of facilities that can be opened.
Definition 1 (openable). A facility \(i\) is openable with respect to the algorithm’s state \((\alpha,S,\theta)\) if there are increased dual values \((\tau_j)_{j\in A}\) of active clients that satisfy the following conditions:
Only nearby clients are increased: \[\tau_j=\alpha_j, \text{ for every } j\in A\setminus B(i,\sqrt{\varepsilon\theta}).\]
Nearby clients are only increased slightly: \[\alpha_j\leq\tau_j\leq \min\{(1-\delta)d^2(j,S), (1+\varepsilon^2)\theta\}\text{ for every } j\in A\cap B(i,\sqrt{\varepsilon\theta}).\]
Facility \(i\) is paid for: \[\sum_{j\in A}[\tau_j - (1-\delta)\gamma d^2(i, j)]^+ + \sum_{j\in IC}[\alpha_j - (1-\delta)\gamma d^2(i, j)]^+ +(1-\delta)\sum_{j\in DC}[\gamma d^2(j,S)-\gamma d^2(i,j)]^+ \geq \hat{f}\]
Dual feasibility: for every client \(k\in A\) and facility \(i_0\) \[\begin{align} \sum_{j\in DC}\left[\tau_k - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0,k) + d^2(i_0,j))-\gamma d^2(i_0,j)\right]^+ &+ \sum_{j\in IC} [\alpha_{j}-\gamma d^2(i_0,j)]^+ \\ &+ \sum_{j\in A}[\tau_{j}-\gamma d^2(i_0,j)]^+\leq \hat{f} \end{align}\]
The openability can be easily checked by solving a linear program.
Lemma 6. There is a polynomial-time algorithm that, given the state of the algorithm and a facility \(i\), either outputs \((\tau_j)_{j \in A}\) that satisfy all conditions of openability or certifies that \(i\) is not openable.
Proof. Fix \(i\) and \((\alpha, S, A, IC, DC, \theta)\) and consider a linear program with variables \((\tau_j)_{j \in A}\). We claim that each of the four bullets in 1 can be expressed as linear constraints. The first two bullets are immediate. Indeed, as \(\tau_j = \alpha_j\) for every \(j \in A - B(i, \varepsilon\theta)\), we can treat them as constants and only have \((\tau_j)_{j \in A \cap B(i, \sqrt{\varepsilon\theta})}\) as the true variables.
Then, the third bullet, \[\begin{gather} \sum_{j\in A} [\tau_j - (1-\delta)\gamma d^2(i,j)]^+ + \sum_{j\in IC\cup DC} [\min(\alpha_j, (1-\delta)\gamma d^2(j,S)) - (1-\delta)\gamma d^2(i,j)]^+ \geq \hat{f}\, \end{gather}\] becomes a linear inequality in the true variables, since the only terms involving the true variables are \([\tau_j - (1 - \delta)\gamma d^2(i,j)]^+\) for \(j \in A \cap B(i, \sqrt{\varepsilon\theta})\), and for those \(j\), \([\tau_j - (1 - \delta)\gamma d^2(i,j)]^+\) is indeed equal to \((\tau_j - (1 - \delta)\gamma d^2(i,j))\) without \([\cdot]^+\).
Finally, the fourth bullet can be similarly expressed as a linear inequality in the true variables as the third bullet. ◻
3 is our log-adaptive algorithm. It works in \(O(\log n/\varepsilon^2)\) phases where, in the \(i\)th phase, every active client \(j\) has \(\alpha_j = (1+\varepsilon^2)^{i}\) and the algorithm opens openable facilities in an arbitrary order by increasing \(\alpha_j\)’s to \(\tau_j\)’s. However, when \(i\) is open, the only scenario \(j\) with \(\tau_j > \alpha_j\) is when \(j \in B(i, \sqrt{\varepsilon\theta})\), so \(j\) is immediately put into \(DC\) after \(i\) is open.
Figure 3:
.
In this subsection, we show that 3 achieves an LMP \({\frac{\Gamma}{1-\delta}=}\Gamma + O(\varepsilon)\) approximation. This is a direct consequence of the following two lemmas, proved in 5.2.1 and 5.2.2, resp. Let \((\alpha^*_j)_{j \in D}\) be the final \(\alpha\) values.
Lemma 7. We have \(\sum_{j\in D}\alpha^*_j \geq \sum_{j\in D}(1-\delta)d^2(j,S) + \sum_{i\in S}\hat{f}\).
Lemma 8. For every facility \(i\), \[\sum_{k\in D}[\alpha_k^* -\Gamma d^2(i, k)]^+ \leq \hat{f}.\]
In more detail, Lemma 7 shows that the dual values \(\frac{\alpha^*_j}{1-\delta}\) can pay the cost of the solution with facility opening cost \(\frac{\Gamma}{1-\delta}f\). Lemma 8 implies that \(\alpha^*/\Gamma\) is a feasible solution for the dual of the facility location LP with facility cost \(f\). We conclude as desired that \[\frac{\Gamma}{1-\delta}\text{opt}_{\text{LP}}(f)\geq \sum_{j\in D}d^2(j,S)+\frac{\Gamma}{1-\delta}|S|f.\]
Proof of Lemma 7. It is sufficient to show that, at any point of the algorithm, one has \[\begin{gather} \sum_{j\in DC} \alpha_j \geq \sum_{j\in DC}(1-\delta)\gamma d^2(j, S) + \sum_{i\in S} \hat{f}\,. \label{eq:IH95approx95guarantee} \end{gather}\tag{12}\] Indeed, at the end of the algorithm all the clients are in \(IC\) or \(DC\). For the ones in \(IC\), one trivially has \({\alpha^*_j}\geq (1-\delta)d^2(j, S)\). For the remaining ones it is sufficient to apply the above inequality and the fact that \(\gamma\geq 1\).
We prove 12 by induction on the steps of the algorithm. The inequality is initially true since \(A= D\) (thus \(IC\cup DC = \emptyset\)) and \(S = \emptyset\). For the inductive step, we next analyze each one of the two stages separately.
Consider what happens when we open a facility \(i\), i.e., we add it to \(S\). Let \((\alpha, S, A, IC, DC, \theta)\) be the state right before opening \(i\), and let \(A'\) and \(IC'\) be the clients that are moved to \(DC\) from \(A\) and \(IC\) respectively by the opening, i.e., \(A' = \{ j \in A : \tau_j \geq (1 - \delta)\gamma d^2(i, j) \}\) and \(IC'=\{j\in IC:\alpha_j\geq (1-\delta)\gamma d^2(i, j)\}\). Let also \(X=\{j\in DC:d^2(j, i)<d^2(j,S)\}\). The change of cost of the right-hand side of 12 is at most \[\begin{align} \hat{f} &+ \sum_{j\in A'\cup IC'} (1-\delta) \gamma d^2(i,j) + \sum_{j \in X} (1 - \delta)\gamma (d^2(i,j) - d^2(j, S))\,. \end{align}\] Since \(i\) is paid for (the third bullet of 1), we also have \[\begin{align} \hat{f} &\leq \sum_{j\in A'}(\tau_j - (1-\delta)\gamma d^2(i, j)) + \sum_{j\in IC'} (\alpha_j - (1-\delta)\gamma d^2(i, j)) + (1-\delta)\sum_{j\in X}(\gamma d^2(j,S)-\gamma d^2(i,j))\,. \end{align}\] In the above inequality we used the fact that the only positive terms in the left-hand side of the definition of paid for correspond to the sets \(A'\), \(IC'\), and \(X\). We thus get that the change of cost of the right-hand side is at most \(\sum_{j\in A'} \tau_j+\sum_{j\in IC'}\alpha_j\), which is the change of the left-hand side.
No facility is open at this stage, and no client is added to \(DC\) either. ◻
Here we prove 8. First, we prove the following lemma, showing intuitively that no facility is overpaid during the course of our algorithm.
At any point in the algorithm, for every facility \(i_0\), \[\sum_{j\in DC}[{(1-\delta)}\gamma d^2(j, S) - \gamma d^2(i_0,j)]^+ + \sum_{j\in A\cup IC}[\alpha_j - \gamma d^2(i_0,j)]^+\leq \hat{f}.\]
Proof. Let us prove the claim by induction on the steps of the algorithm. The claim is initially true since all clients are in \(A\) and the initial value \(1\) of the variables \(\alpha_j\) makes the left-hand side equal to \(0\) (since we can impose w.l.o.g. that the minimum distance of a client to a facility is \(1\) by 1). For the inductive step, we consider the two stages separately:
Suppose that facility \(i'\) is open, and let \((\tau_j)_{j\in A}\) be the associated values. This implies that (1) the \(\alpha\)-values of clients in \(B(i', \sqrt{\varepsilon\theta})\cap A\) are potentially increased, and (2) some clients might become directly connected. Let us see how the constraint is impacted by these changes. First, observe that a client that was directly connected before the opening of \(i'\) can only lower its contribution. For a client \(j\) that was active or indirectly connected and that now becomes directly connected, its contribution lowers from \([\alpha_j-\gamma d^2(i_0, j)]^+\) to \([{(1-\delta)}\gamma d^2(j,S) - \gamma d^2(i_0,j)]^+\), because \(S\) includes \(i'\).
Assume towards contradiction that at the end of the phase, if we increase \(\alpha_j\) of every \(j\in A\) to \(\min((1+\varepsilon^2)\theta, (1-\delta)d^2(j,S))\), the claim is violated by some facility \(i\). We select a "minimal" such counter-example in the following way: let \(\tau'\leq (1+\varepsilon^2)\theta\) be the smallest value so that \(\alpha_j':=\min(\tau', (1-\delta)d^2(j,S))\) satisfies \[\sum_{j\in A}[\alpha_j'-\gamma d^2(i, j)]^+ + \sum_{j\in IC}[\alpha_j - \gamma d^2(i,j)]^+ + \sum_{j\in DC}[(1-\delta)\gamma d^2(j,S)-\gamma d^2(i,j)]^+=\hat{f},\] for the considered \(i\). We remark that \(\tau'\geq \theta\) since the constraint is satisfied at the end of Phase 1. We also observe that \(i\) is not yet open. Indeed, otherwise there would be no client \(j\in A\) for which \(\alpha'_j-\gamma d^2(i,j)\) is strictly positive. Hence the increase in \(\alpha\)-values cannot cause \(i\) to violate the constraint.
We now show that this \(i\) with \(\tau_j=\alpha_j'\) for \(j\in A\cap B(i,\sqrt{\varepsilon\theta})\) and \(\tau_j=\alpha_j\) for \(j\in A\setminus B(i,\sqrt{\varepsilon\theta})\) satisfies the conditions of openability for \(i\). In other words, \(i\) is an openable facility (that was not yet opened), which contradicts the completion of the first stage. We verify the conditons of openability (1) one-by-one. The first two bullets are satisfied by the definition of \((\tau_j)_{j\in A}\). For the third bullet, we first observe that, for any \(j\in A\setminus B(i,\sqrt{\varepsilon\theta})\), one has \[\label{eqn:clm:nooverbidding} \alpha_j-(1-\delta)\gamma d^2(i,j)\geq (1+\varepsilon^2)\alpha_j - \gamma d^2(i,j)\geq \alpha_j' - \gamma d^2(i,j)\;,\tag{13}\] where we use the facts that \(d^2(i,j)\geq \varepsilon\theta\), \(\alpha_j=\theta\), and \(\gamma\geq 1\). Then \[\begin{align} &\sum_{j\in A}[\tau_j - (1-\delta)\gamma d^2(i,j)]^+ + \sum_{j\in IC}[\alpha_j - (1-\delta)\gamma d^2(i,j)]^+ \\ & \;\;\;\; + \sum_{j\in DC}[(1-\delta)\gamma d^2(j,S) - (1-\delta)\gamma d^2(i,j)]^+\\ = & \sum_{j\in A\cap B(i,\sqrt{\varepsilon\theta})}[\alpha_j' - (1-\delta)\gamma d^2(i,j)]^+ + \sum_{j\in A\setminus B(i,\sqrt{\varepsilon\theta})}[\alpha_j - (1-\delta)\gamma d^2(i,j)]^+\\ & \;\;\;\; + \sum_{j\in IC}[\alpha_j - (1-\delta)\gamma d^2(i,j)]^+ + \sum_{j\in DC}[(1-\delta)\gamma d^2(j,S)-(1-\delta)\gamma d^2(i,j)]^+\\ \overset{\eqref{eqn:clm:nooverbidding}}{\geq} & \sum_{j\in A\cap B(i,\sqrt{\varepsilon\theta})}[\alpha_j' - \gamma d^2(i,j)]^+ + \sum_{j\in (A\setminus B(i,\sqrt{\varepsilon\theta}))}[\alpha'_j - \gamma d^2(i,j)]^+\\ & \;\;\;\; + \sum_{j\in IC}[\alpha_j - \gamma d^2(i,j)]^+ + \sum_{j\in DC}[(1-\delta)\gamma d^2(j,S)-\gamma d^2(i,j)]^+\\ \geq & \hat{f} \end{align}\]
It remains to verify the fourth bullet of openability. Suppose toward contradiction that there is a facility \(i_0\) and \(k\in A\) such that \[\begin{align} & \sum_{j\in DC}\left[\tau_k - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0,k) + d^2(i_0,j))-\gamma d^2(i_0,j)\right]^+ \\ & + \sum_{j\in IC} [\alpha_{j}-\gamma d^2(i_0,j)]^+ + \sum_{j\in A}[\tau_{j}-\gamma d^2(i_0,j)]^+ > \hat{f}. \end{align}\]
Let \(j\in DC\) and \(i_1\in S\) such that \(j\) connects to \(i_1\). By 3, \[\label{eqn:clm:nooverbidding2} \gamma d^2(i_1,j)+ \left(2+\frac{2}{\gamma-1}\right) (d^2(i_0,k) + d^2(i_0,j)) \geq (d(i_1,j)+d(i_0,k) + d(i_0,j))^2\;.\tag{14}\] Then \[\begin{align} &(1-\delta)\gamma d^2(j, S) - \gamma d^2(i_0,j)\\ &=(1-\delta)\gamma d^2(i_1,j) - \gamma d^2(i_0,j)\\ & \overset{\eqref{eqn:clm:nooverbidding2}}{\geq} (1-\delta)\left((d(i_1,j) + d(i_0,k) + d(i_0,j))^2 - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0,k) + d^2(i_0,j))\right)- \gamma d^2(i_0,j)\\ &\geq (1-\delta)d^2(i_1,k) - (1-\delta)\left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0,k) + d^2(i_0,j))- \gamma d^2(i_0,j)\\ &\geq \tau_k - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0,k) + d^2(i_0,j))- \gamma d^2(i_0,j)\;, \end{align}\] where in the last inequality we used \(\tau_k\leq (1-\delta)d^2(k,S)\).
Hence, we have: \[\begin{align} &\sum_{j\in A}[\alpha_{j}'-\gamma d^2(i_0,j)]^+ + \sum_{j\in IC}[\alpha_{j} - \gamma d^2(i_0,j)]^+ + \sum_{j\in DC}[(1-\delta)\gamma d^2(j,S)-\gamma d^2(i_0,j)]^+\\ \geq & \sum_{j\in A}[\tau_{j}-\gamma d^2(i_0,j)]^+ + \sum_{j\in IC}[\alpha_{j} - \gamma d^2(i_0,j)]^+ \\ & + \sum_{j\in DC}\left[\tau_k - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0,k) + d^2(i_0,j))- \gamma d^2(i_0,j)\right]^+\\ > & \hat{f} \end{align}\] which contradicts the minimality of \(\tau'\). ◻
Let \((\alpha_j^*)_j\) be the final vector of \(\alpha\)-values. We say that a facility \(i\) is frozen (by \(i_0\)) if there exists some open facility \(i_0\) such that \(d(i,i_0)\leq (1+\sqrt{\Gamma\varepsilon}+3\varepsilon)\sqrt{\theta/\Gamma}\). Notice that a facility \(i\) can be frozen by \(i\) itself. We next focus on a specific facility \(i\), with the goal of proving Lemma 8. Let \(D^*=\{j:\alpha_j^*>\Gamma d^2(i,j)\}\). Similarly to the proof of 5, we define the set \(D^*\) for \(i\) and assume w.l.o.g. that \(D^*=[s]\) and that \(\alpha^*_j\leq \alpha^*_{j+1}\) for \(j=1,\ldots,s-1\).
Next, for each client \(j\in [s]\):
If \(j\) becomes inactive strictly before \(i\) is frozen, we define \(DC^j\) as the set of clients in \([j-1]\) that are directly connected at the beginning of the stage \(j\) becomes inactive, \(IC^j = [j-1]\setminus DC^j\), and \(S^j\) as the set of opened facilities at the beginning of the stage \(j\) becomes inactive.
Else, we define \(DC^j\) as the set of clients in \([j-1]\) that are directly connected right before \(j\) becomes inactive, \(IC^j = [j-1] \setminus DC^j\), and \(S^j\) as the set of opened facilities right before \(j\) becomes inactive.
For any \(k\in D^*\) that becomes inactive strictly before \(i\) becomes frozen, \[\begin{align} & \sum_{j\in {DC^k}}\left(\alpha_k^*-\left(2+\frac{2}{\gamma-1}\right)(d^2(i,k)+d^2(i,j))-\gamma d^2(i,j)\right)\\ & +\sum_{j\in {IC^k}}(\alpha_j^*-\gamma d^2(i,j)) + \sum_{{k\leq j\leq s}}(\alpha_k^*-\gamma d^2(i,j))\leq \hat{f}. \end{align}\]
Proof. We distinguish the following cases depending on the stage when \(k\) becomes inactive.
\(k\) becomes inactive because of the opening of some \({i'}\). It suffices to handle the case that \({i'}\) does not freeze \(i\). The opening of \({i'}\) might have strictly increased the \(\alpha\)-value of the clients in \(B({i'},\sqrt{\varepsilon\theta})\), but no such client \(j\) will be in \(D^*\), since they immediately become inactive while \[\begin{align} d^2(i,j) &\geq \left(d(i,{i'}) - d({i'},j)\right)^2\\ &> \left((1+\sqrt{\Gamma\varepsilon}+3\varepsilon)\sqrt{\theta/\Gamma} -\sqrt{\varepsilon\theta}\right)^2\\ &\geq (1+\varepsilon)^2 \theta/\Gamma \\ &\geq \alpha_j^* /\Gamma. \end{align}\]
Applying this argument to every facility open in this phase (which did not freeze \(i\)), we can conclude that, right before \({i'}\) is open, every \(j\in D^*\) has \(\alpha_j\leq \theta\) and all active ones have \(\alpha_j=\theta\). [clm:nooverbidding] applied right before \({i'}\) is open ensures that \[\sum_{j\in DC^k}[(1-\delta)\gamma d^2(j, S) - \gamma d^2({i'},j)]^+ + \sum_{j\in {IC^k}}[\alpha_j - \gamma d^2({i'},j)]^+ +\sum_{k\leq j\leq s}[\alpha_j - \gamma d^2({i'},j)]^+\leq \hat{f}.\]
Consider \(j\in DC^k\) that connects to the open facility \(i_1\). One has \[\begin{align} \alpha_k^* &\leq (1-\delta)d^2(i_1,k) \leq (1-\delta)(d(i_1,j) + d(i,k) + d(i,j))^2\\ &\overset{\text{Lem. \ref{lem:apxTriangleInequality3}}}{\leq} (1-\delta)\gamma\cdot d^2(i_1,j) + (1-\delta)\left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i,k) + d^2(i,j))\\ & {\leq} (1-\delta)\gamma d^2(j,S) + \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i,k)+d^2(i,j)) \end{align}\]
Hence, \[\begin{align} & \sum_{j\in {DC^k}}\left(\alpha_k^*-\left(2+\frac{2}{\gamma-1}\right)\left(d^2(i,k)+d^2(i,j)\right)-\gamma d^2(i,j)\right)\\ &+\sum_{j\in {IC^k}}(\alpha_j-\gamma d^2(i,j)) + \sum_{{k\leq j\leq s}}(\alpha_j-\gamma d^2(i,j))\leq \hat{f}. \end{align}\]
The claim follows using that for any \(j\in IC^k\), \(\alpha_j^*{=} \alpha_j\), and that for any \(j\in A\), \(\alpha_k^*\leq \alpha_j\).
Suppose that \(k\) becomes inactive by the increase of the \(\alpha\)-values at the end of a phase. Let \(A', IC', DC'\), and \(S'\) denote the respective sets of clients and open facilities at the end of this phase (immediately after \(k\) becomes inactive). Since Stage 2 does not open any facilities, no clients are moved to \(DC\), meaning \(S' = S^k\) and \(DC^k \subseteq DC'\).
By [clm:nooverbidding], at the end of this phase, the following bound holds for \(i\): \[\sum_{j\in DC'}[(1-\delta)\gamma d^2(j, S') - \gamma d^2(i,j)]^+ + \sum_{j\in A'\cup IC'}[\alpha_j - \gamma d^2(i,j)]^+ \leq \hat{f}.\]
We bound the contribution of each client \(j \in D^*\) in the target inequality of the claim by its corresponding term in the above bound. Because \(x \leq [x]^+\) for any real \(x\), we can drop the positive part brackets for the upper bound. We divide the clients into the three groups:
For \(j \in DC^k\): Because \(DC^k \subseteq DC'\) and \(S^k = S'\), we apply the exact same triangle inequality argument as in Stage 1. This bounds its contribution by \((1-\delta)\gamma d^2(j, S') - \gamma d^2(i,j)\), which corresponds to the first sum of [clm:nooverbidding].
For \(j \in IC^k\): Client \(j\) belongs to \(A' \cup IC'\) at the end of the phase. If \(j\) was already inactive before this phase, its \(\alpha\)-value is permanently fixed by the algorithm, meaning \(\alpha_j^* = \alpha_j\). If \(j\) becomes inactive in this exact phase, it is moved to \(IC'\), meaning its current value \(\alpha_j\) is now its final value \(\alpha_j^*\). If \(j\) is still active (\(j \in A'\)), then \(\alpha_j = (1+\varepsilon^2)\theta\), and since \(j \in [k-1]\), our tie-breaking rule dictates \(\alpha_j^* \leq \alpha_k^* \leq (1+\varepsilon^2)\theta = \alpha_j\). In all cases, \(\alpha_j^* \leq \alpha_j\), so its contribution is bounded by the corresponding term in the second sum.
For \(k \leq j \leq s\): These clients become inactive at the same time as \(k\) or later. If \(j\) remains active (\(j \in A'\)), its value is exactly \(\alpha_j = (1+\varepsilon^2)\theta\); because \(k\) became inactive in this phase, we know \(\alpha_k^* \leq (1+\varepsilon^2)\theta = \alpha_j\). Alternatively, if \(j\) becomes inactive in the exact same phase as \(k\), it is moved to \(IC'\), meaning \(\alpha_j\) has reached its final value \(\alpha_j^*\). By our tie-breaking rule, since \(k \leq j\), we have \(\alpha_k^* \leq \alpha_j^* = \alpha_j\). In both scenarios, \(\alpha_k^* \leq \alpha_j\). Since these clients belong to \(A' \cup IC'\), their contribution is bounded by the second sum.
Combining these three cases term-by-term shows that the left-hand side of our desired inequality is bounded by the left-hand side of [clm:nooverbidding], completing the proof. ◻
Assume that \(i\) is frozen by \(i_0\) and let \((\tau_j)_{j\in A}\) be the values associated to the opening of \(i_0\), \(A\) being the set of active clients right before \(i_0\) is opened. Then, for every \(j\in D^*\cap A\), \(\alpha_j^*=\tau_j\).
Proof. Consider \(j\in A\). First, note that if \(\tau_j\geq (1-\delta)d^2(i_0,j)\) then \(j\) is removed from \(A\) when \(i_0\) is opened and so \(\alpha_j^*=\tau_j\).
In the other case, when \(\alpha_j\leq \tau_j<(1-\delta)d^2(i_0,j)\), we show that \(j\not\in D^*\). Consider the (future) time right after \(j\) is removed from the active clients. The value \(\alpha_j\) at that time (which is equal to the final \(\alpha_j^*\)) cannot be strictly greater than \((1-\delta)d^2(i_0,j)\) whether it is increased in stage 1 or in stage 2, since \(i_0\in S\). By the triangle inequality: \[d(i, j)\geq d(i_0, j) - d(i_0, i) = \left(1-\frac{d(i_0, i)}{\sqrt{\theta}}\cdot \frac{\sqrt{\theta}}{d(i_0, j)}\right)d(i_0, j)\] where \(\theta\) is the value when \(i_0\) was open. As \(i_0\) freezes \(i\), we have \(d(i_0, i)\leq (1+\sqrt{\Gamma\varepsilon}+3\varepsilon)\sqrt{\theta/\Gamma}\), and we have \(\theta=\alpha_j\leq (1-\delta)d^2(i_0, j)\). Plugging those bounds in the above inequality yields, \[\begin{align} d(i, j) &\geq \left(1-\frac{(1+\sqrt{\Gamma\varepsilon}+3\varepsilon)}{\sqrt{\Gamma}}\cdot\sqrt{1-\delta}\right)d(i_0, j) \\ {\Rightarrow} \quad \sqrt{\Gamma}d(i, j) &\geq \left(\sqrt{\Gamma} - (1+\sqrt{\Gamma\varepsilon}+3\varepsilon)\sqrt{1-\delta}\right)d(i_0, j){> d(i_0,j)}\;, \end{align}\] where the last inequality follows from \(\sqrt{\Gamma}>2\) and assuming that \(\varepsilon\) is small enough. Thus \(\alpha_j^*\leq d^2(i_0, j) < \Gamma d^2(i, j)\), so \(j\) cannot be in \(D^*\). ◻
The last two claims together with the fourth bullet point of 1 imply the following fact:
For any \(k \in D^*\), \[\begin{align} & \sum_{j\in {DC^k}}\left(\alpha_k^*-\left(2+\frac{2}{\gamma-1}\right)(d^2(i,k)+d^2(i,j))-\gamma d^2(i,j)\right)\\ &+\sum_{j\in {IC^k}}(\alpha_j^*-\gamma d^2(i,j)) + \sum_{k\leq j{\leq s}}(\alpha_k^*-\gamma d^2(i,j))\leq \hat{f}. \end{align}\]
Proof. Consider the point in the execution when \(k\) becomes inactive. If this occurs strictly before \(i\) is frozen, then [clm:notfrozen] directly implies the claim.
Else, \(k\) becomes inactive when \(i\) is frozen by the opening of some facility \(i_0\): let \((\tau_j)_{j\in A^k}\) be the values associated with the opening of \(i_0\). By the fourth bullet of 1, we have \[\begin{align} & \sum_{j\in DC^k}\left[\tau_k - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i,k) + d^2(i,j))-\gamma d^2(i,j)\right]^+\\ &+ \sum_{j\in IC^k} \left[\alpha_{j}-\gamma d^2(i,j)\right]^+ + \sum_{{k\leq j\leq s}}\left[\tau_{j}-\gamma d^2(i,j)\right]^+\leq \hat{f}. \end{align}\]
By [clm:frozenstay], \(\alpha_k^*= \tau_k\) and for every \(j\in D^*\) that is active at the considered time, \(\alpha_j^*= \tau_j\). Furthermore, for every \(j\in IC^k\), \(\alpha_j^*=\alpha_j\). The claim follows using that, for any \(j\in D^*\) that is active at the considered time, \(j \geq k\) implies \(\alpha_j^*\geq \alpha_k^*\). ◻
We now are ready to prove Lemma 8. The following proof is almost identical to the final part of the proof of Lemma 5, the main difference being that we use [fct:bidbound] here.
Proof of Lemma 8. By definition of \(D^*\), the claim is equivalent to \[\sum_{k\in D^*}\alpha_k^*\leq \hat{f} + \Gamma\cdot \sum_{k\in D^*}d^2(i, k).\]
[fct:bidbound] implies that for any \(k\in D^*\), \[\label{eq-cnt} _k} (s-k+1 + |{DC^j}|)\cdot \alpha_k^* + \sum_{j\in {IC^k}}\alpha_{{j}}^* \leq \hat{f} + \gamma\cdot \sum_{j\in [s]}d^2(i, j) + \left(2+\frac{2}{\gamma-1}\right)\cdot \sum_{j\in {DC^k}} (d^2(i, k) + d^2(i, j))\tag{15}\]
The rest of the proof is identical to the final part of the proof of 5, hence we omit it. ◻
Given the description of the LogAdaptiveAlgorithm, we present our final algorithm MergeSolutions, resulting in a solution that opens \(k+O(\log n{/\varepsilon^2})\) centers by maintaining two partial solutions that lead to opening at least \(k\) and at most \(k\) centers respectively and gradually merge them into a single solution that opens exactly \(k+O(\log n{/\varepsilon^2})\) facilities, exploiting the \(O(\log n{/\varepsilon^2})\) adaptivity of LogAdaptiveAlgorithm.
Before detailing the merging procedure, which we call MergeSolutions, it is helpful to observe that we may generalize the analysis to make it more “robust”. We introduce this more robust analysis in this subsection, where we also define the notation that will be used later to describe MergeSolutions.
Starting from the two solutions obtained in the standard way whose facility costs differ by at most \(\eta := 2^{-n}\), the two solutions we maintain will have an exponentially small difference \(\eta\) in one of their parameters. (This parameter will be either the facility cost \(f\) or some distance related to a free facility that will be introduced later.) For this reason, when we merge the two solutions, it may occur that some facilities in one solution are almost completely paid for, rather than fully paid for. To address this, we generalize the definition of "openable" to "\(\eta\)-openable," where the only difference is in the third condition: we now require each facility that is opened to be paid \(\hat{f} - \eta \gamma n\) instead of \(\hat{f}\) (as in Definition 1). We also note that being openable only depends on the time \(\theta=(1+\varepsilon^2)^p\) and the sequence \(\mathcal{H}=(H_1, \dots , H_p)\) of the sets of facilities open by each stage 1 of the algorithm that was executed so far. Indeed, letting \(S=\cup_{i\leq p}H_i\), we can obtain \(A\), \(IC\) and \(DC\) as follows: \(A=\{j\in D: \theta < (1-\delta)d^2(j, S)\}\), \(IC=\{j\in D\setminus A:\theta<(1-\delta)\gamma d^2(j, S)\}\) and \(DC=D\setminus (IC\cup A)\). Furthermore, the \(\alpha\)-values of the indirectly connected clients only depend on \(\mathcal{H}\). This allows us to simplify notation and we have the following generalization of Definition 1.
Definition 2. Consider the time \(\theta\) and let \(\mathcal{H}\) be the sequence of sets of opened facilities. The variables \(S\), \(A\), \(IC\), \(DC\) and \(\alpha\) are deduced from them. We say that a facility \(i\in F\) is \(\eta\)-openable (with respect to \(\theta\) and \(\mathcal{H}\)) if there are \((\tau_j)_{j\in A}\) of active clients that satisfy the following conditions.
Only nearby clients are increased: \[\begin{gather} \tau_j = \alpha_j \qquad for every j \in A - B(i, \sqrt{\varepsilon\theta}). \end{gather}\]
Nearby clients are only increased slightly: \[\begin{gather} \alpha_j \leq \tau_j \leq \min\{(1-\delta) d^2(j,S), (1+\varepsilon^2)\theta\} \qquad for every j\in A \cap B(i, \sqrt{\varepsilon\theta}). \end{gather}\]
Facility \(i\) is paid for (up to the error parameter \(\eta\)): \[\begin{align} & \sum_{j\in A}[\tau_j - (1-\delta)\gamma d^2(i, j)]^+ + \sum_{j\in IC}[\alpha_j - (1-\delta)\gamma d^2(i,j)]^+ \\ &\quad +(1-\delta)\sum_{j\in DC}[\gamma d^2(j,S)-\gamma d^2(i,j)]^+ \geq \hat{f} - n \gamma \eta. \end{align}\]
Dual feasibility: for every facility \(i_0\) and \(k \in A\), \[\begin{align} & \sum_{j\in DC}\left[\tau_k - \left(2+\frac{2}{\gamma-1}\right)(d^2(i_0,k) + d^2(i_0,j))-\gamma d^2(i_0,j)\right]^+ + \sum_{j\in IC} [\alpha_{j}-\gamma d^2(i_0,j)]^+ \\ &\quad + \sum_{j\in A}[\tau_{j}-\gamma d^2(i_0,j)]^+\leq \hat{f}. \end{align}\]
We also introduce the concept of free facilities. During the process of merging the two solutions, we introduce free facilities, whose opening costs are not necessarily paid. While we will introduce at most \(O(\log n{/\varepsilon^2})\) such free facilities, we do not restrict the number of free copies a regular facility may have. Let \(S_{\mathsf{free}}\subseteq S\) denote the multiset of free facilities that have been opened.
Moreover, for each free copy \(\tilde{i} \in S_{\mathsf{free}}\) of \(i \in F\), we define a parameter \(u(\tilde{i})\), which represents the distance between the freely opened facility \(\tilde{i}\) and its original copy \(i\). So for any point \(x\) in the metric space (either a facility or a client), the distance is given by \(d(\tilde{i}, x) = \sqrt{u(\tilde{i}) + d^2(i, x)}\). We remark that the space remains metric after this extension. In particular, for any two points \(x_1,x_2\) other than \(\tilde{i}\), one has \(d(x_1,x_2)\leq d(\tilde{i},x_1)+d(\tilde{i},x_2)\).
We further introduce the following terminology: as mentioned, we refer to the facilities in \(S_{\mathsf{free}}\) as free facilities, the facilities in \(F\) and \(S_{\mathsf{reg}}= S - S_{\mathsf{free}}\) as regular facilities, and when we simply mention "facilities," we are referring to their union.
Finally, we will use the letters \(i\) and \(h\) to denote facilities. Specifically, we use \(i \in F\) to denote a regular facility and use \(\tilde{i}\) to denote a free copy of \(i\). When referring to a facility that can be either free or regular, we use the letter \(h\).
We now introduce the definition of valid sequences, which aims to capture the sequence of facilities that are opened during the while-loop of stage 1 in LogAdaptiveAlgorithm. Let us say \(\mathcal{H}'=(H_1',\dots,H_p')\) is a super-sequence of \(\mathcal{H}=(H_1,\dots,H_p)\) and denote it \(\mathcal{H}'\supseteq \mathcal{H}\) if they have a common prefix of length \(p-1\), i.e. for all \(i<p\), \(H_i'=H_i\), and \(H_p'\) is a superset of \(H_p\). Given two sequences \(\mathcal{H}_1=(H_1,\dots,H_r)\) and \(\mathcal{H}_2=(H_{r+1}, \dots,H_l)\), we define \(\mathcal{H}_1\oplus\mathcal{H}_2=(H_1,\dots,H_l)\) as the concatenation of the two sequences.
Definition 3 (\(\eta\)-valid sequence). Consider the time \(\theta\) and let \(\mathcal{H}\) be the sequence of sets of opened facilities. A sequence \(\langle h_1, \ldots, h_\ell\rangle\) of facilities is \(\eta\)-valid (with respect to \(\theta\) and \(\mathcal{H}\)), if the following conditions hold.
Each \(h_t\) is either free or \(\eta\)-openable with respect to the time \(\theta\) and some super-sequence \(\mathcal{H}' \supseteq \mathcal{H}\oplus (\langle h_1, \ldots, h_{t-1}\rangle)\) of the sequence of sets of opened facilities, where \(\oplus\) is just the concatenation.
The sequence is maximal, i.e., there is no openable facility with respect to the time \(\theta\) and \(\mathcal{H}\oplus (\langle h_1, \ldots, h_\ell \rangle)\).
The reader might wonder how it is possible to efficiently check whether a sequence is \(\eta\)-valid. We will not need to do that since during the execution of our algorithm a convenient \(\mathcal{H}'\) will be always available when needed.
We remark that LogAdaptiveAlgorithm generates \(0\)-valid sequences in each phase. Specifically, it generates sequences \(\mathcal{H}= (H_1, H_2, \ldots, H_L)\), where each \(H_p\) is \(0\)-valid (with respect to \(\theta = (1+\varepsilon^2)^{p-1}\) and \((H_1,\ldots,H_{p-1})\)) and contains only regular facilities. The set \(S\) of opened facilities is such that \(A = \emptyset\) at the final time \(\theta\).
For a general sequence of sets of facilities \(\mathcal{H}= (H_1, H_2, \ldots, H_L)\), let us say it consists of \(\eta\)-valid sequences if, for every \(p \in [L]\), \(H_p\) is an \(\eta\)-valid sequence with respect to \(\theta = (1+\varepsilon^2)^{p - 1}\) and \((H_1,\ldots,H_{p-1})\). Furthermore, we say that \(\mathcal{H}\) is a solution if the set \(S=\cup_{q\leq p}H_q\) of opened facilities ensures that \(A = \emptyset\) at the end, meaning that at the time \(\theta = (1+\varepsilon^2)^L\) of the \((L+1)\)st phase, the set of clients \(\{ j \mid \theta \geq (1-\delta) d^2(j,S) \}\) equals all clients in \(D\). Otherwise, we say that \(\mathcal{H}\) is a partial solution.
The results in 5.2, namely 7 and 8, can thus be stated as if \(\mathcal{H}\) is a solution of \(0\)-valid sequences consisting of regular facilities then the set \(S\) of opened facilities satisfies \[\sum_{j\in D} d^2(j, S) \leq \frac{\Gamma}{1-\delta} \cdot \left( \text{opt}_{\text{LP}}(f) - f \cdot |S| \right)\,.\] We now allow to open facilities that are paid up to an amount \(\hat{f}- \eta\gamma n\) instead of \(\hat{f}\), and for free facilities that can be opened without paying them. This leads to the following generalization.
Theorem 4. Consider a solution \(\mathcal{H}\) of \(\eta\)-valid sequences and let \(S\) be the opened facilities. Further, let \(S_{\mathsf{free}}\) and \(S_{\mathsf{reg}}= S - S_{\mathsf{free}}\) be the free facilities and regular facilities, respectively. Then \[\sum_{j\in D} d^2(j, S) \leq \frac{\Gamma}{1-\delta} \cdot \left( \text{opt}_{\text{LP}}(f) - (f-\eta n) \cdot |S_{\mathsf{reg}}| \right)\,.\]
In the next subsection we will merge two solutions into one with \(|S_{\mathsf{reg}}| =k\) and \(|S_{\mathsf{free}}| =O(\log n/\varepsilon^2)\). To our help, we will have two basic routines \(\mathrm{\small CompleteSolution}\) and \(\mathrm{\small CompleteSequence}\):
\(\mathrm{\small CompleteSolution}_{f,u}(\mathcal{H})\) takes a partial solution \(\mathcal{H}\) as input and returns a solution by running LogAdaptiveAlgorithmfrom the while-loop of stage \(1\), starting with the open facilities in \(\mathcal{H}\) and using the opening cost \(f\) and the distances \(u\) for free facilities already opened.
\(\mathrm{\small CompleteSequence}_{f,u}(\mathcal{H}= (H_1, \ldots, H_{p-1}), H_p = \langle h_1, \ldots, h_\ell\rangle )\) where \(\mathcal{H}\) is partial solution and \(H_p\) is an \(\eta\)-valid sequence except that it may not be maximal. \(\mathrm{\small CompleteSequence}\) then completes \(H_p\) into a maximal sequence by adding the open facilities obtained by running the while-loop of stage \(1\) in LogAdaptiveAlgorithm starting with \(H_p\) (with respect to opening cost \(f\) and distances \(u\) for the free facilities already opened).
We note that all facilities added by CompleteSolution and CompleteSequence are \(0\)-openable and regular. Additionally, for intuition, observe that, with the above notation, the set of facilities opened by \(\mathrm{\small CompleteSolution}_{f,u}(\emptyset)\) is equivalent to that opened by LogAdaptiveAlgorithm. (There is no free facility so \(u\) is meaningless here.) To simplify notation, we only use \(\mathrm{\small CompleteSequence}\) when the partial solution \(\mathcal{H}\) is clear from the context, so we simply write \(\mathrm{\small CompleteSequence}_{(f,u)}(\langle h_1, \ldots, h_\ell \rangle)\). Furthermore, we omit \((f,u)\) when the parameters are clear from the context.
We now present our procedure MergeSolutions that walks between two solutions. We will maintain two solutions \((\mathcal{H}, f, u)\) and \((\mathcal{H}', f', u')\) whose numbers of open regular facilities sandwich \(k\). (Formally, let us say \(a\) and \(b\) sandwich \(k\) if \(a<k<b\) or \(b<k<a\).) We will gradually make them closer until one of them opens exactly \(k\) regular facilities. We start from the two initial solutions obtained using the standard method. Note that the minimum nonzero distance is \(1\) and the maximum squared distance is \(M= \poly(n)\), which implies that \(\text{opt}\leq nM\).
Binary search on \(f\) in the interval \([1/n^2, 4nM]\) and run \(\mathrm{\small CompleteSolution}_{f, u}(\emptyset)\) (with empty \(u\)). When \(f = 1/n^2\), every client \(j \in D\) satisfies \(d(j, S) = 0\) if \(d(j, F) = 0\) and \(d^2(j, S) \leq d^2(j, F) + 2/n^2\) otherwise, as each client can open its closest facility by itself when \(\alpha _j = d^2(j, F) + 2/n^2\). If this solution opens at most \(k\) centers, then it is already an \((1+2/n)\)-approximation. On the other hand, when \(f = 4nM\), the algorithm will open exactly one facility, since the first facility is open when \(\theta \geq 2M\), so every client becomes immediately inactive when it is open. Therefore, the binary search yields two solutions \((\mathcal{H}, f, u)\) and \((\mathcal{H}', f', u)\) where \((\mathcal{H}, f, u)\) opens less than \(k\) facilities and \((\mathcal{H}', f', u)\) opens more than \(k\) facilities where \({f'} \leq {f} \leq {f'} + \eta\).
MergeSolutions works on phase \(p = 1, 2, \dots\) iteratively, and ensures that the two solutions are identical up to the \(p\)-th phase. Formally, MergeSolutions takes two solutions \((\mathcal{H}, f, u)\) and \((\mathcal{H}', f', u')\) as well as the current phase \(p\) as input. The following promises on them will be satisfied whenever we call MergeSolutions.
Both consist of \(\eta\)-valid sequences.
The numbers of open regular facilities by the two solutions sandwich \(k\).
Exactly one parameter, which we call the difference parameter, differs by at most \(\eta\) between the two solutions, i.e, if \(f\neq f'\) then \(|f-f'| \leq \eta\) and \(u(\tilde{i}) = u'(\tilde{i})\) for every \(\tilde{i} \in F_{\mathsf{free}}\); otherwise if \(f=f'\) there is exactly one free facility \(\tilde{i}\in F_{\mathsf{free}}\) so that \(u(\tilde{i}) \neq u'(\tilde{i})\) and \(|u(\tilde{i}) - u'(\tilde{i})| \leq \eta\).
\(\mathcal{H}= (H_1, H_2, \ldots, H_L)\) and \(\mathcal{H}' = (H'_1, H'_2, \ldots, H'_{L'})\) have a common prefix of length \(p-1\), i.e., \(H_i = H'_i\) for \(i=1,2, \ldots, p-1\). Furthermore, the remaining sequences \(H_p, \ldots, H_L\) and \(H'_p,\ldots, H'_{L'}\) only contain regular facilities and are \(0\)-valid with respect to the parameters \(f, u\) and \(f', u'\), respectively. (This implies that \(\mathcal{H}\) and \(\mathcal{H}'\) open the same set of free facilities.)
Given the promises, the goal of MergeSolutions is to
either find a solution of \(\eta\)-valid sequences that opens exactly \(k\) regular facilities and \(O(\log n{/\varepsilon^2})\) free facilities, or
produce two new solutions that satisfy the above promises for phase \(p + 1\).
Since the maximum squared distance between any two points is \(M\leq \poly(n)\) and \(f \leq 4nM\), before \(\theta\) reaches \(6M\), at least one facility will open and every client will become inactive. Therefore, for some threshold \(p^* = O(\log n / \varepsilon^2)\), once \(\mathcal{H}\) and \(\mathcal{H}'\) agree on the first \(p^*\) phases, they open exactly the same set of facilities which violates the promise that the numbers of open regular facilities sandwich \(k\). Therefore, case (1) must happen for some \(p \leq p^*\), which yields a solution of \(\eta\)-valid sequences that opens exactly \(k\) regular facilities and \(O(\log n{/\varepsilon^2})\) free facilities. Combined with 4, this proves 2. Indeed, we then have a solution consisting of open centers \(S\) with \(|S| = k + O(\log(n)/\varepsilon^2)\) and \(k\) regular facilities. Then, by Theorem 4, \[\begin{align} \sum_{j\in D} d^2(j, S) &\leq \frac{\Gamma}{1-\delta} \cdot \left( \text{opt}_{\text{LP}}(f) - (f-\eta n) \cdot k \right) \leq (\Gamma+O(\varepsilon)) \text{opt}\,, \end{align}\] where, for the last inequality, we used that \(\eta = 2^{-n}\) and \(\text{opt}\geq 1\) (since any distance is at least \(1\)). 2 then follows by scaling \(\varepsilon\) appropriately.
In the remainder of this section, we present MergeSolutions for two solutions and a given phase \(p\). It consists of three subroutines, presented in Section 5.4.1 5.4.2, and 5.4.3 respectively. Each subroutine achieves (1) or (2) above (which ends the whole procedure or lets us move on to the next phase), or sets up the stage for the next subroutine. (The final third subroutine always achieves (1) or (2).)
By renaming, we assume that if \(f\neq f'\) is the difference parameter then \(f' < f\), and if the difference parameter is \(u(\tilde{i}) \neq u'(\tilde{i})\) then \(u(\tilde{i}) < u'(\tilde{i})\).
\(H'_1, H'_2, \ldots, H'_p\) are \(\eta\)-valid sequences with respect to parameters \(f, u\).
Proof. Suppose first that \(f\neq f'\) is the difference parameter. As the first \(p-1\) sequences are identical, we have that \(H'_1, \ldots, H'_{p-1}\) are \(\eta\)-valid with respect to parameters \(f, u\). We further have that \(H'_p\) is \(\eta\)-valid with respect to parameters \(f, u\) since it was \(0\)-valid with respect to parameters \(f', u'\) by assumption and the only difference is that \(f\) is slightly bigger than \(f'\) by at most \(\eta\).
Now assume \(u(\tilde{i}) < u'(\tilde{i})\) is the difference parameter. Then by the same arguments as above, we have \(H'_1, \ldots, H'_{p-1}\) are \(\eta\)-valid with respect to \(f,u\). Moreover, \(H'_p\) was \(0\)-valid with respect to \(f',u'\) by assumption and \(u'(\tilde{i}) - \eta \leq u(\tilde{i}) \leq u'(\tilde{i})\). Next, we show that \(H'_p\) is \(\eta\)-valid with respect to \(f,u\).
Let \(H'_p = \langle h_1, \dots, h_{\ell} \rangle\) and consider \(h_t\) for some \(t \in [\ell]\). With an abuse of notation, we will use \(\mathcal{H}\) to denote the sequence of sequences \((H'_1, \ldots, H'_{p-1})\) in the rest of the proof. Note that \(h_t\) is \(0\)-openable with respect to \(f', u', \theta = (1 + \varepsilon^2)^{p - 1}\) and some super-sequence \(\mathcal{H}' \supseteq \mathcal{H}\oplus (\langle h_1, \dots, h_{t-1} \rangle)\). Let \(S'\) and \(S\) be the set of facilities open in \(\mathcal{H}'\) and \(\mathcal{H}\), respectively. We note that \(S\) can be viewed as the set of facilities opened at the beginning of the stage while \(S'\) can be viewed as the set of facilities opened before \(h_t\) with respect to the super-sequence \(\mathcal{H}'\).
Let \((A', IC', DC', \{ \alpha'_j \}_{j \in IC'}, d'(\cdot,\cdot))\) be the state of the algorithm using \(f', u'\) with opened facilities \(S'\), and \((A, IC, DC, \{ \alpha_j \}_{j \in IC'}, d(\cdot,\cdot))\) be the state using \(f, u\) with opened facilities \(S'\). We refer to these two scenarios as the old and new setting, resp. As the only difference is \(u(\tilde{i}) \in [u'(\tilde{i}) - \eta, u'(\tilde{i})]\), the distances satisfy \(d^2(x,y) \le d'^2(x,y) \le d^2(x,y) + \eta\) for any point \(x,y\) in the space. We have the following:
\(A \subseteq A'\) and \(DC \supseteq DC'\). To see this, \(j \in A\) implies \(\theta < (1-\delta)d^2(j,{S'}) \le (1-\delta)d'^2(j,{S'})\). Hence \(j \in A'\). Also, \(j \in DC'\) implies that \(\alpha'_j\) reached \((1-\delta)\gamma d'^2(j,{S'})\). Since \(d^2(j,{S'}) \le d'^2(j,{S'})\), the threshold \((1-\delta)\gamma d^2(j,{S'})\) is reached no later in the new setting, so \(j \in DC\).
\(A' \cap DC = \emptyset\). Indeed, assume by contradiction that \(j \in A' \cap DC\). Then \(j \in A'\) implies \(\theta < (1-\delta)d'^2(j,{S'}) \le (1-\delta)(d^2(j,{S'}) + \eta)\). Meanwhile, \(j \in DC\) implies \((1-\delta)\gamma d^2(j,{S'}) \le \alpha_j \le \theta\). Combining these gives \(\theta < \theta/\gamma + (1-\delta)\eta\), which is impossible since \(\gamma > 1\), \(\theta \ge 1\), and \(\eta = 2^{-n}\).
Thus, the sets \(A, A' \cap IC, IC \cap IC', IC' \cap DC,\) and \(DC'\) form a valid partition of \(D\).
Recall that \(h_t\) was \(0\)-openable with respect to the old setting with \((\tau'_j)_{j \in A'}\). Let \((\tau_j)_{j \in A}\) be defined as \(\tau_j = \min(\tau'_j, (1-\delta)d^2(j, {S'}))\) for \(j \in A\). Let us show that \(h_t\) was \(\eta\)-openable with respect to the super-sequence \(\mathcal{H}'\) and the new setting with \((\tau_j)_{j \in A}\), by checking the conditions in 2 one by one.
The first bullet, \(\tau_j = \alpha_j\) for every \(j \in A \setminus B(h_t, \sqrt{\varepsilon\theta})\): For such \(j\), we have \(d'^2(h_t, j) \geq d^2(h_t, j) > \varepsilon\theta\), so \(j \in A' \setminus B'(h_t, \sqrt{\varepsilon\theta})\). The validity in the old setting gives \(\tau'_j = \alpha'_j\). Because \(j \in A \subseteq A'\), \(j\) is active in both settings, so \(\alpha_j = \alpha'_j = \theta\), giving \(\tau'_j = \theta\). Thus, \(\tau_j = \min(\theta, (1-\delta)d^2(j, {S'}))\). Since \(j \in A\), \((1-\delta)d^2(j, {S'}) > \theta\), so \(\tau_j = \theta = \alpha_j\).
The second bullet, \(\alpha_j \leq \tau_j \leq \min\{(1-\delta)d^2(j,{S'}),(1+\varepsilon^2)\theta\}\) for every \(j \in A \cap B(h_t, \sqrt{\varepsilon\theta})\): Since \(j \in A \subseteq A'\), validity in the old setting guarantees \(\tau'_j \leq (1+\varepsilon^2)\theta\). Hence by definition of \(\tau_j\), \(\tau_j \leq \min((1+\varepsilon^2)\theta, (1-\delta)d^2(j,{S'}))\). For the lower bound, \(j \in A\) implies \(\alpha_j = \theta < (1-\delta)d^2(j,{S'})\), and \(j \in A'\) implies \(\tau'_j \geq \alpha'_j = \theta\). Thus, \(\tau_j \geq \theta = \alpha_j\).
The third bullet, \[\begin{align} \sum_{j\in A}[\tau_j - (1-\delta)\gamma d^2(h_t, j)]^+ + \sum_{j\in IC}[\alpha_j - (1-\delta)\gamma d^2(h_t, j)]^+ \\ +(1-\delta)\sum_{j\in DC}[\gamma d^2(j,S)-\gamma d^2(h_t, j)]^+ \geq \hat{f} - n \gamma \eta ~: \end{align}\] We argue that the contribution of each client \(j\) to the left-hand side decreases by at most \(\gamma \eta\) when switching from the old to the new setting.
For \(j \in A {\subseteq A'}\), \(\tau_j < \tau'_j\) implies \(\tau_j = (1-\delta)d^2(j, {S'}) \geq (1-\delta)(d'^2(j, {S'}) - \eta) \geq \tau'_j - \eta\). Also \(d^2(h_t,j) \le d'^2(h_t,j)\). Its contribution decreases by at most \(\eta \le \gamma \eta\).
For \(j \in A' \cap IC\), its new contribution uses \(\alpha_j\) and its old one uses \(\tau'_j\). Since \(j \in IC\), \(\alpha_j {\geq} (1-\delta)d^2(j, {S'}) \geq (1-\delta)(d'^2(j, {S'}) - \eta) \geq \tau'_j - \eta\) (because \(\tau'_j \le (1-\delta)d'^2(j, {S'})\) for all active clients \(j \in A'\)). Its contribution decreases by at most \(\eta \le \gamma \eta\).
For \(j \in IC \cap IC'\), its old contribution uses \(\alpha'_j\). Since \(\alpha_j\) is determined either by the same phase time \(\theta\) or by \((1-\delta)d^2(j,{S'})\) in Stage 2, and \(d^2(j,{S'}) \ge d'^2(j,{S'}) - \eta\), we have \(\alpha_j \ge \alpha'_j - \eta\). Its contribution decreases by at most \(\eta \le \gamma \eta\).
For \(j \in IC' \cap DC\), its new contribution is \((1-\delta)[\gamma d^2(j,{S'}) - \gamma d^2(h_t, j)]^+\) and its old one is \([\alpha'_j - \gamma d'^2(h_t, j)]^+\). Because \(j \in IC'\), \(\alpha'_j < (1-\delta)\gamma d'^2(j,{S'})\). Thus \((1-\delta)\gamma d^2(j,{S'}) \geq (1-\delta)\gamma(d'^2(j,{S'}) - \eta) > \alpha'_j - \gamma \eta\). Its contribution decreases by at most \(\gamma \eta\).
For \(j \in DC'\), since \(d^2(x,y) \le d'^2(x,y) \le d^2(x,y) + \eta\) for any \(x,y\) in the metric space, its contribution decreases by at most \((1-\delta)\gamma \eta \le \gamma \eta\).
Summing over at most \(n\) clients gives a maximum decrease of \(n \gamma \eta\). The property follows.
The fourth bullet, for every regular facility \(i_0\) and \(k \in A\), \[\begin{align} & \sum_{j\in DC}\left[\tau_k - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0,k) + d^2(i_0,j))-\gamma d^2(i_0,j)\right]^+\nonumber \\ &\quad + \sum_{j\in IC} \left[\alpha_{j}-\gamma d^2(i_0,j)\right]^+ + \sum_{j\in A}\left[\tau_{j}-\gamma d^2(i_0,j)\right]^+\leq \hat{f}~:\label{eqn:dualFeasibility:new} \end{align}\tag{16}\] Since \(k \in A \subseteq A'\), the fourth condition of \(\eta\)-openability must hold for \(k\) and the regular facility \(i_0\) in the old setting. Because \(i_0\) is regular, \(d'(i_0, j) = d(i_0, j)\). Thus one has: \[\begin{align} \sum_{j\in DC'}\left[\tau_k' - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0,k) + d^2(i_0,j))-\gamma d^2(i_0,j)\right]^+ & +\nonumber \\ \sum_{j\in IC'} \left[\alpha_{j}'-\gamma d^2(i_0,j)\right]^+ + \sum_{j\in A'}\left[\tau_{j}'-\gamma d^2(i_0,j)\right]^+ &\leq \hat{f}.\label{eqn:dualFeasibility:old} \end{align}\tag{17}\] It is sufficient to show that the (new) contribution of each client \(j\) to the left-hand side of 16 is upper bounded by its (old) contribution to the left-hand side of 17 . Note \(\tau_k \leq \tau'_k\) by definition of \(\tau_k\).
For \(j \in DC'\): Its new contribution uses \(\tau_k\) while its old one uses \(\tau'_k\). Since \(\tau_k \le \tau'_k\), the new contribution is at most the old one.
For \(j \in A\): Its new contribution uses \(\tau_j\) while its old one uses \(\tau'_j\). Since \(\tau_j \le \tau'_j\), the new contribution is at most the old one.
For \(j \in IC \cap IC'\): Its new contribution uses \(\alpha_j\) while its old one uses \(\alpha'_j\). Since \(d^2{(x,y)} \le d'^2{(x,y)}\) for any \(x,y\) in the metric space (and we are considering the same super-sequence, \(\mathcal{H}'\), in both the new and old settings), \(j\) becomes indirectly connected no later in the new setting, giving \(\alpha_j \le \alpha'_j\). Thus the new contribution is at most the old one.
For \(j \in A' \cap IC\): Its new contribution is \([\alpha_j - \gamma d^2(i_0, j)]^+\) while its old one is \([\tau'_j - \gamma d^2(i_0, j)]^+\). Since \(j \in IC\) in the new setting but \(j \in A'\) in the old setting, we have \(\alpha_j \le \theta \le \tau'_j\).
For \(j \in IC' \cap DC\): Its new contribution is \(\big[\tau_k - (2+\frac{2}{\gamma-1})\cdot(d^2(i_0,k)+d^2(i_0,j)) - \gamma d^2(i_0,j)\big]^+\) while its old one is \([\alpha'_j - \gamma d^2(i_0,j)]^+\). Let \(h \in {S'}\) such that \(d(j, {S'})=d(h, j)\). By 3: \[\label{claim:1ststep95etavalid:eqn1} \gamma d^{2}(h,j)+\left(2+\frac{2}{\gamma-1}\right)(d^2(i_0,k)+d^2(i_0,j))\geq (d(h,j)+d(i_0,k)+d(i_0,j))^2.\tag{18}\] Since \(k \in A\), \(\tau_k \leq (1-\delta)d^2(k,{S'}) \leq (1-\delta)d^2(k,h)\). Since \(j \in DC\) in the new setting, \(\alpha_j \ge (1-\delta)\gamma d^2(j, {S'}) = (1-\delta)\gamma d^2(h, j)\). As discussed above in the case \(j\in IC\cap IC'\), client \(j\) becomes indirectly connected no later in the new setting, ensuring \(\alpha'_j \ge \alpha_j\). Thus: \[\begin{align} \alpha_j' &\geq \alpha_j \geq (1-\delta)\gamma d^2(h, j)\\ &\overset{\eqref{claim:1ststep95etavalid:eqn1}}{\geq} (1-\delta)\left( (d(h, j) + d(i_0, k) + d(i_0, j))^2 - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0, k) + d^2(i_0, j)) \right)\\ &\geq (1-\delta) d^2(h, k) - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0, k) + d^2(i_0, j))\\ &\geq \tau_k - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0, k) + d^2(i_0, j)). \end{align}\] This implies \(\alpha'_j - \gamma d^2(i_0,j) \ge \tau_k - \left(2+\frac{2}{\gamma-1}\right)\cdot (d^2(i_0, k) + d^2(i_0, j)) - \gamma d^2(i_0,j)\), so the new contribution of \(j\) is at most its old one.
This completes the proof that \(h_t\) is \(\eta\)-openable with respect to the super-sequence \(\mathcal{H}'\) and the new setting \((\tau_j)_{j\in A}\). Because we choose arbitrary \(t\in [\ell]\), it guarantees that \(H'_p\) is \(\eta\)-valid with respect to \(f,u\) according to our 3. The claim follows. ◻
Let \[\mathcal{H}'' = \mathrm{\small CompleteSolution}_{(f,u)}(H'_1, \ldots, H'_p)\,,\] which is a valid call by the above claim. If \(\mathcal{H}''\) opens \(k\) regular facilities, we return this solution. Otherwise, as \((\mathcal{H}, f,u)\) and \((\mathcal{H}', f', u')\) sandwich \(k\), we must have that either \((\mathcal{H}, f, u)\) and \((\mathcal{H}'', f, u)\), or \((\mathcal{H}'', f, u)\) and \((\mathcal{H}', f', u')\) sandwich \(k\). On the one hand, if \((\mathcal{H}'', f, u)\) and \((\mathcal{H}', f',u')\) sandwich \(k\), then we made progress in that we now have two solutions with a common prefix of length \(p\) (instead of \(p-1\)) and only one parameter differs by at most \(\eta\). In this case, we are done with phase \(p\) and can continue MergeSolutions with these two solutions and phase \(p+1\).
On the other hand, if \((\mathcal{H}, f,u)\) and \((\mathcal{H}'', f, u)\) sandwich \(k\), then these two solutions have the same parameters and their first \(\eta\)-valid sequences that differ are \(H_p\) and \(H'_p\). In this case, we rename \(\mathcal{H}''\) to \(\mathcal{H}'\) and proceed to the next step.
We are given two solutions \((\mathcal{H}, f,u)\) and \((\mathcal{H}', f, u)\) on the same parameters \(f,u\) that sandwich \(k\). Moreover, if we let \(\mathcal{H}= (H_1, \ldots, H_L)\) and \(\mathcal{H}' = (H'_1, \ldots, H'_{L'})\), then \(H_i = H'_i\) for \(i= 1, \ldots, p-1\) and \(H_p \neq H'_p\). In addition \(H_p\) and \(H'_p\) only contain regular facilities.
In this step of MergeSolutions, we increase the common prefix of \(H_p\) and \(H'_p\) by “slowly” modifying \(H'_p\). As \(H_p\) only contains regular facilities, we let \(H_p = \langle i_1, i_2, \ldots, i_\ell \rangle\). Moreover, as the parameters \((f,u)\) are clear from the context, we omit them in the following when, e.g., calling the procedures CompleteSolution and CompleteSequence.
Repeat the following until all of \(H_p\) becomes a prefix of \(H'_p\).
Let \(q\) be the largest index so that \(H'_p = \langle i_1, i_2, \ldots, i_q, h'_{q+1}, \ldots, h'_{\ell_1}\rangle\), i.e., \(q\) equals the length of the common prefix \(i_1, i_2, \ldots, i_q\) of \(H_p\) and \(H'_p\).
Update \(H'_p\) by inserting a free copy of \(i_{q+1}\), \(\tilde{i}_{q+1}\), at the end of \(H'_p\) with \(u(\tilde{i}_{q+1}) = 0\). That is, we get the sequence \[\begin{gather} H'_p = \langle i_1, i_2, \ldots, i_q, h'_{q+1}, \ldots, h'_{\ell_1}, \tilde{i}_{q+1} \rangle,. \end{gather}\]
For \(t = q+1 , \ldots, \ell_1\),
After removing \(h'_{q+1}, \ldots, h'_{\ell_1}\), we have \[\begin{align} H'_p &= \langle i_1, i_2, \ldots, i_q, \tilde{i}_{q+1}, h'_{x}, \ldots, h'_{y}\rangle\,.\\ \intertext{We update H'_p by replacing \tilde{i}_{q+1} with its regular copy i_{q+1}, i.e., we obtain} H'_p &= \langle i_1, i_2, \ldots, i_q, {i}_{q+1}, h'_{x}, \ldots, h'_{y}\rangle\,. \end{align}\]
We have the following claims.
Throughout the updates to \(H'_p\), \(H'_1, \ldots, H'_p\) remain \(\eta\)-valid sequences, and \(H'_p\) contains at most one free facility.
Proof. As we never update \(f\) or the value \(u(\cdot)\) of a free facility in \(H'_1, \ldots, H'_{p-1}\), these sequences remain \(\eta\)-valid.
We continue to argue that \(H'_p\) remains \(\eta\)-valid throughout its updates. By Claim [claim:1ststep95etavalid], this is true before any updates to \(H'_p\). We now analyze the three types of updates to \(H'_p\).
Updating \(H'_p\) by inserting a free copy of \(i_{q+1}\) maintains that it is \(\eta\)-valid as every regular facility stays \(\eta\)-openable in the sequence (they have the same prefix as before) and the sequence remains maximal.
Updating \(H'_p\) by removing \(h'_t\) and calling CompleteSequence. Removing a \(h'_t\) can only decrease the prefix of regular facilities in the sequence, and so each regular facility still has a super-sequence of facilities for which it is \(\eta\)-openable. Finally, the call CompleteSequence ensures that the sequence is maximal.
Updating \(H'_p\) by replacing \(\tilde{i}_{q+1}\) with its regular copy \(i_{q+1}\). First note that, since \(u(\tilde{i}_{q+1}) = 0\), this does not impact the following regular facilities are \(\eta\)-openable (with respect to a super-sequence). By the same argument, the sequence stays maximal (as \(\tilde{i}_{q+1}\) with \(u(\tilde{i}_{q+1}) = 0\) and \(i_{q+1}\) has the same impact on following facilities). Finally, to see that \(i_{q+1}\) is \(\eta\)-openable (with respect to a potential super-sequence) notice that the prefix \(i_1, \ldots, i_q\) is the same as that in \(H_p\) which is an \(\eta\)-valid sequence.
We complete the proof of the claim by arguing that \(H'_p\) contains at most one free facility at any point of time. This follows from the facts that (1) \(H'_p\) initially contains no free facility, (2) in one repetition, the free facility \(\tilde{i}_{q+1}\) is inserted into \(H'_p\), and (3) \(\tilde{i}_{q+1}\) is replaced by its regular copy \(i_{q+1}\) before continuing to the next repetition. ◻
We distinguish three cases.
If at some point \(H'_p\) is such that \(\mathrm{\small CompleteSolution}(H'_1, H'_2, \ldots, H'_p)\) opens exactly \(k\) facilities, then we return that solution.
Otherwise, suppose there is an update to \(H'_p\) so that if we let \(H^{\text{before}}_p\) and \(H^{\text{after}}_p\) denote \(H'_p\) before and after this update, respectively, then CompleteSolution\((H_1, H_2, \ldots, H^{\text{before}}_p)\) and CompleteSolution\((H_1, H_2, \ldots, H^{\text{after}}_p)\) sandwich \(k\). There are three kinds of updates to \(H'_p\). However, note that the update where \(\tilde{i}_{q+1}\) is replaced by its regular copy \(i_{q+1}\) cannot satisfy the conditions of this case. Indeed, as \(u(\tilde{i}_{q+1}) = 0\), we have \[\mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{before}}_p) = \mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{after}}_p)\] in this case, which contradicts that they sandwich \(k\).
We proceed to analyze the two other kind of updates. If the update to \(H'_p\) is to insert a free facility \(\tilde{i}_{q+1}\) with \(u(\tilde{i}_{q+1}) = 0\). Then \[\begin{align} H^{\text{before}}_p&= \langle i_1, i_2, \ldots, i_q, h'_{q+1}, \ldots, h'_{\ell_1} \rangle\\ H^{\text{after}}_p&= \langle i_1, i_2, \ldots, i_q, h'_{q+1}, \ldots, h'_{\ell_1}, \tilde{i}_{q+1} \rangle \end{align}\] Note that the solution CompleteSolution\((H_1, H_2, \ldots, H^{\text{before}}_p)\) is equivalent to CompleteSolution\((H_1, H_2, \ldots, H^{\text{after}}_p)\) if we set \(u(\tilde{i}_{q+1}) = 10M\) (except for the free facility \(\tilde{i}_{q+1}\)). We can thus do binary search on \(u(\tilde{i}_{q+1})\) to find two values \(u'(\tilde{i}_{q+1})\) and \(u(\tilde{i}_{q+1})\) with \(|u'(\tilde{i}_{q+1}) - u(\tilde{i}_{q+1})| \leq \eta\) so that the solutions \(\mathrm{\small CompleteSolution}_{(f,u')}(H_1, \ldots, H^{\text{after}}_p)\) and \(\mathrm{\small CompleteSolution}_{(f,u)}(H_1, \ldots, H^{\text{after}}_p)\) sandwich \(k\) (where \(u\) and \(u'\) are identical except for \(\tilde{i}_{q+1}\)). We have thus finished phase \(p\), and we can restart MergeSolutions with the two solutions and phase \(p+1\), since they have the first \(p\), instead of \(p-1\), \(\eta\)-valid sequences in common and exactly one difference parameter. Their maximality follows from that of \(H^{\text{before}}_p\).
Finally, consider when the update to \(H'_p\) is of the second type, i.e., \(u(\tilde{i}_{q+1}) = 0\) and \[\begin{align} H^{\text{before}}_p= &\langle i_1, \ldots, i_q, h'_t, h'_{t+1} \ldots, h'_{\ell_1}, \tilde{i}_{q+1}, h'_{\ell_1+1}, \ldots, h'_{\ell_2}\rangle\\ H^{\text{after}}_p= &\langle i_1, \ldots, i_q, h'_{t+1}, \ldots, h'_{\ell_1}, \tilde{i}_{q+1}, h'_{\ell_1+1}, \ldots, h'_{\ell_2}, \ldots, h'_{\ell_3}\rangle \end{align}\] In this case, \(\mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{before}}_p)\) and \(\mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{after}}_p)\) are two solutions with the same parameters \(f, u\), that sandwich \(k\) and we proceed to the next step with the following properties of \(H^{\text{before}}_p\) and \(H^{\text{after}}_p\):
Both sequences contain one free facility, \(\tilde{i}_{q+1}\).
\(H^{\text{before}}_p\) and \(H^{\text{after}}_p\) are identical except that (1) \(H^{\text{before}}_p\) contains a regular facility \(h'_t\) not present in \(H^{\text{after}}_p\), and (2) \(H^{\text{after}}_p\) contains a (potentially empty) suffix of regular facilities not present in \(H^{\text{before}}_p\).
None of the previous cases apply. Then, completing the solution with the initial \(H'_p\) and the final \(H'_p\) cannot sandwich \(k\). Since then (assuming the first case does not apply) there must be an update to \(H'_p\) that results in two solutions that sandwich \(k\), since the the completion of \(H_p\) and the completion of the initial \(H'_p\) sandwich \(k\). The above implies that if we let \(H^{\text{before}}_p= H_p\) and \(H^{\text{after}}_p\) equal the final \(H'_p\) then CompleteSolution\((H_1, \ldots, H^{\text{before}}_p)\) and CompleteSolution\((H_1, \ldots, H^{\text{after}}_p)\) sandwich \(k\). Further note that since \(H^{\text{after}}_p\) equals \(H'_p\) after the final updates \(H^{\text{before}}_p\) appears as a prefix of \(H^{\text{after}}_p\) and both sequences only contain regular facilities. To summarize, in this case, CompleteSolution\((H_1, \ldots, H^{\text{before}}_p)\) and \(\mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{after}}_p)\) are two solutions with the same parameters \(f, u\), that sandwich \(k\) and we proceed to the next step with the following properties of \(H^{\text{before}}_p\) and \(H^{\text{after}}_p\):
Both sequences contain no free facilities.
\(H^{\text{before}}_p\) and \(H^{\text{after}}_p\) are identical except that \(H^{\text{after}}_p\) contains a suffix of regular facilities not present in \(H^{\text{before}}_p\).
The input to this step consists of two solutions \(\mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{before}}_p)\) and CompleteSolution\((H_1,\ldots, H^{\text{after}}_p)\) that have the same parameters \(f, u\) and sandwich \(k\). Moreover, \(H^{\text{before}}_p\) and \(H^{\text{after}}_p\) both contain at most one free facility and they are identical except for potential two differences:
\(H^{\text{before}}_p\) may contain a facility not present in \(H^{\text{after}}_p\);
\(H^{\text{after}}_p\) contains a suffix of regular facilities (which may be empty) that is not present in \(H^{\text{before}}_p\).
To simplify notation in this section, we let \(i_*\) denote the regular facility in \(H^{\text{before}}_p\) that is not present in \(H^{\text{after}}_p\) if it exists (so \(i_*\) corresponds to \(h'_t\) in the previous section). We further let \(h_1, \ldots, h_\ell\) denote the suffix of \(H^{\text{after}}_p\) not present in \(H^{\text{before}}_p\).
We now transform \(H^{\text{after}}_p\) into \(H^{\text{before}}_p\) one change at a time:
If \(H^{\text{before}}_p\) contains the regular facility \(i_*\) not present in \(H^{\text{after}}_p\), then let \(\tilde{i}_*\) be a free copy of \(i_*\) with \(u(\tilde{i}_*) =0\) and obtain \(H^{0}_p\) from \(H^{\text{after}}_p\) by adding \(\tilde{i}_*\) at the end. Otherwise, we let \(H^0_p\) equal \(H^{\text{after}}_p\).
For \(r= 1, \ldots, \ell\), obtain \(H^r_p\) from \(H^{r-1}_p\) by removing \(h_r\).
We remark that \(H^\ell_p\) is identical to \(H^{\text{before}}_p\) since we removed the whole suffix \(h_1, \ldots h_\ell\) present in \(H^{\text{after}}_p\), except for potentially the facility \(i_*\). That is the only difference in \(H^{\text{before}}_p\) and \(H^\ell_p\) may be the placement of \(\tilde{i}_*\) and that \(\tilde{i}_*\) is a free copy of the regular facility \(i_*\) present in \(H^{\text{before}}_p\). However, since \(u(\tilde{i}_*) = 0\), we have that the two sequences \(H^{\text{before}}_p\) and \(H^\ell_p\) have an identical impact on CompleteSolution, which is a fact we use in the proof of Claim [claim:3rdstep95outcome].
For \(r= 0, 1 \ldots \ell\), \(H^r_p\) is an \(\eta\)-valid sequence with at most two free facilities.
Proof. The sequence \(H^r_p\) has at most two free facilities because \(H^{\text{after}}_p\) has at most one free facility, and we potentially add one new free facility \(\tilde{i}_*\).
We now verify that \(H^r_p\) is \(\eta\)-valid. For any regular facility \(h'\) in the sequence, the prefix of \(H^r_p\) before \(h'\) is a subsequence of the prefix before \(h'\) in \(H^{\text{after}}_p\). Thus, as \(h'\) was \(\eta\)-openable with respect to a super-sequence \(\mathcal{H}(h')\) in \(H^{\text{after}}_p\), \(h'\) must be \(\eta\)-openable with respect to the same super-sequence \(\mathcal{H}(h')\) in \(H^r_p\). This ensures that the first property of Definition 3 is satisfied. To verify maximality, notice that since we added \(\tilde{i}_*\) with \(u(\tilde{i}_*) =0\) in the end, we have that the set of active clients after opening up the facilities in \(H^r_p\) is a subset of the active clients after opening up the facilities in \(H^{\text{before}}_p\). Hence, the maximality of \(H^{\text{before}}_p\) implies the maximality of \(H^r_p\). ◻
One of the following is true.
For one of the sequences \(H^r_p\), CompleteSolution\((H_1, H_2, \ldots, H^r_p)\) opens \(k\) regular facilities.
\(\mathrm{\small CompleteSolution}(H_1, H_2, \ldots, H^{\text{after}}_p)\) and \(\mathrm{\small CompleteSolution}(H_1, H_2, \ldots, H^{0}_p)\) sandwich \(k\).
CompleteSolution\((H_1, H_2, \ldots, H^r_p)\) and CompleteSolution\((H_1, H_2, \ldots, H^{r+1}_p)\) sandwich \(k\) for some \(r\in \{0, 1, \ldots, \ell-1\}\).
Proof. Assume the first bullet point does not hold, i.e., the completion of no \(H^r_p\) leads to the opening of \(k\) regular facilities. Now notice that the second and third bullet points ask whether consecutive solutions sandwich \(k\), starting with \(H^{\text{after}}_p\) and ending with \(H^{\ell}_p\). By definition, \(H^{\ell}_p\) equals \(H^{\text{before}}_p\) except potentially for the placement of \(\tilde{i}_*\), where \(\tilde{i}_*\) is the free copy of \(i_*\) present in \(H^{\text{before}}_p\). However, as \(u(\tilde{i}_*) = 0\), the two sequences have an identical impact when we complete the solution, which implies \[\mathrm{\small CompleteSolution}(H_1, \ldots, H^{\ell}_p) = \mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{before}}_p).\] Thus, as \(\mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{after}}_p)\) and \(\mathrm{\small CompleteSolution}(H_1, \ldots, H^{\text{before}}_p)\) sandwich \(k\), either the second or third bullet point of the statement must be valid (since no solution opened exactly \(k\) regular facilities). ◻
We distinguish three cases based on the first bullet point that is true in the above claim.
If one of the sequences \(H^r_p\) is such that \(\mathrm{\small CompleteSolution}(H_1, H_2, \ldots, H^r_p)\) opens \(k\) regular facilities, then we return that solution.
Otherwise, if the solutions \(\mathrm{\small CompleteSolution}(H_1, H_2, \ldots, H^{\text{after}}_p)\) and CompleteSolution\((H_1, H_2, \ldots, H^{0}_p)\) sandwich \(k\), then \(H^0_p\) is equal to \(H^{\text{after}}_p\) except that \(\tilde{i}_p\) was added in the end of \(H^{\text{after}}_p\) with \(u(\tilde{i}_p) = 0\). Note that the solution CompleteSolution\((H_1, H_2, \ldots, H^{\text{after}}_p)\) is equivalent to CompleteSolution\((H_1, H_2, \ldots, H^0_p)\) if we set \(u(\tilde{i}_{q+1}) = 10M\) (except the presence of \(\tilde{i}_*\)). We can thus do binary search on \(u(\tilde{i}_*)\) to find two values \(u'(\tilde{i}_*)\) and \(u(\tilde{i}_*)\) with \(|u'(\tilde{i}_*) - u(\tilde{i}_*)| \leq \eta\) so that the two solutions \(\mathrm{\small CompleteSolution}_{(f,u')}(H_1, \ldots, H^0_p)\) and \(\mathrm{\small CompleteSolution}_{(f,u)}(H_1, \ldots, H^0_p)\) sandwich \(k\) (where \(u\) and \(u'\) are identical except for \(\tilde{i}_{q+1}\)). We have thus finished phase \(p\), and we can restart MergeSolutions with the two solutions and phase \(p+1\), since they have the first \(p\), instead of \(p-1\), \(\eta\)-valid sequences in common and exactly one difference parameter.
Finally, consider the case when none of the above cases apply and (thus by the above claim) there is an \(r\in \{0, 1, \ldots, \ell-1\}\) so that CompleteSolution\((H_1, H_2, \ldots, H^r_p)\) and CompleteSolution\((H_1, H_2, \ldots, H^{r+1}_p)\) sandwich \(k\). The only difference between \(H^r_p\) and \(H^{r+1}_p\) is that \(H^r_p\) contains \(h_{r+1}\) which is not present in \(H^{r+1}\). Let \(H_p\) be the sequence obtained by adding a free copy \(\tilde{i}_{r+1}\) of \(h_{r+1}\) at the end of \(H^{r+1}\) (which clearly maintains that is \(\eta\)-valid), then \[\begin{align} \mathrm{\small CompleteSolution}(H_1, H_2, \ldots, H_p) &= \mathrm{\small CompleteSolution}(H_1, H_2, \ldots, H^r_p)if u(\tilde{i}_{r+1}) = 0\\ \intertext{and} \mathrm{\small CompleteSolution}(H_1, H_2, \ldots, H_p) &= \mathrm{\small CompleteSolution}(H_1, H_2, \ldots, H^{r+1}_p)if u(\tilde{i}_{r+1}) = 10M. \end{align}\] Hence, doing a binary search on \(u(\tilde{i}_{r+1})\) as in the previous case finishes phase \(p\). We can restart MergeSolutions with the two solutions and phase \(p+1\), since they have the first \(p\), instead of \(p-1\), \(\eta\)-valid sequences in common and exactly one difference parameter.
In this section, we prove 4, showing that a solution \(\mathcal{H}\) of \(\eta\)-valid sequences yields an almost \(\Gamma\)-LMP approximation. The proof is almost identical to that for 3. There are only two minor changes:
2 of \(\eta\)-openability allows for a facility to be paid up to an \(n\gamma\eta\)-additive difference. This difference only appears in 9 below, which is an analog of 7.
3 of an \(\eta\)-valid sequence allows \(h_t\) is \(\eta\)-openable with respect to a super sequence \(\mathcal{H}'\supseteq \mathcal{H}\oplus(\langle h_1,\dots,h_{t-1}\rangle)\). This difference only appears in (the last part of) the proof of 10, an analog of 8.
These two lemmas immediately imply 4.
In order to use mostly the same analysis, one syntactic difference between the setting of 5.2 and the current setting that we have to reconcile is the the former analyzes the outcome of 3 while the latter analyzes a solution \(\mathcal{H}=(H_1,\dots,H_L)\) of \(\eta\)-valid sequences. To use the same terminology from 5.2, let us consider the execution of the solution \(\mathcal{H}\) where for \(p=1,\dots,L\), we run the \(p\)-th phase according to the sequence \(H_p\); in Stage 1, each facility in the sequence becomes open one-by-one with the corresponding \((\tau_j)_j\) values, and in Stage 2 at the end of the phase, \(\theta\leftarrow (1+\varepsilon^2)\theta\).
Then, an atomic step can still be defined in the same way as in 3; it corresponds to opening a facility in Stage 1, possibly a free facility, (and updating \(\alpha\), \(S\), \(A\), \(IC\), \(DC\) accordingly) or increasing \(\alpha\)-values in Stage 2 simultaneously (and updating \(IC\) accordingly). By “at any point in the algorithm”, we mean any point in the algorithm’s execution that is not in the middle of an atomic step.
Throughout the analysis, we let \(\alpha_j^*\) be the final \(\alpha\)-value of client \(j\in D\), and we let \(S^*\) be the final set of opened facilities. We start by analyzing the approximation guarantee of the algorithm with respect to \(\alpha^*\), and then we prove that \(\alpha^*/\Gamma\) is a feasible solution to the dual.
The following lemma is the analogue of Lemma 7.
Lemma 9. We have \(\sum_{j\in D}\alpha_j^*\geq (1-\delta)\sum_{j\in D}d^2(j, S)+\sum_{i\in S_{\mathsf{reg}}}(\hat{f}-n\gamma\eta)\).
Proof. The proof is very similar to the proof of Lemma 7. It is sufficient to show that, at any point of the algorithm, one has \[\begin{gather} \sum_{j\in DC} \alpha_j \geq \sum_{j\in DC}(1-\delta)\gamma d^2(j, S) + \sum_{i\in S_{\mathsf{reg}}} (\hat{f}-n\gamma\eta)\,. \label{eq:robustIH95approx95guarantee} \end{gather}\tag{19}\] Indeed, at the end of the algorithm all the clients are in IC or DC. For the ones in IC, we have \(\alpha_j\geq (1-\delta)d^2(j, S)\). For the remaining ones it is sufficient to apply the above inequality and the fact that \(\gamma\geq 1\).
We prove 19 by induction on the steps of the algorithm. The equality is initially true since \(A= D\) (thus \(IC\cup DC = \emptyset\)) and \(S = \emptyset\). For the inductive step, we next analyze each one of the two stages separately.
Consider what happens when we open a facility \(h\), i.e., add it to \(S\).
If \(h\) is a free facility, the \(\alpha\)-values and \(S_{\mathsf{reg}}\) do not change, and the only change is that some client \(j\) with \(\alpha_j\geq (1-\delta)\gamma d^2(j, S)\) becomes directly connected. The amount of the increase of the left-hand side of 19 is at least that of the right-hand side.
If \(h\) is a regular facility \(i\), the argument is analogous to the proof of lemma 7 in the same case, the only difference being that \(\hat{f}\) is replaced by \(\hat{f}-n\gamma\eta\).
No facility is open at this stage, and no client is added to \(DC\) either. ◻
We next prove the following lemma, which is analogous to 8.
Lemma 10. We have \[\sum_{k\in D}[\alpha_k^*-\Gamma d^2(i,k)]^+\leq \hat{f}.\]
The following three claims and their proofs are identical to [clm:nooverbidding], [clm:notfrozen] and [clm:frozenstay], without any modification and using a similar notation.
At any point in the algorithm, for every facility \(i_0\), \[\sum_{j\in DC}[{(1-\delta)}\gamma d^2(j, S) - \gamma d^2(i_0,j)]^+ + \sum_{j\in A\cup IC}[\alpha_j - \gamma d^2(i_0,j)]^+\leq \hat{f}.\]
As usual, fix an arbitrary facility \(i\in F\). The setup in this paragraph is also identical to 5.2.2. Let \(D^*=\{j\in D:\alpha_j^*>\Gamma d^2(i, j)\}\) be those clients that contribute to the left-hand side. We also reuse the definitions of freezing and \(IC^k, DC^k, A^k\) for for \(k\in D^*\) that becomes inactive strictly before \(i\) becomes frozen.
For any \(k\in D^*\) that becomes inactive strictly before \(i\) becomes frozen, \[\begin{align} & \sum_{j\in {DC^k}}\left(\alpha_k^* - \left(2+\frac{2}{\gamma-1}\right)(d^2(i,k)+d^2(i,j))-\gamma d^2(i,j)\right)+\sum_{j\in {IC^k}}(\alpha_j^*-\gamma d^2(i,j))\\ &\quad +\sum_{{k\leq j\leq s}}(\alpha_k^*-\gamma d^2(i, j))\leq \hat{f}. \end{align}\]
Assume that \(i\) is frozen by \(i_0\) and let \((\tau_j)_{j\in A}\) be the values associated with the opening of \(i_0\). Then, for every \(j\in D^*\cap A\), \(\alpha_j^*=\tau_j\).
The remaining part of the proof needs some changes from 5.2.2, due to the fact that a facility may be openable with respect to a super-sequence instead of a sequence that the algorithm executes. Let \(i_0\) be the facility that freezes \(i\), which opens in (stage 1) of phase \(p\). Let \(\theta = (1+\varepsilon^2)^p\) be the \(\theta\) value in phase \(p\). Let \(\mathcal{H'} \supseteq \mathcal{H}\) be the super-sequence with respect to which \(i_0\) is openable. As in 5.2, we order the clients in \(D^*\) according to the time they are removed from \(A\) (in the algorithm) and break ties according to \(\alpha^*\)-values in increasing order. The only additional rule is for the clients who are in \(A\) right before \(i_0\) is open; let us call them \(A\). They are, by [clm:robustfrozenstay], the last group of clients in \(D^*\). Let \(A' \subseteq A\) be the clients who are active right before \(i_0\) is open according to the supersequence \(\mathcal{H'}\). Then for the order within \(A\), we place \(A \setminus A'\) first and \(A'\) after, and within each group we sort by the \(\alpha^*_j\) values. Similarly, let \(IC'\) and \(DC'\) be the set of indirectly and directly connected clients right before \(i_0\) is open in the supersequence \(\mathcal{H}'\), and \(I'=A\setminus A'\). For \(k\in D^*\) that becomes inactive when \(i\) becomes frozen, we define \(DC^k\) by \(DC'\cap [k-1]\), and \(IC^k\) by \((IC'\cup A')\cap [k-1]\). We prove the following analog of [fct:bidbound].
For any \(k \in D^*\): \[\begin{align} & \sum_{j\in DC^k}\left(\alpha_k^*-\left(2+\frac{2}{\gamma-1}\right)(d^2(i,k)+d^2(i,j))-\gamma d^2(i,j)\right)\\ &\quad +\sum_{j\in IC^k}(\alpha_j^*-\gamma d^2(i,j)) + \sum_{k\leq j{\leq s}}(\alpha_k^*-\gamma d^2(i,j))\leq \hat{f}. \end{align}\]
Proof. Let \(k\in D^*\). Consider the point in the execution when \(k\) becomes inactive. If this occurs strictly before \(i\) is frozen, then by [clm:robustnotfrozen], we have \[\begin{align} & \sum_{j\in {DC^k}}\left(\alpha_k^*-\left(2+\frac{2}{\gamma-1}\right)(d^2(i,k)+d^2(i, j)) - \gamma d^2(i,j)\right)\\ &\quad + \sum_{j\in {IC^k}}(\alpha_j^* - \gamma d^2(i, j)) + \sum_{{k\leq j\leq s}}(\alpha_k^*-\gamma d^2(i, j)) \leq \hat{f}. \end{align}\] This is precisely the claim.
Else, \(k\) becomes inactive when \(i\) is frozen by the opening of some facility \(i_0\): let \((\tau_j)_{j\in A^k}\) be the values associated with the opening of \(i_0\). For simplicity, we use \(\Gamma'=2+\frac{2}{\gamma-1}\) in the rest of this proof.
If \(k\in D^*\cap A'\), by the fourth bullet of \(\eta\)-openability, we have \[\sum_{j\in DC'}\left[\tau_k - {\Gamma'} \cdot (d^2(i,k) + d^2(i,j))-\gamma d^2(i,j)\right]^+ + \sum_{j\in IC'} [\alpha_{j}-\gamma d^2(i,j)]^+ + \sum_{j\in A'}[\tau_{j}-\gamma d^2(i,j)]^+\leq \hat{f}.\] By [clm:robustfrozenstay], \(\alpha_j^*=\tau_j\) for every \(j\in D^*\cap {A'}\) (and thus for \(j=k\)). Furthermore, for \(j \in IC'\), even when \(\alpha_j\) values above are determined by the super-sequence \(\mathcal{H'}\) instead of \(\mathcal{H}\), the \(\alpha_j\) values are the same in both executions; these sequences are identical until the \((p-1)\)th phase, so any \(j\) that became inactive in phase \((p-1)\) or earlier has the same \(\alpha_j\) values. For \(j\) that becomes inactive in (stage 1 of) phase \(p\) in \(\mathcal{H'}\), we have \(\alpha_j = \theta\) in \(\mathcal{H'}\), and we also have \(\alpha^*_j = \theta\) as well, because if we had \(\tau_j > \theta\) at any opening of a facility in phase \(p\), it implies \(j \in DC'\), which is contradiction. Hence \[\sum_{j\in DC'}\left[\alpha_k^* - {\Gamma'} \cdot (d^2(i,k) + d^2(i,j))-\gamma d^2(i,j)\right]^+ + \sum_{j\in IC'} [\alpha_{j}^*-\gamma d^2(i,j)]^+ + \sum_{j\in A'} [\alpha_{j}^*-\gamma d^2(i,j)]^+ \leq \hat{f}.\] By our ordering, (1) \(j \in DC'\) and \(k \in A'\) imply \(j < k\), and (2) \(k \in A'\) and \(j \geq k\) imply \(\alpha^*_j \geq \alpha^*_k\). Therefore, the above inequality implies what we want: \[\sum_{j<k:j\in DC'}\left(\alpha_k^* - {\Gamma'} \cdot (d^2(i,k) + d^2(i,j))-\gamma d^2(i,j)\right) + \sum_{j<k:j\not\in DC'} (\alpha_{j}^*-\gamma d^2(i,j)) + \sum_{j\geq k}(\alpha_{k}^*-\gamma d^2(i,j))\leq \hat{f}.\]
If \(k\in D^*\cap I'\), then \(\alpha^*_k = \theta\) since, with respect to \(\mathcal{H'}\), \(k\) was inactive right before opening \(i_0\). [clm:robustnooverbidding] applied to the execution with respect to \(\mathcal{H}'\) right before \(i_0\) was opened ensures that \[\sum_{j\in DC'}[\gamma d^2(j,S) - \gamma d^2(i_0,j)]^+ + \sum_{j\in A'\cup IC'}[\alpha_j - \gamma d^2(i_0,j)]^+\leq \hat{f}.\] We conclude, using 3, [clm:robustfrozenstay] and that for any \(j\in A'\cap D^*\), \(j \geq k\) implies \(\alpha_j^*\geq \alpha_k^*\). ◻
We are now ready to prove 10.
Proof of 10. By definition of \(D^*\), this is equivalent to proving that \[\sum_{k\in D^*}\alpha_k^*\leq \hat{f} + \Gamma\cdot \sum_{k\in D^*}d^2(i, k).\]
[fct:robustbidbound] implies that for any \(k\in D^*\), \[\label{zmsejkgv} _k} (s-k+1 + |{DC^k}|)\cdot \alpha_k^* + \sum_{j\in {IC^k}}\alpha_j^* \leq \hat{f} + \gamma\cdot \sum_{j\in [s]}d^2(i, j) + \left(2+\frac{2}{\gamma-1}\right)\cdot \sum_{j\in {DC^k}} (d^2(i, k) + d^2(i, j))\tag{20}\] The rest of the proof is identical to the final part of the proof of 5, hence we omit it. ◻
We conclude with the proof of 4.
Proof of 4. By 9, the dual values \(\frac{\alpha^*_j}{1-\delta}\) can pay the cost of the solution with facility opening cost \(\frac{\Gamma f-n\gamma \eta}{1-\delta}{\geq \frac{\Gamma}{1-\delta}(f-n\eta)}\) for the regular facilities. Lemma 10 implies that \(\alpha^*/\Gamma\) is a feasible solution to the dual of the facility location LP with facility cost \(f\). We conclude that \[\frac{\Gamma}{1-\delta}\text{opt}_{LP}(f)\geq \sum_{j\in D}d^2(j,S)+|{S_{reg}}|\frac{\Gamma}{1-\delta}(f-n\eta).\] ◻
In this section, we give a \((5+O(\sqrt{\varepsilon}))\)-approximation algorithm for \((\frac{\zeta}{\log n})\)-stable \(k\)-means instances.
theoremstableapprox For any constants \(\varepsilon, \zeta>0\), there exists a randomized polynomial-time algorithm that, given a \((\zeta/\log n)\)-stable \(k\)-means instance, returns a solution of cost at most \((5+O(\sqrt{\varepsilon})\text{opt}\) with high probability.
To simplify notation, we let \(\varepsilon\) be the minimum of \(\varepsilon\) and \(\zeta\) in the above theorem and further assume that \(\varepsilon<1/12\) is sufficiently small. With this notation, we present a \((5+O(\sqrt{\varepsilon})\)-approximation algorithm for \(\varepsilon/\log(n)\)-stable instances. This implies the above theorem as any \(\zeta/\log(n)\)-stable instance is also \(\zeta'/\log(n)\)-stable with \(\zeta' \leq \zeta\).
The algorithm and the proof of the above theorem follow several steps where we iteratively simplify the instance by adding more structure. Finally, we obtain enough structure to solve the problem by maximizing a submodular function subject to a partition matroid constraint. We have not optimized constants in favor of simplifying the description, and throughout this section we let \(O_\varepsilon(\log n))\) denote \(O(\log(n)/\varepsilon^{O(1)})\). An overview of this section and the algorithm is as follows:
We start, in 6.1, by running a standard Local Search on \((k, D, F, d)\) to obtain a set of centers \(S\). It is well-known that \(S\) is a constant-factor approximation. Moreover, for a stable instance, we show that \(S\) “correctly” implicitly identifies all but \(O_\varepsilon(\log n)\) centers of \(\text{OPT}\). Specifically, this ensures that all but \(O_\varepsilon(\log n)\) clusters have the same cost as in \(\text{OPT}\) up to a \((1+O(\sqrt{\varepsilon}))\) factor.
In 6.3, we use a technique inspired from the classic \(k\)-means++ algorithm and its so called \(D^2\)-sampling procedure to sample clients proportional to their cost in solution \(S\), and we show that if we take \(O_\varepsilon(\log n)\) samples \(W\) then with good probability we “hit” all but an insignificant fraction of clusters of high cost in \(S\).
In 6.4, we then, guess a subset of the sampled clients \(W\) so that each hit cluster has exactly one client, which we refer to as the leader of that cluster. In addition, for each client \(\ell\) that is a leader, we guess the (approximate) distance from \(\ell\) to the optimal center in the optimal cluster it hits. This defines a set \(\mathcal{B}\) of balls with the guarantee that the optimal solution opens one center in each of these balls. Moreover, if we let \(\hat{\text{OPT}}\) be the optimal centers corresponding to these balls, we prove in 6.5 that there is a swap of centers \(M_O = S-S_0 \cup \hat{\text{OPT}}\) that removes \(S_0\) and adds the optimal centers \(\hat{\text{OPT}}\) so that the cost of the solution \(M_O\) is good and in particular a \((4+O(\sqrt{\varepsilon}))\)-approximation.
The remaining steps are then focused on approximating this swap, i.e., intuitively to that of finding \(S_0\) and \(\hat{\text{OPT}}\):
We first find the set \(\mathcal{Q}\) of expensive centers of \(S_0\) so that the clusters of centers \(S_0-\mathcal{Q}\) have total cost \(O(\varepsilon\text{opt})\) in 6.6. This allows us to think of the clusters of centers in \(S_0 - \mathcal{Q}\) as contracted, i.e., as single weighted points, and in particular, that all clients of these clusters are assigned to the same center when their center in \(S_0\) is removed. We then, in 6.7, use this structure to partition \(S_0 - \mathcal{Q}\) into two sets \(\mathcal{U}\) and \(\mathcal{R}\) where \(\mathcal{U}\) are those centers that are reassigned to other centers in \(S - S_0\) and \(\mathcal{R}\) are those centers that are assigned to \(\hat{\text{OPT}}\).
The set \(\mathcal{U}\) is then approximated with a set \(\widetilde{\mathcal{U}}\) (with close to identical properties) in 6.8.
At this stage, we have thus “guessed” all centers \(\mathcal{Q}\cup \widetilde{\mathcal{U}}\) to remove from \(S\) except for those in \(\mathcal{R}\). This is achieved in 6.10 where we reduce the problem of both finding \(\mathcal{R}\) and an approximate version of \(\hat{\text{OPT}}\) to that of submodular function optimization subject to a partition matroid (since we should open one center per ball in \(\mathcal{B}\)).
We remark that in each of Steps 3, 4a, 4b, and 4c, we will make guesses by enumerating polynomially \(n^{\varepsilon^{-O(1)}}\) many potential choices. In the following, we describe the algorithm and its analysis by presenting each of these steps. When presenting the next step, we analyze the branch of the algorithm that took the successful guesses up to that point. The algorithm outputs the solution of the smallest cost among the \(n^{\varepsilon^{-O(1)}}\) constructed solutions obtained by enumerating all possible guesses (see 6.11 for a more formal treatment where we put everything together). In particular, the final solution will have cost at most the solution that is output in the analyzed branch of “correct” guesses.
We end this section by introducing basic definitions and concepts, followed by the definition of matroids and submodular functions. We also state the known result, an \((1-1/e)\)-approximation algorithm for maximizing monotone submodular functions subject to a matroid constraint, that we use in the last step (6.10).
We use the following definitions throughout this section. Given a set of centers \(A\subseteq F\), we let \(\text{cost}(A):=\sum_{p\in D}d^2(p,A)\) denote the cost of the corresponding clustering (where each client \(p\) is assigned to the closest center in \(A\) and pays the corresponding distance). Sometimes we will consider a (possibly suboptimal) assignment \(\mu:D\rightarrow A\) of clients to centers in \(A\), and let \(\text{cost}(A,\mu):=\sum_{p\in D}d^2(p,\mu(p))\) be the corresponding cost. Let \(\text{OPT}\) be a fixed optimum solution for the \(k\)-means instance, and let \(\text{opt}= \text{cost}(\text{OPT})\) be its cost. For a client \(p\in D\), let \(\text{OPT}_p:=d^2(p,\text{OPT})\) be the cost paid by \(p\) in \(\text{OPT}\).
Let \(C^*\) be an \(\text{OPT}\) cluster with center \(c^*\in \text{OPT}\). We let \(\text{avg}_{C^*, \text{OPT}}\) be the squared distance from \(c^*\) to the \(\varepsilon|C^*|\)th closest client of \(C^*\) to \(c^*\). We further let \(C^*_\text{avg}\) be the set of clients of \(C^*\) at a squared distance at most \(\text{avg}_{C^*, \text{OPT}}\) from \(c^*\), we refer to these clients as leaders for \(C^*\). So \(\text{avg}_{C^*, \text{OPT}}\) is the maximum squared distance from a leader to its center \(c^*\). Also note that we have, \(|C^*_{avg}|\geq {\varepsilon}|C^*|\). We thus have that \(\text{avg}_{C^*, \text{OPT}}\) is upper bounded by \(\frac{1}{1-\varepsilon}\) times the average cost \(\frac{1}{|C^*|} \sum_{p\in C^*} d^2(p, c^*)\), and at the same time \(C^*_{avg}\) contains a constant fraction of the clients.
In 6.10, we formulate a submodular function that we then maximize over a partition matroid using known results. We define those concepts and also state the result that we will use. First, recall the definition of a matroid and partition matroid. A matroid is a tuple \((E, \mathcal{I})\) defined on a ground set \(E\) with a family of independent sets \(\mathcal{I}\) that satisfy: (1) if \(A \in \mathcal{I}\) and \(A' \subseteq A\), then \(A' \in \mathcal{I}\); and (2) if \(A, B \in \mathcal{I}\) and \(|A| < |B|\), then there exists an element \(e \in B - A\) such that \(A \cup \{e\} \in \mathcal{I}\). In the special case of a partition matroid, the ground set \(E\) is partitioned into disjoint subsets \(E_1, E_2, \dots, E_k\), and there are non-negative integers \(r_1, r_2, \dots, r_k\) such that:
In other words, each subset \(E_i\) has a capacity limit \(r_i\), and an independent set \(I\) cannot contain more than \(r_i\) elements from \(E_i\). To work with matroids (to get a running time that is polynomial in the size of the ground set \(E\)), we often use independence queries, which allow us to determine if a given subset \(A \subseteq E\) is independent (i.e., whether \(A \in \mathcal{I}\)). Specifically, an independence query on a subset \(A\) returns true if \(A\) is independent and false otherwise.
Having defined matroids, we proceed to define non-negative monotone submodular functions. For a finite ground set \(E\), a set function \(f: 2^E \to \mathbb{R}\) is submodular if it satisfies the diminishing returns property: for every pair of sets \(A \subseteq B \subseteq E\) and any element \(e \in E - B\), it holds that \[f(A \cup \{e\}) - f(A) \geq f(B \cup \{e\}) - f(B).\] Intuitively, this means that adding an element \(e\) to a smaller set \(A\) provides at least as much additional value as adding \(e\) to a larger set \(B\). In addition, \(f\) is called monotone if for any pair of sets \(A \subseteq B \subseteq E\), we have \(f(A) \leq f(B)\). In other words, adding elements to a set does not decrease the function value. Finally, \(f\) is non-negative if \(f(A) \geq 0\) for all \(A \subseteq E\).
A celebrated result [23] gives a polynomial-time \((1-1/e)\)-approximation algorithm for the problem of maximizing a non-negative monotone submodular function over a matroid constraint. While the original result was a randomized algorithm, a recent striking result [24], building upon the work of [25], gives a deterministic algorithm with the same guarantee. We remark that polynomial time here refers to a running time that is polynomial in the size of the ground set \(E\). To summarize, they show the following theorem.
Theorem 5. Let \(f: 2^E \to \mathbb{R}\) be a non-negative monotone submodular function that we can evaluate in polynomial time, and let \((E, \mathcal{I})\) be a matroid on the same groundset, for which we can answer independence queries in polynomial time. Then, for every \(\zeta>0\), there is a polynomial-time algorithm that outputs a set \(X\subseteq E\) with \(X \in \mathcal{I}\) so that \[f(X) \geq (1-1/e - \zeta) \cdot \max_{X^*\in \mathcal{I}} f(X^*)\,.\]
Let \(S\) be a locally optimal solution output by the following standard local search algorithm. We remark that its running time is polynomial since by 1 the cost of a solution is a polynomially bounded integer and, at each improving step, the cost decreases by at least one.
\(S \gets\) Arbitrary solution for \(k\)-Means.
While there exists a solution \(S'\) such that \(|S \Delta S'|\le 2\) and \(\text{cost}(S') <\text{cost}(S)\):
Output \(S\).
Local search achieves a \(25\) approximation for \(k\)-Means, see [4].
Lemma 11. \(\text{cost}(S) \leq 25\cdot \text{opt}\).
In the remaining part of the algorithm and its analysis we fix \(S\), and recall that we fixed the reference optimal solution \(\text{OPT}\). We distinguish different types of clusters of \(\text{OPT}\) and analyze their properties in the next two sections. We let \(S_p:=d^2(p,S)\) be the cost paid by \(p\) in \(S\) and recall that \(\text{OPT}_p\) denotes the cost \(p\in D\) pays in \(\text{OPT}\).
We say that a cluster \(C^*\) of \(\text{OPT}\) is pure (w.r.t. \(S\)) if there exists a cluster \(C'\) of \(S\) such that \(|C' \Delta C^*| \le {3\varepsilon} \min(|C^*|,|C'|)\). In which case we also say that \(C'\) is pure w.r.t. \(\text{OPT}\). We say that \(C'\) and \(C^*\) are associated. The following lemma follows from the fact that the input is \(\beta\)-stable for \(\beta := \varepsilon/\log n\) and that the solution \(S\) is a \(25\)-approximation by 11. Given a client or center \(a\) and a distance \(r\), we let \(B(a,r)\) be the set of clients and centers at distance at most \(r\) from \(a\). This lemma is originally proved in [26], we include a proof for completeness.
Lemma 12 (Restatement from [26], Lemma IV.4). The number \(k_{imp}\) of clusters of \(\text{OPT}\) that are not pure w.r.t. \(S\) (and thus the number of clusters of \(S\) which are not pure w.r.t \(\text{OPT}\)) is at most \(\frac{\log n}{\varepsilon^3}\).
Proof. We let \(C^*_o\) denote the optimal cluster for each optimal center \(o\in \text{OPT}\) and we let \(C_c\) denote the cluster in \(S\) corresponding to center \(c\in S\). We refine \(\text{OPT}\) in steps so that the final set only consists of centers of pure clusters.
We start by removing expensive clusters in \(\text{OPT}\). Specifically, let \[\widetilde{\text{OPT}} = \{ o \in \text{OPT}\mid \sum_{p\in C^*_o} d^2(p, o) \geq \frac{5\varepsilon^3}{\log n}\text{opt}\}\,.\] Clearly \(|\widetilde{\text{OPT}}|\leq \frac{\log n}{5\varepsilon^3}\). Let \(\text{OPT}_1:=\text{OPT}-\widetilde{\text{OPT}}\).
For the next step, for every \(o \in \text{OPT}_1\), let \(\pi(o)\) be the closest center in \(\text{OPT}- \{o\}\) to \(o\), and let \(d_o = d(o, \text{OPT}- \{o\}) = d(o, \pi(o))\) be the respective distance. As the instance is \(\beta{=\frac{\varepsilon}{\log n}}\) stable we have for every \(o\in \text{OPT}_1\): \[\begin{gather} |C^*_o| d^2_o = |C^*_o| d^2(o, \pi(o)) \geq \sum_{p\in C^*_o} \left(\frac{1}{2}d^2(p, \pi(o)) - d^2(p,o)\right) \geq \frac{1}{2}\beta {\text{opt}}-\frac{5\varepsilon^3}{\log n}\text{opt}\geq \frac{1}{3}\beta\text{opt}, \end{gather}\] where the first inequality holds by 2 with \(\gamma=2\). Therefore, as the cluster \(C^*_o\) has cost less than \(5\varepsilon^3 \text{opt}/\log n\) for \(o\in \text{OPT}_1\), we have \[|C^*_o \cap B(o, d_o\sqrt{15\varepsilon})| \geq (1-\varepsilon) |C^*_o|\,.\] Indeed, otherwise, we would have the contradiction \[\sum_{p \in C^*_o} d^2(p, o) \geq |C^*_o - B(o, d_o\sqrt{15\varepsilon})|\cdot 15\varepsilon\cdot d^2_o > |C^*_o| 15\varepsilon^2 d^2_o \geq 5\varepsilon^2\beta \text{opt}= 5\varepsilon^3 \frac{\text{opt}}{\log n}\,.\] Now let \(\widetilde{\text{OPT}}_1\) be the subset of \(\text{OPT}_1\) so that for every \(o\in \widetilde{\text{OPT}}_1\), we have \(B(o, d_o\sqrt{40\varepsilon}) \cap S = \emptyset\). We claim that \(|\widetilde{\text{OPT}}_1| \leq \frac{\log n}{5\varepsilon^3}\). Indeed, for each \(o\in \widetilde{\text{OPT}}_1\), the cost of each point \(p\in C^*_o \cap B(o, d_o\sqrt{15\varepsilon})\) in the solution \(S\) would be at least \(\frac{40\varepsilon}{2}d^2_o-15\varepsilon\cdot d^2_o=5\varepsilon\cdot d^2_o\) by 2 with \(\gamma=2\). Hence the total cost of the points in \(C^*_o \cap B(o, d_o\sqrt{15\varepsilon})\) in the solution \(S\) would be at least \(5\varepsilon d^2_o (1-\varepsilon) |C^*_o| \geq 5(1-\varepsilon)\frac{\varepsilon^2}{3} \frac{\text{opt}}{\log n}\). Therefore, using the fact that local search gives a \(25\)-approximate solution, we must have \(|\widetilde{\text{OPT}}_1| \leq \frac{3\cdot 25\log n}{5(1-\varepsilon)\varepsilon^2} \leq \frac{\log n}{5\varepsilon^3}\).
We define \(\text{OPT}_2 = \text{OPT}_1 - \widetilde{\text{OPT}}_1\) and so now we have \(B(o, d_o\sqrt{40\varepsilon}) \cap S \neq \emptyset\) for every \(o\in \text{OPT}_2\). Now let \(\widetilde{\text{OPT}}_2\) be the subset of \(\text{OPT}_2\) so that every \(o\in \widetilde{\text{OPT}}_2\) is such that \(|B(o, d_o/3) \cap S| > 1\). By the pigeon hole principle we must have that \(|\widetilde{\text{OPT}}_2| \leq |\text{OPT}| - |\text{OPT}_2| =|\widetilde{\text{OPT}}|+|\widetilde{\text{OPT}}_1| \leq \frac{2\log n}{5\varepsilon^3}\).
Let \(\text{OPT}_3:=\text{OPT}_2-\widetilde{\text{OPT}}_2\). For each center \(o\in \text{OPT}_3\) there is thus a center \(c(o)\in S\) such that \(d(o, c(o)) \leq d_o\sqrt{40\varepsilon}\) and any other center \(c'\in S\) with \(c'\neq c(o)\) satisfies \(d(o, c') \geq d_o/3\). It follows that all points in \(B(o, d_o/4)\) are assigned to \(c(o)\) in \(S\). In other words, at least a \((1-\varepsilon)\) fraction of the points of \(C^*_o\) are assigned to the cluster with center \(c(o)\) in \(S\). Now let \(\widetilde{\text{OPT}}_3\) be those centers in \(\text{OPT}_3\) so that for every \(o \in \widetilde{\text{OPT}}_3\) the associated center \(c(o) \in S\) is assigned more than \(\varepsilon|C^*|\) points from outside the ball \(B(o, d_o/4)\). The cost of the cluster of \(c(o)\) in \(S\) is then at least \[\left(\frac{d_o}{5}\right)^2 \varepsilon|C^*| \geq \frac{\varepsilon^2}{75 \log n} \text{opt}.\] It follows that \(\widetilde{\text{OPT}}_3\) has cardinality at most \(75\cdot 25\frac{\log n}{\varepsilon^2} \leq \frac{\log n}{5\varepsilon^3}\). Our final set is \(\text{OPT}_4:=\text{OPT}_3-\widetilde{\text{OPT}}_3\).
Now for each center in \(c \in \text{OPT}_4\), with associated cluster \(C^*\), we have that it together with its associated center \(c(o) \in S\), with associated cluster \(C'\), satisfies the following:
All clients in \(B(o, d_o/4)\), i.e. at least \((1-\varepsilon) |C^*|\) many clients, are both assigned to \(o\) and \(c(o)\) in \(\text{OPT}\) and \(S\), respectively. Notice that this implies \(\min\{|C^*|,|C'|\}\geq (1-\varepsilon)|C^*|\).
The additional clients assigned to \(o\) and not to \(c(o)\) is at most \(\varepsilon|C^*|\).
The additional clients assigned to \(c(o)\) and not \(o\) is at most \(\varepsilon|C^*|\).
Notice that \(|C^*\Delta C'|\leq 2\varepsilon|C^*|\leq 3\varepsilon\min\{|C^*|,|C'|\}\), in particular \(C^*\) is pure. It follows that all centers in \(\text{OPT}_4\) correspond to pure clusters. Furthermore, \(\text{OPT}_4\) was obtained by removing at most \(\frac{\log n}{\varepsilon^3}\) centers. The claim follows. ◻
Let \(C^*\) be a pure cluster of \(\text{OPT}\) and \(C'\) be the associated cluster of \(S\). Let \(c^*\) be the center of \(C^*\) and \({c'}\) be the center of \({C'}\). We define \(t(c^*) := {c'}\). For any client \(p \in C^*\), let \(r(p) := d^2(p, {c'}) = d^2(p, t(c^*))\). We have the following lemma which is the only lemma that requires that the solution \(S\) is obtained via the local search (the proof of the previous lemma only used that it was a constant-factor approximation). In words, it says that \(S\) approximates the connection cost of clients belonging to pure clusters of the optimal solution almost perfectly.
Lemma 13 (Adapted from [26]). Let \(D^*_{\texttt{pure}}\subseteq D\) be the subset of clients that belong to pure clusters of the optimal solution \(\text{OPT}\). We have \[\begin{gather} \sum_{p\in D^*_{\texttt{pure}}} r(p) \leq \sum_{p\in D^*_{\texttt{pure}}} \text{OPT}_p + O(\sqrt{\varepsilon} \cdot \text{opt})\,. \end{gather}\]
Proof. Recall that \(S_p = d^2(p,S)\). Consider a pair of pure clusters \(C^*\) and \(C'\) with the same notation as above. We prove the following:
\(\sum_{p \in C^* \cap C'} r(p) = \sum_{p \in C^* \cap C'} d^2(p,S) \le \sum_{p \in C^* \cap C'} \left((1+12\sqrt{\varepsilon}) \text{OPT}_p + 12\sqrt{\varepsilon} S_p\right)+\sqrt{\varepsilon}\sum_{p\in C'}S_p\); and
\(\sum_{p \in C^* {-} C'} r(p) {=} \sum_{p \in C^*{-} C'} d^2(p, c') \le \sum_{p \in C^*{-} C'} (1+\sqrt{\varepsilon})\text{OPT}_p + 12\sqrt{\varepsilon}\sum_{p \in C^*} (\text{OPT}_p + {S_p})\).
The statement of the lemma then follows by summing up the above bounds and using that \(\text{cost}(S) \leq 25\cdot {\text{opt}}\) by 11.
For proving the first bullet, consider the swap that swaps in \(c^*\) and swaps out the center \(c'\). The cost change for the clients in \(C^* \cap C'\) is exactly \(\sum_{p \in C^*\cap C'} (\text{OPT}_p - S_p)\). For any \(p \not\in C^*\), if \(p\) is not served by \({c'}\) in \(S\) the cost is unchanged. Otherwise the cost of \(p \in C' - C^*\) in the new solution \(S - \{{c'}\} \cup \{c^*\}\) is, by 3 with \(\gamma=1+\sqrt{\varepsilon}\), at most \((1+\sqrt{\varepsilon})S_{p} + \frac{2+2/\sqrt{\varepsilon}}{|C^*\cap C'|} \sum_{p' \in C^*{\cap C'}} (S_{p'} + \text{OPT}_{p'})\). Summing over all clients \(p \in C'-C^*\), this is at most \(\sum_{p \in C'-C^*} (1+\sqrt{\varepsilon})S_{{p}} + \frac{3}{\sqrt{\varepsilon}}\frac{|C'-C^*|}{|C^*\cap C'|} \sum_{p' \in C^*{\cap C'}} (S_{p'} + \text{OPT}_{p'})\). Thus, the cost difference \(\text{cost}(S- \{c'\} \cup \{c^*\}) - \text{cost}(S)\) for these clients is at most \[\sum_{p\in C'-C^*}\sqrt{\varepsilon}S_p+\frac{3}{\sqrt{\varepsilon}}\frac{|C'-C^*|}{|C^*\cap C'|} \sum_{p' \in C^*{\cap C'}} (S_{p'} + \text{OPT}_{p'})\leq \sum_{p\in C'}\sqrt{\varepsilon}S_p+ 12\sqrt{\varepsilon} \sum_{p' \in C^*{\cap C'}} (S_{p'} + \text{OPT}_{p'}),\] where in the inequality we used the fact that \(C^*\) is pure, hence \(\frac{|C'-C^*|}{|C^*\cap C'|}\leq \frac{{3\varepsilon}|C^*|}{(1-\varepsilon)|C^*|}\leq 4\varepsilon\). The first bullet follows since, by local optimality, \(\text{cost}(S- \{c'\} \cup \{c^*\}) - \text{cost}(S) \ge {0}\).
We turn to the second bullet. By triangle inequality, for each \(p\in C^*-C'\) and each \(p'\in C^*\cap C'\), one has \(d(p,c')\leq d(p,c^*)+d(p',c^*)+d(p',c')=\sqrt{\text{OPT}_p}+\sqrt{\text{OPT}_{p'}}+\sqrt{S_{p'}}\). Hence, by 3 with \(\gamma=1+\sqrt{\varepsilon}\) and by averaging over \(p'\in C^*\cap C'\), one has \[d^2(p,c')\leq (1+\sqrt{\varepsilon})\text{OPT}_p + \frac{3/\sqrt{\varepsilon}}{|C^* \cap C'|} \sum_{p' \in C^* {\cap} C'} (S_{p'} + \text{OPT}_{p'}).\] Summing up over all clients \(p \in C^* - C'\), we have that \[\begin{align} \sum_{p \in C^*{-} C'} d^2(p, c') & \le \sum_{p \in C^*- C'} (1+\sqrt{\varepsilon})\text{OPT}_p + \frac{3}{\sqrt{\varepsilon}}\frac{|C^*{-} C'|}{|C^*\cap C'|} \sum_{p' \in C^*{\cap}C'} (\text{OPT}_{p'} + S_{p'})\\ & \leq \sum_{p \in C^*- C'} (1+\sqrt{\varepsilon})\text{OPT}_p + 12\sqrt{\varepsilon} \sum_{p' \in C^*} (\text{OPT}_{p'} + S_{p'}), \end{align}\] where the second inequality follows from \(\frac{|C^*{-} C'|}{|C^*\cap C'|}\leq {4\varepsilon}\) similarly to the first bullet. The second bullet follows. ◻
In the previous section, we showed that the cost of pure clusters in \(\text{OPT}\) is close to to their optimal cost in our local search solution \(S\). Our goal in this section is to “hit” those non-pure clusters of \(\text{OPT}\) that have a high cost in \(S\). We say that a non-pure cluster \(C^*\) of \(\text{OPT}\) with center \(c^*\) is basic-cheap if the total cost in \(S\) of the clients in \(C^*_\text{avg}\) is less than \(\varepsilon^{5}\text{opt}/\log n\) or if there exists a center of \(S\) at squared distance at most \((1+\varepsilon)\text{avg}_{C^*,\text{OPT}} + \varepsilon\gamma_{C^*}\) from \(c^*\), where \(\gamma_{C^*} := \frac{1}{|C^*|} \sum_{p\in C^*} (\text{OPT}_p + S_p)\); in the latter case we also say that \(C^*\) is covered by \(S\).
The following procedure, that aims to “hit” all clusters of \(\text{OPT}\) that are non-pure and non-basic-cheap, is inspired by the classic \(k\)-means++ algorithm and its so called \(D^2\)-sampling procedure to sample clients proportional to their cost in solution \(S\).
Let \(W\) be the set obtained by taking \(s\) independent samples of clients where, in each sample, client \(p\) is sampled with probability \(\frac{d^2(p, S)}{\text{cost}(S)}\).
Output \(W\).
Our algorithm obtains a set \(W\) of clients by sampling \(s^*\) using the \(s^*\)-\(D^2\)-sample process, where \[s^* = 25\cdot \frac{\log n}{\varepsilon^{5}}\ln\left( \frac{{81}}{\varepsilon^{2}}\right)\,.\] We have the following lemma that says that we hit all non-pure and non-basic-cheap clusters except for a set \(V\) of clusters that have an insignificant cost in \(S\).
For a non-pure cluster \(C^*\) of \(\text{OPT}\) with center \(c^*\in \text{OPT}\), we let \(t(c^*)\) be the closest center in \(S\) to \(c^*\), and for any \(p\in C^*\), we let the replacement cost of \(p\) be \(r(p):=d^2(p,t(c^*))\).
Lemma 14. Consider the random set \(W\) of clients obtained from the \(s^*\)-\(D^2\)-sample process. Let \(V\) be the set of clusters \(C^*\) of \(\text{OPT}\) that are non-pure and non-basic-cheap such that \(C^*_\text{avg}\cap W = \emptyset\). With probability at least \(1-\varepsilon\), \[\begin{align} \sum_{C^* \in V} \sum_{p \in C^*} {r(p)} \le \varepsilon\cdot \text{opt}\,. \label{eq:probcost} \end{align}\tag{21}\]
Proof. Recall that \(S_p = d^2(p,S)\). Consider a non-pure and non-basic-cheap cluster \(C^*\) of \(\text{OPT}\). We say that a sampled point \(p\in W\) hits \(C^*\) if \(p\in C^*_{avg}\) (i.e., \(p\) is a leader of \(C^*\)). As \(C^*\) is not basic-cheap, we have \(\sum_{p\in C^*_{avg}}S_p\geq \varepsilon^{5} {\text{opt}}/\log n\). Thus the probability that a sampled \(p\in W\) hits \(C^*\) is at least \(\frac{\sum_{p\in C^*}S_p}{\text{cost}(S)}\geq \frac{\varepsilon^{5}}{{25} \log n}\), where we used that \(\text{cost}(S) \leq 25\text{opt}\) (11). Thus the probability that \(C^*\) is not hit by any point in \(W\) is at most \((1-\frac{\varepsilon^{5}}{{25} \log n})^{s^*}\) which by the selection of \(s^*\) is at most \(\varepsilon^{2}/{81}\). For a point \(p\in C^*\) which is assigned to \(c'\) in \(S\), by triangle inequality one has \[\begin{align} \sqrt{r(p)} & =d(p,t(c^*))\leq d(p,c^*)+d(c^*,t(c^*))\leq d(p,c^*)+d(c^*,c') \\ & \leq d(p,c^*)+d(p,c^*)+d(p,c') =2\sqrt{\text{OPT}_p}+\sqrt{S_p}. \end{align}\] Thus, by applying Lemma 3 with \(\gamma=3\), one gets \[r(p)\leq 6\text{OPT}_p+3S_p.\] Therefore, by linearity of expectation, \[E[\sum_{C^*\in V}\sum_{p\in C^*}{r(p)}] \leq \sum_{p\in D} {(6\text{OPT}_p+3S_p)}\cdot \frac{\varepsilon^{2}}{{81}} \leq \varepsilon^{2}\cdot \text{opt}\,,\] where we again used that \(\text{cost}(S) \leq 25\text{opt}\) by 11. The total cost of the clusters in \(V\) is thus at most \(\varepsilon\cdot {\text{opt}}\) with probability at least \(1-\varepsilon\) by Markov’s inequality. ◻
We say that the set of clients \(W\) obtained from the \(s^*\)-\(D^2\)-sample process is a successful sample if 21 holds. We define the following two types of \(\text{OPT}\) clusters. We say that a non-pure cluster \(C^*\) of \(\text{OPT}\) with center \(c^*\) is cheap if it is basic-cheap or is in \(V\); a non-pure cluster is expensive otherwise. In other words, a cluster \(C^*\) of the optimal solution is expensive if it is a non-pure and non-basic-cheap cluster such that \(C^*_{avg} \cap W \neq \emptyset\).
Assuming that \(W\) is successful, we have a good bound on the cost of the clients assigned to cheap centers in the optimal solution.
Lemma 15. Let \(D^*_{\texttt{cheap}}\subseteq D\) be the subset of clients that belong to cheap clusters of the optimal solution \(\text{OPT}\). If \(W\) is a successful sample, \[\begin{gather} \sum_{p\in D^*_{\texttt{cheap}}} r(p) \leq \sum_{p\in D^*_{\texttt{cheap}}} 4\,\text{OPT}_p + O(\sqrt{\varepsilon} \cdot \text{opt})\,. \end{gather}\]
Proof. We claim that for any cluster \(C^*\) of \(\text{OPT}\) that is basic-cheap, and any \(p \in C^*\):
If \(C^*\) is not covered, then \(r(p) = d^2(p, t(c^*)) \le (2+\sqrt{\varepsilon})(\text{OPT}_p + \text{avg}_{C^*,\text{OPT}}) + \frac{3}{\varepsilon^{1.5} |C^*|} \sum_{p \in C^*_{\text{avg}}} S_p\).
If \(C^*\) is covered, then \(r(p) \le 2\text{OPT}_p + 2(1+\varepsilon) \text{avg}_{C^*,\text{OPT}} + 2\varepsilon\gamma_{C^*}\).
If \(C^*\) is covered, the bound 2. follows immediately by 2 with \(\gamma=2\). Otherwise, observe that for any such cluster and for any \(p'\in C^*_{\text{avg}}\), one has \(\sqrt{r(p)}=d(p,t(c^*))\leq d(p,c^*)+d(c^*,p')+d(p',t(c^*))=\sqrt{\text{OPT}_p}+\sqrt{\text{OPT}_{p'}}+\sqrt{S_{p'}}\). Thus applying 3 with \(\gamma=1+\frac{2}{\sqrt{\varepsilon}}\leq \frac{3}{\sqrt{\varepsilon}}\), one gets \(d^2(p,t(c^*))\leq (2+\sqrt{\varepsilon})(\text{OPT}_p+\text{OPT}_{p'})+\frac{3}{\sqrt{\varepsilon}}S_{p'}\). Averaging over \(p'\in C^*_{\text{avg}}\), we obtain \[\begin{align} d^2(p,t(c^*)) & \leq (2+\sqrt{\varepsilon})\text{OPT}_p+\frac{2+\sqrt{\varepsilon}}{|C^*_{\text{avg}}|}\sum_{p'\in C^*_{\text{avg}}}\text{OPT}_{p'}+\frac{3}{\sqrt{\varepsilon}|C^*_{\text{avg}}|}\sum_{p'\in C^*_{\text{avg}}}S_{p'}\\ & \leq (2+\sqrt{\varepsilon})(\text{OPT}_p+\text{avg}_{C^*,\text{OPT}})+\frac{3}{\varepsilon^{1.5}|{C^*}|}\sum_{p'\in C^*}S_{p'}, \end{align}\] where in the second inequality we used \(|C^*_{\text{avg}}| \ge \varepsilon|C^*|\). The bound 1. follows.
Now, to prove the above lemma, we sum up the cost of all the clients of cheap clusters \(C^*\). For a covered cluster \(C^*\), by 2. we have \[\begin{align} \sum_{p\in C^*} r(p)& \leq 2\sum_{p\in C^*} \left(\text{OPT}_p + (1+\varepsilon)\text{avg}_{C^*, \text{OPT}} + \varepsilon\gamma_{C^*}\right)\\ &\leq 2\left( 1+ (1+2\varepsilon) (1+\varepsilon)\right) \sum_{p\in C^*} \text{OPT}_p + 2\varepsilon\sum_{p\in C^*} (\text{OPT}_p + S_p)\,, \end{align}\] where we used the definition of \(\gamma_{C^*} = \frac{1}{|C^*|} \sum_{p\in C^*} (\text{OPT}_p + S_p)\) and that \(|C^*| \cdot \text{avg}_{C^*, \text{OPT}} \leq (1+2\varepsilon) \sum_{p\in C^*} \text{OPT}_p\), which holds because \(C^*\) has at least \((1-\varepsilon) |C^*|\) clients \(p\in C^*\) so that \(\text{OPT}_p \geq \text{avg}_{C^*, \text{OPT}}\). For a basic-cheap cluster \(C^*\) which is not covered, by 1. one has \[\begin{align} \sum_{p\in C^*} r(p) & \leq \sum_{p\in C^*} \left((2+\sqrt{\varepsilon})(\text{OPT}_p + \text{avg}_{C^*,\text{OPT}}) + \frac{3}{\varepsilon^{1.5} |C^*|} \sum_{p \in C^*_{\text{avg}}} S_p\right)\\ &\leq (4+O(\sqrt{\varepsilon})) \sum_{p\in C^*} \text{OPT}_p + \frac{3\varepsilon^{3.5}\text{opt}}{\log n}\,, \end{align}\] where we again used that \(|C^*| \cdot \text{avg}_{C^*, \text{OPT}} \leq (1+2\varepsilon) \sum_{p\in C^*} \text{OPT}_p\) and we additionally used that, by the definition of basic-cheap clusters, \(\sum_{p\in C^*_{avg}} S_p \leq \varepsilon^{5} \text{opt}/\log n\).
Finally, we have that if we sum up all clusters in \(V\), i.e., clusters that are cheap but not basic-cheap, then 14 says \[\begin{gather} \sum_{C^* \in V} \sum_{p \in C^*} {r(p)} \le \varepsilon\cdot \text{opt}\,. \end{gather}\] The statement of the lemma now follows by summing up the above bounds for all cheap clusters and using that \(\text{cost}(S) \leq 25\cdot \text{opt}\) by 11 and the property that there are at most \(\log(n)/\varepsilon^3\) basic-cheap clusters. The latter claim is true because 12 says that there are at most \(\log(n)/\varepsilon^3\) non-pure clusters and basic-cheap clusters are non-pure clusters by definition. ◻
Given \(S\) and \(W\), the set of clusters of the optimal solution \(\text{OPT}\) is thus partitioned into pure clusters, cheap clusters, and expensive clusters. We let \(\hat{\text{OPT}}\) be the centers of \(\text{OPT}\) that are expensive. We further define the set \(D^*_{\texttt{exp}}\subseteq D\) to be the subset of clients that belong to the expensive clusters in \(\text{OPT}\). We have thus partitioned \(D\) into sets \(D^*_{\texttt{pure}}, D^*_{\texttt{cheap}}\), and \(D^*_{\texttt{exp}}\) depending on the type of optimal cluster they belong to. 13 bounds the cost of the clients in \(D^*_{\texttt{pure}}\) in \(S\) and 15 bounds the cost of the clients in \(D^*_{\texttt{cheap}}\). For future reference, we summarize these two lemmas (by weakening the upper bound for clients in \(D^*_{\texttt{pure}}\)).
Lemma 16. Assuming \(W\) is a successful sample, \[\sum_{p\in D - D^*_{\texttt{exp}}} r(p) \leq \sum_{p \in D - D^*_{\texttt{exp}}} {4} \text{OPT}_p + O({\sqrt{\varepsilon}} \cdot \text{opt})\,.\]
It follows that the connection cost in solution \(S\) of clients in \(D- D^*_{\texttt{exp}}\) is roughly within a factor \({4}\) of their cost in the optimal solution. The remaining part of the algorithm is thus devoted to modifying \(S\) to obtain a small connection cost of the clients in \(D^*_{\texttt{exp}}\) without significantly increasing the cost of the other clients.
By the definition of expensive clusters, each expensive cluster \(C^*\) of \(\text{OPT}\) satisfies \(C^*\cap W \neq \emptyset\) where \(W\) is the sample obtained by running the sampling procedure of the last subsection. Here, our goal is to guess a subset \(\mathcal{B}\) of balls so that for each expensive cluster \(C^*\) there is a ball \(B(\ell, {\sqrt{\rho}}) \in \mathcal{B}\) so that \(\ell\), which we refer to as a leader, is in \(C^*_{avg}\) and \(\rho\) is a very close approximation to \(\text{avg}_{C^*, \text{OPT}}\). This guarantees that the center \(c^* \in \hat{\text{OPT}}\) of cluster \(C^*\) is in \(B(\ell, {\sqrt{\rho}})\) and that no other center in \(B(\ell, {\sqrt{\rho}})\) is "too" far from \(c^*\) since the radius of the ball is \(\approx {\sqrt{\text{avg}_{C^*, \text{OPT}}}}\). The balls \(\mathcal{B}\) will then be used when we approximate the centers in \(\hat{\text{OPT}}\) via submodular function maximization subject to a partition matroid constraint (the balls will correspond to the partitions of the matroid). As the algorithm does not know the set of expensive clusters, it enumerates all subsets of \(W\), and for each guessed point, it enumerates a constant number of radii.
\(\mathcal{L}_\texttt{bal} \gets \emptyset\).
For each subset \(\{p_1, p_2, \ldots, p_q\} \subseteq W\):
We show that the ball procedure runs in polynomial time and that one of the subsets \(\mathcal{B}\) of balls that the procedure constructs is a correct guess: every expensive cluster \(C^*\) has a leader, and \(\text{avg}_{C^*, \text{OPT}}\) is guessed approximately correct. We say that a set of balls \(\mathcal{B}\) is a valid set of balls if it satisfies the following: For each expensive cluster \(C^*\) of \(\text{OPT}\), we have a ball \(B(\ell, {\sqrt{\rho}}) \in \mathcal{B}\) such that \(\ell\in C^*_{avg}\) is a leader and \[\text{avg}_{C^*,\text{OPT}} \leq \rho \leq \text{avg}_{C^*,\text{OPT}} + \varepsilon\gamma_{C^*},\] where we recall that \(\gamma_{C^*} = \frac{1}{|C^*|} \sum_{p \in C^*} (\text{OPT}_p + S_p)\).
Lemma 17. The ball procedure runs in polynomial time \(n^{\varepsilon^{-O(1)}}\) and produces a collection \(\mathcal{L}_{\texttt{bal}}\) of sets of balls such that at least one set \(\mathcal{B}\in \mathcal{L}_{\texttt{bal}}\) is a valid set of balls.
Proof. We start by showing that the running time is bounded by \(n^{\varepsilon^{-O(1)}}\). Indeed, we have \(|W| = s^*\), and so the number of subsets of \(W\) is \(2^{s^*}= n^{\varepsilon^{-O(1)}}\) since \(s^* = {25} \cdot \frac{\log n}{\varepsilon^{5}}\ln\left( \frac{{25}}{\varepsilon^{2}}\right)\). Moreover, for a fixed subset \(\{p_1, p_2, \ldots, p_q\}\), we consider a constant number \(\alpha = \log_{1+\varepsilon^3}(1/\varepsilon^6)\) of balls (i.e., values of \(i_j\)) for each \(p_j\). So the total number of balls considered added for each subset \(\{p_1, p_2, \ldots, p_q\}\) is \(\alpha^{q}\) which is \(n^{\varepsilon^{-O(1)}}\) since \(q \leq |W| \leq s^*\).
We now turn our attention to showing that there is a set of balls \(\mathcal{B}\in \mathcal{L}_{\texttt{bal}}\) that satisfies the properties of the lemma. Let \(C^*(1), \ldots, C^*(|\hat{\text{OPT}}|)\) be the expensive clusters of . By definition, we have \(C^*_{avg}(j) \cap W\neq \emptyset\) for each such cluster. Now arbitrarily fix one client \(\ell_j\in C^*_{avg}(j) \cap W\) for \(j=1,2, \ldots, |\hat{\text{OPT}}|\), which we refer to the leader of \(C^*(j)\). Since the algorithm enumerates over all subsets of \(W\), there exists an execution of the algorithm where the subset is the set \(\{\ell_1, \ldots, \ell_{|\hat{\text{OPT}}|}\}\) of leaders for all the expensive clusters. We consider the set \[\mathcal{B}= \left\{B(\ell_1, {\sqrt{(1+\varepsilon^3)^{i_1}}}), B(\ell_2, {\sqrt{(1+\varepsilon^3)^{i_2}}}), \ldots, B(\ell_{|\hat{\text{OPT}}|}, {\sqrt{(1+\varepsilon^3)^{i_{|\hat{\text{OPT}}|}}}})\right\}\] of balls, where \(i_j\) is the smallest integer so that \((1+\varepsilon^3)^{i_j} \geq \max\{\text{avg}_{C^*, \text{OPT}}, \varepsilon^3 S_{\ell_j}\}\).
It remains to prove that, for each leader \(\ell_j\), we have \((1+\varepsilon^3)^{i_j} \leq S_{\ell_j}/\varepsilon^3\) and \(\text{avg}_{C^*(j),\text{OPT}} \leq (1+\varepsilon^3)^{i_j}\leq \text{avg}_{C^*(j),\text{OPT}} + \varepsilon\gamma_{C^*(j)}\). The first property guarantees that \(\mathcal{B}\in \mathcal{L}_{\texttt{bal}}\) and the second property is the bounds on \(\rho\) for \(\mathcal{B}\) to be a valid set of balls.
We now verify these two properties for each leader \(\ell_j\). To simplify notation, we let \(\ell = \ell_j\), \(C^* = C^*(j)\) and \(\rho = (1+\varepsilon^3)^{i_j}\). We have \({d^2}(\ell, S) = S_{\ell} > \varepsilon\text{avg}_{C^*,{\text{OPT}}}\) since otherwise \(C^*\) would be covered by \(S\), which would contradict that \(C^*\) is an expensive cluster. By the selection of \(i_j\), \(\rho = (1+\varepsilon^3)^{i_j}\leq (1+\varepsilon^3) \max\{\text{avg}_{C^*, \text{OPT}}, \varepsilon^3 S_\ell\} \leq (1+\varepsilon^3) S_\ell/\varepsilon\) and thus \((1+\varepsilon^3)^{i_j} \leq S_\ell/\varepsilon^3\) as required.
We further claim that \(\rho \in [\text{avg}_{C^*,\text{OPT}}, \text{avg}_{C^*,\text{OPT}} + {\varepsilon^2} S_\ell)\). Assume first that \(\text{avg}_{C^*,\text{OPT}}\geq \varepsilon^3 S_\ell\). Then \(\rho = (1+\varepsilon^3)^{i_j}\geq\text{avg}_{C^*,\text{OPT}}\), for the smallest possible integer \(i_j\) which satisfies this condition. The claim then follows since \(\rho \leq (1+\varepsilon^3)\text{avg}_{C^*,\text{OPT}}\leq \text{avg}_{C^*,\text{OPT}}+\varepsilon^2 S_\ell\) as required (where we used that \(\text{avg}_{C^*, \text{OPT}} \leq S_\ell/\varepsilon\)). In the complementary case, namely \(\text{avg}_{C^*,\text{OPT}}< \varepsilon^3 S_\ell\), one has that \(i_j\) was selected to be the smallest integer so that \((1+\varepsilon^3)^{i_j} \geq \varepsilon^3 S_\ell\). Moreover, the interval \([\text{avg}_{C^*,\text{OPT}}, \text{avg}_{C^*,\text{OPT}} + \varepsilon^2 S_\ell)\) contains the interval \([\varepsilon^3 S_\ell,\varepsilon^2 S_{\ell}]\), and the latter interval contains at least one power of \((1+\varepsilon^3)\). We thus have \[\text{avg}_{C^*, \text{OPT}} \leq \rho \leq \text{avg}_{C^*, \text{OPT}} + \varepsilon^2 S_{\ell}\, .\]
We conclude the proof by showing \(S_\ell \le ({6}+{6}\varepsilon)\gamma_{C^*}{\leq \gamma_{C^*}/\varepsilon}\). Let \(\ell\) be assigned to \(c'\) in \(S\), and consider any \(p\in C^*\) which is assigned to \(c''\) in \(S\). Then, by 3 with \(\gamma=3\), one has \(S_\ell={d^2}(\ell,c')\leq {d^2}(\ell,c'')\leq {3d^2}(\ell,c^*)+{3d^2}(c^*,p)+{3d^2}(p,c'')={3d^2}(\ell,c^*)+{3}\text{OPT}_p+{3}S_p\). Hence, averaging over \(C^*\), one gets \(S_\ell \le {3d^2}(\ell, c^*) + \frac{{3}}{|C^*|} \sum_{p \in C^*} (S_p + \text{OPT}_p)\). Since \(\ell\) is a leader, i.e., \(\ell \in C^*_{avg}\), \({d^2}(\ell,c^*)\leq \text{avg}_{C^*,\text{OPT}}\leq \frac{1+2\varepsilon}{|C^*|}\sum_{p \in C^*}\text{OPT}_p\), where we used that there is at least \((1-\varepsilon)|C^*|\) clients \(p\in C^*\) so that \({d^2}(p, c^*) \geq \text{avg}_{C^*, \text{OPT}}\). Therefore, \(S_\ell \leq ({6}+{6}\varepsilon) \gamma_{C^*}\), which, as aforementioned, concludes the proof of the lemma. ◻
We thus have that the ball procedure produces a family \(\mathcal{L}_{\texttt{bal}}\) such that at least one set \(\mathcal{B}\in \mathcal{L}_{\texttt{bal}}\) satisfies the conditions of the lemma. While our algorithm will try all possible sets in \(\mathcal{L}_{\texttt{bal}}\) (since it does not know which one is valid), we do our analysis by considering the run of the algorithm when it selects this set \(\mathcal{B}\) of valid balls.
Next, the algorithm creates, for each ball \(B(\ell, {\sqrt{\rho}}) \in \mathcal{B}\) with center \(\ell\) and radius \({\sqrt{\rho}}\), a dummy center \(\delta\). The center \(\delta\) is at distance \({\sqrt{\rho}}\) from \(\ell\) and and at distance \({\sqrt{\rho}} + d(\ell, p)\) from any other input point \(p\).
Let \(\Lambda\) be the set of dummy centers, so \(|\Lambda| = |\mathcal{B}|\). Recall that \(D^*_{\texttt{exp}}\) is the set of clients that are in an expensive cluster of \(\text{OPT}\), i.e., served by a center in \(\hat{\text{OPT}}\) in the optimal solution.
Lemma 18. Suppose the sample \(W\) is successful, and that the set of balls \(\mathcal{B}\) is valid, then there exists a set of centers \(S_0\) of \(S\) that satisfies the following properties:
\(|S_0| = |\hat{\text{OPT}}| \le \frac{\log n}{\varepsilon^3}\), and;
\(\forall c \in S_0\), there is no \(c^* \in \text{OPT}-\hat{\text{OPT}}\) such that \(t(c^*) = c\), and;
\(\text{cost}(S - S_0 \cup \Lambda) \le {9} \sum_{p \in D^*_{\texttt{exp}}}\text{OPT}_p + \sum_{p \in D{-} D^*_{\texttt{exp}}} r(p) + O(\varepsilon\cdot{\text{opt}})) \le ({9}+O({\sqrt{\varepsilon}}))\text{opt}\).
Proof. By definition, the centers in \(\hat{\text{OPT}}\) are not pure, hence \(|\hat{\text{OPT}}|\leq \frac{\log n}{\varepsilon^3}\) by 12. Furthermore, since there are \(|\text{OPT}- \hat{\text{OPT}}|\) centers of \(\text{OPT}\) not in \(\hat{\text{OPT}}\), there are (at least) \(|\hat{\text{OPT}}|\) centers \(c\) of \(S\) such that there is no \(c^* \in \text{OPT}-\hat{\text{OPT}}\) such that \(t(c^*) = c\), and we let \(S_0\) refer to these centers: the first 2 bullets follow immediately.
Let us turn to the last bullet. The bound on the cost of the clients that are not in \(D^*_{\texttt{exp}}\) follows from the second bullet: for each client \(p\) in a cluster of the optimum solution whose center is \(c^* \in \text{OPT}-\hat{\text{OPT}}\), we have that \(t(c^*) \in S-S_0\) and so its cost is at most \(r(p)\). We finally consider the points in \(D^*_{\texttt{exp}}\). Since the balls are valid, 17 implies that for each expensive cluster \(C^*\) of \(\text{OPT}\), there is a ball \(B(\ell,{\sqrt{\rho}})\) where \(\rho \in [\text{avg}_{C^*,\text{OPT}}, \text{avg}_{C^*,\text{OPT}} + \varepsilon\gamma_{C^*})\) and \(\ell \in C^*_\text{avg}\). Therefore, if we let \(c^*\) be the center of \(C^*\) and using 3 with \(\gamma=3\), \[\begin{align} \sum_{p\in C^*} {d^2}(p, \Lambda) & \leq \sum_{p\in C^*} \left({3}d^2(p, c^*) + {3}d^2(c^*, \ell) + {3}d^2(\ell, \Lambda) \right)\\ &\leq\sum_{p\in C^*} \left({3}\text{OPT}_p + {3}\text{avg}_{C^*,\text{OPT}}+ {3}\rho \right)\\ & \leq \sum_{p\in C^*} \left({3}\text{OPT}_p + {6}\text{avg}_{C^*,\text{OPT}} + {3}\varepsilon\gamma_{C^*}) \right) \\ & = \sum_{p\in C^*} {3}\text{OPT}_p + |C^*|({6}\text{avg}_{C^*,\text{OPT}} + {3}\varepsilon\gamma_{C^*})\\ & \le ({9}+O(\varepsilon)) \sum_{p\in C^*} \text{OPT}_p + O(\varepsilon\sum_{p \in C^*} {S_p}). \end{align}\] The lemma follows from the fact \(\text{cost}(S) \leq {25} \cdot {\text{opt}}\) (11) and by invoking 16 to bound the sum of the \(r(p)\) values (where we use the assumption that the sample \(W\) is successful). ◻
Next, let us analyze the cost of the swap \((\hat{\text{OPT}}, S_0)\). Namely, of the solution \(M_O = S - S_0 \cup \hat{\text{OPT}}\), where \(M\) in \(M_O\) stands for “mixed solution” and the subscript \(O\) stands for that the mixed solution is obtained by swapping in some elements from \(\text{OPT}\) (and removing \(S_0\)). We will also analyze the “dummy” version of \(M_O\) where instead of swapping in \(\hat{\text{OPT}}\), we swap in the dummy centers \({\Lambda}\). We denote that solution by \(M_D = S - S_0 \cup \Lambda\), where subscript \(D\) stands for “dummy”.
Lemma 19. We have \(d^2(p, \hat{\text{OPT}}) \leq \text{OPT}_p\) if \(p\in D^*_{\texttt{exp}}\) and \(d^2(p, S- S_0)\leq r(p)\) if \(p\in D- D^*_{\texttt{exp}}\).
Proof. We have \(d^2(p, \hat{\text{OPT}}) \leq \text{OPT}_p\) when \(p\in D^*_{\texttt{exp}}\) because the center serving \(p\) in the optimal solution is in \(\hat{\text{OPT}}\). Consider the remaining case and let \(p\in D- D^*_{\texttt{exp}}\) be a client whose serving center in \(\text{OPT}\) is say \(c^*\). By the second condition on \(S_0\) in [lemma:S0properties], the center \(t(c^*)\) is in \(S - S_0\) and so \(d^2(p, S- S_0) \leq d^2(p, t(c^*)) = r(p)\). ◻
Notice that \(M_O\) contains \(S- S_0\) and \(\hat{\text{OPT}}\). Therefore, if we sum up the above bounds for all clients we get \[\begin{align} \text{cost}(M_O) & \leq \sum_{p\in D^*_{\texttt{exp}}} \text{OPT}_p + \sum_{p\in D{-} D^*_{\texttt{exp}}} r(p)\,, \end{align}\] which by 16 is at most \(\sum_{p\in D^*_{\texttt{exp}}} \text{OPT}_p + \sum_{p\in D{-}D^*_{\texttt{exp}}} {4} \text{OPT}_p + O({\sqrt{\varepsilon}}) \cdot \text{opt}\) (assuming that that the sample \(W\) was successful). By swapping \(S_0\) with \(\hat{\text{OPT}}\) we thus get a \(1\)-approximation on the clients \(D^*_{\texttt{exp}}\) and a \({4}\)-approximation of the remaining clients (plus a small error term). Our goal in the next sections will thus be to approximate this swap. The next few steps will be aimed at simplifying (or guessing parts of) \(S_0\). The last step will then approximate \(\hat{\text{OPT}}\) and the remaining part of \(S_0\) by submodular function maximization subject to a partition matroid constraint. For that part, it will be helpful to have a bound on the dummy solution as well; specifically, a modified version of it (see 21 and [claim:Mprimebounds]). For intuition of those statements, let us here say that one can show \[\begin{align} \text{cost}(M_D) & \leq \sum_{p\in D^*_{\texttt{exp}}} {9}\,\text{OPT}_p + \sum_{p\in D- D^*_{\texttt{exp}}} r(p) + O({\sqrt{\varepsilon}}) \cdot \text{opt}\,\, \end{align}\] by observing that only the clients \(D^*_{\texttt{exp}}\) have a different connection cost in \(M_D\) than in \(M_O\). Moreover, each such client \(p\in D^*_{\texttt{exp}}\) that was previously assigned to a center \(c^* \in \hat{\text{OPT}}\), and belongs to cluster \(C^*\) of \(\text{OPT}\) with leader \(\ell\), has an associated dummy center \(\delta\) at squared distance \[{d^2(p,\delta)\leq 3d^2(p, c^*)+3d^2(c^*,\ell)+3d^2(\ell,\delta)\leq} {3}d^2(p, c^*) + {6}\text{avg}_{C^*, \text{OPT}} + {3}\varepsilon\gamma_{C^*}\] (assuming the set \(\mathcal{B}\) of balls is valid and using 3 with \(\gamma=3\)). Simplifications then give the stated inequality as \(|C^*| \text{avg}_{C^*, \text{OPT}} \leq (1+2\varepsilon) \sum_{p\in C^*} \text{OPT}_p\) and \(|C^*| \varepsilon\gamma_{C^*} = \varepsilon\sum_{p\in C^*} ( \text{OPT}_p + S_p)\).
Thus, it remains to show that our algorithm can yield a good approximation to the gain that the swap \((\hat{\text{OPT}}, S_0)\) would provide. Of course, it will not necessarily be optimum, but we can show it is enough to conclude the proof of our theorem. We focus on the iteration of the procedure that produces valid ball guesses. In particular, at this point given that \(W\) is successful and the ball guesses are valid, the number of balls in our ball guess is equal to \(|S_0|=|\hat{\text{OPT}}|{=|\Lambda|}\leq \frac{\log n}{\varepsilon^3}\). Our algorithm then makes use of the following procedure that takes as input the local search solution \(S\) and the set \(\Lambda\) of dummy centers.
\(\mathcal{L}_{\text{exp}}\leftarrow \emptyset\) \(\mathcal{Q}\leftarrow \emptyset\) With probability 1/2 do the following: Consider the clustering induced by \(\Lambda\cup S-\mathcal{Q}\) and, for each \(c\in S-\mathcal{Q}\), let \(\text{cost}(c)\) be the cost of the cluster associated with \(c\) in the considered solution Sample one \(c\in S-\mathcal{Q}\) with probability \(\frac{\text{cost}(c)}{\sum_{c'\in S-\mathcal{Q}}\text{cost}(c')}\) Set \(\mathcal{Q}\leftarrow \mathcal{Q}\cup \{c\}\) \(\mathcal{L}_{\text{exp}}\leftarrow \mathcal{L}_{\text{exp}}\cup \{\mathcal{Q}\}\) return \(\mathcal{L}_{\text{exp}}\)
The goal of the above procedure is to guess a subset \(\mathcal{Q}\) of all “costly” centers in \(S_0\) (the set \(\mathcal{L}_{\text{exp}}\) contains all guesses). Specifically, if we consider the solution \((S - \mathcal{Q}) \cup \Lambda\), then we wish that the cost of the clusters corresponding to the remaining centers in \(S_0 - \mathcal{Q}\) is at most \(\varepsilon\cdot {\text{opt}}\). Formally, the clusters corresponding to \(S_0 - \mathcal{Q}\) in \(S - \mathcal{Q}\cup \Lambda\) consists of all the clients whose closest center in \(S - \mathcal{Q}\cup \Lambda\) is from \(S_0 - \mathcal{Q}\). If we let \(D' \subseteq D\) be those clients then the total cost in solution \(S- \mathcal{Q}\cup \Lambda\) of the clusters with centers in \(S_0 - \mathcal{Q}\) is defined as \[\sum_{p\in D'} d^2(p, S- \mathcal{Q}\cup \Lambda) = \sum_{p\in D'} d^2(p, S_0 - \mathcal{Q})\,,\] where the equality holds because of the definition \(D'\).
Lemma 20. \(expRem()\) runs in \(n^{1/\varepsilon^{O(1)}}\)-time and produces a collection \(\mathcal{L}_{\text{exp}}\) of at most \(n^{1/\varepsilon^{O(1)}}\) subsets of \(S\) such that with probability at least \(1-1/n\) there exists \(\mathcal{Q}\in \mathcal{L}_{\text{exp}}\) satisfying
\(\mathcal{Q}\subseteq S_0\), and
The total cost in the solution \(S - Q \cup \Lambda\) of the clusters with centers in \(S_0 - \mathcal{Q}\) is at most \(\varepsilon\cdot \text{opt}\).
Proof. The claim on the running time and on the size of \(\mathcal{L}_{\text{exp}}\) is trivially satisfied since \(|\Lambda|=|S_0|\leq \frac{\log n}{\varepsilon^3}\).
It remains to show that with probability at least \(1-\frac{1}{n}\) at least one set \(\mathcal{Q}\in \mathcal{L}_{\text{exp}}\) satisfies the desired properties. Let us consider some iteration of the external for loop, and let \(\mathcal{Q}\) be the corresponding set. We say that the \(j\)-th iteration of the corresponding inner for loop is successful if the following happens:
If condition (2) of the lemma is satisfied considering the current value of \(\mathcal{Q}\), the event from line 5 does not happen (hence in particular \(\mathcal{Q}\) is not updated in this \(j\)-th iteration).
Otherwise, the event from line 5 happens and furthermore the sampled \(c\) belongs to \(S_0\).
Let \(A_j\) denote the event that the considered \(j\)-th iteration is successful. Let us condition on the event \(A_{<j}\) that the previous iterations \(A_1,\ldots,A_{j-1}\) are successful. In particular, one has \(\mathcal{Q}\subseteq S_0\) at the beginning of the \(j\)-th iteration. Let \(B_j\) denote the event that condition (2) is satisfied at the beginning of the iteration. Then trivially \(Pr[A_j|B_j,A_{<j}]\geq 1/2\). Suppose next that \(B_j\) does not hold. In that case, with probability \(1/2\), the procedure samples a center \(c\). Since by assumption \(\sum_{c\in S_0-\mathcal{Q}}\text{cost}(c)>\varepsilon\text{opt}\), the probability that the procedure samples some \(c\in S_0-\mathcal{Q}\) is at least \[\frac{\varepsilon\text{opt}}{\sum_{c'\in S-\mathcal{Q}}\text{cost}(c')}\geq \frac{\varepsilon\text{opt}}{\text{cost}(\Lambda\cup S-\mathcal{Q})}\geq \frac{\varepsilon\text{opt}}{\text{cost}(\Lambda\cup S-S_0)}\geq \frac{\varepsilon}{{10}},\] where in the last inequality we used the fact that \(\text{cost}(\Lambda\cup S-S_0)\leq {10}\cdot\text{opt}\) by 18.
Altogether \(Pr[A_j|\overline{B}_j,A_{<j}]\geq \varepsilon/{20}\). Thus \(Pr[A_j|A_{<j}]\geq \varepsilon/{20}\). Chaining the obtained inequalities we obtain that all the events \(A_1,\ldots,A_{|S_0|+1}\) are simultaneously true with probability at least \((\varepsilon/{20})^{|S_0|+1}\). Notice that when the latter event happens, the corresponding \(\mathcal{Q}\) satisfies all the properties. Indeed, \(\mathcal{Q}\subseteq S_0\) and furthermore the event \(B_j\) must happen for some \(j\leq |S_0|+1\) (hence for the next iterations if any) since otherwise \(\mathcal{Q}\) would contain more than \(|S_0|\) elements.
Thus, the probability that the overall procedure fails is at most \((1-(\frac{\varepsilon}{{20}})^{|S_0|+1})^{({20}/\varepsilon)^{|S_0|+1}\ln n}\leq \frac{1}{n}\). ◻
While our algorithm tries all possible \(\mathcal{Q}\in \mathcal{L}_{\text{exp}}\), we focus on the execution path of a set \(\mathcal{Q}\) of centers satisfying the properties of 20, i.e.,
\(\mathcal{Q}\subseteq S_0\), and
the cost in the solution \(S - \mathcal{Q}\cup \Lambda\) of the clusters with centers in \(S_0 - \mathcal{Q}\) is at most \(\varepsilon\cdot \text{opt}\).
We define the solution \(S_{\mathcal{Q}} := S- \mathcal{Q}\cup \Lambda\) and for a center \(c\in S_{\mathcal{Q}}\) we let \(S_{\mathcal{Q}}(c)\) be the subset of clients closest to \(c\) (i.e., assigned to \(c\)) in the solution \(S_{\mathcal{Q}}\). The second property above allows us to consider each cluster \(S_{\mathcal{Q}}(c)\), \(c\in S_0 - \mathcal{Q}\), as contracted by paying a small extra cost of \(\varepsilon\cdot \text{opt}\). In particular, this allows us to give a “consistent” assignment \(\mu_O\) of clients in the mixed solutions. Here, consistent means that all clients in \(S_Q(c)\), for \(c\in S_0 - \mathcal{Q}\), are assigned to the same center in the mixed solutions where all of \(S_0\) is removed.
We modify how he clients are assigned in the solution \(M_O\) to obtain the assignment \(\mu_O\). For every \(c \in S_0 - \mathcal{Q}\), all the clients in \(S_{\mathcal{Q}}(c)\) are reassigned to the same center of \(M_O\) as follows. Let \(c_1\) be the cluster of \(\hat{\text{OPT}}\) that is the closest to \(c\) and let \(c_2\) be the center of \(M_O-\hat{\text{OPT}}= S - S_0\) that is the closest to \(c\). The clients of \(S_{\mathcal{Q}}(c)\) are all assigned to either \(c_1\) or \(c_2\):
If \(d^2(c,c_1) \le d^2(c,c_2)/5\), assign \(S_{\mathcal{Q}}(c)\) to \(c_1\); \(S_{\mathcal{Q}}(c)\) is called a type-1 cluster.
Otherwise (\(d^2(c,c_1) > d^2(c,c_2)/5\)), assign \(S_{\mathcal{Q}}(c)\) to \(c_2\); \(S_{\mathcal{Q}}(c)\) is called a type-2 cluster.
Let \(T_1\) be the set of clients in a type-1 cluster and \(T_2\) the set of clients in a type-2 cluster. The remaining clients in \(D^*_{\texttt{exp}}- (T_1 \cup T_2)\) are assigned to their closest centers in \(\hat{\text{OPT}}\), and the remaining clients in \((D- D^*_{\texttt{exp}})- (T_1 \cup T_2)\) are assigned to their closest centers in \(S- S_0\). Notice that, even neglecting the extra cost due to the consistent assignment, the above assignment of clients in \(T_2\) is suboptimal when \(d(c,c_2)>d(c,c_1)>d(c,c_2)/5\). The motivation for this reassignment is technical. More specifically, it will be used in Lemma 21 to have a better upper bound on the cost of clients in \(C^*\cap T_1\) for a non-expensive cluster \(C^*\) (case b2). This leads to a larger upper bound on the cost of clients in \(C^*\cap T_2\) for an expensive cluster \(C^*\) (case a3), which is however tolerable.
We further obtain an assignment \(\mu_D\) of clients in \(M_D\) by modifying \(\mu_O\) as follows: each client \(p\) with \(\mu_O(p) \in \hat{\text{OPT}}\) is assigned to the associated dummy center by \(\mu_D\). So for each client \(p\) we have \(\mu_D(p) = \mu_O(p)\) unless \(\mu_O(p)\in \hat{\text{OPT}}\) in which case \(\mu_D(p)\) equals the dummy center associated with \(\mu_O(p)\).
By the definition of type-1 and type-2 cluster, we can split the set of centers of \(S_0 - \mathcal{Q}\) into two groups \(\mathcal{R}\) and \(\mathcal{U}\). Let \(\mathcal{R}\) be the set of centers of \(S_0- \mathcal{Q}\) whose set of clients is completely assigned to a center of \(\hat{\text{OPT}}\) in the assignment \(\mu_O\), and let \(\mathcal{U}= S_0 - \mathcal{Q}- \mathcal{R}\) be the remaining ones that are assigned to centers in \(S- S_0\).
We end this section by analyzing the costs of the assignments \(\mu_O\) and \(\mu_D\). Recall that we use the notation \(\text{cost}(M_O,\mu_O)\) to denote the cost of \(M_O\) equipped with assignment \(\mu_O\) and, similarly \(\text{cost}(M_D, \mu_D)\) for the cost of \(M_D\) equipped with assignment \(\mu_D\). We say that the selection of \((W, \mathcal{B}, \mathcal{Q})\) is successful, if the sample \(W\) selected in 6.3 is successful, the set of balls \(\mathcal{B}\) from 6.4 is valid, and \(\mathcal{Q}\) selected in this section satisfies the properties of 20.
Lemma 21. If the selection of \((W, \mathcal{B}, \mathcal{Q})\) is successful, \[\text{cost}(M_O, \mu_O) + \text{cost}(M_D, \mu_D) \leq 10\cdot \text{opt}+ O(\sqrt{\varepsilon} \cdot \text{opt})\,.\]
Proof. Throughout the proof of the lemma, we will repeatedly upper bound \(d^2(p,\mu_D(p))\) in terms of \(d^2(p,\mu_O(p))\) using the following bounds:
Consider a client \(p\in S_{\mathcal{Q}}(c)\) with \(\mu_O(p) \neq \mu_D(p)\) and so \(\mu_O(p)\in \hat{\text{OPT}}\) is the center of an expensive cluster \(C^*\) of \(\text{OPT}\). Then
\(d^2(p, \mu_D(p)) \leq 3d^2(p, \mu_O(p)) + 6 ( \text{avg}_{C^*, \text{OPT}} + \varepsilon\gamma_{C^*})\), and
\(d^2(p,\mu_D(p)) \leq \frac{2}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q}) + 9(1+\sqrt{\varepsilon})d^2(c, \mu_O(p))\).
Proof of Claim [clm:costboundofMOandMDwithassignments]. Let \(\mu_O(p) = c^*\). By the assumption that \(\mathcal{B}\) is a valid set of balls, we have by 17 that there is a ball \(B(\ell, \sqrt{\rho}) \in \mathcal{B}\) such that \(c^* \in B(\ell, \sqrt{\rho})\) and \[\text{avg}_{C^*, \text{OPT}} \leq \rho \leq \text{avg}_{C^*, \text{OPT}} + \varepsilon\gamma_{C^*}\,.\] Thus, if we let \(\delta \in \Lambda\) be the dummy center associated with this ball (at a distance \(\sqrt{\rho}\) from \(\ell\)), then \(\mu_D(p) = \delta\) and, by 3 with \(\gamma=3\), \[d^2(p, \mu_D(p)) \leq 3 d^2(p, c^*) + 3 d^2(c^*, \ell) + 3 d^2(\ell, \delta) \leq 3 d^2(p, \mu_O(p)) + 6 ( \text{avg}_{C^*, \text{OPT}} + \varepsilon\gamma_{C^*})\,.\] For the second bound, one has: \[\begin{align} \notag d^2(p, \mu_D(p)) & \leq \frac{2}{\sqrt{\varepsilon}}d^2(p, c) + (1+\sqrt{\varepsilon})(d(c, c^*) + d(c^*, \ell) + d(\ell, \delta))^2 \\ \notag &\leq \frac{2}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q}) + 3(1+\sqrt{\varepsilon})(d^2(c, c^*) + 2( \text{avg}_{C^*, \text{OPT}} + \varepsilon\gamma_{C^*})) \\ &\leq \frac{2}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q}) + 9(1+\sqrt{\varepsilon}) d^2(c, c^*)\,. \label{eq:lastinequality} \end{align}\tag{22}\] In the first inequality above we used 3 with \(\gamma=1+\sqrt{\varepsilon}\) (hence \(\frac{\gamma}{\gamma-1}\leq \frac{2}{\sqrt{\varepsilon}}\)), in the second inequality above we used 3 with \(\gamma=3\), and the last inequality above follows from the fact that we must have \(d^2(c, c^*) > (1+\varepsilon) \text{avg}_{C^*, \text{OPT}} + \varepsilon\gamma_{C^*}\) since otherwise we would have the contradiction that \(c^*\in \hat{\text{OPT}}\) is covered by \(S\); recall that \(\hat{\text{OPT}}\) only contains expensive centers of \(\text{OPT}\). ◻
Having proven the above claim, we prove the lemma by distinguishing between expensive and non-expensive clusters \(C^*\) of \(\text{OPT}\).
Let \(c^*\in \hat{\text{OPT}}\) be the center of \(C^*\). Let \(p\in C^*\) be a client in \(C^*\) and let \(c\) be its closest center in \(S_\mathcal{Q}\), i.e., \(p\in S_\mathcal{Q}(c)\). We bound \(d^2(p, \mu_O(p)) + d^2(p, \mu_D(p))\) by considering three cases:
By definition, we have \(\mu_O(p)\) is the closest center in \(\hat{\text{OPT}}\). Moreover, \(\mu_O(p)\) equals the cluster center \(c^*\) of \(C^*\) since \(p\) is closest to \(c^*\) among all centers in \(\text{OPT}\supseteq \hat{\text{OPT}}\). Claim [clm:costboundofMOandMDwithassignments].1 together with 19 thus gives us, \[d^2(p,\mu_O(p)) + d^2(p, \mu_D(p)) \leq 4\text{OPT}_p + 6 ( \text{avg}_{C^*, \text{OPT}} + \varepsilon\gamma_{C^*})\,.\]
By definition of type-1 clusters, \(\mu_{O}(p) = c_1\) is the closest center in \(\hat{\text{OPT}}\) to \(c\). Now, by Claim [clm:costboundofMOandMDwithassignments].2, \[\begin{align} d^2(p, \mu_O(p)) + d^2(p, \mu_D(p)) & \leq d^2(p,\mu_O(p)) + \frac{2}{\sqrt{\varepsilon}} d^2(p, S_{\mathcal{Q}}) + 9(1+\sqrt{\varepsilon}) d^2(c, c_1) \\ & \leq \frac{2}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q})+(1+\sqrt{\varepsilon})d^2(c,c_1) + 9(1+\sqrt{\varepsilon}) d^2(c, c_1)\\ & \leq \frac{2}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q})+10(1+\sqrt{\varepsilon})(\frac{2}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q})+(1+\sqrt{\varepsilon})d^2(p,c_1))\\ & \leq \frac{23}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q})+(10+O(\sqrt{\varepsilon}))\text{OPT}_p\,. \end{align}\] where the second and third inequalities above uses 2 with \(\gamma=1+\sqrt{\varepsilon}\).
By the definition of type-2 clusters, \(\mu_O(p) = c_2\) is the closest center to \(c\) in \(S- S_0\), and \(d^2(c, c_2) \leq 5 d^2(c, \hat{\text{OPT}})\). So, by 2 with \(\gamma=1+\sqrt{\varepsilon}\), \(d^2(c, c_2) \leq 5(\frac{2}{\sqrt{\varepsilon}} d^2(c,p) + (1+\sqrt{\varepsilon})\text{OPT}_p)\) where we additionally used that \(d^2(p, \hat{\text{OPT}}) \leq \text{OPT}_p\) by 19. As \(\mu_O(p) = \mu_D(p)\) in this case, and using again 2 with \(\gamma=1+\sqrt{\varepsilon}\), \[\begin{align} {d^2}(p, \mu_O(p)) + d^2(p, \mu_D(p)) & = 2d^2(p,\mu_O(p)) \\ & \leq 2(\frac{2}{\sqrt{\varepsilon}}d^2(p, c) + (1+\sqrt{\varepsilon})d^2(c,c_2)) \\ & \leq 2(\frac{2}{\sqrt{\varepsilon}}d^2(p, c) + (1+\sqrt{\varepsilon})5(\frac{2}{\sqrt{\varepsilon}}d^2(c,p) + (1+\sqrt{\varepsilon})\text{OPT}_p)) \\ & \leq \frac{25}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q}) + (10+O(\sqrt{\varepsilon})) \text{OPT}_p\,. \end{align}\]
By the above bounds, we have that \[\begin{align} & \sum_{p\in C^*} (d^2(p, \mu_O(p)) + d^2(p, \mu_D(p)))\\ \leq & \sum_{p\in C^* - (T_1 \cup T_2)} \left(4\text{OPT}_p + 6(\text{avg}_{C^*, \text{OPT}} + \varepsilon\gamma_{C^*})\right) + \sum_{p\in C^*\cap (T_1 \cup T_2)}\left((10+O(\sqrt{\varepsilon}))\text{OPT}_p + \frac{25}{\sqrt{\varepsilon}} d^2(p, S_\mathcal{Q})\right)\,. \end{align}\] We complete the analysis of the expensive clusters by upper bounding the terms \(6\varepsilon\gamma_{C^*}\) and \(6\text{avg}_{C^*, \text{OPT}}\). By definition we have \(|C^* - (T_1 \cup T_2)| \cdot 6\varepsilon\gamma_{C^*}\leq 6\varepsilon\sum_{p\in C^*} (\text{OPT}_p + S_p)\). For the other term, we claim that \[6 |C^* - (T_1 \cup T_2)|\cdot \text{avg}_{C^*, \text{OPT}} \leq \sum_{p\in C^* - (T_1 \cup T_2)} 6\text{OPT}_p + 7\varepsilon\cdot \sum_{p\in C^*} \text{OPT}_p\,.\] This holds because there are at least \((1-\varepsilon)|C^*|\) clients in \(C^*\) such that \(\text{OPT}_p \geq \text{avg}_{C^*, \text{OPT}}\), which implies \[\begin{align} \sum_{p\in C^* - (T_1 \cup T_2)} 6\text{OPT}_p + 7\varepsilon\cdot \sum_{p\in C^*} \text{OPT}_p &\geq 6(|C^* - (T_1 \cup T_2)|-\varepsilon|C^*|)\cdot \text{avg}_{C^*, \text{OPT}} + 7\varepsilon(1-\varepsilon)|C^*|\cdot \text{avg}_{C^*, \text{OPT}} \\ & \geq 6 |C^*- (T_1 \cup T_2)|\cdot \text{avg}_{C^*, \text{OPT}}\,. \end{align}\] In summary, for an expensive cluster \(C^*\) we have that \[\begin{align} & \sum_{p\in C^*} (d^2(p, \mu_O(p)) + d^2(p, \mu_D(p)))\nonumber\\ \leq & \sum_{p\in C^* - (T_1 \cup T_2)} 10\text{OPT}_p + \sum_{p\in C^*\cap (T_1 \cup T_2)}(10\text{OPT}_p + \frac{25}{\sqrt{\varepsilon}} d^2(p, S_\mathcal{Q})) + O(\sqrt{\varepsilon})\sum_{p\in C^*} (\text{OPT}_p + S_p) \label{eq:expensive95cluster95bound} \end{align}\tag{23}\] .
We proceed with a similar analysis. Indeed, consider a client \(p\in C^*\) and let \(c\) be its closest center in \(S_\mathcal{Q}\), i.e., \(p\in S_\mathcal{Q}(c)\). We again bound \(d^2(p, \mu_O(p)) + d^2(p, \mu_D(p))\) by considering three cases:
By the definition of \(\mu_O\), we have that \(\mu_O(p)\) is the closest center in \(S - S_0\) to \(p\). So \(\mu_D(p) = \mu_O(p)\) and \(d^2(p,\mu_O(p)) + d^2(p, \mu_D(p)) \leq 2r(p)\), by 19.
By the definition of type-1 clusters, \(\mu_{O}(p) = c_1\) is the closest center in \(\hat{\text{OPT}}\) to \(c\). Now, by Claim [clm:costboundofMOandMDwithassignments].2 and 2 with \(\gamma=1+\sqrt{\varepsilon}\), \[\begin{align} d^2(p, \mu_O(p)) + d^2(p, \mu_D(p)) & \leq d^2(p,\mu_O(p)) + \frac{2}{\sqrt{\varepsilon}}d^2(p, S_{\mathcal{Q}}) + 9(1+\sqrt{\varepsilon}) d^2(c, c_1) \\ & \leq \frac{2}{\sqrt{\varepsilon}}d^2(p, S_{\mathcal{Q}})+(1+\sqrt{\varepsilon})d^2(c, c_1)+\frac{2}{\sqrt{\varepsilon}}d^2(p, S_{\mathcal{Q}}) + 9(1+\sqrt{\varepsilon}) d^2(c, c_1)\\ & \leq \frac{4}{\sqrt{\varepsilon}} d^2(p, S_\mathcal{Q}) + 10(1+\sqrt{\varepsilon}) d^2(c,c_1)\,. \end{align}\] We proceed by upper bounding \(d^2(c, c_1)\). Here we critically use the fact that, by the definition of \(T_1\), one has \(d^2(c, c_1) \leq d^2(c, c_2)/5\) where \(c_2\) is the closest center to \(c\) in \(S- S_0\). Let \(c_3\) be the closest center to \(p\) in \(S - S_0\). Then, using 2 with \(\gamma=1+\sqrt{\varepsilon}\), we obtain that \[d^2(c, c_1) \leq \frac{1}{5}d^2(c, c_2)\leq \frac{1}{5}d^2(c,c_3) \leq \frac{2}{5\sqrt{\varepsilon}}d^2(p,S_\mathcal{Q}) + \frac{1+\sqrt{\varepsilon}}{5}d^2(p, c_3).\] Moreover, we have \(d^2(p, c_3) = d^2(p, S- S_0)\leq r(p)\) by 19 and so \(d^2(c,c_1) \le \frac{1}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q}) + \frac{1+\sqrt{\varepsilon}}{5}r(p)\), which gives us the bound \[\begin{align} d^2(p, \mu_O(p)) + d^2(p, \mu_D(p)) \leq \frac{15}{\sqrt{\varepsilon}} d^2(p, S_\mathcal{Q}) + (2+O(\sqrt{\varepsilon})) r(p)\,. \end{align}\]
By the definition of type-2 clusters, \(\mu_O(p) = c_2\) is the closest center to \(c\) in \(S- S_0\), and so \(\mu_O(p) = \mu_D(p)\). Now by 19 and applying twice 2 with \(\gamma=1+\sqrt{\varepsilon}\), \[\begin{align} d^2(p, \mu_O(p)) & \leq \frac{2}{\sqrt{\varepsilon}}d^2(p,c) + (1+\sqrt{\varepsilon})d^2(c, c_2)\\ & \leq \frac{2}{\sqrt{\varepsilon}}d^2(p,c ) + (1+\sqrt{\varepsilon})\left(\frac{2}{\sqrt{\varepsilon}}d^2(p,c )+(1+\sqrt{\varepsilon})d^2(p,c_2)\right)\\ & \leq \frac{5}{\sqrt{\varepsilon}}d^2(p,c ) + (1+\sqrt{\varepsilon})^2 d^2(p, S- S_0)\\ & \leq \frac{5}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q}) + (1+O(\sqrt{\varepsilon}))r(p). \end{align}\] So we get the bound \[\begin{align} d^2(p,\mu_O(p)) + d^2(p, \mu_D(p)) {=2 d^2(p,\mu_O(p))}\leq \frac{10}{\sqrt{\varepsilon}}d^2(p, S_\mathcal{Q}) + (2+O(\sqrt{\varepsilon})) r(p)\,. \end{align}\]
Summing up the above bounds, yields \[\sum_{p\in C^*} (d^2(p, \mu_O(p)) + d^2(p, \mu_D(p))) \leq \sum_{p\in C^*} (2+O(\sqrt{\varepsilon})) r(p) + \sum_{p\in C^* \cap (T_1 \cup T_2)} \frac{15}{\sqrt{\varepsilon}} d^2(p, S_\mathcal{Q})\] for a non-expensive cluster \(C^*\) of \(\text{OPT}\). If we sum up the above inequality for all non-expensive clusters and the bound 23 for expensive clusters of \(\text{OPT}\) we thus get \[\text{cost}(M_O, \mu_O) + \text{cost}(M_D, \mu_D) \leq \sum_{p\in D^*_{\texttt{exp}}} 10 \text{OPT}_p + \sum_{p\in D- D^*_{\texttt{exp}}} (2+O(\sqrt{\varepsilon})) r(p) + O(\sqrt{\varepsilon} \cdot \text{opt})\,,\] where we used that \(\sum_{c \in S_0 - \mathcal{Q}} \sum_{p \in S_{\mathcal{Q}}(c)} d^2(p, S_\mathcal{Q}) = \sum_{p\in T_1 \cup T_2} d^2(p, S_\mathcal{Q}) \leq \varepsilon\cdot \text{opt}\) (20) and \(\text{cost}(S) \leq 25\text{opt}\) (11) to bound the error term \(O(\sqrt{\varepsilon} \cdot \text{opt})\).
The proof is now concluded by 16, which says that \(\sum_{p\in D- D^*_{\texttt{exp}}} r(p) \leq \sum_{p\in D- D^*_{\texttt{exp}}} 4\text{OPT}_p + O(\sqrt{\varepsilon} \cdot \text{opt})\) if the sample \(W\) is successful. ◻
At this stage we have defined a clustering \(S_{\mathcal{Q}} = S - \mathcal{Q}\cup \Lambda\), where \(\Lambda\) is the set of dummy centers. Recall that the mixed solution \(M_O\) equals \(S-S_0 \cup \hat{\text{OPT}}\). So \(S_\mathcal{Q}- \Lambda\) represents progress compared to \(S\) in that we have already removed a subset \(\mathcal{Q}\) of \(S_0\). Furthermore, with respect to the assignment of clients \(\mu_O\), we have that the remaining centers \(S_0 - Q\), which we want to remove, are divided into two sets \(\mathcal{R}\) and \(\mathcal{U}\). The clusters with centers in \(\mathcal{R}\) are completely assigned (by \(\mu_O\)) to centers in \(\hat{\text{OPT}}\), and every cluster with center in \(\mathcal{U}\) is completely assigned to a center in \(S - S_0\). The task of this section is to make further progress by guessing the centers in \(\mathcal{U}\) and their reassignment to centers in \(S- S_0\). This turns out to be a difficult task, and we will instead “approximately” guess a set \(\widetilde{\mathcal{U}}\) and reassignment \(\widetilde{\mu}\) of the clients of those clusters. Specifically, we will output a solution \(S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}} = S_{\mathcal{Q}} - \widetilde{\mathcal{U}}\) (obtained by removing \(\widetilde{\mathcal{U}}\) from \(S_{\mathcal{Q}}\)) and an assignment of clients \(\widetilde{\mu}\) to centers in \(S_\mathcal{Q}-\widetilde{\mathcal{U}}\). This is done through the following lemma. Recall that for \(c\in S_{\mathcal{Q}}\), \(S_{\mathcal{Q}}(c)\) is the set of clients assigned to \(c\) in \(S_\mathcal{Q}\), i.e., closest to \(c\) among all centers in \(S_\mathcal{Q}\).
Lemma 22. Given \(S\) and \(\mathcal{Q}\) as described above, there is a polynomial-time algorithm that produces a collection \(\mathcal{L}_{cheap}\) of subsets \(\widetilde{\mathcal{U}}\) of \(S-\mathcal{Q}\), and for each such \(\widetilde{\mathcal{U}}\) and assignment \(\widetilde{\mu}\) of clients to centers in \(S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}} = S_\mathcal{Q}-\widetilde{\mathcal{U}}\), such that at least one such pair \((\widetilde{\mathcal{U}},\widetilde{\mu})\) satisfies the following properties:
\(|\widetilde{\mathcal{U}}| = |\mathcal{U}|\).
\(\widetilde{\mathcal{U}}\cap \mathcal{R}= \emptyset\), i.e., \(\widetilde{\mathcal{U}}\) does not contain any center of \(S_0 - \mathcal{Q}\) whose set of clients is completely assigned to a center of \(\hat{\text{OPT}}\) in the assignment \(\mu_O\).
\(\widetilde{\mu}\) satisfies:
For every center \(c\in S_{\mathcal{Q}} - \widetilde{\mathcal{U}}\), we have \(\widetilde{\mu}(p)= c\) for every \(p\in S_{\mathcal{Q}}(c)\).
For a center \(c\in \widetilde{\mathcal{U}}\), the clients in \(S_\mathcal{Q}(c)\) are reassigned to a center \(c' \in S- \mathcal{Q}- \widetilde{\mathcal{U}}- \mathcal{R}\), i.e., \(\widetilde{\mu}(p) = c'\) for every \(p\in S_{\mathcal{Q}}(c)\).
The cost increase of the reassignment \(\widetilde{\mu}\) of clients previously assigned to \(\widetilde{\mathcal{U}}\) compared to that of the reassignment \(\mu_O\) of clients previously assigned to \(\mathcal{U}\) is bounded by \(O(\varepsilon\cdot \text{opt})\): \[\begin{gather} \sum_{c \in \mathcal{U}\cup \widetilde{\mathcal{U}}} \sum_{p\in S_\mathcal{Q}(c)} \left( d^2(p, \widetilde{\mu}(p)) - d^2(p, \mu_O(p)) \right) = O ({\sqrt{\varepsilon}} \cdot \text{opt})\,. \end{gather}\]
In words, the above properties of \(\widetilde{\mu}\) say that we maintain the assignment of clients whose closest center remains the same, and the clients associated to the removed centers \(\widetilde{\mathcal{U}}\) are reassigned to centers not in \(\mathcal{R}\) at no higher cost (up to \(O({\sqrt{\varepsilon}} \cdot \text{opt})\)) than the cost of the reassignment of \(\mathcal{U}\) in the modified solution \(M_O\).
Let \(\mathcal{X}\) be the centers in \(S-S_0\) to which the points \(p\in S_{\mathcal{Q}}(c)\) with \(c\in \mathcal{U}\) are assigned according to \(\mu_O\). Notice that \(|\mathcal{X}|\leq |\mathcal{U}|\) and \(\mathcal{X}\cap (\mathcal{Q}\cup \mathcal{U}\cup \mathcal{R})=\emptyset\). We assume that the values of \(|\mathcal{U}|\), \(|\mathcal{R}|\), and \(|\mathcal{X}|\) are known. This can be achieved by trying, for each such value, all the integers between \(0\) and \(|S_0|\leq \frac{\log n}{\varepsilon^3}\). Let \(\ell:=|\mathcal{U}|+|\mathcal{R}|+|\mathcal{X}|\leq 2|\mathcal{U}|+|\mathcal{R}|\leq 2|S_0 - \mathcal{Q}|\). Then we run the recursive procedure \(cheapRem()\) described in the box with input \((\mathcal{U}',\mathcal{R}',\mathcal{X}',\mathcal{N},\widetilde{\mathcal{U}})=(\emptyset,\emptyset,\emptyset,\emptyset,\emptyset)\). We assume that \(cheapRem()\) has access to the quantities \(S\), \(\mathcal{Q}\), \(|\mathcal{U}|\), \(|\mathcal{R}|\), \(|\mathcal{X}|\) and \(\ell\), as well as to a global variable \(\mathcal{L}_{cheap}\), which is initialized to \(\emptyset\). The intuition for the parameters is as follows. Intuitively \(\mathcal{U}'\), \(\mathcal{R}'\) and \(\mathcal{X}'\) are subsets of \(\mathcal{U}\), \(\mathcal{R}\) and \(\mathcal{X}\), resp., that we have already identified, while \(\widetilde{\mathcal{U}}\) is the current value of the set \(\widetilde{\mathcal{U}}\) under construction. Intuitively, \(\mathcal{N}\) are the centers to which the points \(p\in S_{\mathcal{Q}}(c)\) with \(c\in \widetilde{\mathcal{U}}\) are reassigned, namely \(\widetilde{\mu}(p)\in \mathcal{N}\). At the end of the root call, \(\mathcal{L}_{cheap}\) contains the desired collection of sets \(\widetilde{\mathcal{U}}\) as in 22. Whenever some \(\widetilde{\mathcal{U}}\) is added to \(\mathcal{L}_{cheap}\), we define a corresponding \(\widetilde{\mu}\) as follows: For each \(p\in S_{\mathcal{Q}}(c)\), \(\widetilde{\mu}(p)=c\) if \(c\in S_{\mathcal{Q}}-\widetilde{\mathcal{U}}\). Otherwise, i.e., if \(c\in \widetilde{\mathcal{U}}\), \(\widetilde{\mu}(p)=next(c)\in \mathcal{N}\), where \(next(c)\) is defined in the recursive call when \(c\) is added to \(\widetilde{\mathcal{U}}\).
Add \(\widetilde{\mathcal{U}}\) to \(\mathcal{L}_{cheap}\) and, for each \(c\in \widetilde{\mathcal{U}}\), set \(next(c)\) to the closest center to \(c\) in \(S-\mathcal{Q}-\widetilde{\mathcal{U}}-\widetilde{\mathcal{R}}\) halt Add \(\widetilde{\mathcal{U}}\) to \(\mathcal{L}_{cheap}\) and halt Let \(c\in S-\mathcal{Q}-\mathcal{R}'-\mathcal{X}'-\mathcal{N}-\widetilde{\mathcal{U}}\) minimize \(R(c):=\sum_{p\in S_{\mathcal{Q}}(c)}d^2(p,next(c))\), where \(next(c)\) is the closest center to \(c\) in \(S-\mathcal{Q}-\mathcal{U}'-\mathcal{R}'-\widetilde{\mathcal{U}}-\{c\}\). \(cheapRem(\mathcal{U}',\mathcal{R}',\mathcal{X}'\cup \{c\},\mathcal{N},\widetilde{\mathcal{U}})\) \(cheapRem(\mathcal{U}',\mathcal{R}'\cup \{c\},\mathcal{X}',\mathcal{N},\widetilde{\mathcal{U}})\) \(cheapRem(\mathcal{U}',\mathcal{R}',\mathcal{X}',\mathcal{N}\cup \{next(c)\},\widetilde{\mathcal{U}}\cup \{c\})\) \(cheapRem(\mathcal{U}',\mathcal{R}'\cup \{next(c)\},\mathcal{X}',\mathcal{N},\widetilde{\mathcal{U}})\) \(cheapRem(\mathcal{U}'\cup \{next(c)\},\mathcal{R}',\mathcal{X}',\mathcal{N},\widetilde{\mathcal{U}})\) \(cheapRem(\mathcal{U}',\mathcal{R}',\mathcal{X}',\mathcal{N}\cup \{next(c)\},\widetilde{\mathcal{U}}\cup \{c\})\)
Proof of 22. Consider the execution of the above procedure for the correct guess of the values \(|\mathcal{R}|\), \(|\mathcal{X}|\) and \(|\mathcal{U}|\). We remark that, when line [alg:cheapRem:selectc] is executed, the set \(S-\mathcal{Q}-\mathcal{R}'-\mathcal{X}'-\mathcal{N}-\widetilde{\mathcal{U}}\) is not empty (so that we can choose an appropriate \(c\)). Indeed, at each recursive call we add at most two elements to \(\mathcal{R}'\cup \mathcal{X}'\cup \mathcal{N}\cup \widetilde{\mathcal{U}}\) and the value of \(|\mathcal{U}'|+|\mathcal{R}'|+|\mathcal{X}'|+|\widetilde{\mathcal{U}}|\) grows by at least \(1\). The latter value cannot grow more than \(2|\mathcal{U}|+|\mathcal{R}|+|\mathcal{X}|\leq 2\ell\) times since at that point we would have necessarily \(|\widetilde{\mathcal{U}}|=|\mathcal{U}|\), which makes the condition of line [alg:cheapRem:termination] true. Since the condition of line [alg:cheapRem:fewCenters] cannot hold if line [alg:cheapRem:selectc] is executed at least once, we have that \(|S- \mathcal{Q}|> 4\ell\). Thus \(S-\mathcal{Q}\) contains sufficiently many elements to remove up to \(2\) elements for up to \(2\ell\) times.
Concerning the running time of the procedure, each recursive step involves a branching on at most \(4\) subproblems, and in each one of them the value of \(|\mathcal{U}'|+|\mathcal{R}'|+|\mathcal{X}'|+|\widetilde{\mathcal{U}}|\) grows by at least \(1\). Thus, by the same argument as before, the depth of the recursion is at most \(2\ell\). So the number of recursive calls is at most \(4^{2\ell}=n^{{1/\varepsilon^{O(1)}}}\), implying a polynomial running time.
It remains to show that at least one set \(\widetilde{\mathcal{U}}\in \mathcal{L}_{cheap}\) (with the associated \(\tilde{\mu}\)) at the end of the procedure satisfies the claim. If the condition of line [alg:cheapRem:fewCenters] holds, it must happen that in one of the executions of line [alg:cheapRem:optimalGuess] one has \(\widetilde{\mathcal{U}}=\mathcal{U}\) and \(\widetilde{\mathcal{R}}=\mathcal{R}\). In that case \(\widetilde{\mathcal{U}}\) and the corresponding \(\widetilde{\mu}\) trivially satisfy the claim. In particular we remark that for each \(p\in S_{\mathcal{Q}}(c)\) with \(c\in \widetilde{\mathcal{U}}=\mathcal{U}\), \(\widetilde{\mu}(p)=next(c)=\mu_{O}(p)\).
Otherwise, let us focus on the solution \(\widetilde{\mathcal{U}}\in \mathcal{L}_{cheap}\) which is generated by the following chain of recursive calls starting from the root call with \((\mathcal{U}',\mathcal{R}',\mathcal{X}',\mathcal{N},\widetilde{\mathcal{U}})=(\emptyset,\emptyset,\emptyset,\emptyset,\emptyset)\). Consider the current input parameters \((\mathcal{U}',\mathcal{R}',\mathcal{X}',\mathcal{N},\widetilde{\mathcal{U}})\) and let \(c\) be selected in line [alg:cheapRem:selectc]. During the process, we will maintain the following invariants: \[\label{inv:UpRpXp} \mathcal{U}'\subseteq \mathcal{U};\,\mathcal{R}'\subseteq \mathcal{R}; \mathcal{X}'\subseteq \mathcal{X}.\tag{24}\] \[\label{inv:N} \mathcal{N}\cap (\mathcal{U}\cup \mathcal{R})=\emptyset.\tag{25}\] \[\label{inv:tU} \widetilde{\mathcal{U}}\cap (\mathcal{X}\cup \mathcal{R}\cup \mathcal{N})=\emptyset.\tag{26}\] The root call satisfies the mentioned invariants trivially since \(\widetilde{\mathcal{U}}=\mathcal{U}'=\mathcal{R}'=\mathcal{X}'=\mathcal{N}=\emptyset\).
If \(c\in \mathcal{X}\), we continue with the recursive call of line [alg:cheapRem:discoveredX]. The invariants are maintained since \(\mathcal{X}'\cup\{c\}\subseteq \mathcal{X}\) and \(c\notin \widetilde{\mathcal{U}}\). Observe that this choice is excluded if \(c\in \mathcal{U}'\) or \(|\mathcal{X}'|=|\mathcal{X}|\), however by Invariant 24 the latter conditions cannot happen when \(c\in \mathcal{X}\).
Similarly, if \(c\in \mathcal{R}\), we continue with the recursive call of line [alg:cheapRem:discoveredR]. The invariants are maintained since \(\mathcal{R}'\cup\{c\}\subseteq \mathcal{R}\), \(c\notin \mathcal{N}\), and \(c\notin \widetilde{\mathcal{U}}\). Observe that this choice is excluded if \(c\in \mathcal{U}'\) or \(|\mathcal{R}'|=|\mathcal{R}|\), however by Invariant 24 the latter conditions cannot happen when \(c\in \mathcal{R}\).
Otherwise, namely if \(c\notin \mathcal{R}\cup \mathcal{X}\), if the condition of line [alg:cheapRem:easyAddtU] is true, we continue with the recursive call of the same line. Let us show that invariants are preserved. Suppose first that \(next(c)\in \mathcal{N}\). In this case the first two invariants are not affected, and the third one is maintained since \(c\notin \mathcal{N}\) (and by assumption \(c\notin \mathcal{R}\cup \mathcal{X}\)). Otherwise one has \(|\mathcal{U}'|+|\mathcal{R}'|=|\mathcal{U}|+|\mathcal{R}|\), which by Invariant 24 implies \(\mathcal{U}'=\mathcal{U}\) and \(\mathcal{R}'=\mathcal{R}\). Thus one has \(next(c)\notin \mathcal{U}\cup \mathcal{R}\) and \(c\notin \mathcal{R}\cup \mathcal{X}\cup \mathcal{N}\).
Otherwise, i.e., if the condition of line [alg:cheapRem:easyAddtU] is false, depending on whether \(next(c)\) belongs to \(\mathcal{R}\), \(\mathcal{U}\), or none of the previous cases, we continue with the recursive calls of lines [alg:cheapRem:guessNextR], [alg:cheapRem:guessNextU], and [alg:cheapRem:guessNextNotRU], resp. If \(next(c)\in \mathcal{R}\), the invariants are satisfied since \(\mathcal{R}'\cup \{c\}\subseteq \mathcal{R}\). Invariant 24 guarantees that in this case \(|\mathcal{R}'|<|\mathcal{R}|\) as required. Similarly, if \(next(c)\in \mathcal{U}\), the invariants are satisfied since \(\mathcal{U}'\cup \{c\}\subseteq \mathcal{U}\). Invariant 24 guarantees that in this case \(|\mathcal{U}'|<|\mathcal{U}|\) as required. The remaining case if that \(next(c)\notin \mathcal{R}\cup \mathcal{U}\). Invariant 25 is maintained since \(next(c)\notin \mathcal{R}\cup \mathcal{U}\). Invariant 26 is maintained since \(c\notin \mathcal{X}\cup \mathcal{R}\) by the assumptions of this case, \(c\notin \mathcal{N}\cup \{next(c)\}\) by construction, and \(\next{c}\notin \widetilde{\mathcal{U}}\) by construction.
Let us show that the final \(\tilde{U}\) obtained with the above procedure with the associated \(\tilde{\mu}\) satisfies the claim. Condition (1) is trivially satisfied. Invariant 26 directly implies property (2). We next focus on property (3). Property (a) is satisfied by definition. When a center \(c\) is added to \(\widetilde{\mathcal{U}}\), the respective \(c':=next(c)=\widetilde{\mu}(p)\) for all \(p\in S_{\mathcal{Q}}(c)\) is added to \(\mathcal{N}\) (if not already there). Invariant 25 guarantees that \(c'\notin \mathcal{R}\), while Invariant 26 guarantess that \(c'\notin \widetilde{\mathcal{U}}\). Property (b) follows.
It remains to prove property (c). Consider first any \(c\in \mathcal{U}\cap \widetilde{\mathcal{U}}\). We claim that for the corresponding \(p\in S_{\mathcal{Q}}(c)\) one has \(\tilde{\mu}(p)=\mu_O(p)\). Indeed, let \(c_1,c_2,\dots\) be the centers in \(S- \mathcal{Q}- \{c\}\) in non-decreasing order of distance from \(c\). Let also \(c_q\) be the first such center belonging to \(S- S_0\). In particular \(\mu_O(p)=c_q\). By construction all the centers \(c_1,\ldots,c_{q-1}\) must have been already added to \(\mathcal{U}'\cup \mathcal{R}'\) in previous recursive steps when \(c\) is added to \(\widetilde{\mathcal{U}}\). Furthermore, when the latter event happens either \(c_q\in \mathcal{N}\) already or \(c_q\) is added to \(\mathcal{N}\). In both cases one has that \(\tilde{\mu}(p)=c_q\) as desired. As a consequence \[\begin{align} \sum_{c\in \mathcal{U}\cap \widetilde{\mathcal{U}}}\sum_{p\in S_{ \mathcal{Q}}(c)}(d^2(p,\tilde{\mu}(p))-d^2(p,\mu_O(p)))=0.\label{lem:successcheapremove:eqn1} \end{align}\tag{27}\] Consider next any \(c\in \mathcal{U}- \widetilde{\mathcal{U}}\). For any \(p\in S_{\mathcal{Q}}(c)\) by construction one has \(\tilde{\mu}(p)=c\). Thus \[\begin{align} \sum_{c\in \mathcal{U}- \widetilde{\mathcal{U}}}\sum_{p\in S_{ \mathcal{Q}}(c)}(d^2(p,\tilde{\mu}(p))-d^2(p,\mu_O(p))) & \leq \sum_{c\in S_0- \mathcal{Q}}\sum_{p\in S_{ \mathcal{Q}}(c)}d^2(p,c) -\sum_{c\in \mathcal{U}- \widetilde{\mathcal{U}}}\sum_{p\in S_{ \mathcal{Q}}(c)}d^2(p,\mu_O(p)) \nonumber \\ & \leq O(\varepsilon) opt-\sum_{c\in \mathcal{U}- \widetilde{\mathcal{U}}}\sum_{p\in S_{ \mathcal{Q}}(c)}d^2(p,\mu_O(p)),\label{lem:successcheapremove:eqn2} \end{align}\tag{28}\] where in the last inequality above we used the assumption that \(\mathcal{Q}\) satisfies property (2) of 20, and the fact that \(\mathcal{U}- \widetilde{\mathcal{U}}\subseteq \mathcal{U}\subseteq S_0-\mathcal{Q}\).
Finally consider any \(c\in \widetilde{\mathcal{U}}- \mathcal{U}\). Define any bijection between each such \(c\) and some distinct \(c'\in \mathcal{U}- \widetilde{\mathcal{U}}\) (this is possible since \(|\widetilde{\mathcal{U}}|=|\mathcal{U}|\)). Consider the recursive call when \(c\) is added to \(\widetilde{\mathcal{U}}\). Let \(\mathcal{U}'\), \(\mathcal{R}'\), \(\mathcal{X}'\), \(\mathcal{N}\), \(next(c)\), \(R(c)\), \(next(c')\), \(R(c')\) be the associated quantities in that call. Notice that at that time \(c'\) was an available candidate to be added to \(\widetilde{\mathcal{U}}\) since \(c'\in S-\mathcal{Q}-\mathcal{R}-\mathcal{X}-\widetilde{\mathcal{U}}\subseteq S-\mathcal{Q}-\mathcal{R}'-\mathcal{X}'-\widetilde{\mathcal{U}}\) (using Invariant 24 ) and \(\mathcal{N}\cap \mathcal{U}=\emptyset\) by Invariant 25 , hence \(c'\in S-\mathcal{Q}-\mathcal{R}'-\mathcal{X}'-\mathcal{N}-\widetilde{\mathcal{U}}\). Since we added \(c\) instead of \(c'\), it must be the case that \(R(c)\leq R(c')\). For every \(p\in S_{\mathcal{Q}}(c')\), \(\mu_O(p)\in \mathcal{X}\), hence \(\mu_O(p)\notin \widetilde{\mathcal{U}}\) by Invariant 26 . It follows that \(\mu_O(p)\in S-\mathcal{Q}-\mathcal{U}- \mathcal{R}- \widetilde{\mathcal{U}}-\{c'\}\subseteq S-\mathcal{Q}-\mathcal{U}'- \mathcal{R}'- \widetilde{\mathcal{U}}-\{c'\}\), where we used again Invariant 24 . Thus \(d^2(c',next(c'))\leq d^2(c',\mu_O(p))\). Hence for every \(p\in S_{\mathcal{Q}}(c')\), using 2 with \(\gamma=1+\sqrt{\varepsilon}\) twice, \[\begin{align} d^2(p,next(c')) & \leq \frac{2}{\sqrt{\varepsilon}}d^2(p,c')+(1+\sqrt{\varepsilon})d^2(c',next(c')) \leq \frac{2}{\sqrt{\varepsilon}}d^2(p,c')+(1+\sqrt{\varepsilon})d^2(c',\mu_O(p))\\ & \leq \frac{4}{\sqrt{\varepsilon}}d^2(p,c')+(1+\sqrt{\varepsilon})^2d^2(p,\mu_O(p)). \end{align}\] Summarizing, \[\begin{align} & \sum_{c\in \widetilde{\mathcal{U}}- \mathcal{U}}\sum_{p\in S_{\mathcal{Q}}(c)}(d^2(p,\tilde{\mu}(p))-d^2(p,\mu_O(p))) \leq \sum_{c\in \widetilde{\mathcal{U}}- \mathcal{U}}\sum_{p\in S_{\mathcal{Q}}(c)}d^2(p,\tilde{\mu}(p))= \sum_{c\in \widetilde{\mathcal{U}}- \mathcal{U}}R(c)\leq \sum_{c'\in \mathcal{U}- \widetilde{\mathcal{U}}}R(c')\nonumber \\ & = \sum_{c'\in \mathcal{U}- \widetilde{\mathcal{U}}}\sum_{p\in S_{\mathcal{Q}}(c')}d^2(p,next(c')) \leq \sum_{c'\in \mathcal{U}- \widetilde{\mathcal{U}}}\sum_{p\in S_{\mathcal{Q}}(c')}(\frac{4}{\sqrt{\varepsilon}}d^2(p,c')+(1+\sqrt{\varepsilon})^2d^2(p,\mu_O(p)))\nonumber\\ & \leq O({\sqrt{\varepsilon}}) opt+ \sum_{c\in \mathcal{U}- \widetilde{\mathcal{U}}}\sum_{p\in S_{\mathcal{Q}}(c)}d^2(p,\mu_O(p)),\label{lem:successcheapremove:eqn3} \end{align}\tag{29}\] where in the last inequality above we used again the assumption on \(\mathcal{Q}\), i.e., property (2) of 20, and the fact that \(\sum_{c\in \mathcal{U}- \widetilde{\mathcal{U}}}\sum_{p\in S_{\mathcal{Q}}(c)}d^2(p,\mu_O(p))\leq \text{cost}(M_O, \mu_O)\leq 11\,\text{opt}\) by 21. Property (c) follows by summing 27 , 28 , and 29 . ◻
We let \((S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}}, \widetilde{\mu})\) be the output of a successful run of the \(cheapRem\) procedure, i.e., where \(\widetilde{\mathcal{U}}\in \mathcal{L}_{cheap}\) and its associated assignment \(\widetilde{\mu}\) satisfies the properties of 22. Recall that \(S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}}\) consists of the centers \(S' = S - \mathcal{Q}- \widetilde{\mathcal{U}}\) and the dummy centers \(\Lambda\). Further recall that \(M_O\) consists of centers \(S- S_0 = S - \mathcal{Q}- \mathcal{U}- \mathcal{R}\) and \(\hat{\text{OPT}}\). \(M_D\) is the same set of centers except that \(\hat{\text{OPT}}\) is replaced by \(\Lambda\). Notice that some centers of \(M_O\) and \(M_D\) are now removed if \(\widetilde{\mathcal{U}}- \mathcal{U}\neq \emptyset\). To take care of this, we modify these mixed solutions to obtain \(M'_O\) and \(M'_D\).
We first define \(M'_O\); the definition of \(M'_D\) is then very similar. The centers of \(M'_O\) are \(S- \mathcal{Q}- \widetilde{\mathcal{U}} - \mathcal{R}\) and \(\hat{\text{OPT}}\). Hence, the difference between \(M_O\) and \(M'_O\) is that in \(M_O\) we remove \(\mathcal{U}\) from \(S\) and in \(M'_O\) we remove \(\widetilde{\mathcal{U}}\). In other words, \(M'_O = M_O \cup \mathcal{U}- \widetilde{\mathcal{U}}\). Similarly, we let \(M'_D = M_D \cup \mathcal{U}- \widetilde{\mathcal{U}}\). We update the assignment \(\mu_O\) of \(M_O\) to an assignment \(\mu'_O\) of \(M'_O\) (and the assignment \(\mu_D\) to \(\mu'_D\)). Recall that \(\mu_O\) assigns each client \(p\) to its closest center in \(\hat{\text{OPT}}\) (if \(p\in D^*_{\texttt{exp}}\)) or its closest center in \(S- S_0\) (if \(p\in D- D^*_{\texttt{exp}}\)) except for those clients that belong to a cluster \(S_{\mathcal{Q}}(c)\) with \(c\in \mathcal{U}\cup \mathcal{R}\). Indeed, the clients in \(S_\mathcal{Q}(c)\) are all assigned to the center of \(\hat{\text{OPT}}\) that is closest to \(c\) if \(c\in \mathcal{R}\), and if \(c\in \mathcal{U}\) they are all assigned to the center in \(S - S_0\) that is closest to \(c\). We also recall that \(\mu_D\) is the same as \(\mu_O\) except when \(\mu_O(p) \in \hat{\text{OPT}}\) in which case \(\mu_O(p)\) is replaced by its corresponding dummy center.
For clients \(p\in S_{\mathcal{Q}}(c)\) with \(c \not\in \mathcal{U}\cup \widetilde{\mathcal{U}}\cup \Lambda\), we define \(\mu_O'(p) = \mu_O(p)\). For \(p\in S_{\mathcal{Q}}(c)\) with \(c\in \Lambda\), we let \(\mu'_O(p)\) be the closest center in \(\hat{\text{OPT}}\). Finally, for \(p\in S_{\mathcal{Q}}(c)\) with \(c\in \mathcal{U}\cup \widetilde{\mathcal{U}}\), we define \(\mu'_O(p) = \widetilde{\mu}(p)\).
The assignment \(\mu'_D\) is obtained in the same way from \(\mu_D\) with the difference that we use \(\Lambda\) instead of \(\hat{\text{OPT}}\): For clients \(p\in S_{\mathcal{Q}}(c)\) with \(c \not\in \mathcal{U}\cup \widetilde{\mathcal{U}}\cup \Lambda\), we define \(\mu_D'(p) = \mu_D(p)\). For \(p\in S_{\mathcal{Q}}(c)\) with \(c\in \Lambda\), we let \(\mu'_D(p)\) be the closest center in \(\Lambda\). Finally, for \(p\in S_{{\mathcal{Q}}}(c)\) with \(c\in \mathcal{U}\cup \widetilde{\mathcal{U}}\), we define \(\mu'_D(p) = \widetilde{\mu}(p)\).
This completes the definition of \(\mu'_O\) and \(\mu'_D\). We remark that we have \(\mu'_O(p) = \mu_O(p)\) and \(\mu'_D(p) = \mu_D(p)\) for all \(p\in S_\mathcal{Q}(c)\) with \(c\not \in \mathcal{U}\cup \widetilde{\mathcal{U}}\cup \Lambda\).
We continue by arguing that \(\mu'_O\) is well-defined, i.e., that \(\mu'_O(p) \in M_O'\) for every \(p\in D\) (the proof for \(\mu'_D\) is the same). This is immediate for a client \(p\in S_\mathcal{Q}(c)\) with \(c \in \Lambda\). For a client \(p\in S_{{\mathcal{Q}}}(c)\) with \(c\in \cal U \cup \widetilde{\mathcal{U}}\), it holds because, by 22, \(\widetilde{\mu}(p)\) equals \(c\in M'_O\) if \(c \in \mathcal{U}- \widetilde{\mathcal{U}}\) and otherwise \(\widetilde{\mu}(p) \in S- \mathcal{Q}- \widetilde{\mathcal{U}}- \mathcal{R}\subseteq M'_O\). It remains to verify that \(\mu_O(p) \in M_O'\) for a client \(p\in S_\mathcal{Q}(c)\) with \(c\not \in \mathcal{U}\cup \widetilde{\mathcal{U}}\cup \Lambda\). If \(c\in \mathcal{R}\), we have \(\mu_O(p) \in \hat{\text{OPT}}\subseteq M'_O\). Similarly, if \(c \not \in \mathcal{U}\cup \widetilde{\mathcal{U}}\cup \Lambda \cup \mathcal{R}\) and \(p\in D^*_{\texttt{exp}}\) we have \(\mu_O(p) \in \hat{\text{OPT}}\subseteq M'_O\). In the remaining case when \(c \not \in \mathcal{U}\cup \widetilde{\mathcal{U}}\cup \Lambda \cup \mathcal{R}\) and \(p\in D- D^*_{\texttt{exp}}\), \(\mu_O(p)\) equals \(p\)’s closest center in \(S- S_0\). As \(p\in S_\mathcal{Q}(c)\), we thus have \(\mu_O(p) = c \in S - (S_0 \cup \widetilde{\mathcal{U}}) \subseteq M'_O\).
The following upper bound on \(\text{cost}(M'_O, \mu'_O) + \text{cost}(M'_D, \mu'_D)\) is a fairly immediate consequence of the assumption that the cheap-removal process is successful (Property 3c of Lemma 22). Similarly to before, we say that the selection of \((W, \mathcal{B}, \mathcal{Q}, \widetilde{\mathcal{U}},\widetilde{\mu})\) is successful, if the sample \(W\) selected in 6.3 is successful, the set of balls \(\mathcal{B}\) from 6.4 is valid, \(\mathcal{Q}\) selected in 6.6 satisfies the properties of 20, and \(\widetilde{\mathcal{U}},\widetilde{\mu}\) selected in this section satisfies the properties of 22.
If \((W, \mathcal{B}, \mathcal{Q}, \widetilde{\mathcal{U}},\widetilde{\mu})\) is successful, \[\text{cost}(M'_O, \mu'_O) + \text{cost}(M'_D, \mu'_D) \leq \sum_{p\in D} {10} \text{OPT}_p + O({\sqrt{\varepsilon}} \cdot \text{opt})\,.\]
Proof. For \(x\in \{O, D\}\) the only differences between \(\mu'_x\) and \(\mu_x\) are clients in \(S_{\mathcal{Q}}(c)\) with \(c\in \Lambda\cup \mathcal{U}\cup \widetilde{\mathcal{U}}\). Consider first a client \(p \in S_{\mathcal{Q}}(c)\) with \(c \in \Lambda\). Then, as \(c\) is the closest center among \((S - \mathcal{Q}) \cup \Lambda\), which both contains \(M_O - \hat{\text{OPT}}\) and \(M'_O - \hat{\text{OPT}}\), we have that the closest center to \(p\) in both \(M'_O\) and \(M_O\) is in \(\hat{\text{OPT}}\) (because by the definition of dummy centers, \(d^2(p, \hat{\text{OPT}}) \leq d^2(p, \Lambda)\)). Similarly, the closest center to \(p\) in both \(M'_D\) and \(M_D\) is in \(\Lambda\). Hence, the definitions of \(\mu'_O\) and \(\mu'_D\) to assign \(p\) to its closest center in \(\hat{\text{OPT}}\) and \(\Lambda\), respectively, cannot increase the cost, i.e., \(d^2(p, \mu'_O(p)) \leq d^2(p, \mu_O(p))\) and \(d^2(p, \mu'_D(p)) \leq d^2(p, \mu_D(p))\) for such a client \(p\).
Finally, for those clients \(p\in S_\mathcal{Q}(c)\) with \(c\in\mathcal{U}\cup \widetilde{\mathcal{U}}\) we have \(\mu'_x = \widetilde{\mu}\) by definition and \(d^2(p, \mu_O(p)) \leq d^2(p, \mu_D(p))\) since \(\mu_O(p) = \mu_D(p)\) unless \(\mu_O(p)\in \hat{\text{OPT}}\) in which case \(\mu_D(p)\) is the dummy center associated with \(\mu_O(p)\) that can only be farther away from \(p\) than \(\mu_O(p)\). Hence \[\begin{gather} \sum_{c \in \mathcal{U}\cup \widetilde{\mathcal{U}}} \sum_{p\in S_\mathcal{Q}(c)} \left( d^2(p, \widetilde{\mu}(p)) - d^2(p, \mu_D(p)) \right) \leq \sum_{c \in \mathcal{U}\cup \widetilde{\mathcal{U}}} \sum_{p\in S_\mathcal{Q}(c)} \left( d^2(p, \widetilde{\mu}(p)) - d^2(p, \mu_O(p)) \right) = O (\sqrt{\varepsilon} \cdot {\text{opt}})\,, \end{gather}\] where in the equality we used Property (c) of 22). The claim follows since \[\text{cost}(M'_O, \mu'_O) + \text{cost}(M'_D, \mu'_D)\leq \text{cost}(M_O, \mu_O) + \text{cost}(M_D, \mu_D) +O(\sqrt{\varepsilon}\cdot \text{opt}) \overset{Lem. \ref{lemma:costboundofMOandMDwithassignments}}\leq 10 \text{OPT}_p + O(\sqrt{\varepsilon} \cdot \text{opt})\,.\] ◻
To better understand \(\text{cost}(M'_O, \mu'_O)\), let us consider the cost \(d(p, \mu'_O(p))\) of a single client \(p\):
If \(p \in S_{\mathcal{Q}}(c)\) with \(c\not\in \widetilde{\mathcal{U}}\cup \mathcal{R}\) then \(\widetilde{\mu}(p) = c\) by Property 3a of 22. Moreover, \(\mu'_O(p)\) assigns \(p\) either to a center in \(\hat{\text{OPT}}\) or to one in \(S - \mathcal{Q}- \widetilde{\mathcal{U}}- \cal R\) and we have \(d^2(p, c) \leq d^2(p, S - \mathcal{Q}- \widetilde{\mathcal{U}}- \cal R)\). Hence, in either case, we have \[d^2(p, \mu'_O(p)) \geq d^2(p, \{\widetilde{\mu}(p)\} \cup \hat{\text{OPT}}) = d^2(p, \{\widetilde{\mu}(p)\} \cup \hat{\text{OPT}}\cup \Lambda) \,.\]
If \(p\in S_{\mathcal{Q}}(c)\) with \(c\in \mathcal{R}\) then \(\mu'_O(p) = \mu_O(p) = c^*\in \hat{\text{OPT}}\) where \(c^*\) is the center of \(\hat{\text{OPT}}\) that is closest to \(c\). So \[d^2(p, \mu_O'(p)) = d^2(p, c^*)\,.\]
If \(p \in S_{\mathcal{Q}}(c)\) with \(c\in \widetilde{\mathcal{U}}\) then \(\mu'_O(p) = \widetilde{\mu}(p)\) and so \[d^2(p, \mu_O'(p)) \geq d^2(p, \{\widetilde{\mu}(p)\} \cup \hat{\text{OPT}}\cup \Lambda).\]
Similarly, we can analyze \(d^2(p, \mu_D(p))\) by replacing \(\hat{\text{OPT}}\) with the set \(\Lambda\) of dummy centers (and \(c^*\) by its associated dummy center). Summarizing, we have \[\begin{align} \text{cost}(M'_O, \mu'_O) &\geq \sum_{c\in S_{\mathcal{Q}} - \mathcal{R}}\sum_{p\in S_{\mathcal{Q}}(c)} d^2\left(p, \{c\} \cup \hat{\text{OPT}}\cup \Lambda\right) + \sum_{c\in \mathcal{R}} \min_{c' \in \hat{\text{OPT}}} \sum_{p\in S_{\mathcal{Q}}(c)} d^2\left(p, c' \right)\\ \intertext{and} \text{cost}(M'_D, \mu'_D) &\geq \sum_{c\in S_{\mathcal{Q}} - \mathcal{R}}\sum_{p\in S_{\mathcal{Q}}(c)} d^2\left(p, \{c\} \cup \Lambda\right) + \sum_{c\in \mathcal{R}} \min_{c'\in \Lambda}\sum_{p\in S_{\mathcal{Q}}(c)} d^2\left(p, c'\right) \end{align}\]
Furthermore, by Properties 3a and 3b of 22, we have that, for every \(c\in \mathcal{R}\), the set \(S_{\mathcal{Q}}(c)\) of clients assigned to \(c\) in \(S_{\mathcal{Q}}\) equals the set \(\widetilde{\mu}^{-1}(c)\) of clients assigned by \(\widetilde{\mu}\). So, if we let \(\{C_c\}_{c\in S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}}}\) be the partitioning of the set \(D\) of clients according to \(\widetilde{\mu}\), i.e., \(C_c = \{p\in D\mid \widetilde{\mu}(p) =c\}\), we can thus rewrite the above bounds on the cost as \[\begin{align} \text{cost}(M'_O, \mu'_O) &\geq \sum_{c\not \in \mathcal{R}}\sum_{p\in C_c} d^2\left(p, \{c\} \cup \hat{\text{OPT}}\cup \Lambda\right) + \sum_{c\in \mathcal{R}}\min_{c' \in \hat{\text{OPT}}}\sum_{p\in C_c} d^2\left(p, c'\right) \tag{30}\\ \intertext{and} \text{cost}(M'_D, \mu'_D) &\geq \sum_{c \not\in \mathcal{R}}\sum_{p\in C_c} d^2\left(p, \{c\} \cup \Lambda\right) + \sum_{c\in \mathcal{R}}\min_{c' \in \Lambda}\sum_{p\in C_c} d^2\left(p, c'\right)\,.\tag{31} \end{align}\] In the next section, we use these bounds to give a polynomial-time algorithm that outputs a solution \(S^*\) with \(k\) centers so that (see 23) \[\begin{align} \text{cost}(S^*) \leq \frac{(1+{6\sqrt{\varepsilon}})}{2} \left( \text{cost}(M'_O, \mu'_O) + \text{cost}(M'_D, \mu'_D) \right) + O({\sqrt{\varepsilon}}\cdot \text{opt}) \leq \sum_{p\in D} {5} \text{OPT}_p + O({\sqrt{\varepsilon}} \cdot \text{opt}) \end{align}\] where the second inequality is by [claim:Mprimebounds]. So the proof of 23 in the next subsection is the final step in the proof of [thm:mainadditivecenters] (see also 6.11 where we put everything together to prove [thm:mainadditivecenters]).
In this section, we give a polynomial-time algorithm for finding the solution \(S^*\) by reducing the problem to maximizing a submodular function subject to a partition matroid constraint. Specifically, we prove the following lemma:
Lemma 23. We can in polynomial-time find a clustering \(S^*\) with \(k\) centers of cost at most \[\frac{(1+{6\sqrt{\varepsilon}})}{2} \left( \text{cost}(M'_O, \mu'_O) + \text{cost}(M'_D, \mu'_D) \right) + O({\sqrt{\varepsilon}}\cdot \text{opt})\,.\]
Recall that at this point the algorithm calculated the local search solution \(S\), sampled \(W\), guessed \(\mathcal{B}\), \(\mathcal{Q}\), and \(\widetilde{\mathcal{U}}\) with the assignment \(\widetilde{\mu}\) of the clustering \(S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}}\). We assume that all these choices were successful guesses, i.e., that \((W, \mathcal{B}, \mathcal{Q}, \widetilde{\mathcal{U}}, \widetilde{\mu})\) is successful. Further recall the notation that we partition the clients into the clusters \(\{C_c\}_{c\in S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}}}\) where \(C_c = \{ p\in D: \widetilde{\mu}(p) =c\}\).
Our goal is to give a polynomial-time algorithm that finds approximations of the sets \(\hat{\text{OPT}}\) and \(\mathcal{R}\) that only have slightly worse cost. We start by defining the feasible set of candidates for \(\hat{\text{OPT}}\) as a partition matroid. Recall that \(\hat{\text{OPT}}\) contains one center from each ball in \(\mathcal{B}\).
We define the partition matroid that captures the constraint that we wish to open a center in each ball in \(\mathcal{B}\). Let \(F_\mathcal{B}\) be the (multi) subset of facility/center locations containing \(B\cap F\) for each ball \(B\in \mathcal{B}\). If a center \(c\) is in multiple balls in \(\mathcal{B}\), then \(F_\mathcal{B}\) contains one distinct copy of \(c\) for each ball. We let \(F_{\mathcal{B}}(B) \subseteq F_\mathcal{B}\) denote the centers associated with \(B\in \mathcal{B}\). These sets satisfy the following two properties:
The sets \(F_{\mathcal{B}}(B)\) partition \(F_\mathcal{B}\).
For \(B \in \mathcal{B}\), \(F_{\mathcal{B}}(B)\) contains (a copy of) every center in \(F\cap B\).
The first property holds since we took a unique copy of each center for each ball, and they are thus disjoint: \(F_\mathcal{B}(B) \cap F_\mathcal{B}(B') = \emptyset\) for distinct \(B,B' \in \mathcal{B}\). Indeed, while it is not better for the cost to open multiple copies of a center, we make the copies to ensure the above two properties. This allows us to define the partition matroid \(\mathcal{M}_\mathcal{B}= (F_\mathcal{B}, \mathcal{I})\) where \[\mathcal{I}= \{X \subseteq F_\mathcal{B}: |X\cap F_\mathcal{B}(B)| \leq 1for everyB\in \mathcal{B}\}\,.\] Moreover, since there is exactly one ball in \(\mathcal{B}\) for each center in \(\hat{\text{OPT}}\), we have \(\hat{\text{OPT}}\in \mathcal{I}\) (where we slightly abuse notation as we should take the copy of center \(c^*\in \hat{\text{OPT}}\) that belongs to its associated ball).
Our goal is now to define a submodular function \(f\) so that we obtain a good approximation to \(\hat{\text{OPT}}\) by maximizing \(f\) over the matroid constraint \(\mathcal{M}_\mathcal{B}\). In particular, the domain of \(f\) is every subset of \(F_\mathcal{B}\). However, we need some additional steps before defining \(f\). In particular, we introduce the concept of the core of a cluster \(C_c\) and the notions of concentrated and hit clusters, which allow us to simplify the structure of centers in \(\mathcal{R}\). For a cluster \(C_c\), we define the core of \(C_c\) as \[\begin{gather} C^{\text{core}}_c = \left\{p \in C_c: d^2(p, c) \leq \varepsilon\cdot \frac{\text{cost}(S)}{|\mathcal{R}|\cdot |C_c|}\right\}\,. \end{gather}\] We further say that cluster \(C_c\) is concentrated if \[\begin{gather} |C^{\text{core}}_c| \geq (1-\varepsilon) |C_c| \end{gather}\] and it is hit by a set \(X\) of centers if there is a point \(p \in C^{\text{core}}_c\) such that \[\begin{gather} d^2(p, X) < d^2(p,c)\,. \end{gather}\] For shortness we will sometimes say that a center is concentrated (resp., hit), if the corresponding cluster is so.
We further simplify the task of finding the set of centers \(\mathcal{R}\) by guessing the centers of \(\mathcal{R}\) that are not concentrated. Specifically, partition the set \(\mathcal{R}\) into \(\mathcal{R}_0\) and \(\mathcal{R}_1\), where \(\mathcal{R}_1\) contains those centers of \(\mathcal{R}\) that are concentrated and \(\mathcal{R}_0\) contains those that are not. We can correctly guess \(\mathcal{R}_0\) in polynomial time since the following simple claim shows that it is a subset of the centers whose cluster costs at least \(\varepsilon^2 \cdot \text{opt}/|\mathcal{R}|\), of which there are only \(O(|\mathcal{R}|/\varepsilon^2)\) many, and so guessing \(\mathcal{R}_0\) can thus be done in time \(2^{O(|\mathcal{R}|/\varepsilon^2)}\).
Suppose that \(C_c\) is not concentrated. Then the cost of \(C_c\) is at least \(\varepsilon^2 \cdot \text{opt}/|\mathcal{R}|\).
Proof. Since \(C_c\) is not concentrated we have \(|C_c - C^{\text{core}}_c| \geq \varepsilon|C_c|\). Moreover, each point \(p\in C_c - C^{\text{core}}_c\) has \(d^2(p,c) > \varepsilon\frac{\text{cost}(S)}{|\mathcal{R}| \cdot |C_c|}\) by definition. Hence, as \(\text{cost}(S) \geq \text{opt}\), \[\sum_{p\in C_c} d^2(p,c) \geq \sum_{p\in C_c - C^{\text{core}}_c} d^2(p,c) \geq |C_c- C^{\text{core}}_c|\cdot \varepsilon\frac{\text{opt}}{|\mathcal{R}| \cdot |C_c|} \geq \varepsilon^2 \frac{\text{opt}}{|\mathcal{R}|}\,.\] ◻
Now let \(\mathcal{P}\) be the potential centers that can be in \(\mathcal{R}\). Specifically, we let \(\mathcal{P}\) be the set that contains a center \(c\) in \(S -\mathcal{Q}- \widetilde{\mathcal{U}}\) if \(C_c\) equals the set of clients in \(S_{\mathcal{Q}}(c)\), where we recall that \(S_{\mathcal{Q}}(c)\) is the set of clients that are closest to \(c\) in the clustering \(S_{\mathcal{Q}}\). Notice that the algorithm has all the information \(S, \mathcal{B}, \mathcal{Q}, \widetilde{\mathcal{U}}\) and \(\widetilde{\mu}\) to calculate \(\mathcal{P}\). Furthermore, by 22, we have that no clients from \(\widetilde{\mathcal{U}}\) were reassigned by \(\widetilde{\mu}\) to a center in \(\mathcal{R}\). So for \(c\in \mathcal{R}\) we have \(C_c = S_{\mathcal{Q}}(c)\). Hence, \(\cal R \subseteq \mathcal{P}\) and we can guess \(\mathcal{R}_0\) as follows:
Let \(\mathcal{C}\) be the clusters of \(\mathcal{P}\) whose cost is at least \(\varepsilon^2 \cdot \text{opt}/|\mathcal{R}|\).
Output each subset of \(\mathcal{C}\).
By the above claim and the definition of \(\mathcal{P}\), one of the outputs is \(\mathcal{R}_0\). Furthermore, the above guessing procedure outputs a family of polynomial many subsets. Indeed, we have \(|\mathcal{R}| \leq \log(n)/\varepsilon^3\) by 12. Moreover, the total cost of the clusters in \(\mathcal{P}\) is \(O({\text{opt}})\). To see this notice that the clusters corresponding to \(\mathcal{P}\) is a subset of the clusters of \(S_{\mathcal{Q}}\) and the cost of \(S_{\mathcal{Q}}\) is at most \(\text{cost}(S - S_0 \cup \Lambda)\) (since \(S_{\mathcal{Q}}\supseteq S- S_0 \cup \Lambda\)), which has cost at most \(O(\text{opt})\) by [lemma:S0properties]. This implies that \(|\mathcal{C}| = O(\log(n)/\varepsilon^5)\), so the total number of subsets is \(n^{\varepsilon^{-O(1)}}\). The algorithm proceeds by trying all possible subsets in the output, and we analyze the algorithm when it takes the correct guess of \(\mathcal{R}_0\).
We first define another function \(g\) on the same domain as \(f\), i.e., on all subsets \(X\) of \(F_\mathcal{B}\). We will then define \(f\) by \(f(X) = g(\emptyset) - g(X)\). Let the closed cost of a cluster \(C_c\) be defined as \[\text{closedcost}_c(X) := \begin{cases} \sum_{p\in C_c} d^2(p, \{c\} \cup X \cup \Lambda) & if C_c is hit by X, \\ \min_{c'\in X \cup \Lambda} \sum_{p\in C^{\text{core}}_c} d^2(p, c') + \sum_{p\in C_c - C^{\text{core}}_c} d^2(p, \{c\} \cup X \cup \Lambda) & otherwise. \end{cases}\] Further, let \(\mathcal{P}_1\) be the potential centers for \(\mathcal{R}_1\): it contains each center \(c\in \mathcal{P}- \mathcal{R}_0\) so that \(c\) is concentrated, i.e., \(|C^{\text{core}}_c| \geq (1-\varepsilon) |C_c|\). We remark that the algorithm can calculate this set \(\mathcal{P}_1\) as it only depends on \(\mathcal{P}\), the guessed set \(\mathcal{R}_0\), the value \(\text{cost}(S)\), and the clusters \(C_c\) defined by \(\widetilde{\mu}\). Moreover, by definition, we have \(\mathcal{R}_1 \subseteq \mathcal{P}_1\). For a subset \(X \subseteq F_\mathcal{B}\), we then then define \(g(X)\) to be the minimum value of \[\begin{gather} \sum_{c \not \in \mathcal{R}_0 \cup \mathcal{R}'_1}\sum_{p\in C_c} d^2\left(p, \{c\} \cup X \cup \Lambda\right) + \sum_{c\in \mathcal{R}_0} \sum_{p\in C_c} d^2(p, X \cup \Lambda) + \sum_{c\in \mathcal{R}'_1} \text{closedcost}_c(X) \end{gather}\] over all subsets \(\mathcal{R}'_1 \subseteq \mathcal{P}_1\) with \(|\mathcal{R}_1'| = |\mathcal{R}_1| = |\mathcal{R}| - |\mathcal{R}_0|\). In words, over the best \(\mathcal{R}_1'\), \(g(X)\) is the cost of the solution obtained by removing the centers \(\mathcal{R}_0 \cup \mathcal{R}_1'\) and assigning clients as follows:
If \(p\in C_c\) for a remaining center \(c \not\in \mathcal{R}_0 \cup \mathcal{R}_1'\) or \(p \not \in C^{\text{core}}_c\) with \(c\in \mathcal{R}'_1\), \(p\) is assigned to its closest center in \(\{c\} \cup X \cup \Lambda\).
If \(p \in C_c\) for a removed center \(c\in \mathcal{R}_0\), \(p\) is assigned to its closest center in \(X \cup \Lambda\).
If \(p \in C^{\text{core}}_c\) for a removed center \(c\in \mathcal{R}'_1\), \(p\) is assigned to its closest center in \(\{c\} \cup X \cup \Lambda\) if \(X\) hits \(C_c\), and otherwise all clients in \(C^{\text{core}}_c\) are assigned to the same center \(c'\in X \cup \Lambda\) that minimizes the cost.
We remark that this assignment is infeasible in the sense that it may assign clients to removed centers in \(\mathcal{R}_1\). Nevertheless, we relate the values of \(g(\emptyset)\) and \(g(\hat{\text{OPT}})\) to \(\text{cost}(M'_D, \mu'_D)\) and \(\text{cost}(M'_O, \mu'_O)\), respectively; and, we show that given an \(X \subseteq F_\mathcal{B}\) that is independent in \(M_\mathcal{B}\), i.e., \(X\in \mathcal{I}\), we can in polynomial-time output \(k\) centers \(S^*\) whose cost is at most \((1+{6\sqrt{\varepsilon}})g(X) + {O(\sqrt{\varepsilon}}) \text{opt}\). Finally, the definition of \(g\) allows us to prove that \(f\) (defined by \(f(X) = g(\emptyset) - g(X)\)) is a non-negative monotone submodular function.
Lemma 24. We have that \(g\) and \(f\) satisfy the following properties:
We can evaluate \(g(X)\) in polynomial time for every given \(X \subseteq F_\mathcal{B}\), and we can thus evaluate \(f(X)\) in polynomial time.
\(f\) is a non-negative monotone submodular function.
The value \(g(\emptyset)\) is at most \(\text{cost}(M'_D, \mu'_D)\).
The value \(g(\hat{\text{OPT}})\) is at most \(\text{cost}(M'_O, \mu'_O)\).
Given an \(X \subseteq F_\mathcal{B}\) that is independent in \(M_\mathcal{B}\), i.e., \(X\in \mathcal{I}\), we can in polynomial-time output \(k\) centers \(S^*\) whose associated cost is at most \((1+{6\sqrt{\varepsilon}}) g(X) + {O(\sqrt{\varepsilon})} \text{opt}\).
We give the proof of the lemma in the next subsection. We explain here how it implies 23.
Proof of 23. By the first property of 24, we can evaluate \(f\) in polynomial time. Moreover, it is easy to see that we can answer independence queries in polynomial time for any partition matroid, particularly for \(\mathcal{M}_\mathcal{B}\). We can thus apply 5 on \(f\) and \(\mathcal{M}_\mathcal{B}\) with \(\zeta = (1-1/e - 1/2)\) to find a solution \(X \in \mathcal{I}\) such that7 \[\begin{gather} g(\emptyset) - g(X) = f(X) \geq (1-1/e - \zeta)f(\hat{\text{OPT}}) = (1-1/e - \zeta)( g(\emptyset) - g(\hat{\text{OPT}})) = \frac{1}{2} ( g(\emptyset) - g(\hat{\text{OPT}}))\,, \end{gather}\] where we used that \(\hat{\text{OPT}}\) is one feasible solution, i.e., \(\hat{\text{OPT}}\in \mathcal{I}\). This in turn implies that \[\frac{1}{2} \left(g(\hat{\text{OPT}}) + g(\emptyset) \right) \geq g(X)\,.\]
Using the upper bounds on \(g(\emptyset)\) and \(g(\hat{\text{OPT}})\) of the above lemma we thus have found a set \(X\) such that \[\begin{gather} \frac{1}{2} (\text{cost}(M'_O, \mu'_O) + \text{cost}(M'_D, \mu'_D)) \geq g(X)\,. \end{gather}\] Now using the last property of the above lemma we can output a solution \(S^*\) whose cost is at most \[\begin{gather} \frac{(1+{6\sqrt{\varepsilon}})}{2} \left( \text{cost}(M'_O, \mu'_O) + \text{cost}(M'_D, \mu'_D) \right) + O({\sqrt{\varepsilon}}\cdot \text{opt})\,. \end{gather}\] as required.
Finally, each of the above steps runs in polynomial time: the algorithm of 5 is polynomial time, and the last property of 24 used to obtain \(S^*\) is polynomial-time. Moreover, the number of guesses of \(\mathcal{R}_0\) is at most \(n^{\varepsilon^{-O(1)}}\), as argued after the description of that procedure. So we can, in polynomial time, try all possibilities and, among all solutions found (one for each guess of \(\mathcal{R}_0\)), return one that minimizes the cost and, in particular, has cost at most that of \(S^*\) (which was analyzed assuming the guess of \(\mathcal{R}_0\) was correct). We thus have a polynomial time algorithm that returns a solution that satisfies the guarantee of the lemma. ◻
Given \(X \subseteq F_{\mathcal{B}}\), we argue that we can evaluate \(g(X)\) in polynomial time. For a center \(c \in \mathcal{P}_1\), define \[\text{cost-inc}_c(X) = \text{closedcost}_c(X) - \sum_{p\in C_c} d^2(p, \{c\} \cup X \cup \Lambda)\,.\] In other words, using that \(d^2(p,c ) \leq d^2(p, X)\) for \(p\in C^{\text{core}}_c\) if \(C_c\) is not hit by \(X\), \[\begin{align} \text{cost-inc}_c(X) = \begin{cases} 0 & if C_c is hit by X, \\ \min_{c'\in X \cup \Lambda} \sum_{p\in C^{\text{core}}_c} (d^2(p, c') - d^2(p,\{c\} \cup \Lambda)) & otherwise. \end{cases} \label{eq:increase} \end{align}\tag{32}\] We remark that \(\text{cost-inc}_c(X)\geq 0\) by definition. Let \(D_0\) denote the clients belonging to clusters \(C_c\) with \(c\in \mathcal{R}_0\). With this notation, \(g(X)\) is the minimum value \[\begin{align} \sum_{p\in D- D_0} d^2(p, \{\widetilde{\mu}(p)\} \cup X \cup \Lambda) + \sum_{p\in D_0} d^2(p, X \cup \Lambda) + \sum_{c \in \mathcal{R}'_1} \text{cost-inc}_c(X) \label{eq:nicedefofg} \end{align}\tag{33}\] over all subsets \(\mathcal{R}'_1 \subseteq \mathcal{P}_1\) with \(|\mathcal{R}'_1| = |\mathcal{R}_1|\). We further have that the value of \(\text{cost-inc}_c(X)\) for \(c\in \mathcal{R}'_1\) is independent of other centers in \(\mathcal{R}'_1\). We can thus obtain the best choice of \(\mathcal{R}'_1\) by evaluating \(\text{cost-inc}_c(X)\) for every \(c\in \mathcal{P}_1\) and choose the \(|\mathcal{R}_1|\) ones of smallest value. Notice that the algorithm knows \(|\mathcal{R}_1|\) since it equals \(|S_0| - |\mathcal{Q}| - |\widetilde{\mathcal{U}}| - |\mathcal{R}_0| =|\mathcal{B}| - |\mathcal{Q}| - |\widetilde{\mathcal{U}}| - |\mathcal{R}_0|\). After we have obtained \(\mathcal{R}'_1\) in polynomial time, we can evaluate \(g(X)\) in polynomial time by simply calculating the sum.
In the proof of this property it will be convenient to use definition 33 of \(g\). We start by verifying that \(f\) is monotone. I.e., that \(f(Y) \geq f(X)\) when \(X \subseteq Y\), which is equivalent to verifying that \(g(Y) \leq g(X)\). Let \(g(X)\) equal \[\sum_{ p\in D- D_0} d^2(p, \{\widetilde{\mu}(p)\} \cup X \cup \Lambda) + \sum_{p\in D_0} d^2(p, X \cup \Lambda)+ \sum_{c \in \mathcal{R}'_1} \text{cost-inc}_c(X)\] for some set \(\mathcal{R}'_1\). Then \(g(Y)\) is at most \[\sum_{p\in D- D_0} d^2(p, \{\widetilde{\mu}(p)\} \cup Y \cup \Lambda)+ \sum_{p\in D_0} d^2(p, {Y} \cup \Lambda) + \sum_{c \in \mathcal{R}'_1} \text{cost-inc}_c(Y)\] As trivially \(d^2(p, \{\widetilde{\mu}(p)\} \cup Y \cup \Lambda) \leq d^2(p, \{\widetilde{\mu}(p)\}\cup X \cup \Lambda)\), \(d^2(p, Y \cup \Lambda) \leq d^2(p, X \cup \Lambda)\) and \(\text{cost-inc}_c(Y) \leq \text{cost-inc}_c(X)\) (see 32 ), we have \(g(Y) \leq g(X)\) as required. Moreover, as \(f(\emptyset) = 0\) by definition, non-negativity follows.
We proceed to verify that \(f\) is submodular, i.e., that for every \(X \subseteq Y \subseteq F_B\) and \(c_0 \in F_B - Y\), \(f(X \cup \{c_0\}) - f(X) \geq f(Y \cup \{c_0\}) - f(Y)\), or equivalently \[\begin{align} g(X \cup \{c_0\}) - g(X) \leq g(Y \cup \{c_0\}) - g(Y)\,. \label{eq:submodularineq} \end{align}\tag{34}\] Let \(\mathcal{R}_1^X, \mathcal{R}_1^Y\), and \({\mathcal{R}}_1^{Y+c_0}\) be subsets of \(\mathcal{P}_1\) of cardinality \(|\mathcal{R}_1|\) such that \[\begin{align} g(X) &= \sum_{p\in D- D_0} d^2(p, \{\widetilde{\mu}(p)\} \cup X \cup \Lambda) + \sum_{p\in D_0} d^2(p, X \cup \Lambda) + \sum_{c \in \mathcal{R}^X_1} \text{cost-inc}_c(X)\\ g(Y) &= \sum_{p\in D- D_0} d^2(p, \{\widetilde{\mu}(p)\} \cup Y \cup \Lambda)+ \sum_{p\in D_0} d^2(p, Y \cup \Lambda) + \sum_{c \in \mathcal{R}^Y_1} \text{cost-inc}_c(Y)\\ g(Y \cup \{c_0\}) & = \sum_{p\in D- D_0} d^2(p, \{\widetilde{\mu}(p)\} \cup (Y \cup \{c_0\}) \cup \Lambda)+ \sum_{p\in D_0} d^2(p, (Y \cup \{c_0\}) \cup \Lambda) \\ & + \sum_{c \in {\mathcal{R}}^{Y+c_0}_1} \text{cost-inc}_c(Y\cup \{c_0\}) \end{align}\] We shall define \({\mathcal{R}}^{X+c_0}_1\) to be a subset of \(\mathcal{P}_1\) of cardinality \(|\mathcal{R}_1|\) so that the upper bound \[\begin{align} g(X\cup \{c_0\}) & \leq \sum_{p\in D- D_0} d^2(p, \{\widetilde{\mu}(p)\} \cup (X\cup \{c_0\}) \cup \Lambda)+ \sum_{p\in D_0} d^2(p, (X \cup \{c_0\}) \cup \Lambda) \\ & + \sum_{c \in {\mathcal{R}}^{X+c_0}_1} \text{cost-inc}_c(X \cup \{c_0\}) \end{align}\] allows us to verify Inequality 34 . First notice that no matter the definition of \({\mathcal{R}}^{X+c_0}_1\), we have that \[\begin{align} & \sum_{p\in D- D_0} (d^2(p, \{\widetilde{\mu}(p)\} \cup (X\cup \{c_0\}) \cup \Lambda) - d^2(p, \{\widetilde{\mu}(p)\} \cup X \cup \Lambda) )\nonumber \\ & +\sum_{p\in D_0} (d^2(p, (X\cup \{c_0\}) \cup \Lambda) - d^2(p, X \cup \Lambda) ) \label{eq:boringsubmodular1} \end{align}\tag{35}\] is upper bounded by \[\begin{align} & \sum_{p\in D- D_0} (d^2(p, \{\widetilde{\mu}(p)\} \cup (Y \cup \{c_0\}) \cup \Lambda) - d^2(p, \{\widetilde{\mu}(p)\} \cup Y \cup \Lambda)) \nonumber \\ & + \sum_{p\in D_0}(d^2(p, (Y \cup \{c_0\}) \cup \Lambda) - d^2(p, Y \cup \Lambda))\,. \label{eq:boringsubmodular2} \end{align}\tag{36}\] Indeed, if we let \(D' \subseteq D- D_0\) be the subset of clients for which \(d^2(p, c_0) < d^2(p, \{\widetilde{\mu}(p)\} \cup Y \cup \Lambda)\) and \(D'_0 \subseteq D_0\) be the subset of clients for which \(d^2(p, c_0) < d^2(p, Y \cup \Lambda)\), then 36 equals \[\sum_{p\in D'} (d^2(p, c_0) - d^2(p, \{\widetilde{\mu}(p)\} \cup Y \cup \Lambda))+ \sum_{p\in D'_0} (d^2(p, c_0) - d^2(p, Y \cup \Lambda))\] and we have \[\eqref{eq:boringsubmodular1} \leq \sum_{p\in D'} (d^2(p, c_0) - d^2(p, \{\widetilde{\mu}(p)\} \cup X \cup \Lambda)) + \sum_{p\in D'_0} (d^2(p, c_0) - d^2(p, X \cup \Lambda))\,.\] It follows that 35 is at most 36 because \[\sum_{p\in D'} ( d^2(p, \{\widetilde{\mu}(p)\} \cup Y \cup \Lambda) - d^2(p, \{\widetilde{\mu}(p)\} \cup X \cup \Lambda)) + \sum_{p\in D'_0} ( d^2(p, Y \cup \Lambda) - d^2(p, X \cup \Lambda)) \leq 0\,.\]
To prove that \(f\) is submodular, it is thus sufficient to define \({\mathcal{R}}^{X+c_0}_1\) so that \[\begin{align} \sum_{c\in {\mathcal{R}}^{X+c_0}_1} \text{cost-inc}_c(X \cup \{c_0\}) - \sum_{c\in {\mathcal{R}}^X_1} \text{cost-inc}_c(X)\leq \sum_{c\in {\mathcal{R}}^{Y+c_0}_1} \text{cost-inc}_c(Y \cup \{c_0\}) - \sum_{c\in {\mathcal{R}}^Y_1} \text{cost-inc}_c(Y)\,. \label{eq:mainsubmodular} \end{align}\tag{37}\] To this end, let \(\Delta_{\text{new}}\) contain the centers in \({\mathcal{R}}^{Y+c_0}_1 - {\mathcal{R}}^Y_1\) and those centers \(c \in {\mathcal{R}}^{Y+c_0}_1 \cap \mathcal{R}^Y_1\) with \(\text{cost-inc}_c(Y \cup \{c_0\}) < \text{cost-inc}_c(Y)\). Notice that we may assume that, for each \(c\in \Delta_{\text{new}}\), \[\text{cost-inc}_c(Y \cup \{c_0\})= \text{cost-inc}_c(\{c_0\}) = \begin{cases} 0 & if C_c is hit by c_0, \\ \sum_{p\in C^{\text{core}}_c} (d^2(p, c_0) - d^2(p,\{c\} \cup \Lambda)) & otherwise. \end{cases}\] because the addition of \(c_0\) caused a decrease in \(\text{cost-inc}(\cdot)\) for these clusters. Further, let \(\Delta_{\text{old}}^Y\) contain \(\Delta_{\text{new}} \cap \mathcal{R}^{Y}_1\) and the centers \(\mathcal{R}^{Y}_1 - \mathcal{R}^{Y+c_0}_1\). So \(\mathcal{R}^{Y+c_0}_1 = (\mathcal{R}^{Y}_1 - \Delta_{\text{old}}^Y) \cup \Delta_{\text{new}}\) and \(|\Delta_{\text{new}}| = |\Delta_{\text{old}}^Y|\). We now define \(\mathcal{R}^{X+c_0}_1 = (\mathcal{R}^{X}_1 - \Delta_{\text{old}}^X) \cup \Delta_{\text{new}}\) where \(\Delta^X_{\text{old}}\) is obtained as follows:
Initialize \(\Delta_{\text{old}}^X =\mathcal{R}^X_1\cap \Delta_{\text{new}}\).
While \(|\Delta_{\text{old}}^X|< |\Delta_{\text{new}}|\), add a center according to the following priorities:
If there is a center \(c\in \mathcal{R}^X_1 - \Delta_{\text{old}}^X\) so that \(c\not \in \mathcal{R}^{Y}_1\), add \(c\) to \(\Delta_{\text{old}}^X\).
Else add a center \(c\in \mathcal{R}^X_1- \Delta_{\text{old}}^X\) with \(c \in \Delta_{\text{old}}^Y\).
We claim that the above is well-defined, i.e., that if \(|\Delta_{\text{old}}^X|< |\Delta_{\text{new}}|\) and there is no center \(c\in \mathcal{R}^X_1 - \Delta_{\text{old}}^X\) so that \(c\not \in \mathcal{R}^{Y}_1\), then there must be a center \(c\in \mathcal{R}^X_1- \Delta_{\text{old}}^X\) with \(c \in \Delta_{\text{old}}^Y\). This is because \(|\Delta_{\text{old}}^X| < |\Delta_{\text{new}}| = |\Delta_{\text{old}}^Y|\) and all remaining centers \(\mathcal{R}_1^X - \Delta_{\text{old}}^X\) are in \(\mathcal{R}^Y_1\) in this case, so at least one of them must be in \(\Delta_{\text{old}}^Y\) (recall that \(|\mathcal{R}_1^X| = |\mathcal{R}_1^Y|\)).
With this notation we have \[\begin{align} \notag \sum_{c\in {\mathcal{R}}^{Y+c_0}_1} \text{cost-inc}_c(Y \cup \{c_0\}) - \sum_{c\in {\mathcal{R}}^Y_1} \text{cost-inc}_c(Y ) & = \sum_{c\in \Delta_{\text{new}}} \text{cost-inc}_c(Y \cup \{c_0\}) - \sum_{c\in \Delta_{\text{old}}^Y}\text{cost-inc}_{c}(Y) \\ &= \sum_{c\in \Delta_{\text{new}}} \text{cost-inc}_c(\{c_0\}) - \sum_{c\in \Delta_{\text{old}}^Y}\text{cost-inc}_{c}(Y)\,. \label{eq:firstsubmodular} \end{align}\tag{38}\] Similarly, \[\begin{align} \sum_{c\in {\mathcal{R}}^{X+c_0}_1} \text{cost-inc}_c(X \cup \{c_0\}) - \sum_{c\in {\mathcal{R}}^X_1} \text{cost-inc}_c(X ) & \leq \sum_{c\in \Delta_{\text{new}}} \text{cost-inc}_c(X \cup \{c_0\}) - \sum_{c\in \Delta_{\text{old}}^X} \text{cost-inc}_{c}(X) \notag\\ & = \sum_{c\in \Delta_{\text{new}}} \text{cost-inc}_c(\{c_0\}) - \sum_{c\in \Delta_{\text{old}}^X} \text{cost-inc}_{c}(X)\,, \label{eq:secondsubmoular} \end{align}\tag{39}\] where we used that \(\text{cost-inc}_c(X \cup \{c_0\}) \leq \text{cost-inc}_c(X)\) for any center \(c\).
To analyze this let, \(\pi\) be a bijection from \(\Delta_{\text{old}}^Y\) to \(\Delta_{\text{old}}^X\) so that \(\pi(c) =c\) for all \(c\in \Delta_{\text{old}}^Y \cap \Delta_{\text{old}}^X\).
For every \(c\in \Delta_{\text{old}}^Y\) we have \[\text{cost-inc}_c(Y) \leq \text{cost-inc}_{\pi(c)}(X)\,.\]
Proof. If \(c\in \Delta_{\text{old}}^Y \cap \Delta_{\text{old}}^X\), the claim holds because \(\text{cost-inc}_c(Y) \leq \text{cost-inc}_c(X)\) for every \(c\in \mathcal{P}_1\). Otherwise, we have \(\pi(c) \not \in \mathcal{R}^Y_1\). This is because \((\Delta_{\text{old}}^X - \Delta_{\text{new}}^Y) \cap \mathcal{R}_1^Y = \emptyset\). Indeed, in the construction of \(\Delta_{\text{old}}^X\), we initialized with \(\mathcal{R}^X_1\cap \Delta_{\text{new}}\) and, as \(\Delta_{\text{old}}^Y\) contains \(\Delta_{\text{new}} \cap \mathcal{R}^Y_1\), all elements in \(\mathcal{R}^X_1\cap \Delta_{\text{new}}\) are either in \(\Delta_{\text{old}}^Y\) or not in \(\mathcal{R}^Y_1\). The property is then maintained by definition of the while-loop in the construction of \(\Delta_{\text{old}}^X\).
It follows that \(\mathcal{R}^Y_1\) where we remove \(c\) and add \(\pi(c)\) is another subset of \(\mathcal{P}_1\) of cardinality \(|\mathcal{R}_1|\). Hence, by the selection of \(\mathcal{R}^Y_1\) (to be the collection of centers with smallest \(\text{cost-inc}(\cdot)\)) we have \[\text{cost-inc}_c(Y) \leq \text{cost-inc}_{\pi(c)}(Y) \leq \text{cost-inc}_{\pi(c)}(X)\,.\] ◻
By the above claim, \[\begin{align} \sum_{c\in \Delta_{\text{old}}^Y}\text{cost-inc}_{c}(Y) - \sum_{c\in \Delta_{\text{old}}^X} \text{cost-inc}_{c}(X) = \sum_{c\in \Delta_{\text{old}}^Y}(\text{cost-inc}_{c}(Y) - \text{cost-inc}_{\pi(c)}(X)) \leq 0 \end{align}\] and thus by the above arguments (see 38 and 39 ) \[\sum_{c\in {\mathcal{R}}^{X+c_0}_1} \text{cost-inc}_c(X \cup \{c_0\}) - \sum_{c\in {\mathcal{R}}^X_1} \text{cost-inc}_c(X)\leq \sum_{c\in {\mathcal{R}}^{Y+c_0}_1} \text{cost-inc}_c(Y \cup \{c_0\}) - \sum_{c\in {\mathcal{R}}^Y_1} \text{cost-inc}_c(Y)\,.\] We have thus verified 37 , which concludes the proof that \(f\) is submodular.
We have \[\begin{align} g(\emptyset) &\leq \sum_{c \not \in \mathcal{R}}\sum_{p\in C_c} d^2\left(p, \{c\} \cup \Lambda\right) + \sum_{p\in D_0} d^2(p, \Lambda) + \sum_{c\in \mathcal{R}_1} \text{closedcost}_c(\emptyset) \\ &\leq \sum_{c \not \in \mathcal{R}_1}\sum_{p\in C_c} d^2\left(p, \{c\} \cup \Lambda\right)+ \sum_{p\in D_0} d^2(p, \Lambda) + \sum_{c\in \mathcal{R}_1} \min_{c'\in \Lambda} \sum_{p\in C_c} d^2(p, c') \\ & \leq \sum_{c \not \in \mathcal{R}}\sum_{p\in C_c} d^2\left(p, \{c\} \cup \Lambda\right) + \sum_{c\in \mathcal{R}} \min_{c'\in \Lambda} \sum_{p\in C_c} d^2(p, c')\,\overset{\eqref{eq:MprimeDbound}}{\leq}\text{cost}(M'_D, \mu'_D). \end{align}\]
Similarly to the third property, we have \[\begin{align} g(\hat{\text{OPT}}) &\leq \sum_{c \not \in \mathcal{R}}\sum_{p\in C_c} d^2\left(p, \{c\} \cup \hat{\text{OPT}}\cup \Lambda\right) + \sum_{p\in D_0}d^2(p, \hat{\text{OPT}}\cup \Lambda)+ \sum_{c\in \mathcal{R}_1} \text{closedcost}_c(\hat{\text{OPT}}) \\ &\leq \sum_{c \not \in \mathcal{R}}\sum_{p\in C_c} d^2\left(p, \{c\} \cup \hat{\text{OPT}}\cup \Lambda\right)+ \sum_{p\in D_0} d^2(p, \hat{\text{OPT}}\cup \Lambda) + \sum_{c\in \mathcal{R}_1} \min_{c'\in \hat{\text{OPT}}} \sum_{p\in C_c} d^2(p, c') \\ & \leq \sum_{c \not \in \mathcal{R}}\sum_{p\in C_c} d^2\left(p, \{c\} \cup \hat{\text{OPT}}\cup \Lambda\right) + \sum_{c\in \mathcal{R}} \min_{c'\in \hat{\text{OPT}}} \sum_{p\in C_c} d^2(p, c')\overset{\eqref{eq:MprimeObound}}{\leq}\,\text{cost}(M'_O, \mu'_O)\,. \end{align}\]
Let \(X \subseteq F_\mathcal{B}\) be independent in \(M_\mathcal{B}\), i.e., \(X\in \mathcal{I}\). We give a polynomial-time algorithm that outputs \(k\) centers \(S^*\) whose cost is at most \((1+{6\sqrt{\varepsilon}})g(X) +{O(\sqrt{\varepsilon})} \text{opt}\). Let \(\mathcal{R}'_1\) be a subset of \(\mathcal{P}_1\) of cardinality \(|\mathcal{R}_1|\) so that \[\begin{gather} g(X) = \sum_{c \not \in \mathcal{R}_0 \cup \mathcal{R}'_1}\sum_{p\in C_c} d^2\left(p, \{c\} \cup X \cup \Lambda\right)+ \sum_{p \in D_0} d^2(p, X \cup \Lambda) + \sum_{c\in \mathcal{R}'_1} \text{closedcost}_c(X) \end{gather}\] By the arguments in the proof of the first property, we can calculate \(\mathcal{R}'_1\) in polynomial time. Now we obtain \(S^*\) from \(S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}}\) as follows:
Initialize \(S^* = S_{\mathcal{Q}\cup \widetilde{\mathcal{U}}} = S \cup \Lambda- \mathcal{Q}- \widetilde{\mathcal{U}}\).
Remove centers \(\mathcal{R}_0\) and \(\mathcal{R}'_1\) from \(S^*\) to obtain a set of cardinality \(k\).
Finally, for each ball in \(\mathcal{B}\), if \(X\) contains a center \(c\) in that ball, replace the associated dummy center by \(c\); otherwise, replace the dummy center with an arbitrary center in the ball.
By the definition of the dummy centers \(\Lambda\), the cost of \(S^*\) is at most \[\sum_{c \not \in \mathcal{R}_0 \cup \mathcal{R}'_1}\sum_{p\in C_c} d^2\left(p, \{c\} \cup X \cup \Lambda\right)+ \sum_{p \in D_0} d^2(p, X \cup \Lambda) + \sum_{c\in \mathcal{R}'_1} \sum_{p\in C_c} d^2(p, X \cup \Lambda)\,.\] To relate this to \(g(X)\) we need to compare \(\text{closedcost}_c(X)\) to \(\sum_{p\in C_c} d^2(p, X\cup \Lambda)\) for every \(c\in \mathcal{R}'_1\). Recall that \[\text{closedcost}_c(X) = \begin{cases} \sum_{p\in C_c} d^2(p, \{c\} \cup X \cup \Lambda) & if C_c is hit by X, \\ \min_{c'\in X \cup \Lambda} \sum_{p\in C^{\text{core}}_c} d^2(p, c') + \sum_{p\in C_c - C^{\text{core}}_c} d^2(p, \{c\} \cup X \cup \Lambda) & otherwise. \end{cases}\] Consider a cluster \(C_c\) with \(c\in \mathcal{R}'_1\) and partition \(C_c- C^{\text{core}}_c\) into sets \(A\) and \(B\) where \(A\) contain those clients \(p\) so that \(d^2(p, \{c\} \cup X \cup \Lambda) =d^2(p, c)\) and \(B\) contain the remaining clients \(p\) with \(d^2(p, \{c\} \cup X \cup \Lambda) = d^2(p, X \cup \Lambda)\). Suppose first that there is a client \(p_0 \in C^{\text{core}}_c\) so that \(d^2(p_0, X \cup \Lambda) < d^2(p_0, c)\), i.e., \(C_c\) is hit by \(X \cup \Lambda\). By the definition of \(C^{\text{core}}_c\), we have \(d^2(p_0, c) \leq \varepsilon\cdot \frac{\text{cost}(S)}{|\mathcal{R}| \cdot |C_c|}\leq {25} \varepsilon\cdot \frac{\text{opt}}{|\mathcal{R}| \cdot |C_c|}\) where we used that \(\text{cost}(S) \leq {25} \cdot \text{opt}\) by 11. So, by 3 with \(\gamma=1+\sqrt{\varepsilon}\), \[\begin{align} \sum_{p\in C_c} d^2(p, X \cup \Lambda)& \leq \sum_{p\in C_c - B} ({1+\sqrt{\varepsilon}})d^2(p, c) + {\frac{3}{\sqrt{\varepsilon}}}(d^2(c, p_0) + d^2(p_0, X\cup \Lambda))) + \sum_{p\in B} d^2(p, X \cup \Lambda)\\ &\leq \sum_{p\in A} ({1+\sqrt{\varepsilon}})d^2(p, c) + \sum_{p\in B} d^2(p, X \cup \Lambda) + {O(\sqrt{\varepsilon})} \cdot \frac{\text{opt}}{|\mathcal{R}|}\,, \end{align}\] where we used \(d^2(p_0, X\cup \Lambda) \leq d^2(p_0,c) \leq {25}\varepsilon\cdot \frac{\text{opt}}{|\mathcal{R}| \cdot |C_c|}\) and \(d^2(p, c) \leq {25}\varepsilon\cdot \frac{\text{opt}}{|\mathcal{R}| \cdot |C_c|}\) for any \(p\in C^{\text{core}}_c\) for the last inequality. Moreover, by definition of \(A\) and \(B\), we have \(d^2(p, c) = d^2(p, \{c\} \cup X \cup \Lambda)\) for any \(p\in A\) and \(d^2(p, X \cup \Lambda) = d^2(p, \{c\} \cup X \cup \Lambda)\) for any \(p\in B\). Hence, in this case, \[\begin{align} \sum_{p\in C_c} d^2(p, X \cup \Lambda) & \leq \sum_{p\in C_c - C^{\text{core}}_c} ({1+\sqrt{\varepsilon}})d^2(p, \{c\} \cup X \cup Y) + {O(\sqrt{\varepsilon})} \cdot \frac{\text{opt}}{|\mathcal{R}|} \\ & \leq ({1+\sqrt{\varepsilon}})\text{closedcost}_c(X) + {O(\sqrt{\varepsilon})} \cdot \frac{\text{opt}}{|\mathcal{R}|}\,. \end{align}\]
Let us now consider a cluster \(C_c\) with \(c\in \mathcal{R}'_1\) that is not hit by \(X \cup \Lambda\), particularly not by \(X\). Then \[\begin{align} \text{closedcost}_c(X) &= \min_{c'\in X \cup \Lambda} \sum_{p\in C^{\text{core}}_c} d^2(p, c') + \sum_{p\in C_c - C^{\text{core}}_c} d^2(p, \{c\} \cup X \cup \Lambda) \\ & \geq \sum_{p\in C^{\text{core}}_c \cup B} d^2(p, X \cup \Lambda) + \sum_{q\in A} d^2(q, c) \end{align}\] Using again 3 with \(\gamma=1+\sqrt{\varepsilon}\), we further have \[\begin{align} & \sum_{p\in C_c} d^2(p, X \cup \Lambda) = \sum_{p\in C^{\text{core}}_c \cup B} d^2(p, X \cup \Lambda) + \sum_{q\in A} d^2(q, X \cup \Lambda)\\ \leq & \sum_{p\in C^{\text{core}}_c \cup B} d^2(p, X \cup \Lambda) + \sum_{q\in A} \frac{1}{|C^{\text{core}}_c|}\sum_{p\in C^{\text{core}}_c} ({(1+\sqrt{\varepsilon})}d^2(q, c) + {\frac{3}{\sqrt{\varepsilon}}}(d^2(c, p) + d^2(p, X \cup \Lambda))). \end{align}\] Now using that \(d^2(c,p) \leq {25} \varepsilon\cdot \frac{\text{opt}}{|\mathcal{R}| \cdot |C_c|}\) for \(p\in C^{\text{core}}_c\) we obtain the upper bound \[\begin{align} \sum_{p\in C_c} d^2(p, X \cup \Lambda) & \leq \left(1 + {\frac{3}{\sqrt{\varepsilon}}}\frac{|A|}{|C^{\text{core}}_c|}\right) \sum_{p\in C^{\text{core}}_c\cup B} d(p, X \cup \Lambda) + \sum_{q\in A} ({1+\sqrt{\varepsilon}})d^2(q,c) + {O(\sqrt{\varepsilon})} \frac{\text{opt}}{|\mathcal{R}|} \\ &\leq \left(1 + \frac{{3\sqrt{\varepsilon}}}{(1-\varepsilon)}\right) \sum_{p\in C^{\text{core}}_c \cup B} d^2(p, X \cup \Lambda) + \sum_{q\in A} ({1+\sqrt{\varepsilon}})d^2(q,c) + {O(\sqrt{\varepsilon})} \frac{\text{opt}}{|\mathcal{R}|} \\ & \leq (1+ {6\sqrt{\varepsilon}}) \text{closedcost}_c(X) + {O(\sqrt{\varepsilon})} \frac{\text{opt}}{|\mathcal{R}|} \end{align}\] where for the second inequality we used that every cluster in \(\mathcal{R}_1' \subseteq \mathcal{P}_1\) is concentrated. In more detail \(|C^{\text{core}}_c|\geq (1-\varepsilon)|C_c|\), hence \(|A|\leq |C_c-C^{\text{core}}_c|\leq \varepsilon|C_c|\).
Hence, for any \(c\in \mathcal{R}_1'\) we proved that \(\sum_{p\in C_c} d^2(p,X \cup \Lambda) \leq (1+{6\sqrt{\varepsilon}}) \text{closedcost}_c(X) + {O(\sqrt{\varepsilon})} \frac{\text{opt}}{|\mathcal{R}|}\). We thus get that the cost of \(S^*\) is at most
\[\begin{align} & \sum_{c \not \in \mathcal{R}_0 \cup \mathcal{R}'_1}\sum_{p\in C_c} d^2\left(p, \{c\} \cup X \cup \Lambda\right)+ \sum_{p \in D_0} d^2(p, X \cup \Lambda) + \sum_{c\in \mathcal{R}'_1}\left( (1+{6\sqrt{\varepsilon}}) \text{closedcost}_c(X) + {O(\sqrt{\varepsilon})} \frac{\text{opt}}{|\mathcal{R}|}\right) \\ \leq & (1+{6\sqrt{\varepsilon}}) \left(\sum_{c \not \in \mathcal{R}_0 \cup \mathcal{R}'_1}\sum_{p\in C_c} d^2\left(p, \{c\} \cup X \cup \Lambda\right)+ \sum_{p \in D_0} d^2(p, X \cup \Lambda) + \sum_{c\in \mathcal{R}'_1} \text{closedcost}_c(X) \right) + {O(\sqrt{\varepsilon})} \text{opt} \end{align}\] which equals \((1+{6\sqrt{\varepsilon}}) g(X) + {O(\sqrt{\varepsilon})} \text{opt}\).
We now turn to proving [thm:mainadditivecenters]. We first describe the algorithm we analyse.
\(S \gets\) Local Search on \((k, D, F, d)\), see 6.1
Let \(W\) be the set produced by the \(s^*\)-\(D^2\)-Sample process (6.3) on \(S\).
For each \(\mathcal{B}{\in \mathcal{L}_{\texttt{bal}}}\) produced as in 17 on \(W\) (6.4)
Compute the set of dummy centers \(\Lambda\).
For each \(Q\in \mathcal{L}_{\text{exp}}\) produced by \(expRem()\) as in 20 (6.6):
Output the solution \(S_{(W,\mathcal{B},\mathcal{Q},\widetilde{\mathcal{U}},\widetilde{\mu})}\) of smallest cost.
Our approach consists of running the above algorithm \(\log n\) times and take the minimum cost solution output. In the remaining, we argue that the above algorithm yields a \({(5+O(\sqrt{\varepsilon}))}\)-approximation with probability at least \((1-\varepsilon)(1-1/n)\). [thm:mainadditivecenters] then follows as the probability that all \(\log n\) executions of the above algorithm would fail is at most \(\left( 1- (1-\varepsilon)(1-1/n)\right)^{\log n} < 1/n\), and so with high probability we output a \({(5+O(\sqrt{\varepsilon}))}\)-approximation.
We first discuss the algorithm’s running time. The local search algorithm runs in polynomial time. The submodular optimization step also runs in polynomial time by 23. The output of the \(s^*\)-\(D^2\)-Sample process (which is clearly a polynomial time procedure) is a subset of size \(s^*\). By 17, we construct \(\mathcal{L}_{\texttt{bal}}\) in polynomial time the and \(|\mathcal{L}_{\texttt{bal}}| \leq n^{\varepsilon^{-O(1)}}\). Similarly, by 20, we construct \(\mathcal{L}_{\text{exp}}\) in polynomial time and \(|\mathcal{L}_{\text{exp}}| \leq n^{\varepsilon^{-O(1)}}\). Finally, by 22, we construct in polynomial-time \(n^{\varepsilon^{-O(1)}}\) candidate pairs \(\widetilde{\mathcal{U}},\widetilde{\mu}\). It follows that we solve \(n^{\varepsilon^{-O(1)}}\) submodular function optimization problems, each in polynomial time, and thus the total running time is polynomial.
We turn to proving the approximation guarantee. We aim to show that there exists a \((W,\mathcal{B}, \mathcal{Q}, \widetilde{\mathcal{U}}, \widetilde{\mu})\) that is successful with probability at least \((1-\varepsilon/2)\). Assuming this, the \(({5+O(\sqrt{\varepsilon})})\)-approximation follows by combining [claim:Mprimebounds] and 23.
Our algorithm runs the local search algorithm and thus provides us with a \(25\) approximation \(S\) that satisfies 13. Our algorithm next applies the \(s^*\)-\(D^2\)-Sample process and by 14 finds a successful \(W\) with probability at least \(1-\varepsilon\). Condition on having a successful \(W\), we then have that 15 holds, and so does 16 by combining 13 and 15.
Next, 17 implies that one set of balls \(\mathcal{B}\) is a valid set of balls. This set of balls induces a set of dummy centers \(\Lambda\). From there, by 20 we have that with probability at least \(1-1/n\), the \(expRem()\) procedure produces a set of center \(\mathcal{Q}\) such that
\(\mathcal{Q}\subseteq S_0\), and
The total cost in solution \(S {-} Q \cup \Lambda\) of the clusters in \(S_0 {-} \mathcal{Q}\) is at most \(\varepsilon\cdot \text{opt}\).
and so we have obtained a successful \((W,\mathcal{B},\mathcal{Q})\) and 21 applies. Condition on the event that we obtain a successful \((W, \mathcal{B}, \mathcal{Q})\), then, applying 22 we have that the \(cheapRem()\) procedure outputs a pair \((\widetilde{\mathcal{U}}, \widetilde{\mu})\) satisfying the properties of 22. We thus have a \((W, \mathcal{B}, \mathcal{Q}, \widetilde{\mathcal{U}},\widetilde{\mu})\) such that \(W\) is successful, the set of balls \(\mathcal{B}\) from 6.4 is valid, \(\mathcal{Q}\) selected in 6.6 satisfies the properties of 20, and \(\widetilde{\mathcal{U}},\widetilde{\mu}\) selected in this section satisfies the properties of 22 and so \((W, \mathcal{B}, \mathcal{Q}, \widetilde{\mathcal{U}},\widetilde{\mu})\) is successful. Finally, note that the only probabilistic steps were the sampling of \(W\) and of \(\mathcal{Q}\), and both steps are successful with probability at least \((1-\varepsilon) \cdot (1-1/n)\), as required.
R. Gao was supported by a Stanford Graduate Fellowship. F. Grandoni was partially supported by the SNF Grants 200021-200731 and 200021-236706. E. Lee was partially supported by the NSF Grant 2236669. E. van. Wijland. was partially supported by the French PEPR integrated projects EPIQ (ANR-22-PETQ-0007).↩︎
It can equivalently be phrased as the problem of partitioning the given points (\(D\)) into \(k\) disjoint clusters and finding the best center (amongst \(F\)) for each cluster, to minimize the \(k\)-Means objective.↩︎
We let \([a]^+:=\max\{0,a\}\).↩︎
To be precise, this version of JMMSV establishes an equivalent notion of approximation, but not exactly the LMP 2-approximation defined in 1 ; the latter is achieved when we run the algorithm with scaled opening cost \(\hat{f} = 2f\), which our actual algorithms do with different scaling factors. In this overview, let us ignore this subtlety and conflate these two notions of approximations while just using \(f\).↩︎
An exception is the approach in [2] which loses only a factor \((1+\varepsilon)\). However their approach is tailored to the specific LMP algorithms considered in that work and hard to adapt to others, as the authors openly admit.↩︎
As standard for primal-dual-based algorithms, we describe the algorithm in a more intuitive continuous version. It is easy to convert it into an equivalent discrete algorithm.↩︎
We remark that we could select \(\zeta\) to be arbitrarily small and get a better guarantee in the statement of 23. We have chosen this value to simplify the calculations as improving the guarantee of 23 does not improve the overall result.↩︎