Better Guarantees for k-Means and Euclidean k-Median by Primal-Dual Algorithms

Sara Ahmadian, Ashkan Norouzi-Fard, Ola Svensson, Justin Ward

Introduction

A commonly used heuristic for kk-means is Lloyd’s algorithm , which is based on iterative improvement. However, despite its ubiquity in practice, Lloyd’s algorithm has, in general, no worst-case guarantee and may not even converge in polynomial time . To overcome some of these limitations, Arthur and Vassilvitskii proposed a randomized initialization procedure for Lloyd’s algorithm, called kk-means++++, that leads to a Θ(log⁡k)\Theta(\log k) expected approximation guarantee in the worst case. Under additional assumptions about the clusterability of the input dataset, Ostrovsky et al. showed that this adaptation of Lloyd’s algorithm gives a PTAS for kk-means clustering. However, under no such assumptions, the best approximation algorithm in the general case has for some time remained a (9+ϵ)(9+\epsilon)-approximation algorithm based on local search, due to Kanungo et al. . Their analysis also shows that no natural local search algorithm performing a fixed number of swaps can improve upon this ratio. This leads to a barrier for these techniques that are rather far away from the best-known inapproximability result which only says that it is NP-hard to approximate this problem to within a factor better than 1.00131.0013 .

In summary, while kk-means is perhaps the most widely used clustering problem in computer science, the only constant-factor approximation algorithm for the general case is based on simple local search heuristics that, for inherent reasons, give guarantees that are rather far from known hardness results. This is in contrast to many other well-studied clustering problems, such as facility location and kk-median. Over the past several decades, a toolbox of core algorithmic techniques such as dual fitting, primal-dual and LP-rounding, has been refined and applied to these problems leading to improved approximation guarantees . In particular, the current best approximation guarantees for both facility location (a 1.488-approximation due to Li ) and kk-median (a 2.675-approximation due to Byrka et al. ) are LP-based and give significantly better results than previous local search algorithms . However, such LP-based techniques have not yet been able to attain similar improvements for kk-means. One reason for this is that they have relied heavily on the triangle inequality, which does not hold in the case of kk-means.

For any ϵ>0\epsilon>0, there is a (ρmean+ϵ)(\rho_{\textsf{\tiny mean}}+\epsilon)-approximation algorithm for the kk-means problem, where ρmean≈6.357\rho_{\textsf{\tiny mean}}\approx 6.357. Moreover, the integrality gap of the standard LP is at most ρmean\rho_{\textsf{\tiny mean}}.

Using Lagrangian relaxation, we can then consider the resulting discrete problem using the standard linear programming formulation for facility location. This general approach was pioneered in this context by Jain and Vazirani who gave primal-dual algorithms for the kk-median problem. In their paper, they first present a Lagrangian Multiplier Preserving (LMP\mathsf{LMP}) 33-approximation algorithm for the facility location problem. Then they run binary search over the opening cost of the facilities and use the aforementioned algorithm to get two solutions: one that opens more than kk facilities and one that opens fewer than kk, such that the opening cost of facilities in these solutions are close to each other. These solutions are then combined to obtain a solution that opens exactly kk facilities. This step results in losing another factor 22 in the approximation guarantee, which results in a 66-approximation algorithm for kk-median. The factor 66 was later improved by Jain, Mahdian, and Saberi who obtained a 44-approximation algorithm for kk-median by developing an LMP\mathsf{LMP} 22-approximation algorithm for facility location.

One can see that the same approach gives a much larger constant factor for the kk-means problem since one cannot anymore rely on the triangle inequality. We use two main ideas to overcome this obstacle: (1) we exploit the geometric structure of kk-means to obtain an improved LMP\mathsf{LMP}-approximation, and (2) we develop a new primal-dual algorithm that opens exactly kk facilities while losing only an arbitrarily small factor.

For our first contribution, we modify the primal-dual algorithm of Jain and Vazirani into a parameterized version which allows us to regulate the “aggressiveness” of the opening strategy of facilities. By using properties of Euclidean metrics we show that this leads to improved LMP\mathsf{LMP} approximation algorithms for kk-means.

By the virtue of , these results already imply upper bounds on the integrality gaps of the standard LP relaxations, albeit with an exponential time rounding algorithm. Our second and more technical contribution is a new primal-dual algorithm that accomplishes the same task in polynomial time. In other words, we are able to turn an LMP\mathsf{LMP} approximation algorithm into an algorithm that opens at most kk facilities without deteriorating the approximation guarantee. We believe that this contribution is of independent interest. Indeed, all recent progress on the approximation of kk-median beyond long-standing local search approaches has involved reducing the factor 22 that is lost by Jain and Vazirani when two solutions are combined to open exactly kk facilities (i.e. in the rounding of a so-called bipoint solution) . Here, we show that it is possible to reduce this loss all the way to (1+ϵ)(1+\epsilon) by fundamentally changing the way in which dual solutions are constructed and maintained.

Instead of finding two solutions by binary search as in the framework of , we consider a sequence of solutions such that the opening costs and also the dual values of any two consecutive solutions are close in L∞L^{\infty}-norm. We show that this latter property allows us to combine two appropriate, consecutive solutions in the sequence into a single solution that opens exactly kk facilities while losing only a factor of 1+ϵ1+\epsilon (rather than 2) in the approximation guarantee. Unfortunately, the dual solutions produced by the standard primal-dual algorithm approach are unstable, in the sense that a small change in opening price may result in drastic changes in the value of the dual variables. Thus, we introduce a new primal-dual procedure which instead iteratively transforms a dual solution for one price into a dual solution for another price. By carefully constraining the way in which the dual variables are altered, we show that we can obtain a sequence of “close” solutions that can be combined as desired.

We believe that this technique may be applicable in other settings, as well. An especially interesting open question is whether it is possible combine stronger LMP\mathsf{LMP} approximation algorithms, such as the one by Jain, Mahdian, Saberi , with our lossless rounding to obtain an improved (2+ϵ)(2+\epsilon)-approximation algorithm for kk-median.

For any ϵ>0\epsilon>0, there is a (ρmed+ϵ)(\rho_{\textsf{\tiny med}}+\epsilon)-approximation algorithm for the Euclidean kk-median problem, where ρmed≈2.633\rho_{\textsf{\tiny med}}\approx 2.633. Moreover, the integrality gap of the standard LP is at most ρmed\rho_{\textsf{\tiny med}}.

In the second extension, we consider a variant of the kk-means problem in which each c(j,S)c(j,S) corresponds to the squared distance in an arbitrary (possibly non-Euclidean) metric on \cD∪\cF\cD\cup\cF. For this problem, the best-known approximation algorithm is a 16-approximation due to Gupta and Tangwongsan . In this paper, we obtain the following improvement:

For any ϵ>0\epsilon>0, there is a (9+ϵ)(9+\epsilon)-approximation algorithm for the kk-means problem in general metrics. Moreover, the integrality gap of the standard LP is at most 99.

We remark that the same hardness reduction as used for kk-median immediately yields a much stronger hardness result for the above generalization than what is known for the standard kk-means problem: it is hard to approximate the kk-means problem in general metrics within a factor 1+8/e−ϵ≈3.941+8/e-\epsilon\approx 3.94 for any ϵ>0\epsilon>0.

In Section 2 we review the standard LP formulation that we use, as well as its Lagrangian relaxation. We then in Section 3 show how to exploit the geometric structure of kk-means and Euclidean kk-median to give improved LMP\mathsf{LMP} guarantees. In Section 4 we show the main ideas behind our new rounding approach by giving an algorithm that runs in quasi-polynomial time. These results are then generalized in Sections 5, 6, and 7 to obtain an algorithm that runs in polynomial time.

The standard LP relaxation and its Lagrangian relaxation

Here and in the remainder of the paper, we shall consider the discrete kk-means problem, where we are given a discrete set \cF\cF of facilities (corresponding to candidate centers).As discussed in the introduction, it is well-known that a ρ\rho-approximation algorithm for this case can be turned into a (ρ+ϵ)(\rho+\epsilon)-approximation algorithm for the standard kk-means problem, for any constant ϵ>0\epsilon>0 (see e.g., ). Henceforth, we will simply refer to the discrete kk-means problem as the kk-means problem.

Given an instance (\cD,\cF,d,k)(\cD,\cF,d,k) of the kk-means problem or the kk-median problem, let c(j,i)c(j,i) denote the connection cost of client jj if connected to facility ii. That is, c(j,i)=d(j,i)c(j,i)=d(j,i) in the case of kk-median and c(j,i)=d(j,i)2c(j,i)=d(j,i)^{2} in the case of kk-means. Let n=∣\cD∣n=|\cD| and m=∣\cF∣m=|\cF|.

The standard linear programming (LP) relaxation of these problems has two sets of variables: a variable yiy_{i} for each facility i∈\cFi\in\cF and a variable xijx_{ij} for each facility-client pair i∈\cF,j∈\cDi\in\cF,j\in\cD. The intuition of these variables is that yiy_{i} should indicate whether facility ii is opened and xijx_{ij} should indicate whether client jj is connected to facility ii. The standard LP relaxation can now be formulated as follows.

A main difficulty for approximating the kk-median and the kk-means problems is the hard constraint that at most kk facilities can be selected, i.e., constraint (2.3) in the above relaxation. A popular way of overcoming this difficulty, pioneered in this context by Jain and Vazirani , is to consider the Lagrangian relaxation where we multiply the constraint (2.3) times a Lagrange multiplier λ\lambda and move it to the objective. This results, for every λ≥0\lambda\geq 0, in the following relaxation and its dual that we denote by LP(λ)(\lambda) and DUAL(λ)(\lambda), respectively.

LP(λ)(\lambda) min⁡\displaystyle\min ∑i∈F,j∈Dxij⋅c(j,i)+λ⋅(∑i∈Fyi−k)\displaystyle\sum_{i\in\mathcal{F},j\in\mathcal{D}}x_{ij}\cdot c(j,i)+\lambda\cdot\left(\sum_{i\in\mathcal{F}}y_{i}-k\right) s.t. (2.1), (2.2), and (2.4). DUAL(λ)(\lambda) max⁡\displaystyle\max ∑j∈Dαj−λ⋅k\displaystyle\sum_{j\in\mathcal{D}}\alpha_{j}-\lambda\cdot k s.t. ∑j∈D[αj−c(j,i)]+\displaystyle\sum_{j\in\mathcal{D}}[\alpha_{j}-c(j,i)]^{+} ≤λ∀i∈F\displaystyle\leq\lambda\qquad\forall i\in\mathcal{F} (2.5) α\displaystyle\alpha ≥0.\displaystyle\geq 0.

If we disregard the constant term λ⋅k\lambda\cdot k in the objective functions, LP(λ)(\lambda) and DUAL(λ)(\lambda) become the standard LP formulation and its dual for the facility location problem where the opening cost of each facility equals λ\lambda and the connection costs are defined by c(⋅,⋅)c(\cdot,\cdot). Recall that the facility location problem (with uniform opening costs) is defined as the problem of selecting a set S⊆\cFS\subseteq\cF of facilities to open so as to minimize the opening cost ∣S∣λ|S|\lambda plus the connection cost ∑j∈Dc(j,S)\sum_{j\in\mathcal{D}}c(j,S). Jain and Vazirani introduced the following method for addressing the kk-median problem motivated by simple economics. On the one hand, if λ\lambda is selected to be very small, i.e., it is cheap to open facilities, then a good algorithm for the facility location problem will open many facilities. On the other hand, if λ\lambda is selected to be very large, then a good algorithm for the facility location problem will open few facilities. Ideally, we want to use this intuition to find an opening price that leads to the opening of exactly kk facilities and thus a solution to the original, constrained problem.

To make this intuition work, we need the notion of Lagrangian Multiplier Preserving (LMP\mathsf{LMP}) approximations: we say that a ρ\rho-approximation algorithm is LMP\mathsf{LMP} for the facility location problem with opening costs λ\lambda if it returns a solution S⊆FS\subseteq\mathcal{F} satisfying

Exploiting Euclidean metrics via primal-dual algorithms

In this section we show how to exploit the structure of Euclidean metrics to achieve better approximation guarantees. Our LMP\mathsf{LMP} approximation algorithm builds upon the primal-dual algorithm for the facility location problem by Jain and Vazirani . We refer to their algorithm as the JV algorithm. The main modification to their algorithm is that we allow for a more “aggressive” opening strategy of facilities. The amount of aggressiveness is measured by the parameter δ\delta: we devise an algorithm JV(δ)(\delta) for each parameter δ≥0\delta\geq 0, where a smaller δ\delta results in a more aggressive opening strategy. We first describe JV(δ)(\delta) and we then optimize δ\delta for the considered objectives to obtain the claimed approximation guarantees.

We remark that the result in (non-constructively) upper bounds the integrality gap of the standard LP relaxation of kk-median in terms of the LMP\mathsf{LMP} approximation guarantee of JV. This readily generalizes to the kk-means problem and JV(δ)(\delta). Consequently, our guarantees presented here upper bound the integrality gaps as the theorems state in the introduction.

As alluded to above, the algorithm is a modification of JV, and Remark 3.2 below highlights the difference. The algorithm consists of two phases: the dual-growth phase and the pruning phase.

In this stage, we construct a feasible dual solution α\alpha to DUAL(λ)(\lambda). Initially, we set α=0\alpha={\bm{0}} and let A=\cDA=\cD denote the set of active clients (which is all clients at first). We then repeat the following until there are no active clients, i.e., A=∅A=\emptyset: increase the dual-variables {αj}j∈A\{\alpha_{j}\}_{j\in A} corresponding to the active clients at a uniform rate until one of the following events occur (if several events happen at the same time, break ties arbitrarily):

A dual constraint ∑j∈\cD[αj−c(j,i)]+≤λ\sum_{j\in\cD}[\alpha_{j}-c(j,i)]^{+}\leq\lambda becomes tight for a facility i∈\cFi\in\cF. In this case we say that facility ii is tight or temporarily opened. We update AA by removing the active clients with a tight edge to ii, that is, a client j∈Aj\in A is removed if αj−c(j,i)≥0\alpha_{j}-c(j,i)\geq 0. For future reference, we say that facility ii is the witness of these removed clients.

An active client j∈Aj\in A gets a tight edge, i.e., αj−c(j,i)=0\alpha_{j}-c(j,i)=0, to some already tight facility ii. In this case, we remove jj from AA and let ii be its witness.

This completes the description of the dual-growth phase. Before proceeding to the pruning phase, let us remark that the constructed α\alpha is indeed a feasible solution to DUAL(λ)(\lambda) by design. It is clear that α\alpha is non-negative. Now consider a facility i∈Fi\in\mathcal{F} and its corresponding dual constraint ∑j∈D[αj−c(j,i)]+≤λ\sum_{j\in\mathcal{D}}[\alpha_{j}-c(j,i)]^{+}\leq\lambda. On the one hand, the constraint is clearly satisfied if it never becomes tight during the dual-growth phase. On other hand, if it becomes tight, then all clients with a tight edge to it are removed from the active set of clients by Event 1. Moreover, if any client gets a tight edge to ii in subsequent iterations it gets immediately removed from the set of active clients by Event 2. Therefore the left-hand-side of the constraint will never increase (nor decrease) after it becomes tight so the constraint remains satisfied. Having proved that α\alpha is a feasible solution to DUAL(λ)(\lambda), let us now describe the pruning phase.

After the dual-growth phase (too) many facilities are temporarily opened. The pruning phase will select a subset of these facilities to open. In order to formally describe this process, we need the following notation. For a client jj, let N(j)={i∈F:αj−c(j,i)>0}N(j)=\{i\in\mathcal{F}:\alpha_{j}-c(j,i)>0\} denote the facilities to which client jj contributes to the opening cost. Similarly, for i∈Fi\in\mathcal{F}, let N(i)={j∈D:αj−c(j,i)>0}N(i)=\{j\in\mathcal{D}:\alpha_{j}-c(j,i)>0\} denote the clients with a positive contribution toward ii’s opening cost. For a temporarily opened facility ii, let

and by convention let ti=0t_{i}=0 if N(i)=∅N(i)=\emptyset (this convention will be useful in future sections and will only be used when the opening cost λ\lambda of facilities are set to ). Note that, if N(i)≠∅N(i)\neq\emptyset, then tit_{i} equals the “time” that facility ii was temporarily opened in the dual-growth phase. A crucial property of tit_{i} that follows from the construction of α\alpha is the following.

For a client jj and its witness ii, αj≥ti\alpha_{j}\geq t_{i}. Moreover, for any j′∈N(i)j^{\prime}\in N(i) we have ti≥αj′t_{i}\geq\alpha_{j^{\prime}}.

For the pruning phase, it will be convenient to define the client-facility graph GG and the conflict graph HH. The vertex set of GG consist of all the clients and all the facilities ii such that ∑j∈\cD[αj−c(j,i)]+=λ\sum_{j\in\cD}[\alpha_{j}-c(j,i)]^{+}=\lambda (i.e., the tight or temporarily open facilities). There is an edge between facility ii and client jj if i∈N(j)i\in N(j). The conflict graph HH is defined based on the client-facility graph GG and tt as follows:

The vertex set consists of all facilities in GG.

There is an edge between two facilities ii and i′i^{\prime} if some client jj is adjacent to both of them in GG and c(i,i′)≤δmin⁡(ti,ti′)c(i,i^{\prime})\leq\delta\min(t_{i},t_{i^{\prime}}).

The pruning phase now finds a (inclusion-wise) maximal independent set IS\mathsf{IS} of HH and opens those facilities; clients are connected to the closest facility in IS\mathsf{IS}.

The difference between the original algorithm JV and our modified JV(δ)(\delta) is the additional condition c(i,i′)≤δmin⁡(ti,ti′)c(i,i^{\prime})\leq\delta\min(t_{i},t_{i^{\prime}}) in the definition of the conflict graph. Notice that if we select a smaller δ\delta we will have fewer edges in HH. Therefore a maximal independent set will likely grow in size, which results in a more “aggressive” opening strategy. Adjusting δ\delta will allow us to achieve better LMP\mathsf{LMP} approximation guarantees.

2 Analysis of JV(δ)𝛿(\delta) for the considered objectives

In the following subsections, we optimize δ\delta and analyze the guarantees obtained by the algorithm JV(δ)(\delta) for the objective functions: k-means objective in general metrics, standard kk-means objective (in Euclidean metrics), and k-median objective in Euclidean metrics. The first analysis is very similar to the original JV analysis and also serves as a motivation for the possible improvements in Euclidean metrics.

We consider the case when c(j,i)=d(j,i)2c(j,i)=d(j,i)^{2} and dd forms a general metric. We let δ=∞\delta=\infty so JV(δ)(\delta) becomes simply the JV algorithm. We prove the following.

Let dd be any metric on \cD∪\cF\cD\cup\cF and suppose that c(j,i)=d(j,i)2c(j,i)=d(j,i)^{2} for every i∈\cFi\in\cF and j∈\cDj\in\cD. Then, for any λ≥0\lambda\geq 0, Algorithm JV(∞)(\infty) constructs a solution α\alpha to DUAL(λ)(\lambda) and returns a set IS\mathsf{IS} of opened facilities such that

Consider any client j∈\cDj\in\cD. We shall prove that

The statement then follows by summing up over all clients and noting that any facility i∈ISi\in\mathsf{IS} was temporarily opened and thus we have ∑j∈D[αj−c(j,i)]+=λ\sum_{j\in\mathcal{D}}[\alpha_{j}-c(j,i)]^{+}=\lambda.

To prove (3.1), we first note that ∣IS∩N(j)∣≤1|\mathsf{IS}\cap N(j)|\leq 1. Indeed, consider i≠i′∈N(j)i\neq i^{\prime}\in N(j). Then (j,i)(j,i) and (j,i′)(j,i^{\prime}) are edges in the client-facility graph GG and as δ=∞\delta=\infty, ii and i′i^{\prime} are adjacent in the conflict graph HH. Hence, the temporarily opened facilities in N(j)N(j) form a clique in HH and at most one of them can be selected in the maximal independent set IS\mathsf{IS}. We complete the analysis by considering the two cases ∣IS∩N(j)∣=1|\mathsf{IS}\cap N(j)|=1 and ∣IS∩N(j)∣=0|\mathsf{IS}\cap N(j)|=0.

Let i∗i^{*} be the unique facility in IS∩N(j)\mathsf{IS}\cap N(j). Then

Notice the amount of slack in the above analysis (specifically, the first inequality). In the Euclidean case, we exploit this slack for a more aggressive opening and to improve the approximation guarantee.

Let i1i_{1} be jj’s witness. First, if i1∈ISi_{1}\in\mathsf{IS} then by the same arguments as above we have the desired inequality; specifically, since jj has a tight edge to i1i_{1} but i1∉N(j)i_{1}\not\in N(j) we must have αj=c(j,i1)\alpha_{j}=c(j,i_{1}). Now consider the more interesting case when i1∉ISi_{1}\not\in\mathsf{IS}. As IS\mathsf{IS} is a maximal independent set in HH, there must be a facility i2∈ISi_{2}\in\mathsf{IS} that is adjacent to i1i_{1} in HH. By definition of HH, there is a client j1j_{1} such that (j1,i1)(j_{1},i_{1}) and (j1,i2)(j_{1},i_{2}) are edges in the client-facility graph GG, i.e., j1∈N(i1)∩N(i2)j_{1}\in N(i_{1})\cap N(i_{2}). By the definition of witness and N(⋅)N(\cdot), we have

and by the description of the algorithm (see Claim 3.1 in Section 3) we have αj≥ti1≥αj1\alpha_{j}\geq t_{i_{1}}\geq\alpha_{j_{1}}. Hence, using the triangle inequality and that (a+b+c)2≤3(a2+b2+c2)(a+b+c)^{2}\leq 3(a^{2}+b^{2}+c^{2}),

As ∑i∈N(j)∩IS(αj−c(j,i))=0\sum_{i\in N(j)\cap\mathsf{IS}}(\alpha_{j}-c(j,i))=0, this completes the proof of this case and thus the theorem.

2.2 k𝑘k-Means objective in Euclidean metrics

We start with some intuition that illustrates our approach. From the standard analysis of JV (and our analysis of kk-means in general metrics), it is clear that the bottleneck for the approximation guarantee comes from the connection-cost analysis of clients that need to do a “33-hop” as illustrated in the left part of Figure 1: client jj is connected to open facility i2i_{2} and the squared-distance is bounded by the path j−i1−j1−i2j-i_{1}-j_{1}-i_{2}. Moreover, this analysis is tight when considering \textsf{\small JV}=\textsf{\small JV(\infty)}. Our strategy will now be as follows: Select δ\delta to be a constant smaller than 44. This means that in the configurations of Figure 1, we will also open i2i_{2} if the distance between i1i_{1} and i2i_{2} is close to 22. Therefore, if we do not open i2i_{2}, the distance between i1i_{1} and i2i_{2} is less than 22 (as in the right part of Figure 1) which allows us to get an approximation guarantee better than 99. However, this might result in a client contributing to the opening cost of many facilities in IS\mathsf{IS}. Nonetheless, by using the properties of Euclidean metrics, we show that even in this case, we are able to achieve an LMP\mathsf{LMP} approximation guarantee with ratio better than 99.

Specifically, define δmean\delta_{\textsf{\tiny mean}} to be the constant larger than 22 that minimizes

Let dd be a Euclidean metric on \cD∪\cF\cD\cup\cF and suppose that c(j,i)=d(j,i)2c(j,i)=d(j,i)^{2} for every i∈\cFi\in\cF and j∈\cDj\in\cD. Then, for any λ≥0\lambda\geq 0, Algorithm JV(δmean)(\delta_{\textsf{\tiny mean}}) constructs a solution α\alpha to DUAL(λ)(\lambda) and returns a set IS\mathsf{IS} of opened facilities such that

To simplify notation, we use δ\delta instead of δmean\delta_{\textsf{\tiny mean}} throughout the proof. Consider any client j∈\cDj\in\cD. We shall prove that

Similarly to the proof of Theorem 3.3, the statement then follows by summing up over all clients. A difference compared to the standard analysis of JV is that in our algorithm we may open several facilities in N(j)N(j), i.e., client jj may contribute to the opening of several facilities. We divide our analysis into the three cases ∣N(j)∩IS∣=1|N(j)\cap\mathsf{IS}|=1, ∣N(j)∩IS∣>1|N(j)\cap\mathsf{IS}|>1, and ∣N(j)∩IS∣=0|N(j)\cap\mathsf{IS}|=0. For brevity, let SS denote N(j)∩ISN(j)\cap\mathsf{IS} and s=∣S∣s=|S|.

If we let i∗i^{*} be the unique facility in SS,

In this case, there are multiple facilities in IS\mathsf{IS} that jj is contributing to. We need to show that αj−∑i∈S(αj−c(j,i))≥1ρmeanc(j,IS)\alpha_{j}-\sum_{i\in S}(\alpha_{j}-c(j,i))\geq\frac{1}{\rho_{\textsf{\tiny mean}}}c(j,\mathsf{IS}).

The sum ∑i∈Sc(j,i)\sum_{i\in S}c(j,i) is the sum of square distances from jj to facilities in SS which is at least the sum of square distances of these facilities from their centroid μ\mu, i.e., ∑i∈Sc(j,i)≥∑i∈Sc(i,μ)\sum_{i\in S}c(j,i)\geq\sum_{i\in S}c(i,\mu). Moreover, by the identity, ∑i∈Sc(i,μ)=12s∑i∈S∑i′∈Sc(i,i′)\sum_{i\in S}c(i,\mu)=\frac{1}{2s}\sum_{i\in S}\sum_{i^{\prime}\in S}c(i,i^{\prime}), we get

As there is no edge between any pair of distinct facilities ii and i′i^{\prime} in S⊆ISS\subseteq\mathsf{IS}, we must have

where the last inequality follows because jj is contributing to both ii and i′i^{\prime} and hence min⁡(ti,ti′)≥αj\min(t_{i},t_{i^{\prime}})\geq\alpha_{j}. By the above,

Now, since δ≥2\delta\geq 2 the above upper bound is a non-increasing function of ss. Therefore, since s≥2s\geq 2 we always have

We also know that αj>c(j,i)\alpha_{j}>c(j,i) for any i∈Si\in S. Therefore, αj>c(j,IS)\alpha_{j}>c(j,\mathsf{IS}) and, since δ≥2\delta\geq 2:

We conclude the analysis of this case by rearranging the above inequality and recalling that ρmean≥1δ/2−1\rho_{\textsf{\tiny mean}}\geq\frac{1}{\delta/2-1}.

Here, we claim that there exists a tight facility ii such that

To see that such a facility ii exists, consider the witness w(j)w(j) of jj. By Claim 3.1, we have αj≥tw(j)\alpha_{j}\geq t_{w(j)} and since jj has a tight edge to its witness w(j)w(j), αj≥c(j,w(j)=d(j,w(j))2\alpha_{j}\geq c(j,w(j)=d(j,w(j))^{2}; or, equivalently, αj≥tw(j)\sqrt{\alpha_{j}}\geq\sqrt{t_{w(j)}} and αj≥d(j,w(j))\sqrt{\alpha_{j}}\geq d(j,w(j)) which implies that there is a tight facility, namely w(j)w(j), satisfying (3.4).

Since IS\mathsf{IS} is a maximal independent set of HH, either i∈ISi\in\mathsf{IS}, in which case d(j,IS)≤d(j,i)d(j,\mathsf{IS})\leq d(j,i), or there is an i′∈ISi^{\prime}\in\mathsf{IS} such that the edge (i′,i)(i^{\prime},i) is in HH, in which case

where the second inequality follows from d(i,i′)2=c(i,i′)≤δmin⁡(ti,ti′)d(i,i^{\prime})^{2}=c(i,i^{\prime})\leq\delta\min(t_{i},t_{i^{\prime}}) by the definition of HH. In any case, we have by (3.4)

Squaring both sides and recalling that ρmean≥(1+δ)2\rho_{\textsf{\tiny mean}}\geq(1+\sqrt{\delta})^{2} completes the last case and the proof of the theorem.

2.3 k𝑘k-Median objective in Euclidean metrics

We use a very similar approach as the one for kk-means (in Euclidean metrics) to address the kk-median objective in Euclidean metrics. In this section, we have c(j,i)=d(j,i)c(j,i)=d(j,i), i.e., the distances are not squared. Define,

We have δmed≈1.633\delta_{\textsf{\tiny med}}\approx 1.633 and ρmed≈2.633\rho_{\textsf{\tiny med}}\approx 2.633.

Let dd be a Euclidean metric on \cD∪\cF\cD\cup\cF and suppose that c(j,i)=d(j,i)c(j,i)=d(j,i) for every i∈\cFi\in\cF and j∈\cDj\in\cD. Then, for any λ≥0\lambda\geq 0, Algorithm JV(δmed)(\delta_{\textsf{\tiny med}}) constructs a solution α\alpha to DUAL(λ)(\lambda) and returns a set IS\mathsf{IS} of opened facilities such that

To simplify notation, we use δ\delta instead of δmed\delta_{\textsf{\tiny med}} throughout the proof. Similar to the proof of the previous theorem, we proceed by considering a single client jj and prove

Let SS denote N(j)∩ISN(j)\cap\mathsf{IS} and s=∣S∣s=|S|. We again proceed by case distinction on ss. We first bound the number of cases.

Using the centroid property of squared distances in Euclidean space,

where the last inequality follows from the fact that each pair of facilities i,i′∈S⊆ISi,i^{\prime}\in S\subseteq\mathsf{IS} are not adjacent in HH so d(i,i′)>δmin⁡(ti,ti′)d(i,i^{\prime})>\delta\min(t_{i},t_{i^{\prime}}) and min⁡(ti,ti′)≥αj\min(t_{i},t_{i^{\prime}})\geq\alpha_{j} since i,i′∈S⊆N(j)i,i^{\prime}\in S\subseteq N(j). Since the left-hand-side is upper bounded by sαj2s\alpha_{j}^{2}, we get s>δ2(s−1)2s>\frac{\delta^{2}(s-1)}{2}. Therefore s<δ2δ2−2=4s<\frac{\delta^{2}}{\delta^{2}-2}=4. ∎

We now proceed by considering the cases s=0,1,2,3s=0,1,2,3.

Consider the witness i1i_{1} of jj. We have αj≥ti1\alpha_{j}\geq t_{i_{1}} by Claim 3.1 and also αj≥c(j,i1)=d(j,i1)\alpha_{j}\geq c(j,i_{1})=d(j,i_{1}). Since IS\mathsf{IS} is a maximal independent set of HH, either i1∈ISi_{1}\in\mathsf{IS}, in which case c(j,IS)=d(j,IS)≤d(j,i1)≤αjc(j,\mathsf{IS})=d(j,\mathsf{IS})\leq d(j,i_{1})\leq\alpha_{j}, or there is an i2∈ISi_{2}\in\mathsf{IS} such that the edge (i1,i2)(i_{1},i_{2}) is in HH, in which case

In any case, we have c(j,IS)/ρmed≤αjc(j,\mathsf{IS})/\rho_{\textsf{\tiny med}}\leq\alpha_{j} as required.

If we let i∗i^{*} be the unique facility in SS,

where we used the triangle inequality and that c(i1∗,i2∗)>δmin⁡(ti1∗,ti2∗)≥δαjc(i_{1}^{*},i_{2}^{*})>\delta\min(t_{i^{*}_{1}},t_{i^{*}_{2}})\geq\delta\alpha_{j} since both i1∗i_{1}^{*} and i2∗i_{2}^{*} are in SS and hence i1∗i_{1}^{*} and i2∗i_{2}^{*} are not adjacent in HH. Rearranging the above inequality noting that αj≥c(j,IS)\alpha_{j}\geq c(j,\mathsf{IS}), we have

and the case follows because ρmed≥1/(δ−1)\rho_{\textsf{\tiny med}}\geq 1/(\delta-1).

using the triangle inequality. Rearranging the above inequality noting that αj≥c(j,IS)\alpha_{j}\geq c(j,\mathsf{IS}), we have

and the lemma follows because ρmed≥1/(3δ2−2)\rho_{\textsf{\tiny med}}\geq 1/(\frac{3\delta}{2}-2).

Quasi-polynomial time algorithm

In this section, we present a quasi-polynomial time approach that turns the LMP\mathsf{LMP} approximation algorithms presented in the previous section into approximation algorithms for the original problems (kk-means and kk-median), i.e., into algorithms that find solutions satisfying the strict constraint that at most kk facilities are opened. This is achieved by only deteriorating the approximation guarantee by an arbitrarily small factor regulated by ϵ\epsilon. We also introduce several of the ideas used in the polynomial time approach. Although the results obtained in this section are weaker (quasi-polynomial instead of polynomial), we believe that the easier quasi-polynomial algorithm serves as a good starting point before reading the more complex polynomial time algorithm. From now on, we concentrate on the kk-means problem and we let ρ=ρmean\rho=\rho_{\textsf{\tiny mean}} denote the approximation guarantee and δ=δmean\delta=\delta_{\textsf{\tiny mean}} denote the parameter to our algorithm, where ρmean\rho_{\textsf{\tiny mean}} and δmean\delta_{\textsf{\tiny mean}} are defined as in Section 3.2.2 (it will be clear that the techniques presented here are easily applicable to the other considered objectives, as well). Throughout this section we fix ϵ>0\epsilon>0 to be a small constant, and we assume for notational convenience and without loss of generality that n≫1/ϵn\gg 1/\epsilon. We shall also assume that the distances satisfy the following:

By losing a factor (1+100/n2)(1+100/n^{2}) in the approximation guarantee, we can assume that the squared-distance between any client jj and any facility ii satisfies: 1≤d(i,j)2≤n61\leq d(i,j)^{2}\leq n^{6}, where n=∣\cD∣n=|\cD|.

The proof follows by standard discretization techniques and is presented in Appendix C.

Our algorithm will produce a (ρ+O(ϵ))(\rho+O(\epsilon))-approximate solution. In the algorithm, we consider separately the two phases of the primal-dual algorithm from Section 3.2.2. Suppose that the first phase produces a set of values α={αj}j∈D\alpha=\{\alpha_{j}\}_{j\in\mathcal{D}} satisfying the following definition:

A feasible solution α\alpha of DUAL(λ)(\lambda) is good if for every j∈Dj\in\mathcal{D} there exists a tight facility ii such that (1+δ+ϵ)αj≥d(j,i)+δti(1+\sqrt{\delta}+\epsilon)\sqrt{\smash[b]{\alpha_{j}}}\geq d(j,i)+\sqrt{\smash[b]{\delta t_{i}}}.

Recall that for a dual solution α\alpha, tit_{i} is defined to be the largest α\alpha-value out of all clients that are contributing to a facility ii: ti=max⁡j∈N(i)αjt_{i}=\max_{j\in N(i)}\alpha_{j} where N(i)={j∈\cD:αj−d(i,j)2>0}N(i)=\{j\in\cD:\alpha_{j}-d(i,j)^{2}>0\}.

Two solutions α\alpha and α′\alpha^{\prime} are close if ∣αj′−αj∣≤1n2|\alpha^{\prime}_{j}-\alpha_{j}|\leq\frac{1}{n^{2}} for all j∈\cDj\in\cD.

We first describe our procedure for generating a close sequence of good solutions. Select the following parameters

We also use the notion of buckets that partition the real line:

We say that B(v)B(v) is the index of the bucket containing vv.

The buckets will be used to partition the α\alpha-values of the clients. As, in every constructed solution α\alpha, each client will have a tight edge to a facility, Lemma 4.1 implies that αj\alpha_{j} will always be at least 11. Therefore, the definition gives the property that the α\alpha-values of any two clients jj and j′j^{\prime} in the same bucket differ by at most a factor of 1+ϵ1+\epsilon. In other words, the buckets will be used to classify the clients according to similar α\alpha-values.

Note that this implies that each solution in our sequence is good. Indeed, consider a dual solution α\alpha that satisfies Invariant 1. Then, for any client jj, we have some ii (=w(j)=w(j)) such that αj≥d(i,j)\sqrt{\alpha_{j}}\geq d(i,j) (since jj has a tight edge to w(j)w(j)) and (1+ϵ)δαj≥δti\sqrt{(1+\epsilon)\delta\alpha_{j}}\geq\sqrt{\delta t_{i}} where we used that B(αj)≥B(ti)B(\alpha_{j})\geq B(t_{i}) implies (1+ϵ)αj≥ti(1+\epsilon)\alpha_{j}\geq t_{i}. Hence,

and so α\alpha is good (here, for the first inequality we have used that 1+ϵ≤1+ϵ/2\sqrt{1+\epsilon}\leq 1+\epsilon/2 and δ≤2\sqrt{\delta}\leq 2). We observe that our initial solution α(0)\alpha^{(0)} has ti=0t_{i}=0 for all i∈\cFi\in\cF, and so Invariant 1 holds trivially. In our following analysis, we will show that each call to Sweep preserves Invariant 1.

We now formally describe the procedure QuasiSweep that, given the last previously generated solution α\mboxin\alpha^{\mbox{\tiny{in}}} in our sequences produces the solution α\mboxout\alpha^{\mbox{\tiny{out}}} returned next.

We initialize the algorithm by setting αj=αj\mboxin\alpha_{j}=\alpha^{\mbox{\tiny{in}}}_{j} for each j∈\cDj\in\cD and by increasing the opening prices of each facility from λ\lambda to λ+ϵz\lambda+\epsilon_{z}. At this point, no facility is tight and therefore the solution α\alpha is not a good solution of DUAL(λ+ϵz)(\lambda+\epsilon_{z}). We now describe how to modify α\alpha to obtain a solution α\mboxout\alpha^{\mbox{\tiny{out}}} satisfying Invariant 1 (and hence into a good solution). The algorithm will maintain a current set AA of active clients and a current threshold θ\theta. Initially, A=∅A=\emptyset, and θ=0\theta=0. We slowly increase θ\theta and whenever θ=αj\theta=\alpha_{j} for some client jj, we add jj to AA. While j∈Aj\in A, we increase αj\alpha_{j} at the same rate as θ\theta. We remove a client jj from AA, whenever the following occurs:

jj has a tight edge to some tight facility ii with B(αj)≥B(ti)B(\alpha_{j})\geq B(t_{i}). In this case, we say that ii is the witness of jj.

Note that if a client jj satisfies this condition when it is added to AA, then we remove jj from AA immediately after it is added. In this case, αj\alpha_{j} is not increased.

Increasing the α\alpha-values for clients in AA, may cause the contributions to some facility ii to exceed the opening cost λ+ϵz\lambda+\epsilon_{z}. To prevent this from happening, we also decrease every value αj\alpha_{j} with B(αj)>B(θ)B(\alpha_{j})>B(\theta) at a rate of ∣A∣|A| times the rate that θ\theta is increasing. Observe that while there exists any such j∈N(i)j\in N(i), the total contribution of the clients toward opening this ii cannot increase, and so ii cannot become tight. It follows that once any facility ii becomes tight, B(αj)≤B(θ)B(\alpha_{j})\leq B(\theta) for every j∈N(i)j\in N(i) and so ii is presently a witness for all clients j∈N(i)∩Aj\in N(i)\cap A. At this moment all such clients in N(i)∩AN(i)\cap A will be removed from AA and their α\alpha-values will not subsequently be changed. Thus, ii remains tight until the end of QuasiSweep. Moreover, observe any other client j′j^{\prime} that is added to AA later will immediately be removed from AA as soon as it has a tight edge to ii. Thus, neither tit_{i} nor the total contribution to ii change throughout the remainder of QuasiSweep. In particular, ii remains a witness for all such clients jj for the remainder of QuasiSweep.

We stop increasing θ\theta once every client jj has been added and removed from AA. The procedure QuasiSweep then terminates and outputs α\mboxout=α\alpha^{\mbox{\tiny{out}}}=\alpha. As we have just argued, the contributions to any tight facility can never increase, and every client that is removed from jj will have a witness through the rest of QuasiSweep (in particular, in α\mboxout\alpha^{\mbox{\tiny{out}}}). Thus, α\mboxout\alpha^{\mbox{\tiny{out}}} is a feasible solution of DUAL(λ+ϵz)(\lambda+\epsilon_{z}) in which every client jj has a witness w(j)w(j), i.e., jj has a tight edge to the tight facility w(j)w(j) and B(tw(j))≤B(αj)B(t_{w(j)})\leq B(\alpha_{j}). Hence, the output of Sweep always satisfies Invariant 1.

This completes the description of QuasiSweep. For a small example of its execution see Figure 2. We now show that the produced sequence of solutions is close and to analyze the running time.

1.2 Closeness and running time

We begin by showing that QuasiSweep produces a close sequence of solutions.

For each client j∈\cDj\in\cD, we have ∣αj\mboxin−αj\mboxout∣≤1/n2|\alpha^{\mbox{\tiny{in}}}_{j}-\alpha^{\mbox{\tiny{out}}}_{j}|\leq 1/n^{2}.

We first note that the largest α\alpha-value at any time is at most (λ+ϵz)+n6≤Lϵz+n6=4n7+n6≤5n7(\lambda+\epsilon_{z})+n^{6}\leq L\epsilon_{z}+n^{6}=4n^{7}+n^{6}\leq 5n^{7}. This follows from the feasibility of α\alpha because, by Lemma 4.1, no squared-distance is larger than n6n^{6} and the opening cost of any facility is at most λ+ϵz≤Lϵz\lambda+\epsilon_{z}\leq L\epsilon_{z}. Hence, B(αj)≤1+⌊log⁡1+ϵ(5n7)⌋≤10log⁡1+ϵ(n)B(\alpha_{j})\leq 1+\lfloor\log_{1+\epsilon}(5n^{7})\rfloor\leq 10\log_{1+\epsilon}(n) for any client jj and dual solution α\alpha.

Any αj\alpha_{j} can increase by at most ϵzn3b\epsilon_{z}n^{3b} while B(θ)≤bB(\theta)\leq b.

The proof is by induction on b=0,1,…,10log⁡1+ϵ(n)b=0,1,\dots,10\log_{1+\epsilon}(n).

This case is trivially true because there are no clients jj with B(αj)=0B(\alpha_{j})=0, and so no clients can have been added to AA while B(θ)=0B(\theta)=0. Indeed, any client jj had a tight edge to some facility in α\mboxin\alpha^{\mbox{\tiny{in}}}, which by Lemma 4.1 implies αj\mboxin≥1\alpha^{\mbox{\tiny{in}}}_{j}\geq 1, and a client’s α\alpha-value can decrease only while some smaller α\alpha-value is increasing.

Now, we suppose some αj\alpha_{j} is increasing while B(θ)≤bB(\theta)\leq b. Note that we then must have αj=θ\alpha_{j}=\theta. Let ii be the witness of jj in α\mboxin\alpha^{\mbox{\tiny{in}}}, and let N\mboxin(i)N^{\mbox{\tiny{in}}}(i) be the set of clients contributing to ii in α\mboxin\alpha^{\mbox{\tiny{in}}}. We further suppose that αj\alpha_{j} is increased by at least ϵz\epsilon_{z} while B(θ)≤bB(\theta)\leq b; otherwise the claim follows immediately, since ϵz≤n3bϵz\epsilon_{z}\leq n^{3b}\epsilon_{z} for all b≥0b\geq 0.

First, suppose that αj<αj\mboxin\alpha_{j}<\alpha^{\mbox{\tiny{in}}}_{j} and so αj\alpha_{j} was previously decreased by QuasiSweep. Moreover, since αj\alpha_{j} has increased by at least ϵz\epsilon_{z} while B(θ)≤bB(\theta)\leq b, we must have previously decreased αj\alpha_{j} while B(αj)≤bB(\alpha_{j})\leq b. In particular, at the last moment αj\alpha_{j} was decreased, we must have had B(αj)≤bB(\alpha_{j})\leq b, and since αj\alpha_{j} was decreasing at this moment, we also had B(θ)<B(αj)B(\theta)<B(\alpha_{j}). Then, αj\alpha_{j} was decreased only while B(θ)<bB(\theta)<b. Moreover, during this time, jj’s α\alpha-value was decreased at a rate of ∣A∣|A|, and so was decreased (in total) at most nn times the largest amount that any other αj′\alpha_{j^{\prime}} was increased. By the induction hypothesis, any αj′\alpha_{j^{\prime}} was increased at most ϵz⋅n3b−3\epsilon_{z}\cdot n^{3b-3} while B(θ)<bB(\theta)<b, and so αj\alpha_{j} was decreased at most ϵz⋅n3b−2\epsilon_{z}\cdot n^{3b-2}. Thus, after αj\alpha_{j} increases by at most ϵz⋅n3b−2\epsilon_{z}\cdot n^{3b-2} we will again have αj=αj\mboxin\alpha_{j}=\alpha^{\mbox{\tiny{in}}}_{j}.

Now, we consider how much αj\alpha_{j} may increase while αj≥αj\mboxin\alpha_{j}\geq\alpha^{\mbox{\tiny{in}}}_{j} (and still B(θ)≤bB(\theta)\leq b). For each j′∈N\mboxin(i)j^{\prime}\in N^{\mbox{\tiny{in}}}(i) we must have initially had B(αj′\mboxin)≤B(αj\mboxin)B(\alpha^{\mbox{\tiny{in}}}_{j^{\prime}})\leq B(\alpha^{\mbox{\tiny{in}}}_{j}) since ii is a witness for jj in α\mboxin\alpha^{\mbox{\tiny{in}}}. Additionally, by our assumptions in this case, B(αj\mboxin)≤B(αj)≤bB(\alpha^{\mbox{\tiny{in}}}_{j})\leq B(\alpha_{j})\leq b. Thus, the α\alpha-value of any j′∈N\mboxin(i)j^{\prime}\in N^{\mbox{\tiny{in}}}(i) was decreased by QuasiSweep only while B(θ)≤b−1B(\theta)\leq b-1 and so by the same argument as above the α\alpha-value of any j′∈N\mboxin(i)j^{\prime}\in N^{\mbox{\tiny{in}}}(i) can decrease at most ϵzn3b−2\epsilon_{z}n^{3b-2} throughout QuasiSweep. Thus, the total contribution to ii from all j′≠jj^{\prime}\neq j can decrease at most (n−1)⋅ϵz⋅n3b−2(n-1)\cdot\epsilon_{z}\cdot n^{3b-2}. After increasing αj\alpha_{j} at most (n−1)⋅ϵz⋅n3b−2+ϵz(n-1)\cdot\epsilon_{z}\cdot n^{3b-2}+\epsilon_{z}, ii will again be tight. Moreover, at this moment, any client j′j^{\prime} contributing to ii was either already added to AA (and potentially also removed) in which case αj′≤θ=αj\alpha_{j^{\prime}}\leq\theta=\alpha_{j} or it was not already added to AA in which case αj′≤αj′\mboxin\alpha_{j^{\prime}}\leq\alpha^{\mbox{\tiny{in}}}_{j^{\prime}} since αj′\alpha_{j^{\prime}} has not been increased yet. In either case, B(αj′)≤B(αj)B(\alpha_{j^{\prime}})\leq B(\alpha_{j}) so ii is a witness for jj, and jj will be removed from AA.

Altogether, the total amount αj\alpha_{j} can increase while B(θ)≤bB(\theta)\leq b is then the sum of these two increases, which is ϵz⋅n3b−2+(n−1)⋅ϵz⋅n3b−2+ϵz≤ϵz⋅n3b\epsilon_{z}\cdot n^{3b-2}+(n-1)\cdot\epsilon_{z}\cdot n^{3b-2}+\epsilon_{z}\leq\epsilon_{z}\cdot n^{3b}, as required. ∎

The claim immediately bounds the increase αj\mboxout−αj\mboxin\alpha^{\mbox{\tiny{out}}}_{j}-\alpha^{\mbox{\tiny{in}}}_{j} by 1n3≤1n2\tfrac{1}{n^{3}}\leq\tfrac{1}{n^{2}} as required (recall that ϵz=n−3−10log⁡1+ϵn\epsilon_{z}=n^{-3-10\log_{1+\epsilon}n})). Moreover, as shown in the proof of the claim above, the α\alpha-value of every client decreases by no more than nn times the maximum increase in the α\alpha-value of any client. Then, the desired bound 1n2\tfrac{1}{n^{2}} on αj\mboxin−αj\mboxout\alpha^{\mbox{\tiny{in}}}_{j}-\alpha^{\mbox{\tiny{out}}}_{j} follows as well. ∎

For the sake of clarity, we have presented the QuasiSweep procedure in a continuous fashion. We show in Appendix A how to implement QuasiSweep as a discrete algorithm running in polynomial time. We conclude the analysis of this section by noting that, as Sweep is repeated L=nO(ϵ−1log⁡n)L=n^{O(\epsilon^{-1}\log n)} times, the total running time for producing the sequence α(0),α(1),…,α(L)\alpha^{(0)},\alpha^{(1)},\dots,\alpha^{(L)} is nO(ϵ−1log⁡n)n^{O(\epsilon^{-1}\log n)}.

2 Finding a solution of size k𝑘k

2.2 Analysis

The total running time is nO(ϵ−1log⁡n)n^{O(\epsilon^{-1}\log n)} since the number of steps LL (and the number of dual solutions in our sequence) is nO(ϵ−1log⁡n)n^{O(\epsilon^{-1}\log n)} and each step runs in polynomial time since it involves the construction of at most O(∣\cF∣)O(|\cF|) conflict graphs and maximal independent sets.

For any j∈\cD>0j\in\cD_{>0}, d(j,IS)2≤ρ⋅(αj−∑i∈Sjβij)d(j,\mathsf{IS})^{2}\leq\rho\cdot\left(\alpha_{j}-\sum_{i\in S_{j}}\beta_{ij}\right).

Consider some j∈\cD>0j\in\cD_{>0} and first suppose that ∣Sj∣=1|S_{j}|=1. Then, if we let Sj={i}S_{j}=\{i\}, αj=βij+d(j,i)2≥βij+d(j,IS)2\alpha_{j}=\beta_{ij}+d(j,i)^{2}\geq\beta_{ij}+d(j,\mathsf{IS})^{2} just as in “Case s=1s=1” of Theorem 3.4. Next, suppose that ∣Sj∣=s>1|S_{j}|=s>1. In other words, jj is contributing to multiple facilities in IS\mathsf{IS}. By construction we have αj≤min⁡(ti,ti′)\alpha_{j}\leq\min(t_{i},t_{i^{\prime}}) for any two facilities i,i′∈Sji,i^{\prime}\in S_{j}. Thus, αj−∑i∈Sjβij≥1ρd(j,IS)2\alpha_{j}-\sum_{i\in S_{j}}\beta_{ij}\geq\frac{1}{\rho}d(j,\mathsf{IS})^{2} by the exact same arguments as in “Case s>1s>1” of Theorem 3.4. ∎

Next, we bound the total service cost of all those clients that do not contribute to any facility in IS\mathsf{IS}. The proof is very similar to “Case s=0s=0” in the proof of Theorem 3.4.

For every j∈\cD0j\in\cD_{0}, d(j,IS)2≤(1+5ϵ)ρ⋅αjd(j,\mathsf{IS})^{2}\leq(1+5\epsilon)\rho\cdot\alpha_{j}.

Note the similarity of this inequality with that of (3.4) and the proof is now identical to “Case s=0s=0” of Theorem 3.4.

Indeed, since IS\mathsf{IS} is a maximal independent set of HH, either i∈ISi\in\mathsf{IS}, in which case d(j,IS)≤d(j,i)d(j,\mathsf{IS})\leq d(j,i), or there is a i′∈ISi^{\prime}\in\mathsf{IS} such that the edge (i′,i)(i^{\prime},i) is in HH, in which case

where the inequality follows from d(i,i′)2≤δmin⁡(ti,ti′)d(i,i^{\prime})^{2}\leq\delta\min(t_{i},t_{i^{\prime}}) by the definition of HH. In any case, we have (using n≫1/ϵn\gg 1/\epsilon)

Squaring both sides and recalling that ρ≥(1+δ)2\rho\geq(1+\sqrt{\delta})^{2} and that ϵ\epsilon is a small constant so (1+2ϵ)2≤(1+5ϵ)(1+2\epsilon)^{2}\leq(1+5\epsilon) completes the proof of the lemma. ∎

One difference compared to the analysis in Section 3.2.2 is that not all opened facilities are fully paid for. However, they are almost paid for:

For any i∈ISi\in\mathsf{IS}, ∑j∈\cDβij≥λ−1n\sum_{j\in\cD}\beta_{ij}\geq\lambda-\tfrac{1}{n}.

By Lemma 4.8 (note that by definition, ∑i∈ISβij=∑i∈Sjβij\sum_{i\in\mathsf{IS}}\beta_{ij}=\sum_{i\in S_{j}}\beta_{ij}),

We have thus proved that our quasi-polynomial algorithm produces a (ρ+O(ϵ))(\rho+O(\epsilon))-approximate solution which implies Theorem 1.1. The quasi-polynomial algorithms for the other considered problems are the same except for the selection of δ\delta and ρ\rho, and that in the kk-median problem the connection costs are the (non-squared) distances.

Polynomial time algorithm

We now show how to obtain a polynomial-time algorithm, building on the ideas presented in the previous section. As in Section 4, we focus exclusively on the kk-means problem, and let δ=δmean≈2.3146\delta=\delta_{\textsf{\tiny mean}}\approx 2.3146 and ρ=ρmean=(1+δ)2≈6.3574\rho=\rho_{\textsf{\tiny mean}}=(1+\sqrt{\delta})^{2}\approx 6.3574, and assume that the squared-distances between clients and facilities are in [1,n6][1,n^{6}] by Lemma 4.1. Additionally, we choose ϵ\epsilon and γ\gamma to be suitably small constants with 0<γ≪ϵ≪10<\gamma\ll\epsilon\ll 1, and for notational convenience we assume without loss of generality that n≫1/γn\gg 1/\gamma.

Similarly to Section 4.1, we give an algorithm for generating a close sequence of feasible solutions to DUAL(λ)(\lambda), and then show how to use this sequence to generate a sequence of integral solutions that must contain some solution of size exactly kk. Here, however, we ensure that our sequence of feasible solutions is of polynomial length. In order to accomplish this, we must relax some of the requirements in our definition of a good solution (Definition 4.2).

Second, we shall designate a set of special facilities FS⊆\cF\mathcal{F}_{\textsf{\tiny S}}\subseteq\cF that we shall open, even if they are not tight. To each special facility i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} we assign a set of special clients DS(i)⊆\cD\mathcal{D}_{\textsf{\tiny S}}(i)\subseteq\cD that are allowed to pay for ii. Then, for each i∈FSi\in\mathcal{F}_{\textsf{\tiny S}}, we define the time τi=max⁡j∈N(i)∩DS(i)αj\tau_{i}=\max_{j\in N(i)\cap\mathcal{D}_{\textsf{\tiny S}}(i)}\alpha_{j}, while for each i∈\cF∖FSi\in\cF\setminus\mathcal{F}_{\textsf{\tiny S}} we set τi=ti=max⁡j∈N(i)αj\tau_{i}=t_{i}=\max_{j\in N(i)}\alpha_{j}. Again, we adopt the convention that τi=0\tau_{i}=0 if N(i)∩DS(i)=∅N(i)\cap\mathcal{D}_{\textsf{\tiny S}}(i)=\emptyset for i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} or N(i)=∅N(i)=\emptyset for i∈\cF∖FSi\in\cF\setminus\mathcal{F}_{\textsf{\tiny S}}. Although a facility in FS\mathcal{F}_{\textsf{\tiny S}} is not necessarily tight, we shall require that the total of all payments to such facilities by special clients is almost equal to λ∣FS∣\lambda|\mathcal{F}_{\textsf{\tiny S}}| (Condition 3 of Definition 5.1). That is, on average, each facility of FS\mathcal{F}_{\textsf{\tiny S}} is almost tight.

Finally, given the times τi\tau_{i}, we shall not require that every client jj has some tight or special facility ii such that (1+δ+10ϵ)αj≥d(j,i)+δτi(1+\sqrt{\delta}+10\epsilon)\sqrt{\smash[b]{\alpha_{j}}}\geq d(j,i)+\sqrt{\smash[b]{\delta\tau_{i}}}. Specifically, we shall allow some small set of bad clients DB\mathcal{D}_{\textsf{\tiny B}} to instead satisfy a weaker inequality 6αj≥d(j,i)+δτi6\sqrt{\smash[b]{\alpha_{j}}}\geq d(j,i)+\sqrt{\smash[b]{\delta\tau_{i}}} for some tight or special facility ii. Such clients will have a higher service cost, so we require that their total contribution to the cost of an optimal solution is small (Condition 2 of Definition 5.1).

Combining the above, we have the following definition.

For all i∈\cFi\in\cF, λ≤zi≤λ+1n\lambda\leq z_{i}\leq\lambda+\frac{1}{n}.

There exists a subset DB\mathcal{D}_{\textsf{\tiny B}} of clients so that for all j∈\cDj\in\cD there is a facility w(j)w(j) that is either tight or in FS\mathcal{F}_{\textsf{\tiny S}} and:

(1+δ+10ϵ)2αj≥(d(j,w(j))+δ⋅τw(j))2(1+\sqrt{\delta}+10\epsilon)^{2}\alpha_{j}\geq\left(d(j,w(j))+\sqrt{\smash[b]{\delta\cdot\tau_{w(j)}}}\right)^{2} for all j∈\cD∖DBj\in\cD\setminus\mathcal{D}_{\textsf{\tiny B}}.

Observe that any λ\lambda-roundable solution with FS=∅\mathcal{F}_{\textsf{\tiny S}}=\emptyset, and DB=∅\mathcal{D}_{\textsf{\tiny B}}=\emptyset is essentially a good solution for DUAL(λ+1n)(\lambda+\frac{1}{n}) (as defined for the quasi-polynomial algorithm in Section 4) except that the opening costs of the facilities are allowed to vary slightly. We shall also say that (α,z)(\alpha,z) is roundable if (α,z,∅,DS)(\alpha,z,\emptyset,\mathcal{D}_{\textsf{\tiny S}}) is roundable.

Initially, we set λ←0\lambda\leftarrow 0 and then initialize \cS(0)\cS^{(0)} by setting zi(0)←0z^{(0)}_{i}\leftarrow 0 for all i∈\cFi\in\cF and FS=∅\mathcal{F}_{\textsf{\tiny S}}=\emptyset (observe that DS\mathcal{D}_{\textsf{\tiny S}} is then an empty function), and constructing α(0)\alpha^{(0)} as follows. We set αj=0\alpha_{j}=0 for all j∈\cDj\in\cD and then increase all αj\alpha_{j} at a uniform rate. We stop increasing a value αj\alpha_{j} whenever jj gains a tight edge to some facility i∈\cFi\in\cF or 2αj≥d(j,j′)+6αj′2\sqrt{\alpha_{j}}\geq d(j,j^{\prime})+6\sqrt{\alpha_{j^{\prime}}} for some j′∈\cDj^{\prime}\in\cD (the rationale behind this choice will be made clear in Section 7). Finally, we initialize our current integral solution IS(0)=\cF\mathsf{IS}^{(0)}=\cF.

Algorithm 1 executes L=4n7⋅ϵz−1L=4n^{7}\cdot\epsilon_{z}^{-1} base price increases, each of which performs ∣\cF∣|\cF| calls to RaisePrice. In order to show that Algorithm 1 runs it polynomial time, it is sufficient to show that each call to RaisePrice and GraphUpdate produces a polynomial length sequence in polynomial time. In the next sections, we describe these procedures in more detail and show that they run in polynomial time. In addition, we show that RaisePrice produces a sequence of roundable solutions (Proposition 8.18) that are close (Proposition 8.10). In Section 6, we show that given these solutions, GraphUpdate finds a (ρ+1000ϵ)(\rho+1000\epsilon)-approximate solution (Theorem 6.4).We remark that we have chosen to first describe GraphUpdate as that procedure is very similar to QuasiGraphUpdate in the quasi-polynomial algorithm whereas RaisePrices is more complex. This implies our main theorem:

For any ϵ>0\epsilon>0, there is a (ρ+ϵ)(\rho+\epsilon)-approximation algorithm for kk-means.

Opening a set of exactly k𝑘k facilities in a close, roundable sequence

We define the client-facility graph GG of a roundable solution \cS=(α,z,FS,DS)\cS=(\alpha,z,\mathcal{F}_{\textsf{\tiny S}},\mathcal{D}_{\textsf{\tiny S}}) as in Section 3.1 with the following two changes: First, recall that we now consider a facility ii tight if and only if ∑j∈N(i)βij=zi\sum_{j\in N(i)}\beta_{ij}=z_{i}. Second, we shall additionally add every facility i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} to GG, but place an edge between each i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} and j∈\cDj\in\cD only if j∈N(i)∩DS(i)j\in N(i)\cap\mathcal{D}_{\textsf{\tiny S}}(i). Intuitively, we treat special facilities i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} essentially the same as tight facilities, except only those clients in N(i)∩DS(i)N(i)\cap\mathcal{D}_{\textsf{\tiny S}}(i) are considered to be paying for ii.

Formally, let \cV\cV denote the set of all tight facilities or special facilities with respect to \cS\cS. Then, GG is a bipartite graph on \cD\cD and \cV\cV that contains an edge (i,j)(i,j) if and only if i∈\cV∖FSi\in\cV\setminus\mathcal{F}_{\textsf{\tiny S}} and j∈N(i)j\in N(i) or i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} and j∈N(i)∩DS(i)j\in N(i)\cap\mathcal{D}_{\textsf{\tiny S}}(i). As before, we assign an opening time τi\tau_{i} to each i∈\cVi\in\cV. For i∈\cV∖FSi\in\cV\setminus\mathcal{F}_{\textsf{\tiny S}}, τi=ti=max⁡j∈N(i)αj\tau_{i}=t_{i}=\max_{j\in N(i)}\alpha_{j}, and for i∈FSi\in\mathcal{F}_{\textsf{\tiny S}}, τi=max⁡j∈N(i)∩DS(i)αj\tau_{i}=\max_{j\in N(i)\cap\mathcal{D}_{\textsf{\tiny S}}(i)}\alpha_{j}. In other words, τi\tau_{i} equals the maximum αj\alpha_{j} over all clients jj such that (j,i)(j,i) is an edge in GG (in the case that there is no such edge, we adopt the convention that τi=0\tau_{i}=0). Note that τi≤ti\tau_{i}\leq t_{i} for any facility ii.

1 Analysis

GraphUpdate clearly runs in polynomial time since the number of steps is polynomial and each step requires only the construction of a conflict graph and greedily maintaining a maximal independent set.

For any j∈\cD>0j\in\cD_{>0}, d(j,IS)2≤ρ⋅(αj−∑i∈Sjβij)d(j,\mathsf{IS})^{2}\leq\rho\cdot\left(\alpha_{j}-\sum_{i\in S_{j}}\beta_{ij}\right).

Next, we bound the total service cost of all those clients that do not contribute to any facility in IS\mathsf{IS}. The proof is very similar to that of Lemma 4.7 except that we also need to handle the bad clients in DB\mathcal{D}_{\textsf{\tiny B}}.

We now bound the contributions to the opened facilities as in Lemma 4.8 except that we also need to handle the special facilities.

and the lemma follows since ∣DS(x)(i)∣≤∣\cD∣=n|\mathcal{D}_{\textsf{\tiny S}}^{(x)}(i)|\leq|\cD|=n. ∎

For any IS\mathsf{IS} produced by GraphUpdate with ∣IS∣≥k|\mathsf{IS}|\geq k,

We conclude the proof by substituting this bound in (6.2):

The algorithm RaisePrice

In this section, we give the details of the algorithm RaisePrice, which is responsible for raising facility prices and generating sequences of roundable solutions in Algorithm 1. It is based on similar insights as used in the quasi-polynomial algorithm described in Section 4. Let us first provide a high-level overview of our approach. Recall that in our analysis of that procedure, changing the values αj\alpha_{j} in some bucket bb by ϵz\epsilon_{z} roughly required changing the values in bucket b+1b+1 by up to nϵzn\epsilon_{z}. Because there were Ω(log⁡(n))\Omega(\log(n)) buckets, the total change in the last bucket was potentially ϵznΩ(log⁡n)\epsilon_{z}n^{\Omega(\log n)}, and so to obtain a close sequence of α\alpha-values, we required ϵz=n−Ω(log⁡n)\epsilon_{z}=n^{-\Omega(\log n)} in that section. Here, we reduce the dependence on nn by changing the way in which we increase the opening price zz. As in the quasi-polynomial procedure, our algorithm repeatedly increases the opening cost of every facility from λ\lambda to λ+ϵz\lambda+\epsilon_{z}, for some appropriate small increment ϵz=n−O(1)<ϵ\epsilon_{z}=n^{-O(1)}<\epsilon. However, instead of performing each such increase for every facility at once, we instead increase only a single facility’s price at a time. Each such increase will still cause some clients to become unsatisfied (or undecided as we shall call them), and so we must repair the solution. In contrast to the quasi-polynomial procedure, RaisePrice repairs the solution over a series of stages. We show this will result in a polynomial length sequence of close, roundable solutions.

Notation: Throughout this section, we let ziz_{i} denote the current price for a facility i∈\cFi\in\cF, where always zi∈{λ,λ+ϵz}z_{i}\in\{\lambda,\lambda+\epsilon_{z}\}. We shall now say that ii is tight if ∑j∈\cDβij=zi\sum_{j\in\cD}\beta_{ij}=z_{i}, where as before for a solution α\alpha, we use βij\beta_{ij} as a shorthand for [αj−d(j,i)2]+[\alpha_{j}-d(j,i)^{2}]^{+}. It will also be convenient to denote αj\sqrt{\alpha_{j}} by αˉj\bar{\alpha}_{j}. Note that βij>0\beta_{ij}>0, if and only if αˉj>d(j,i)\bar{\alpha}_{j}>d(j,i). As in the quasi-polynomial procedure, we shall divide the range of possible values for αj\alpha_{j} into buckets: we define B(v)=1+⌊log⁡1+ϵv⌋B(v)=1+\lfloor\log_{1+\epsilon}v\rfloor for any v≥1v\geq 1 and B(v)=0B(v)=0, for all v≤1v\leq 1.

To control the number of undecided (unsatisfied) clients, it will be important to control the way clients may be increased and decreased throughout our algorithm. To accomplish this, we shall not insist that every client has some tight witness in every vector α\alpha that we produce (in contrast to Invariant 1 in the quasi-polynomial algorithm). Rather, we shall consider several different types of clients:

witnessed clients jj have a tight edge to some tight facility ii with B(αj)≥B(ti)B(\alpha_{j})\geq B(t_{i}). In this case, we say that ii is a witness for jj. Note that if ii is a witness for jj we necessarily have (1+ϵ)αj≥ti(1+\epsilon)\alpha_{j}\geq t_{i}.Here, we use that all α\alpha-values will be at least one and two values in the same bucket differs thus by at most a factor 1+ϵ1+\epsilon. We also remark that this is the same concept as in Invariant 1 of the quasi-polynomial algorithm.

for some other client j′j^{\prime}. In this case, we say that j′j^{\prime} stops jj. Note that if j′j^{\prime} stops jj, we necessarily have αˉj≥3αˉj′\bar{\alpha}_{j}\geq 3\bar{\alpha}_{j^{\prime}} and so αj≥9αj′\alpha_{j}\geq 9\alpha_{j^{\prime}}.

undecided clients jj are neither witnessed nor stopped.

Let us additionally call any client that is witnessed or stopped decided. Note that the sets of witnessed and stopped clients are not necessarily disjoint. However, we have the following lemma, which follows directly from the triangle inequality and our definitions:

Suppose that jj is stopped. Then jj must be stopped by some j′j^{\prime} that is not stopped.

We proceed by induction over clients jj in non-decreasing order of αj\alpha_{j}. First, note that the client jj with smallest value αj\alpha_{j} cannot be stopped. For the general case, suppose that jj is stopped by some j1j_{1}. Then, αj1<αj\alpha_{j_{1}}<\alpha_{j}. If j1j_{1} is stopped, then by the induction hypothesis it must be stopped by some j2j_{2} that is not stopped. Then, we have 2αˉj≥d(j,j1)+6αˉj12\bar{\alpha}_{j}\geq d(j,j_{1})+6\bar{\alpha}_{j_{1}}, and 2αˉj1≥d(j1,j2)+6αˉj22\bar{\alpha}_{j_{1}}\geq d(j_{1},j_{2})+6\bar{\alpha}_{j_{2}}. It follows that

Thus jj is stopped by j2j_{2}, as well. ∎

Intuitively, the stopping criterion will ensure that no αj\alpha_{j} grows too large compared to the α\alpha-values of nearby clients. At the same time it is designed so that all decided clients will have a good approximation guarantee.

Finally, we shall require that the following invariants hold throughout the execution of Algorithm 1.

For all j∈\cDj\in\cD, αj≥1\alpha_{j}\geq 1 and for all i∈\cFi\in\cF, ∑j∈\cDβij≤zi\sum_{j\in\cD}\beta_{ij}\leq z_{i}.

We remark that for dual feasibility αj≥0\alpha_{j}\geq 0 is sufficient but the stronger assumption αj≥1\alpha_{j}\geq 1 which is implied by Lemma 4.1 will be convenient.

For any two clients j,j′∈\cDj,j^{\prime}\in\cD, αˉj≤d(j,j′)+αˉj′\bar{\alpha}_{j}\leq d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}

Note that the above invariant says that the ball centered at jj of radius αˉj\bar{\alpha}_{j} does not strictly contain the ball centered at j′j^{\prime} of radius αˉj′\bar{\alpha}_{j^{\prime}}. For future reference, we refer to the ball centered at client jj of radius αˉj\bar{\alpha}_{j} as the α\alpha-ball of that client.

Every client is decided in (α(0),z(0))(\alpha^{(0)},z^{(0)}).

Invariant 4 will be maintained as follows (as we show formally in Lemma 8.1): The initial solution satisfies the invariant. Then, given an initial solution (α(0),z(0))(\alpha^{(0)},z^{(0)}) in which all clients are decided, RaisePrice will output a close, roundable sequence \cS(1),…,\cS(q)\cS^{(1)},\ldots,\cS^{(q)}, where \cS(q)=(α(q),z(q),∅,DS(q))\cS^{(q)}=(\alpha^{(q)},z^{(q)},\emptyset,\mathcal{D}_{\textsf{\tiny S}}^{(q)}) is a roundable solution in which all clients are decided. As the next call to RaisePrice will use (α(q),z(q))(\alpha^{(q)},z^{(q)}) as the initial solution, the invariant is maintained.

RaisePrice is described in detail in Algorithm 2. Initially, we suppose that we are given a λ\lambda-roundable and completely decided dual solution (α(0),z(0))(\alpha^{(0)},z^{(0)}) (i.e., satisfying Invariant 4) where zi∈{λ,λ+ϵz}z_{i}\in\{\lambda,\lambda+\epsilon_{z}\} for all i∈\cFi\in\cF. Additionally, let IS(0)\mathsf{IS}^{(0)} be the independent set of the conflict graph H(0)H^{(0)} associated to the roundable solution (α(0),z(0))(\alpha^{(0)},z^{(0)}), produced at the end of the previous call to GraphUpdate as described in Algorithm 1. We shall assume that ∣IS(0)∣≥k|\mathsf{IS}^{(0)}|\geq k, as otherwise, Algorithm 1 would have already terminated. For a specified facility i+i^{+}, RaisePrice sets zi+←zi++ϵzz_{i^{+}}\leftarrow z_{i^{+}}+\epsilon_{z}. This may result in some clients using i+i^{+} as a witness becoming undecided; specifically, those clients that are not stopped and have no witness except i+i^{+} in (α(0),z(0))(\alpha^{(0)},z^{(0)}). We let U(0)U^{(0)} to be the set of all these initially undecided clients. Throughout RaisePrice, we maintain a set UU of currently undecided clients, and repair the solution over a series of multiple stages, by calling an auxiliary procedure, Sweep. Each repair stage ss will be associated with a threshold θs\theta_{s}, and will make multiple calls to the procedure Sweep, each producing a new solution α\alpha. The algorithm RaisePrice constructs a roundable solution \cS=(α,z,FS,DS)\cS=(\alpha,z,\mathcal{F}_{\textsf{\tiny S}},\mathcal{D}_{\textsf{\tiny S}}) from each such α\alpha, and returns the sequence \cS(1),…,\cS(q)\cS^{(1)},\ldots,\cS^{(q)} of all such roundable solutions, in the order they were constructed. RaisePrice terminates once it constructs some solution in which all clients are decided. In Section 8, we shall show that this must happen after at most O(log⁡n)O(\log n) stages, and that each stage requires only a polynomial number of calls to Sweep. In addition, we show that the produced sequence is close and roundable.

where K=Θ(ϵ−1γ−4)K=\Theta(\epsilon^{-1}\gamma^{-4}) is an integer parameter and σ\sigma is a integer “shift” parameter chosen uniformly at randomWe shall show that it is in fact easy to select an appropriate σ\sigma deterministically (see Remark 8.16). from [0,K/2)[0,K/2). Our selection of thresholds ensures that each stage updates only those αj\alpha_{j} in a constant KK number of buckets. Thus, the total change in any α\alpha-value will be at most nO(K)n^{O(K)}, which will allow us to obtain a polynomial running time. This comes at the price of some clients remaining undecided after each stage, and some such clients jj may have service cost much higher than ρ⋅αj\rho\cdot\alpha_{j}. We let \cB\cB denote the set of all such “bad” clients. Using that the α\alpha-values are relatively well-behaved throughout RaisePrice, we show that only those clients jj with αj(0)\alpha^{(0)}_{j} relatively near to the threshold θs\theta_{s} can be added to \cB\cB in stage ss. Then, the random shift σ\sigma in choosing our definition of thresholds will allow us to show that only an O(K−1)O(K^{-1}) fraction of clients can be bad throughout RaisePrice. Moreover, we can bound the cost of each client j∈\cBj\in\cB by 36αj(0)36\alpha^{(0)}_{j}. Intuitively, then, if at least a constant fraction of each αj(0)\alpha^{(0)}_{j} is contributing to the service cost c(j,IS(0))c(j,\mathsf{IS}^{(0)}), then we can bound the effect of these bad clients by setting KK to be a sufficiently large constant, then using Theorem 6.4 to conclude that:

Unfortunately, it may happen that many clients j∈\cBj\in\cB have αj(0)−c(j,IS(0))≈αj(0)\alpha^{(0)}_{j}-c(j,\mathsf{IS}^{(0)})\approx\alpha^{(0)}_{j}. That is, some clients may be using almost all of their α(0)\alpha^{(0)}-values to pay for the opening costs of facilities. In this case, we could have ∑j∈\cBαj(0)\sum_{j\in\cB}\alpha^{(0)}_{j} arbitrarily larger than ∑j∈\cDc(j,IS(0))\sum_{j\in\cD}c(j,\mathsf{IS}^{(0)}). In order to cope with this situation, we introduce a notion of dense clients and facilities in Section 8.5. These troublesome clients and facilities are handled by carefully constructing the remaining components FS\mathcal{F}_{\textsf{\tiny S}} and DS\mathcal{D}_{\textsf{\tiny S}} of the roundable solution in line 2. We defer the formal details to Section 8.5, but the intuition is if enough bad clients are paying mostly for the opening cost of a facility, then we can afford to open this facility even if it is not tight. This is precisely the role of special facilities in Definition 5.1.

2 The Sweep Procedure

It remains to describe our last procedure, Sweep in more detail. Sweep operates in some stage ss, with corresponding threshold value θs\theta_{s}, takes as input the previous α\alpha produced by the algorithm, and produces a new α\alpha. Note that in every call to Sweep, we let (α(0),z(0))(\alpha^{(0)},z^{(0)}) denote the roundable solution passed to RaisePrice, and UU is the set of undecided clients immediately before Sweep was called. Just like QuasiSweep, the procedure Sweep, maintains a current set of active clients AA and a current threshold θ\theta, where initially, A=∅A=\emptyset, and θ=0\theta=0. We slowly increase θ\theta and whenever θ=αj\theta=\alpha_{j} for some client jj, we add jj to AA. While j∈Aj\in A, we increase αj\alpha_{j} at the same rate as θ\theta. However, in contrast to QuasiSweep, Sweep removes a client jj from AA, whenever one of the following five events occurs:

jj is stopped by some client j′j^{\prime}.

j∈Uj\in U and αj\alpha_{j} is ϵz\epsilon_{z} larger than its value at the start of Sweep.

αj≥θs\alpha_{j}\geq\theta_{s} and αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j}.

There is a client j′j^{\prime} that has already been removed from AA such that αˉj≥d(j,j′)+αˉj′\bar{\alpha}_{j}\geq d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}.

We remark that Rule 55 says that jj is removed from AA as soon as its α\alpha-ball contains the α\alpha-ball of another client j′j^{\prime} that is not currently in AA. This rule is designed so that the algorithm maintains Invariant 3. Also note that if a client jj satisfies one of these conditions when it is added to AA, then we remove jj from AA immediately after it is added. In this case, αj\alpha_{j} is not increased.

As in QuasiSweep, increasing the values αj\alpha_{j} for clients in AA may cause ∑j∈\cDβij\sum_{j\in\cD}\beta_{ij} to exceed ziz_{i} for some facility ii. We again handle this by decreasing some other values αj′\alpha_{j^{\prime}}. However, here we are more careful in our choice of clients to decrease. Let us call a facility ii potentially tight if one of the following conditions hold:

There is some j∈N(i)j\in N(i) with αj>αj(0)\alpha_{j}>\alpha^{(0)}_{j}.

For all j∈N(0)(i)j\in N^{(0)}(i), αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j}.

We now decrease αj′\alpha_{j^{\prime}} if and only if B(αj′)>B(θ)B(\alpha_{j^{\prime}})>B(\theta) and additionally: for some potentially tight facility ii with j′∈N(i)j^{\prime}\in N(i) and ∣N(i)∩A∣≥1|N(i)\cap A|\geq 1, we have αj′=ti\alpha_{j^{\prime}}=t_{i}. We decrease each such αj′\alpha_{j^{\prime}} at a rate of ∣A∣|A| times the rate that θ\theta is increasing. To see that this maintains feasibility we observe that at any time there are ∣A∩N(i)∣|A\cap N(i)| clients whose contribution to facility ii is increasing, and these contributions are increasing at the same rate as θ\theta. Suppose that ii is tight at some moment with some j∈N(i)∩Aj\in N(i)\cap A. Then, since zi≥zi(0)z_{i}\geq z^{(0)}_{i}, there must be either at least one client j′∈N(i)j^{\prime}\in N(i) with αj′>αj′(0)\alpha_{j^{\prime}}>\alpha^{(0)}_{j^{\prime}} or we have αj′=αj′(0)\alpha_{j^{\prime}}=\alpha^{(0)}_{j^{\prime}} for all j′∈N(0)(i)j^{\prime}\in N^{(0)}(i). In either case, ii must be potentially tight. Consider some client j0∈N(i)j_{0}\in N(i) with αj0=ti\alpha_{j_{0}}=t_{i} and note that B(αj0)=B(ti)>B(αj)=B(θ)B(\alpha_{j_{0}})=B(t_{i})>B(\alpha_{j})=B(\theta), since otherwise we would remove jj from AA by Rule 1. The value of αj0\alpha_{j_{0}} is currently decreasing at a rate of ∣A∣≥∣N(i)∩A∣|A|\geq|N(i)\cap A| times the rate that θ\theta is increasing. Thus, the total contribution to any tight facility ii is never increased.

As in QuasiSweep, we stop increasing θ\theta once every client jj has been added and removed from AA, and then output the resulting α\alpha. Note that Sweep never changes any αj<θ\alpha_{j}<\theta. In particular, once some jj has been removed from AA it is not subsequently changed. Additionally, observe that once B(θ)≥B(αj)B(\theta)\geq B(\alpha_{j}), Sweep will not decrease αj\alpha_{j}.

Analysis of the polynomial-time algorithm

In contrast to the quasi-polynomial time procedure, here our analysis is quite involved. Let us first provide a high-level overview of our overall approach. Note that any solution that does not contain any undecided clients is roundable with FS=∅\mathcal{F}_{\textsf{\tiny S}}=\emptyset, and DB=∅\mathcal{D}_{\textsf{\tiny B}}=\emptyset. Indeed, for any witnessed client jj there is a tight facility ii with (1+ϵ)αˉj≥ti(1+\epsilon)\bar{\alpha}_{j}\geq\sqrt{t_{i}} and αˉj≥d(j,i)\bar{\alpha}_{j}\geq d(j,i) and so

Similarly, any stopped client jj in such a solution must be stopped by some witnessed j′j^{\prime} (using Lemma 7.1 and the assumption that all clients are decided). Let ii be the witness of j′j^{\prime}. Then,

since 1≤δ≤21\leq\sqrt{\delta}\leq 2. As τi≤ti\tau_{i}\leq t_{i} for any facility i∈\cFi\in\cF, the required inequalities from Definition 5.1 hold for any decided client jj. In the following our main goal will then be to bound the cost in the general case in which some clients in a solution are undecided.

We start by showing that Invariants 2, 3, and 4 hold.

Invariants 2, 3, and 4 hold throughout Algorithm 1.

We begin by proving Invariant 2, i.e., that the algorithm maintains a feasible dual solution α\alpha with the additional property that αj≥1\alpha_{j}\geq 1 for all j∈\cDj\in\cD. Recall our construction of the initial solution α(0)\alpha^{(0)} for Algorithm 1: we set αj=0\alpha_{j}=0 for all j∈\cDj\in\cD and then increase all αj\alpha_{j} at a uniform rate. We stop increasing a value αj\alpha_{j} whenever jj gains a tight edge to some facility i∈\cFi\in\cF or 2αˉj≥d(j,j′)+6αˉj′2\bar{\alpha}_{j}\geq d(j,j^{\prime})+6\bar{\alpha}_{j^{\prime}} for some j′∈\cDj^{\prime}\in\cD. Note that no αj\alpha_{j} is increased after αj=d(j,i)2\alpha_{j}=d(j,i)^{2} for some facility ii. Thus, we have βij(0)=0\beta^{(0)}_{ij}=0 for all j∈\cDj\in\cD and i∈\cFi\in\cF, and so α(0)\alpha^{(0)} is feasible. Now, we show that min⁡j∈\cDαj(0)≥1\min_{j\in\cD}\alpha^{(0)}_{j}\geq 1. Consider the client j0j_{0} that first stops increasing in our greedy initialization process. At the time αj0\alpha_{j_{0}} stops increasing, we have αj=αj0\alpha_{j}=\alpha_{j_{0}} for all j∈\cDj\in\cD and so 2αˉj≥d(j,j′)+6αˉj′2\bar{\alpha}_{j}\geq d(j,j^{\prime})+6\bar{\alpha}_{j^{\prime}} cannot hold for any pair j,j′j,j^{\prime} of clients. Thus, j0j_{0} must have stopped increasing because αj0=d(j0,i)2\alpha_{j_{0}}=d(j_{0},i)^{2} for some facility ii. By our preprocessing (Lemma 4.1) we have d(j0,i)2≥1d(j_{0},i)^{2}\geq 1, and so αj0(0)≥1\alpha^{(0)}_{j_{0}}\geq 1. Moreover, αj0(0)=min⁡j∈\cDαj(0)\alpha^{(0)}_{j_{0}}=\min_{j\in\cD}\alpha^{(0)}_{j}, and so indeed αj(0)≥1\alpha^{(0)}_{j}\geq 1 for all j∈\cDj\in\cD. Now, we show that Algorithm 1 preserves Invariant 2. Note that α\alpha is altered only by subroutine Sweep, and by construction, Sweep ensures that always ∑jβij≤zi\sum_{j}\beta_{ij}\leq z_{i}. Moreover, Sweep decreases any αj\alpha_{j} only while there is some j′∈N(i)∩Aj^{\prime}\in N(i)\cap A for some facility ii. By our preprocessing (Lemma 4.1) αj′≥d(j′,i)2≥1\alpha_{j^{\prime}}\geq d(j^{\prime},i)^{2}\geq 1 for any such j′j^{\prime}. Thus, no αj\alpha_{j} is ever decreased below 1.

Next, we prove Invariant 3, i.e., that no client’s α\alpha-ball is strictly contained in the α\alpha-ball of another client. First, let us show that the initially constructed solution (α(0),z(0))(\alpha^{(0)},z^{(0)}) satisfies Invariant 3. Note that αj(0)\alpha^{(0)}_{j} is equal to the value of αj\alpha_{j} at the time that our initialization procedure stopped increasing αj\alpha_{j}. Consider any pair of clients jj and j′j^{\prime}. If αj(0)≤αj′(0)\alpha^{(0)}_{j}\leq\alpha^{(0)}_{j^{\prime}} then clearly αˉj(0)≤d(j,j′)+αˉj′(0)\bar{\alpha}^{(0)}_{j}\leq d(j,j^{\prime})+\bar{\alpha}^{(0)}_{j^{\prime}}. Thus, suppose that αj(0)>αj′(0)\alpha^{(0)}_{j}>\alpha^{(0)}_{j^{\prime}}, so αj′\alpha_{j^{\prime}} stopped increasing before αj\alpha_{j} in our initialization procedure. If αj′\alpha_{j^{\prime}} stopped increasing because j′j^{\prime} gained a tight edge to a facility ii, then once αˉj=d(j,j′)+αˉj′\bar{\alpha}_{j}=d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}, jj will have a tight edge to ii and stop increasing. If αj′\alpha_{j^{\prime}} stopped increasing because 2αˉj′=d(j′,j′′)+6αˉj′′2\bar{\alpha}_{j^{\prime}}=d(j^{\prime},j^{\prime\prime})+6\bar{\alpha}_{j^{\prime\prime}} for some client j′′j^{\prime\prime}, then when αˉj=d(j,j′)+αˉj′\bar{\alpha}_{j}=d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}} we will have

and so αj\alpha_{j} must stop increasing. In any case, we must have αˉj(0)≤d(j,j′)+αˉj′(0)\bar{\alpha}^{(0)}_{j}\leq d(j,j^{\prime})+\bar{\alpha}^{(0)}_{j^{\prime}}. Having shown that the invariant is true for the first α(0)\alpha^{(0)} constructed in Algorithm 1, let us now prove that it is maintained. First, we show that the inequality αˉj≤d(j,j′)+αˉj′\bar{\alpha}_{j}\leq d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}} will not be violated by increasing αˉj\bar{\alpha}_{j}. Suppose that j∈Aj\in A and so αj\alpha_{j} is increasing. As long as j′∈Aj^{\prime}\in A, as well, we have αj=αj′=θ\alpha_{j}=\alpha_{j^{\prime}}=\theta, and so αˉj≤d(j,j′)+αˉj′\bar{\alpha}_{j}\leq d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}. On the other hand, if j′∉Aj^{\prime}\not\in A, then as soon as αˉj=d(j,j′)+αˉj′\bar{\alpha}_{j}=d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}, jj will be removed from AA by Rule 5 and αˉj\bar{\alpha}_{j} will no longer increase. Now we show that also αˉj≤d(j,j′)+αˉj′\bar{\alpha}_{j}\leq d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}} will not be violated by decreasing αj′\alpha_{j^{\prime}}. Suppose that αj′\alpha_{j^{\prime}} is decreasing. Then, there must be some potentially tight facility ii with j′∈N(i)j^{\prime}\in N(i) and ti=αj′t_{i}=\alpha_{j^{\prime}}. Let ii be any such facility. If at some point we have αˉj=d(j,j′)+αˉj′\bar{\alpha}_{j}=d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}, then we must also have j∈N(i)j\in N(i) at this moment and αj≥αj′=ti\alpha_{j}\geq\alpha_{j^{\prime}}=t_{i}. Thus, αj\alpha_{j} is also decreasing and in fact αj=αj′\alpha_{j}=\alpha_{j^{\prime}} (since also αj≤ti\alpha_{j}\leq t_{i}). Then, αˉj\bar{\alpha}_{j} and αˉj′\bar{\alpha}_{j^{\prime}} are decreasing at same rate and so αˉj=d(j,j′)+αˉj′\bar{\alpha}_{j}=d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}} as long as αˉj′\bar{\alpha}_{j^{\prime}} continues to decrease.

Finally, we prove Invariant 4, i.e., that the input solution (α(0),z(0))(\alpha^{(0)},z^{(0)}) to RaisePrice is always completely decided. Every client jj is either stopped by some client j′j^{\prime} or has a tight edge to some facility ii in our initially constructed solution (α(0),z(0))(\alpha^{(0)},z^{(0)}). Moreover, the initialization process ensures that N(i)=∅N(i)=\emptyset for all ii (since βij=0\beta_{ij}=0 for all i∈\cFi\in\cF and j∈\cDj\in\cD). Thus, in the latter case ti=0t_{i}=0 and so ii is in fact a witness for jj, and so every client jj is indeed either stopped or witnessed in this initial solution (α(0),z(0))(\alpha^{(0)},z^{(0)}). To show that Invariant 4 holds throughout the rest of the Algorithm 1, we note that (α(0),z(0))(\alpha^{(0)},z^{(0)}) is always updated (in line 1 of Algorithm 1 where \cS(0)←\cS(q)\cS^{(0)}\leftarrow\cS^{(q)}) with the α\alpha-values corresponding to the last solution produced in a call to RaisePrice. Due to the condition in the main loop of RaisePrice, every client is decided in this solution. ∎

The next lemma makes some basic observations about the way in which Sweep alters the α\alpha-values.

The procedure Sweep satisfies the following properties:

Any client jj that becomes decided after being added to AA remains decided until the end of the same call to Sweep.

If the α\alpha-ball of a client jj contains the α\alpha-ball of a decided client, then jj is decided.

Consider the solution α\alpha at the beginning of Sweep, and let μ=min⁡j′∈Uαj′\mu=\min_{j^{\prime}\in U}\alpha_{j^{\prime}}. Then, no αj<μ\alpha_{j}<\mu is increased by Sweep, and no αj\alpha_{j} with B(αj)≤B(μ)B(\alpha_{j})\leq B(\mu) is decreased by Sweep.

For Property 1, suppose first that jj had a witness ii at some point after being added to AA. Consider any j′∈N(i)j^{\prime}\in N(i) at this moment. At this moment, we must have B(αj′)≤B(αj)≤B(θ)B(\alpha_{j^{\prime}})\leq B(\alpha_{j})\leq B(\theta) and so αj′\alpha_{j^{\prime}} cannot be decreased for the remainder of Sweep. In particular, jj retains a tight edge to ii until the end of Sweep and ii remains tight until the end of Sweep. Additionally, any client j′j^{\prime} with αj′>ti\alpha_{j^{\prime}}>t_{i} will be removed from AA as soon as it gains a tight edge to ii (by Rule 1 since ii would then be a witness for j′j^{\prime}). Thus, tit_{i} cannot increase and so ii remains a witness for jj until the end of Sweep. Next, suppose that jj was stopped by some j′j^{\prime} after being added to AA. Then, at this moment, αj′<αj≤θ\alpha_{j^{\prime}}<\alpha_{j}\leq\theta. Hence, for the remainder of Sweep, neither αj′\alpha_{j^{\prime}} or αj\alpha_{j} are changed and so jj remains stopped by j′j^{\prime}.

For Property 2 suppose that the α\alpha-ball of client jj contains the α\alpha-ball of a decided client j′j^{\prime}. Then if j′j^{\prime} has a witness ii, then ii is also a witness for jj, since αˉj≥d(j,j′)+αˉj′≥d(j,j′)+d(j′,i)≥d(j,i)\bar{\alpha}_{j}\geq d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}\geq d(j,j^{\prime})+d(j^{\prime},i)\geq d(j,i) and B(αj)≥B(αj′)≥B(ti)B(\alpha_{j})\geq B(\alpha_{j^{\prime}})\geq B(t_{i}). Similarly if j′j^{\prime} is stopped by some client j′′j^{\prime\prime} then

and so jj is also stopped by j′′j^{\prime\prime}.

Finally, for Property 3, consider the first client jj whose value αj\alpha_{j} is increased by Sweep. Note that jj must not be decided before calling Sweep: otherwise, since no other α\alpha-value has yet been changed, this would hold at the moment jj was added to AA, as well, and so jj would immediately be removed by Rule 1 or 2. Thus, the first αj\alpha_{j} that is increased by Sweep must correspond to some j∈Uj\in U, and at the moment this occurs, θ=αj≥μ\theta=\alpha_{j}\geq\mu. Furthermore, by the definition of Sweep, no αj\alpha_{j} can then be decreased unless B(αj)≥B(μ)+1B(\alpha_{j})\geq B(\mu)+1. ∎

2 Characterizing currently undecided clients

The next observations follow rather directly from the properties given in Lemma 8.2 and the invariants. These facts will help us bound the number of clients that can become bad throughout the algorithm, and also the total number of calls to Sweep that must be executed in each call to RaisePrice. Throughout this section, we consider a single call to RaisePrice and let (α(0),z(0),IS(0),i+)(\alpha^{(0)},z^{(0)},\mathsf{IS}^{(0)},i^{+}) be its input.

In stage 1, Sweep is executed only a single time. After this call, for every j∈U(0)j\in U^{(0)}, we have αj≤αj(0)+ϵz<θ1\alpha_{j}\leq\alpha^{(0)}_{j}+\epsilon_{z}<\theta_{1} and jj is decided.

Consider any client j0∈U(0)j_{0}\in U^{(0)}. Then i+i^{+} was j0j_{0}’s witness in (α(0),z(0))(\alpha^{(0)},z^{(0)}), and j0j_{0} must not have been stopped or have had any other witness i≠i+i\neq i^{+}. Observe that our choice of θ1\theta_{1} ensures that αj0(0)+ϵz<θ1\alpha^{(0)}_{j_{0}}+\epsilon_{z}<\theta_{1}, so any j0∈U(0)j_{0}\in U^{(0)} will be removed from AA by Rule 3 once αj=αj(0)+ϵz\alpha_{j}=\alpha^{(0)}_{j}+\epsilon_{z}. Thus we must have αj≤αj0(0)+ϵz<θ1\alpha_{j}\leq\alpha^{(0)}_{j_{0}}+\epsilon_{z}<\theta_{1} at the end of Sweep for every j0∈U(0)j_{0}\in U^{(0)}.

This also implies that no such j0j_{0} is removed from AA by Rule 4. We now show that when j0j_{0} is removed from AA by any other rule, it must be decided. By Property 1, j0j_{0} is then decided at the end of Sweep, as well. First, we observe that if j0j_{0} is removed from AA by Rules 1 or 2, then it is decided by definition. Next, suppose that j0j_{0} was removed by Rule 3, and let μ=min⁡j∈U(0)αj(0)\mu=\min_{j\in U^{(0)}}\alpha^{(0)}_{j}. Since i+i^{+} was a witness for every j∈U(0)j\in U^{(0)}, we must have B(αj(0))≤B(μ)B(\alpha^{(0)}_{j})\leq B(\mu) for all j∈N(0)(i+)j\in N^{(0)}(i^{+}). Thus, by Property 3 of Sweep, αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j} for every j∈N(0)(i+)j\in N^{(0)}(i^{+}). Then, since αj0=αj0(0)+ϵz\alpha_{j_{0}}=\alpha^{(0)}_{j_{0}}+\epsilon_{z}, at the time j0j_{0} was removed from AA, i+i^{+} must have been tight and also a witness for j0j_{0}. By Property 1, j0j_{0} then remains decided until the end of Sweep. Finally, we consider the case in which j0j_{0} was removed by Rule 5. We show the following:

Suppose that some client jj is removed from AA by Rule 5 and that jj is undecided at this time. Then, αj≥θ1\alpha_{j}\geq\theta_{1}.

Consider the first time that any client jj that is undecided is removed from AA by Rule 5. By Property 2, the α\alpha-ball of this client jj must contain the α\alpha-ball of some undecided client j′j^{\prime} that was previously removed from AA. By Property 1 and our choice of time, j′j^{\prime} must have been removed from AA by Rule 3 or 4. However, if j′j^{\prime} was removed by Rule 3, we must have j′∈U(0)j^{\prime}\in U^{(0)} and so, as we have previously shown, j′j^{\prime} must be decided. Thus, j′j^{\prime} was removed by Rule 4, and so presently αj=θ≥αj′≥θ1\alpha_{j}=\theta\geq\alpha_{j^{\prime}}\geq\theta_{1}. To complete the proof, we observe that any client that is removed from AA after jj must have an α\alpha-value at least αj\alpha_{j}. ∎

It follows by the above Claim that no j0∈U(0)j_{0}\in U^{(0)} can be undecided when it is removed by Rule 5, since, as we have shown, αj0<θ1\alpha_{j_{0}}<\theta_{1} for all such j0j_{0}. By the above cases, every client j0∈U(0)j_{0}\in U^{(0)} is decided with αj≤αj0(0)+ϵz<θ1\alpha_{j}\leq\alpha^{(0)}_{j_{0}}+\epsilon_{z}<\theta_{1} at the end of Sweep.

It remains to show that RaisePrice continues to stage 2 after one call to Sweep. Consider some client jj that is undecided at the end of Sweep. By Property 1 jj must not have been removed from AA by Rule 1 or Rule 2. Moreover, we must have j∉U(0)j\not\in U^{(0)} and so jj was not removed from AA by Rule 3. Thus, jj was removed from AA by Rule 4 or 5. In either case (by the definition of Rule 4 or the above Claim), we have αj≥θ1\alpha_{j}\geq\theta_{1} at this moment (and so also at the end of Sweep, since no αj\alpha_{j} is changed after jj is removed from AA). Thus, after the first call to Sweep in stage 1, every undecided client jj has αj≥θ1\alpha_{j}\geq\theta_{1} and so RaisePrice immediately continues to stage 2. ∎

Consider any solution (α,z)(\alpha,z) produced by RaisePrice. If jj is undecided in (α,z)(\alpha,z), then αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j}.

Suppose toward contradiction that the statement is false. Consider the first call to Sweep that produces a solution violating it and for this call let jj be the first client (in the order of removal from AA) such that αj<αj(0)\alpha_{j}<\alpha^{(0)}_{j} when jj is removed from AA but jj is undecidedBy Property 1, any client jj violating the statement must be undecided when removed from AA and have αj<αj(0)\alpha_{j}<\alpha^{(0)}_{j} at the time of its removal from AA since Sweep does not change jj’s α\alpha-value thereafter.. Then since, jj is undecided it was removed by Rule 3, 4, or 5. If jj was removed by Rule 4, then at this moment αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j}. Suppose then that jj was removed by Rule 3. Then, j∈Uj\in U. By Lemma 8.3, no client j∈Uj\in U before the first call to Sweep is undecided after this call, so jj must have been undecided at the end of some preceding call to Sweep. By assumption, we must have had αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j} at the moment jj was removed from AA in this preceding call (and so also immediately before the present call). But, αj\alpha_{j} has increased by ϵz\epsilon_{z}, so still αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j}. Finally, suppose jj was removed by Rule 5. Then, the α\alpha-ball of jj must contain the α\alpha-ball of a client j′j^{\prime} that has already been removed AA. If j′j^{\prime} is decided, then by Property 2 jj is decided as well. Suppose that j′j^{\prime} is undecided. Then, since we picked the first client that violated the condition of the lemma, and j′j^{\prime} was already removed from AA, we have that αj′≥αj′(0)\alpha_{j^{\prime}}\geq\alpha^{(0)}_{j^{\prime}}. But then, if αj<αj(0)\alpha_{j}<\alpha^{(0)}_{j}, we have αˉj(0)>αˉj≥d(j,j′)+αˉj′≥d(j,j′)+αˉj′(0)\bar{\alpha}^{(0)}_{j}>\bar{\alpha}_{j}\geq d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}\geq d(j,j^{\prime})+\bar{\alpha}^{(0)}_{j^{\prime}} and α(0)\alpha^{(0)} violates Invariant 3. In all cases we showed that we must have αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j} at the moment that jj was removed from AA, and so also at the end of Sweep, contradicting our assumption that αj<αj(0)\alpha_{j}<\alpha^{(0)}_{j} for some undecided client jj. ∎

In every stage s>1s>1, no αj\alpha_{j} is changed by Sweep until θ≥θs−1\theta\geq\theta_{s-1}. In particular, every client jj with αj<θs−1\alpha_{j}<\theta_{s-1} is decided for every solution produced by RaisePrice in stage s>1s>1.

By Property 3 of Sweep, no αj\alpha_{j} is changed until θ=min⁡j∈Uαj\theta=\min_{j\in U}\alpha_{j}. Thus to prove the first part of the claim, it suffices to show that in every stage s>1s>1, if U≠∅U\neq\emptyset then min⁡j∈Uαj≥θs−1\min_{j\in U}\alpha_{j}\geq\theta_{s-1}. Note that the second part of the claim then follows as well for every solution except the one produced by the final call to Sweep in RaisePrice, and this last solution has no undecided clients by Invariant 4.

Let us now prove that min⁡j∈Uαj≥θs−1\min_{j\in U}\alpha_{j}\geq\theta_{s-1} in every stage s>1s>1. We proceed by induction on the number of calls to Sweep made in stage ss. Before the first call to Sweep in stage ss, we must have αj≥θs−1\alpha_{j}\geq\theta_{s-1} for every j∈Uj\in U, since otherwise stage s−1s-1 would have continued. So, consider some later call to Sweep in stage ss, and consider any j∈Uj\in U before this call. Then, we must have had jj undecided after the preceding call to Sweep in stage ss. Moreover, by Property 1, jj must have been undecided when it was removed from AA in this preceding call. Consider the first client jj that was undecided upon removal from AA in this preceding call. Then, jj cannot have been removed by Rules 1 or 2. Moreover, since every client that has been removed from AA before jj is decided, Property 2 implies that jj must not have been removed by Rule 5. If jj was removed by Rule 3, then we must have had j∈Uj\in U already in this preceding call to Sweep, and so by the induction hypothesis, αj≥θs−1\alpha_{j}\geq\theta_{s-1}. Then, since jj was removed from AA by Rule 3, we had αj≥θs−1+ϵz\alpha_{j}\geq\theta_{s-1}+\epsilon_{z}. Finally, if jj was removed by Rule 4, then we must have αj≥θs>θs−1\alpha_{j}\geq\theta_{s}>\theta_{s-1} by definition. Thus, throughout every stage s>1s>1, if U≠∅U\neq\emptyset, then min⁡j∈Uαj≥θs−1\min_{j\in U}\alpha_{j}\geq\theta_{s-1}, as desired. ∎

Suppose that in (α(0),z(0))(\alpha^{(0)},z^{(0)}), jj is not stopped and has only i+i^{+} as a witness, i.e., j∈U(0)j\in U^{(0)}. Then, we have that jj is decided with αj≤αj(0)+ϵz\alpha_{j}\leq\alpha^{(0)}_{j}+\epsilon_{z} in every solution (α,z)(\alpha,z) produced by \textscRaisePrice(α(0),z(0),IS(0),i+){\textsc{RaisePrice}}(\alpha^{(0)},z^{(0)},\mathsf{IS}^{(0)},i^{+}).

We have j∈U(0)j\in U^{(0)} and so by Lemma 8.3, jj is decided with αj≤αj(0)+ϵz<θ1\alpha_{j}\leq\alpha^{(0)}_{j}+\epsilon_{z}<\theta_{1} in the first solution produced by RaisePrice. Moreover, by Lemma 8.5, αj\alpha_{j} remains unchanged and jj remains decided in all later stages. ∎

3 Bounding the cost of clients

In this section we derive inequalities that are used to bound the service cost of each (α,z)(\alpha,z) produced during the algorithm. Consider some solution α\alpha produced by the algorithm, and define

The set \cB\cB is defined to contain those clients that are (potentially) bad, i.e., have worse connection cost than our target guarantee. Specifically, we now show that all clients j∈\cD∖\cBj\in\cD\setminus\cB, satisfy the first inequality of Property 2 in Definition 5.1 (with τi\tau_{i} replaced by tit_{i}), while all clients (in particular those in \cB\cB) satisfy a slightly weaker inequality.

Consider any (α,z)(\alpha,z) produced by RaisePrice. For every client jj the following holds:

If j∈\cD∖\cBj\in\cD\setminus\cB, then there exists a tight facility ii such that (1+δ+ϵ)αˉj≥d(j,i)+δti(1+\sqrt{\delta}+\epsilon)\bar{\alpha}_{j}\geq d(j,i)+\sqrt{\delta t_{i}}.

There exists a tight facility ii such that 6αˉj(0)≥d(j,i)+δti6\bar{\alpha}^{(0)}_{j}\geq d(j,i)+\sqrt{\delta t_{i}}.

The proof is by induction on the well-ordered set (with respect to the natural order ≤\leq)

Specifically, we prove the following induction hypothesis: for r∈Rr\in R,

each client j∈\cD∖\cBj\in\cD\setminus\cB with αj≤r\alpha_{j}\leq r has a tight facility ii such that (1+δ+ϵ)αˉj≥d(j,i)+δti(1+\sqrt{\delta}+\epsilon)\bar{\alpha}_{j}\geq d(j,i)+\sqrt{\delta t_{i}};

each client j∈\cDj\in\cD with (1+ϵ)αj(0)≤r(1+\epsilon)\alpha^{(0)}_{j}\leq r has a tight facility ii such that 6αˉj(0)≥d(j,i)+δti6\bar{\alpha}^{(0)}_{j}\geq d(j,i)+\sqrt{\delta t_{i}}.

The statement then follows from the above with r=arg⁡max⁡r∈Rrr=\arg\max_{r\in R}r.

For the base case (when r=0r=0), the claim is vacuous since there is no client jj such that αj≤0\alpha_{j}\leq 0 or (1+ϵ)αj(0)≤0(1+\epsilon)\alpha^{(0)}_{j}\leq 0 (because every α\alpha-value is at least 11 by Invariant 2). For the induction step, we assume that each client j∈\cD∖\cBj\in\cD\setminus\cB with αj<r\alpha_{j}<r satisfies (a) and each client j∈\cDj\in\cD with (1+ϵ)αj(0)<r(1+\epsilon)\alpha^{(0)}_{j}<r satisfies (b). We need to prove that any client j0∈\cD∖\cBj_{0}\in\cD\setminus\cB with αj0=r\alpha_{j_{0}}=r (respectively, j0∈\cDj_{0}\in\cD with (1+ϵ)αj0(0)=r(1+\epsilon)\alpha^{(0)}_{j_{0}}=r) satisfies (a) (respectively, (b)). We divide the proof into two cases.

We prove that in this case j0j_{0} satisfies (a). Since j0∉\cBj_{0}\not\in\cB, either j0j_{0} has a witness, j0j_{0} is currently stopped, or there is another client jj such that 2αˉj0≥d(j0,j)+6αˉj(0)2\bar{\alpha}_{j_{0}}\geq d(j_{0},j)+6\bar{\alpha}^{(0)}_{j}.

Suppose first that j0j_{0} has a witness ii. Then, ii is a tight facility and, since j0j_{0} has a tight edge to ii, d(j0,i)≤αˉj0d(j_{0},i)\leq\bar{\alpha}_{j_{0}}. Moreover, B(αj0)≥B(ti)B(\alpha_{j_{0}})\geq B(t_{i}) which implies that (1+ϵ2)αˉj0≥(1+ϵ)αˉj0≥ti(1+\tfrac{\epsilon}{2})\bar{\alpha}_{j_{0}}\geq\sqrt{(1+\epsilon)}\bar{\alpha}_{j_{0}}\geq\sqrt{t_{i}}. Therefore, using that δ≤2\sqrt{\delta}\leq 2,

Now suppose that j0j_{0} is stopped by another client jj. Then αj≤αj0/32=r/9\alpha_{j}\leq\alpha_{j_{0}}/3^{2}=r/9. On the one hand, if j∈\cD∖\cBj\in\cD\setminus\cB, we have d(j,i)+δti≤(1+δ+ϵ)αˉj≤6αˉjd(j,i)+\sqrt{\delta t_{i}}\leq(1+\sqrt{\delta}+\epsilon)\bar{\alpha}_{j}\leq 6\bar{\alpha}_{j} for some tight facility ii by the induction hypothesis (a). On the other hand, if j∈\cBj\in\cB then jj is undecided so by Lemma 8.4, αj(0)≤αj\alpha^{(0)}_{j}\leq\alpha_{j}. This in turn implies that αj(0)≤αj≤r/9<r/(1+ϵ)\alpha^{(0)}_{j}\leq\alpha_{j}\leq r/9<r/(1+\epsilon). We can thus apply the induction hypothesis (b) to jj, to conclude that there is a tight facility ii such that d(j,i)+δti≤6αˉj(0)≤6αˉjd(j,i)+\sqrt{\delta t_{i}}\leq 6\bar{\alpha}^{(0)}_{j}\leq 6\bar{\alpha}_{j}. From above we have that, whether jj is in \cB\cB or not, there is a tight facility ii such that

where the penultimate inequality uses the fact that j0j_{0} is stopped by jj and thus 2αˉj0≥d(j,j0)+6αˉj2\bar{\alpha}_{j_{0}}\geq d(j,j_{0})+6\bar{\alpha}_{j}.

Finally, suppose that j0j_{0} is not stopped or witnessed. Then, j0j_{0} is currently undecided and, as j0∉\cBj_{0}\not\in\cB, there is a client jj such that 2αˉj0≥d(j0,j)+6αˉj(0)2\bar{\alpha}_{j_{0}}\geq d(j_{0},j)+6\bar{\alpha}^{(0)}_{j}. This implies that αj(0)≤αj0/9=r/9<r/(1+ϵ)\alpha^{(0)}_{j}\leq\alpha_{j_{0}}/9=r/9<r/(1+\epsilon). We can thus apply the induction hypothesis (b) to jj to conclude, that there is a tight facility ii such that d(j,i)+δti≤6αˉj(0)d(j,i)+\sqrt{\delta t_{i}}\leq 6\bar{\alpha}^{(0)}_{j}. Now, we have:

where the second inequality follows from ϵz<ϵ\epsilon_{z}<\epsilon and αj0(0)≥1\alpha^{(0)}_{j_{0}}\geq 1 by Invariant 2. We can thus again apply the induction hypothesis (a) to conclude that there is a tight facility ii satisfying d(j0,i)+δti≤(1+δ+ϵ)αˉj0≤6αˉj0(0)d(j_{0},i)+\sqrt{\delta t_{i}}\leq(1+\sqrt{\delta}+\epsilon)\bar{\alpha}_{j_{0}}\leq 6\bar{\alpha}^{(0)}_{j_{0}}. Thus, from now on, we assume that αj0≥αj0(0)\alpha_{j_{0}}\geq\alpha^{(0)}_{j_{0}} and that j0∉U(0)j_{0}\not\in U^{(0)}. We divide the remaining part of the analysis into two sub-cases depending on whether j0j_{0} was stopped in α(0)\alpha^{(0)}.

First, suppose that j0j_{0} was stopped in α(0)\alpha^{(0)} by another client jj. Then αj(0)≤αj0(0)/9<r/(1+ϵ)\alpha^{(0)}_{j}\leq\alpha^{(0)}_{j_{0}}/9<r/(1+\epsilon) and so by the induction hypothesis (b), there is a tight facility ii satisfying d(j,i)+δti≤6αˉj(0)d(j,i)+\sqrt{\delta t_{i}}\leq 6\bar{\alpha}^{(0)}_{j}. Hence,

Finally, suppose that j0j_{0} was not stopped in α(0)\alpha^{(0)}. Then since every client is decided in α(0)\alpha^{(0)} (Invariant 4) j0j_{0} had a witness ii in α(0)\alpha^{(0)}. Moreover, as j0∉U(0)j_{0}\not\in U^{(0)}, we may assume that i≠i+i\neq i^{+} and so zi=zi(0)z_{i}=z^{(0)}_{i}. By the definition of a witness, αj1(0)≤(1+ϵ)αj0(0)\alpha^{(0)}_{j_{1}}\leq(1+\epsilon)\alpha^{(0)}_{j_{0}} for all j1∈N(0)(i)j_{1}\in N^{(0)}(i). If αj1≥αj1(0)\alpha_{j_{1}}\geq\alpha^{(0)}_{j_{1}} for all j1∈N(0)(i)j_{1}\in N^{(0)}(i), then, since zi=zi(0)z_{i}=z^{(0)}_{i}, our feasibility invariant (Invariant 2) implies that in fact αj1=αj1(0)\alpha_{j_{1}}=\alpha^{(0)}_{j_{1}} for all j1∈N(0)(i)j_{1}\in N^{(0)}(i) and so N(i)=N(0)(i)N(i)=N^{(0)}(i). Therefore, in this case ii is still a witness for j0j_{0} and d(j0,i)+δti≤(1+δ+ϵ)αˉj0(0)≤6αˉj0(0)d(j_{0},i)+\sqrt{\delta t_{i}}\leq(1+\sqrt{\delta}+\epsilon)\bar{\alpha}^{(0)}_{j_{0}}\leq 6\bar{\alpha}^{(0)}_{j_{0}}. It remains to consider the case when αj1<αj1(0)\alpha_{j_{1}}<\alpha^{(0)}_{j_{1}} for some j1∈N(0)(i)j_{1}\in N^{(0)}(i) (note that j1≠j0j_{1}\neq j_{0}, since αj0≥αj0(0)\alpha_{j_{0}}\geq\alpha^{(0)}_{j_{0}} by assumption). Since αj1<αj1(0)\alpha_{j_{1}}<\alpha^{(0)}_{j_{1}}, j1j_{1} must be decided (by Lemma 8.4) and so j1∈\cD∖\cBj_{1}\in\cD\setminus\cB. Moreover, αj1<αj1(0)≤(1+ϵ)αj0(0)=r\alpha_{j_{1}}<\alpha^{(0)}_{j_{1}}\leq(1+\epsilon)\alpha^{(0)}_{j_{0}}=r, and so we can apply the induction hypothesis (a) to conclude that there is a tight facility i1i_{1} satisfying d(j1,i1)+δti1≤(1+δ+ϵ)αˉj1<(1+δ+ϵ)αˉj1(0)d(j_{1},i_{1})+\sqrt{\delta t_{i_{1}}}\leq(1+\sqrt{\delta}+\epsilon)\bar{\alpha}_{j_{1}}<(1+\sqrt{\delta}+\epsilon)\bar{\alpha}^{(0)}_{j_{1}}. Then,

as required. ∎ Lemma 8.7 shows that the clients in \cD∖\cB\cD\setminus\cB satisfy the first inequality of Property 2 in Definition 5.1 while the potentially bad clients j∈\cBj\in\cB satisfy a slightly weaker inequality. It remains to prove that the potentially bad clients will have a small contribution towards the total cost of our solution.

4 Showing that α𝛼\alpha-values are stable

The key to our remaining analysis is showing that the α\alpha-values are relatively well-behaved throughout the algorithm. The following lemma implies that Sweep decreases an αj′\alpha_{j^{\prime}} only because it is increasing an αj\alpha_{j} which is at most a constant factor smaller. This will imply the required stability properties.

At any time during Algorithm 1: if a client jj has a tight edge to some facility, then αj′≤192αj\alpha_{j^{\prime}}\leq 19^{2}\alpha_{j} for every other client j′j^{\prime} with a tight edge to this facility.

We prove the following stronger statement: at any time during Algorithm 1, we have

for any pair j,j′j,j^{\prime} of clients. To see that this implies the lemma consider two clients jj and j′j^{\prime} that both have tight edges to i∗i^{*}. Then

which implies that αj′≤192αj\alpha_{j^{\prime}}\leq 19^{2}\alpha_{j}.

Inequality (8.2) is clearly satisfied by the initial solution α(0)\alpha^{(0)} constructed at the beginning of Algorithm 1, since we stop increasing any αj\alpha_{j} as soon as 2αˉj≥d(j′,j)+6αˉj′2\bar{\alpha}_{j}\geq d(j^{\prime},j)+6\bar{\alpha}_{j^{\prime}} for any client j′j^{\prime}, and neither αj\alpha_{j} nor αj′\alpha_{j^{\prime}} are later changed. We now show that (8.2) continues to hold throughout the execution of Algorithm 1. The only procedure that updates the dual solution is Sweep, so let us analyze its behavior.

First note that the inequality cannot become violated by increasing αj′\alpha_{j^{\prime}}, because as soon as 2αˉj′≥d(j′,j)+6αˉj2\bar{\alpha}_{j^{\prime}}\geq d(j^{\prime},j)+6\bar{\alpha}_{j}, j′j^{\prime} will be removed from AA by Rule 22 of Sweep. It remains to prove that the inequality does not become violated because αj\alpha_{j} is decreasing. To this end, consider a time when αj\alpha_{j} is decreasing. Then, by the definition of Sweep, there must be some potentially tight facility ii, such that j∈N(i)j\in N(i) with αj=ti\alpha_{j}=t_{i}. Since jj has the largest α\alpha-value in N(i)N(i) and ii is potentially tight, there is some client j1∈N(i)j_{1}\in N(i) (note that possibly j1=jj_{1}=j) such that αj1(0)≤αj1≤αj\alpha^{(0)}_{j_{1}}\leq\alpha_{j_{1}}\leq\alpha_{j}. We show the following:

There exists some facility i⋆i^{\star} such that i⋆i^{\star} was tight in (α(0),z(0))(\alpha^{(0)},z^{(0)}) and also:

By Invariant 4, every client must be decided in (α(0),z(0))(\alpha^{(0)},z^{(0)}). Consider client j1j_{1}. If j1j_{1} was witnessed in (α(0),z(0))(\alpha^{(0)},z^{(0)}), then there was a tight facility i⋆i^{\star} such that d(j1,i⋆)≤αˉj1(0)≤αˉjd(j_{1},i^{\star})\leq\bar{\alpha}^{(0)}_{j_{1}}\leq\bar{\alpha}_{j} and αj′′(0)≤(1+ϵ)αj1(0)\alpha^{(0)}_{j^{\prime\prime}}\leq(1+\epsilon)\alpha^{(0)}_{j_{1}} for every j′′∈N(0)(i⋆)j^{\prime\prime}\in N^{(0)}(i^{\star}). If j1j_{1} was stopped by a client j2j_{2} in (α(0),z(0))(\alpha^{(0)},z^{(0)}) (i.e., 2αˉj1(0)≥d(j1,j2)+6αˉj2(0)2\bar{\alpha}^{(0)}_{j_{1}}\geq d(j_{1},j_{2})+6\bar{\alpha}^{(0)}_{j_{2}}), then we may assume that j2j_{2} is witnessed by Lemma 7.1. In this case, let i⋆i^{\star} be the witness of j2j_{2}. Then,

for all j′′∈N(0)(i⋆)j^{\prime\prime}\in N^{(0)}(i^{\star}). In either case, the claim holds. ∎

Now, let i⋆i^{\star} be the facility guaranteed to exist by the Claim. Consider the dual solution α(p)\alpha^{(p)} at the last time that j′j^{\prime} was previously increased. Then, we must have αj′(p)≥αj′\alpha^{(p)}_{j^{\prime}}\geq\alpha_{j^{\prime}}. Additionally, since Algorithm 1 never decreases any facility’s price, and the current call to RaisePrice has increased any facility’s price by at most ϵz\epsilon_{z}, we have zi⋆(p)≤zi⋆≤zi⋆(0)+ϵzz^{(p)}_{i^{\star}}\leq z_{i^{\star}}\leq z^{(0)}_{i^{\star}}+\epsilon_{z}. Let j⋆=arg⁡min⁡j′′∈N(0)(i⋆)αj′′(p)j^{\star}=\arg\min_{j^{\prime\prime}\in N^{(0)}(i^{\star})}\alpha^{(p)}_{j^{\prime\prime}}. We claim that:

Indeed, otherwise by the Claim, we would have αj′′(p)>(1+ϵ)αj+ϵz≥αj′′(0)+ϵz\alpha^{(p)}_{j^{\prime\prime}}>(1+\epsilon)\alpha_{j}+\epsilon_{z}\geq\alpha^{(0)}_{j^{\prime\prime}}+\epsilon_{z} for every j′′∈N(0)(i⋆)j^{\prime\prime}\in N^{(0)}(i^{\star}). Then, since i⋆i^{\star} is tight in (α(0),z(0))(\alpha^{(0)},z^{(0)}) we would have:

We shall now show that (8.3) and the claim imply (8.2). Since j′j^{\prime} was increasing when α(p)\alpha^{(p)} was maintained, Rule 2 of Sweep implies that:

and thus (8.2) remains satisfied when jj is decreasing. ∎

Using Lemma 8.8, we can now prove that RaisePrice produces a close sequence of solutions, and also bound the total number of clients in \cB\cB for any solution produced by RaisePrice. For both of these tasks, we make use of the following auxiliary lemma, which is a consequence of Lemma 8.8.

Throughout stage ss, for all jj with αj>θs\alpha_{j}>\theta_{s}, we have αj≤αj(0)\alpha_{j}\leq\alpha^{(0)}_{j}, and for all jj with αj(0)≥202θs\alpha^{(0)}_{j}\geq 20^{2}\theta_{s} or αj≥202θs\alpha_{j}\geq 20^{2}\theta_{s}, we have αj=αj(0)\alpha_{j}=\alpha^{(0)}_{j}.

For the first claim, we show that any client αj\alpha_{j} with αj≥θs\alpha_{j}\geq\theta_{s} can continue to increase in stage ss only while αj<αj(0)\alpha_{j}<\alpha^{(0)}_{j}. Indeed, if αj≥θs\alpha_{j}\geq\theta_{s} then once αj=αj(0)\alpha_{j}=\alpha^{(0)}_{j}, jj will immediately be removed from AA by Rule 44.

For the remaining claim, suppose first that αj(0)≥202θs\alpha^{(0)}_{j}\geq 20^{2}\theta_{s}. Then, as we have just shown, αj≤αj(0)\alpha_{j}\leq\alpha^{(0)}_{j} throughout stage ss. Suppose towards contradiction that in fact αj<αj(0)\alpha_{j}<\alpha^{(0)}_{j} at some moment in stage ss or earlier, and let α(−)\alpha^{(-)} be the value of α\alpha at this time. Then, at some moment in stage ss or earlier, we must have had αj(−)<αj<αj(0)\alpha^{(-)}_{j}<\alpha_{j}<\alpha^{(0)}_{j}, and αj>192θs\alpha_{j}>19^{2}\theta_{s} but jj decreasing. Since jj is being decreased by Sweep at this moment, we must have j∈N(i)j\in N(i) for a potentially tight facility ii. Since αj(0)>αj\alpha^{(0)}_{j}>\alpha_{j} we must also have j∈N(0)(i)j\in N^{(0)}(i). However, Lemma 8.8 implies that for every other j′∈N(i)j^{\prime}\in N(i) at this moment we have αj′≥19−2αj>θs.\alpha_{j^{\prime}}\geq 19^{-2}\alpha_{j}>\theta_{s}. Thus, by the first claim, αj′≤αj′(0)\alpha_{j^{\prime}}\leq\alpha^{(0)}_{j^{\prime}} for all j′∈N(i)j^{\prime}\in N(i). This contradicts the fact that ii is potentially tight, since j∈N(0)(i)j\in N^{(0)}(i) with αj<αj(0)\alpha_{j}<\alpha^{(0)}_{j}.

Finally, suppose that αj≥202θs\alpha_{j}\geq 20^{2}\theta_{s}. Then, by the first claim, we must have αj≤αj(0)\alpha_{j}\leq\alpha^{(0)}_{j} and so also αj(0)≥202θs\alpha^{(0)}_{j}\geq 20^{2}\theta_{s}. Then, as we have just shown, αj=αj(0)\alpha_{j}=\alpha^{(0)}_{j}. ∎

In the preceding section, we showed that all of the α\alpha-values are relatively stable throughout the algorithm. Using those observations, we can now prove that RaisePrice indeed produces a close sequence of α\alpha-values. To that end, let us select the remaining parameters KK, σ\sigma, and ϵz\epsilon_{z} used in RaisePrice.

Recall that the thresholds used by RaisePrice are defined by:

Therefore, the ratio of two consecutive thresholds is θs/θs−1=(1+ϵ)K\theta_{s}/\theta_{s-1}=(1+\epsilon)^{K}. We select KK to be the smallest integer satisfying

Note that K=Θ(ϵ−1γ−4)K=\Theta(\epsilon^{-1}\gamma^{-4}). Given KK, we select an integer “shift” σ\sigma uniformly at random from the interval (0,K/2](0,K/2].

Finally, we set the price increment ϵz\epsilon_{z} to:

Using these parameters, we can show that the sequence of solutions (α,z)(\alpha,z) produced by RaisePrice is indeed close. Because each successive α\alpha-value in this sequence is produced by calling Sweep on the previous value, it suffices to show the following.

Each call to Sweep changes every αj\alpha_{j} by at most n−2n^{-2}.

Consider a call to Sweep performed in stage ss. By the definition of Sweep, it suffices to bound how much αj\alpha_{j} has changed at the moment it is removed from AA, since it is not subsequently changed. Let us begin by bounding how much any αj\alpha_{j} may be increased. As in our analysis of QuasiSweep, it will then be possible to bound how much any α\alpha-value is decreased. Let α(1)\alpha^{(1)} and U(1)U^{(1)} be the values of α\alpha and UU before this call to Sweep, and let μ=min⁡j∈U(1)αj(1)\mu=\min_{j\in U^{(1)}}\alpha^{(1)}_{j}. We first show the following:

Any αj\alpha_{j} can increase by at most ϵzn6(b+1)\epsilon_{z}n^{6(b+1)} while B(θ)≤B(μ)+bB(\theta)\leq B(\mu)+b.

The proof is by induction on b=−1,0,1,…b=-1,0,1,\dots.

Initially we have θ=0\theta=0 and, by Invariant 2, μ≥1\mu\geq 1. Thus, at the start of any call to Sweep, we must have B(θ)=0B(\theta)=0 and B(μ)≥1B(\mu)\geq 1. Now, note that while B(θ)≤B(μ)−1B(\theta)\leq B(\mu)-1 we must have θ<μ\theta<\mu. Then, by Property 3 of Sweep no α\alpha-value has yet been altered, and so the claim holds trivially.

Now suppose that some αj\alpha_{j} is increased by at least ϵz\epsilon_{z} while B(θ)≤B(μ)+bB(\theta)\leq B(\mu)+b. Otherwise, the claim is immediate since ϵz<ϵzn6(b+1)\epsilon_{z}<\epsilon_{z}n^{6(b+1)}. Note that while this αj\alpha_{j} is increasing we must also have αj=θ\alpha_{j}=\theta and so B(αj)≤B(μ)+bB(\alpha_{j})\leq B(\mu)+b.

First, suppose that αj<αj(1)\alpha_{j}<\alpha^{(1)}_{j}. Then, αj\alpha_{j} was previously decreased. Moreover, since αj\alpha_{j} was increased by at least ϵz\epsilon_{z} while B(θ)≤B(μ)+bB(\theta)\leq B(\mu)+b, we must have previously decreased αj\alpha_{j} while B(αj)≤B(μ)+bB(\alpha_{j})\leq B(\mu)+b. In particular, at the last moment αj\alpha_{j} was decreased, we must have had B(αj)≤B(μ)+bB(\alpha_{j})\leq B(\mu)+b, and since αj\alpha_{j} was decreasing at this moment, we also had B(θ)<B(αj)B(\theta)<B(\alpha_{j}). Therefore, αj\alpha_{j} was decreased only while B(θ)<B(μ)+bB(\theta)<B(\mu)+b. Moreover, during this time, jj’s α\alpha-value was decreased at most nn times the maximum amount that any other client’s α\alpha-value was increased. By the induction hypothesis, any client’s α\alpha-value can increase at most ϵzn6b\epsilon_{z}n^{6b} while B(θ)<B(μ)+bB(\theta)<B(\mu)+b. Thus, αj\alpha_{j} has decreased at most ϵz⋅n6b+1\epsilon_{z}\cdot n^{6b+1}, and after increasing αj\alpha_{j} by at most this amount, we will again have αj=αj(1)\alpha_{j}=\alpha^{(1)}_{j}.

Next, let us bound how much jj’s α\alpha-value may increase while αj≥αj(1)\alpha_{j}\geq\alpha^{(1)}_{j} (and still B(αj)≤B(μ)+bB(\alpha_{j})\leq B(\mu)+b). We now consider three cases, based on the initial status of jj in α(1)\alpha^{(1)}.

If jj is undecided initially, then j∈Uj\in U and αj\alpha_{j} can increase by at most ϵz≤ϵzn6b\epsilon_{z}\leq\epsilon_{z}n^{6b} (since b≥0b\geq 0) before it is removed by Rule 3.

Next, suppose that jj had some witness ii in α(1)\alpha^{(1)}, and let N(1)(i)N^{(1)}(i) be the set of clients paying for ii in α(1)\alpha^{(1)}. For each j′∈N(1)(i)j^{\prime}\in N^{(1)}(i) we must have B(αj′(1))≤B(αj(1))≤B(μ)+bB(\alpha^{(1)}_{j^{\prime}})\leq B(\alpha^{(1)}_{j})\leq B(\mu)+b, and so αj′\alpha_{j^{\prime}} is decreased by Sweep only while B(θ)≤B(μ)+b−1B(\theta)\leq B(\mu)+b-1. By the same argument given above (when considering the case that αj<αj(1)\alpha_{j}<\alpha^{(1)}_{j}), the α\alpha-value of any such j′∈N(1)(i)j^{\prime}\in N^{(1)}(i) can decrease at most ϵzn6b+1\epsilon_{z}n^{6b+1} during Sweep. Thus, the total contribution to ii can decrease at most n⋅ϵzn6b+1=ϵzn6b+2n\cdot\epsilon_{z}n^{6b+1}=\epsilon_{z}n^{6b+2} during Sweep. After increasing αj\alpha_{j} by at most this amount, ii will again be tight. Moreover, at this moment any client j′j^{\prime} contributing to ii was either already added to AA (and potentially also removed), in which case B(αj′)≤B(θ)=B(αj)B(\alpha_{j^{\prime}})\leq B(\theta)=B(\alpha_{j}), or it was not already added to AA, in which case B(αj′)≤B(αj′(1))≤B(αj(1))≤B(αj)B(\alpha_{j^{\prime}})\leq B(\alpha^{(1)}_{j^{\prime}})\leq B(\alpha^{(1)}_{j})\leq B(\alpha_{j}). Thus, at this moment ii is a witness for jj, and so jj will be removed from AA by Rule 1.

Finally, suppose that jj was initially stopped by some client j′j^{\prime}. Then, by Lemma 7.1, we may assume that j′j^{\prime} was not stopped. Let Δ=αˉj′−αˉj′(1)\Delta=\bar{\alpha}_{j^{\prime}}-\bar{\alpha}^{(1)}_{j^{\prime}} be the amount that αˉj′\bar{\alpha}_{j^{\prime}} has been increased by Sweep. Then, once αˉj−αˉj(1)≥3Δ\bar{\alpha}_{j}-\bar{\alpha}^{(1)}_{j}\geq 3\Delta, we will have:

where in the last inequality we have used the fact that j′j^{\prime} stopped jj in α(1)\alpha^{(1)}. Thus, αˉj\bar{\alpha}_{j} can increase by at most 3Δ3\Delta, before jj will again be stopped by j′j^{\prime} and removed from AA by Rule 2. It remains to bound the corresponding increases in αj\alpha_{j} and αj′\alpha_{j^{\prime}}. We have:

Now, let us bound the right hand side. Since j′j^{\prime} is not stopped, the previous cases show that αj′−αj′(1)≤ϵzn6b+2\alpha_{j^{\prime}}-\alpha^{(1)}_{j^{\prime}}\leq\epsilon_{z}n^{6b+2}. Then, we have:

where the last inequality follows from Invariant 2, which implies αj′(1)≥1\alpha^{(1)}_{j^{\prime}}\geq 1. Combining the above bounds, in this case we have

where the penultimate inequality follows from the feasibility invariant (Invariant 2) and the preprocessing of Lemma 4.1 (that all squared-distances are at most n6n^{6}) which together imply that αj≤min⁡i(zi+d(i,j)2)≤4n7+n6≤5n7\alpha_{j}\leq\min_{i}(z_{i}+d(i,j)^{2})\leq 4n^{7}+n^{6}\leq 5n^{7} for all j∈\cDj\in\cD.

Combining all of the above cases, αj\alpha_{j} can increase at most ϵzn6b+1\epsilon_{z}n^{6b+1}, until αj=αj(1)\alpha_{j}=\alpha^{(1)}_{j} and then at most an additional 9ϵzn6b+11/29\epsilon_{z}n^{6b+11/2}. Thus, the total increase in αj\alpha_{j} while B(θ)≤B(μ)+bB(\theta)\leq B(\mu)+b is at most 9ϵzn6b+11/2+ϵzn6b+1≤ϵzn6b+69\epsilon_{z}n^{6b+11/2}+\epsilon_{z}n^{6b+1}\leq\epsilon_{z}n^{6b+6}, as required. ∎

We now complete the proof of Proposition 8.10. By Lemma 8.9, no αj≥202θs\alpha_{j}\geq 20^{2}\theta_{s} is changed by Sweep in any stage ss, and so once B(θ)≥B(202θs)B(\theta)\geq B(20^{2}\theta_{s}) no α\alpha-values are changed. By the Claim, we then have that in any call to Sweep in stage ss, each client’s α\alpha-value is increased at most ϵzn6(b+1)\epsilon_{z}n^{6(b+1)} where

We now bound the above value bb for every stage ss.

In stage 11, we execute only a single call to Sweep (as shown in Lemma 8.3) and in this call, μ=min⁡j∈U(0)αj(0)\mu=\min_{j\in U^{(0)}}\alpha^{(0)}_{j}. Since every j∈U(0)j\in U^{(0)} must have a tight edge to the facility i+i^{+} in α(0)\alpha^{(0)}, Lemma 8.8 implies that ν≜max⁡j∈U(0)αj(0)≤202μ\nu\triangleq\max_{j\in U^{(0)}}\alpha^{(0)}_{j}\leq 20^{2}\mu. Then, recall that

where we have used that ν≥1\nu\geq 1 (by Invariant 2), ϵz<ϵ\epsilon_{z}<\epsilon and σ≤K/2<K\sigma\leq K/2<K. Finally, recalling that C1=⌈log⁡1+ϵ(204)⌉C_{1}=\lceil\log_{1+\epsilon}(20^{4})\rceil, we have:

In stage s>1s>1, we have μ≥θs−1\mu\geq\theta_{s-1} by Lemma 8.5. Then, recall that θs=(1+ϵ)Kθs−1\theta_{s}=(1+\epsilon)^{K}\theta_{s-1} Then, we have:

In any case, the maximum increase in any client’s α\alpha-value is at most ϵzn6(K+C1+2)=n−3\epsilon_{z}n^{6(K+C_{1}+2)}=n^{-3} (recalling that by definition ϵz=n−6(K+C1+2)−3\epsilon_{z}=n^{-6(K+C_{1}+2)-3}). As we have already observed above in the proof of the Claim, each α\alpha-value can decrease at most nn times this amount. Thus, no α\alpha-value can decrease more than n−2n^{-2}. ∎

4.2 Bounding the number of clients in \cB\cB\cB

We bound the number of clients in \cB\cB by showing that such clients need to have an α(0)\alpha^{(0)}-value close to a threshold θs\theta_{s}. We then select the thresholds so that only a tiny fraction of the clients can be in \cB\cB.

Suppose that j∈\cBj\in\cB for some (α,z)(\alpha,z) produced by RaisePrice. Then, we must have 181θs≤αj(0)<25⋅204θs\tfrac{1}{81}\theta_{s}\leq\alpha^{(0)}_{j}<25\cdot 20^{4}\theta_{s} for some ss.

and so the induction hypothesis holds for jaj_{a} as well (using j′′j^{\prime\prime} and ss).

We complete this section by formally showing that a client is unlikely to become potentially bad over the randomness of the shift-parameter σ\sigma. For any given integer σ∈[0,K/2)\sigma\in[0,K/2), let

Note that by the above lemma, any client that is in \cB\cB in any solution produced during the considered call to RaisePrice, is in \cW(σ)\cW(\sigma).To argue \cB⊆\cW(σ)\cB\subseteq\cW(\sigma), the bounds 81−1θs≤αj(0)≤25⋅204⋅θs81^{-1}\theta_{s}\leq\alpha^{(0)}_{j}\leq 25\cdot 20^{4}\cdot\theta_{s} for some θs\theta_{s} would be sufficient in the definition of \cW(σ)\cW(\sigma). However, the more relaxed bounds will be useful when analyzing dense clients in the next section. Note that each value αj(0)\alpha^{(0)}_{j} is fixed at the beginning of RaisePrice, and there are only a (relatively) small number of choices for σ\sigma such that any given jj is in \cW(σ)\cW(\sigma). Thus, if we choose σ\sigma uniformly at random, the probability that any given j∈\cW(σ)j\in\cW(\sigma) is small. The following corollary formalizes this intuition.

If we select the shift-parameter σ\sigma uniformly at random from [0,K/2)[0,K/2),

Suppose that we select an integer σ\sigma uniformly at random from [0,K/2)[0,K/2). Then, note that by definition θs=(max⁡j∈U(0)αj+2ϵz)(1+ϵ)K⋅(s−1)+σ\theta_{s}=(\max_{j\in U^{(0)}}\alpha_{j}+2\epsilon_{z})(1+\epsilon)^{K\cdot(s-1)+\sigma} and so j∈\cW(σ)j\in\cW(\sigma) if and only if:

for some ss, where K1=log⁡1+ϵ(81−1⋅20−2)+log⁡1+ϵ(max⁡j∈U(0)αj(0)+2ϵz)K_{1}=\log_{1+\epsilon}(81^{-1}\cdot 20^{-2})+\log_{1+\epsilon}(\max_{j\in U^{(0)}}\alpha^{(0)}_{j}+2\epsilon_{z}) and K2=log⁡1+ϵ(25⋅206)+log⁡1+ϵ(max⁡j∈U(0)αj(0)+2ϵz)K_{2}=\log_{1+\epsilon}(25\cdot 20^{6})+\log_{1+\epsilon}(\max_{j\in U^{(0)}}\alpha^{(0)}_{j}+2\epsilon_{z}). In other words, σ\sigma needs to satisfy

Notice that the difference between the upper bound and the lower bound is K2−K1=log⁡1+ϵ(81⋅25⋅208)=log⁡1+ϵC0K_{2}-K_{1}=\log_{1+\epsilon}(81\cdot 25\cdot 20^{8})=\log_{1+\epsilon}C_{0} which by selection of KK is at most γ42K\tfrac{\gamma^{4}}{2}K. Moreover, as σ∈[0,K/2)\sigma\in[0,K/2) there is at most one value of ss that can satisfy the above inequalities. It follows that there are at most γ42K\frac{\gamma^{4}}{2}K distinct values of σ\sigma so that j∈\cW(σ)j\in\cW(\sigma). Thus, j∈\cW(σ)j\in\cW(\sigma) with probability at most γ4\gamma^{4}. ∎

5 Handling dense clients

To cope with this difficulty, we introduce the notion dense facilities and clients, as follows. Recall that γ≪ϵ\gamma\ll\epsilon is a small constant. We define the γ\gamma-close neighborhood of a facility ii as

Then, we say that a facility i∈IS(0)i\in\mathsf{IS}^{(0)} is dense if

We let FD⊆IS(0)\mathcal{F}_{\textsf{\tiny D}}\subseteq\mathsf{IS}^{(0)} be the set of all dense facilities, and then define the set of dense clients as DD=⋃i∈FDNγ(0)(i)\mathcal{D}_{\textsf{\tiny D}}=\bigcup_{i\in\mathcal{F}_{\textsf{\tiny D}}}N^{(0)}_{\gamma}(i). Note that the γ\gamma-close neighborhoods, dense facilities, and dense clients are all determined only by the input solution (α(0),z(0))(\alpha^{(0)},z^{(0)}) and the integral solution IS(0)\mathsf{IS}^{(0)} passed to RaisePrice.

Recall that in Definition 5.1, we have τi=max⁡j∈N(i)∩DS(i)αj\tau_{i}=\max_{j\in N(i)\cap\mathcal{D}_{\textsf{\tiny S}}(i)}\alpha_{j} for any facility i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} and τi=ti\tau_{i}=t_{i} for all other facilities. Note that as (α(0),z(0))(\alpha^{(0)},z^{(0)}) by Invariant 4 is a completely decided solution, by our choice of FS\mathcal{F}_{\textsf{\tiny S}} and DS\mathcal{D}_{\textsf{\tiny S}}, we have FS(0)=∅\mathcal{F}_{\textsf{\tiny S}}^{(0)}=\emptyset in the roundable solution (α(0),z(0),FS(0),DS(0))(\alpha^{(0)},z^{(0)},\mathcal{F}_{\textsf{\tiny S}}^{(0)},\mathcal{D}_{\textsf{\tiny S}}^{(0)}). Therefore, the conflict graph H(0)H^{(0)} of (α(0),z(0),FS(0),DS(0))(\alpha^{(0)},z^{(0)},\mathcal{F}_{\textsf{\tiny S}}^{(0)},\mathcal{D}_{\textsf{\tiny S}}^{(0)}) does not contain any special facilities, and so τi=ti\tau_{i}=t_{i} for each facility i∈H(0)i\in H^{(0)}. Moreover, recall that IS(0)\mathsf{IS}^{(0)} was the maximal independent set of H(0)H^{(0)} computed in the previous call to GraphUpdate. In particular, ∣IS(0)∣>k|\mathsf{IS}^{(0)}|>k and IS(0)\mathsf{IS}^{(0)} does not contain any special facilities.

The following simple lemma is now a direct consequence of our definitions.

Suppose that j∈Nγ(0)(i)j\in N^{(0)}_{\gamma}(i) for some i∈IS(0)i\in\mathsf{IS}^{(0)}. Then, βi′j(0)=0\beta^{(0)}_{i^{\prime}j}=0 for all other i′∈IS(0)i^{\prime}\in\mathsf{IS}^{(0)}. Moreover, for every client j∈\cDj\in\cD, αj(0)≥∑i∈IS(0)βij(0)\alpha^{(0)}_{j}\geq\sum_{i\in\mathsf{IS}^{(0)}}\beta^{(0)}_{ij}.

We start by proving that if j∈Nγ(0)(i)j\in N^{(0)}_{\gamma}(i) for some i∈IS(0)i\in\mathsf{IS}^{(0)}, then βi′j(0)=0\beta^{(0)}_{i^{\prime}j}=0 for all other i′∈IS(0)i^{\prime}\in\mathsf{IS}^{(0)}. Consider some facility i∈IS(0)i\in\mathsf{IS}^{(0)}, and suppose that j∈Nγ(0)(i)j\in N^{(0)}_{\gamma}(i). Further, suppose that for some other facility i′∈H(0)i^{\prime}\in H^{(0)} we have βi′j>0\beta_{i^{\prime}j}>0. Note that this implies (since no facility is special) that jj is adjacent to both ii and i′i^{\prime} in the client-facility graph that generated H(0)H^{(0)}. We shall show that i′∉IS(0)i^{\prime}\not\in\mathsf{IS}^{(0)}. Indeed, we must have:

Thus, there is an edge between ii and i′i^{\prime} in the conflict graph H(0)H^{(0)}, and since i∈IS(0)i\in\mathsf{IS}^{(0)}, we have i′∉IS(0)i^{\prime}\not\in\mathsf{IS}^{(0)}.

We shall now prove that αj(0)≥∑i∈IS(0)βij(0)\alpha^{(0)}_{j}\geq\sum_{i\in\mathsf{IS}^{(0)}}\beta^{(0)}_{ij} for any client j∈\cDj\in\cD. Again using that no facility is special, we have that jj’s neighborhood in the client-facility graph that generated H(0)H^{(0)} is equal to the set of tight facilities that jj is paying for. Therefore, we have that αj(0)−∑i∈IS(0)βij(0)≥d(j,IS(0))2/ρ\alpha^{(0)}_{j}-\sum_{i\in\mathsf{IS}^{(0)}}\beta^{(0)}_{ij}\geq d(j,\mathsf{IS}^{(0)})^{2}/\rho (which implies αj(0)≥∑i∈IS(0)βij(0)\alpha^{(0)}_{j}\geq\sum_{i\in\mathsf{IS}^{(0)}}\beta^{(0)}_{ij}) by the exact same arguments as “Case s=1s=1” and “Case s>1s>1” in the proof of Theorem 3.4. ∎

We partition the clients in \cD∖DD\cD\setminus\mathcal{D}_{\textsf{\tiny D}} into two sets:

To bound the remaining clients consider the following fractional token argument: each client j∈\cD>γj\in\cD_{>\gamma} distributes βij(0)=[αj(0)−d(j,i)2]+\beta^{(0)}_{ij}=[\alpha^{(0)}_{j}-d(j,i)^{2}]^{+} tokens to each facility i∈IS(0)i\in\mathsf{IS}^{(0)}. Lemma 8.13 says that ∑i∈IS(0)βij(0)≤αj(0)\sum_{i\in\mathsf{IS}^{(0)}}\beta^{(0)}_{ij}\leq\alpha^{(0)}_{j} for every client jj, and so the total number of tokens distributed is at most ∑j∈\cD>γαj(0)\sum_{j\in\cD_{>\gamma}}\alpha^{(0)}_{j}.

Now note that every j∈\cD≤γj\in\cD_{\leq\gamma} is in Nγ(0)(i)N^{(0)}_{\gamma}(i) for some i∈IS(0)i\in\mathsf{IS}^{(0)}. By Lemma 8.13 we thus have βi′j(0)=0\beta^{(0)}_{i^{\prime}j}=0 for every i′≠ii^{\prime}\neq i in IS(0)\mathsf{IS}^{(0)}. Moreover, ii must not be dense, since otherwise jj would be in DD\mathcal{D}_{\textsf{\tiny D}}. Hence, we have

Moreover, there must be at least γzi(0)\gamma z^{(0)}_{i} tokens assigned to ii, because it is a tight facility with respect to α(0)\alpha^{(0)} and by Lemma 8.13, every client j∉\cD>γ∪Nγ(0)(i)j\not\in\cD_{>\gamma}\cup N^{(0)}_{\gamma}(i) must have βij(0)=0\beta^{(0)}_{ij}=0. That is,

where the first inequality follows from (8.7), and the last inequality from the fact that each facility i∈IS(0)∖FDi\in\mathsf{IS}^{(0)}\setminus\mathcal{F}_{\textsf{\tiny D}} received at least γzi(0)\gamma z^{(0)}_{i} tokens and the total amount of distributed tokens was at most ∑j∈\cD>γαj(0)\sum_{j\in\cD_{>\gamma}}\alpha^{(0)}_{j}.

where the penultimate inequality follows from (8.6) and the last inequality from Theorem 6.4, as ∣IS(0)∣>k|\mathsf{IS}^{(0)}|>k. ∎

If we select the shift-parameter σ\sigma uniformly at random from [0,K/2)[0,K/2),

In particular, if we set \cW=\cW(σ)\cW=\cW(\sigma) for the value σ\sigma that minimizes ∑j∈\cW(σ)∖DDαj(0)\sum_{j\in\cW(\sigma)\setminus\mathcal{D}_{\textsf{\tiny D}}}\alpha^{(0)}_{j} then, we have

where the first inequality follows from by Corollary 8.12 and the last inequality follows from Lemma 8.14. The second claim now follows since the minimum of left-hand side over all σ∈[0,K/2)\sigma\in[0,K/2) is at most its expected value over a randomly chosen σ∈[0,K/2)\sigma\in[0,K/2). ∎

Now, we show how to obtain a better bound than that given by Lemma 8.7 for dense clients DD∩\cB\mathcal{D}_{\textsf{\tiny D}}\cap\cB. Specifically, we show how to bound the cost of all clients in DD∩\cB\mathcal{D}_{\textsf{\tiny D}}\cap\cB using the facilities of FS\mathcal{F}_{\textsf{\tiny S}}. This will allow us to eventually obtain a roundable solution.

For any j∈DD∩\cBj\in\mathcal{D}_{\textsf{\tiny D}}\cap\cB, either:

There exists a tight facility i∈\cFi\in\cF such that (1+δ+10ϵ)αˉj≥d(j,i)+δti(1+\sqrt{\delta}+10\epsilon)\bar{\alpha}_{j}\geq d(j,i)+\sqrt{\delta t_{i}}.

There exists a special facility i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} such that (1+δ+10ϵ)αˉj≥d(j,i)+δτi(1+\sqrt{\delta}+10\epsilon)\bar{\alpha}_{j}\geq d(j,i)+\sqrt{\delta\tau_{i}}.

Consider a client j0∈DD∩\cBj_{0}\in\mathcal{D}_{\textsf{\tiny D}}\cap\cB. Since j0∈DDj_{0}\in\mathcal{D}_{\textsf{\tiny D}} there must be some i⋆∈FDi^{\star}\in\mathcal{F}_{\textsf{\tiny D}} such that j0∈Nγ(0)(i⋆)j_{0}\in N^{(0)}_{\gamma}(i^{\star}). Moreover, since j0∈\cBj_{0}\in\cB, j0j_{0} is undecided and so by Lemma 8.4 we must have αj0≥αj0(0)\alpha_{j_{0}}\geq\alpha^{(0)}_{j_{0}}.

Suppose first that i⋆∈FSi^{\star}\in\mathcal{F}_{\textsf{\tiny S}}. Then τi⋆=max⁡j∈N(i⋆)∩DS(i⋆)αj\tau_{i^{\star}}=\max_{j\in N(i^{\star})\cap\mathcal{D}_{\textsf{\tiny S}}(i^{\star})}\alpha_{j}. Since i⋆∈FSi^{\star}\in\mathcal{F}_{\textsf{\tiny S}} we have αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j} for all j∈Nγ(0)(i⋆)j\in N^{(0)}_{\gamma}(i^{\star}). We claim that τi⋆≤(1+ϵ)2αj0\tau_{i^{\star}}\leq(1+\epsilon)^{2}\alpha_{j_{0}}. Indeed, otherwise there is a client j∈N(i⋆)∩DS(i⋆)=N(i⋆)∩Nγ(0)(i⋆)j\in N(i^{\star})\cap\mathcal{D}_{\textsf{\tiny S}}(i^{\star})=N(i^{\star})\cap N^{(0)}_{\gamma}(i^{\star}) such that αˉj>(1+ϵ)αˉj0\bar{\alpha}_{j}>(1+\epsilon)\bar{\alpha}_{j_{0}} and so

contradicting Invariant 3, since the α\alpha-ball of jj would then strictly contain the α\alpha-ball of j0j_{0}. Hence, τi⋆≤(1+ϵ)αˉj0\sqrt{\tau_{i^{\star}}}\leq(1+\epsilon)\bar{\alpha}_{j_{0}}. Furthermore, d(j0,i⋆)≤γαˉj0(0)≤γαˉj0d(j_{0},i^{\star})\leq\sqrt{\gamma}\bar{\alpha}^{(0)}_{j_{0}}\leq\sqrt{\gamma}\bar{\alpha}_{j_{0}} and therefore

On the other hand, if i⋆∉FSi^{\star}\not\in\mathcal{F}_{\textsf{\tiny S}} then (by the definition of FS\mathcal{F}_{\textsf{\tiny S}}) there must be some j∈Nγ(0)(i⋆)j\in N^{(0)}_{\gamma}(i^{\star}) with αj<αj(0)\alpha_{j}<\alpha^{(0)}_{j}. By Lemma 8.4, jj must be decided. Then, j∉\cBj\not\in\cB and so by Lemma 8.7 there exists some tight facility ii such that (1+δ+ϵ)αˉj≥d(j,i)+δti(1+\sqrt{\delta}+\epsilon)\bar{\alpha}_{j}\geq d(j,i)+\sqrt{\delta t_{i}}. Moreover, applying the same argument as above, we must have αˉj(0)≤(1+ϵ)αˉj0(0)\bar{\alpha}^{(0)}_{j}\leq(1+\epsilon)\bar{\alpha}^{(0)}_{j_{0}}, since otherwise in α(0)\alpha^{(0)}, the α\alpha-ball of jj would strictly contain the α\alpha-ball of j0j_{0}, contradicting Invariant 3. Then, we have:

where for the final inequality we used that j0j_{0} is undecided and so by Lemma 8.4 we have αj0≥αj0(0)\alpha_{j_{0}}\geq\alpha^{(0)}_{j_{0}}. ∎

6 Showing that each solution is roundable and completing the analysis

We start by showing that each solution (α,z)(\alpha,z) produced by Algorithm 1 satisfies the properties of Definition 5.1.

Every solution (α,z)(\alpha,z) produced by Algorithm 1 is roundable.

By construction, each solution (α,z)(\alpha,z) produced by Algorithm 1 is feasible with respect to DUAL(λ+ϵz)(\lambda+\epsilon_{z}) and ϵz<1n\epsilon_{z}<\frac{1}{n}. In addition, we have λ≤zi≤λ+ϵz≤λ+1/n\lambda\leq z_{i}\leq\lambda+\epsilon_{z}\leq\lambda+1/n for all i∈\cFi\in\cF. It remains to show that Properties 2 and 3 of Definition 5.1 are satisfied. Recall the definitions of FD\mathcal{F}_{\textsf{\tiny D}} and DD\mathcal{D}_{\textsf{\tiny D}}, and define FS\mathcal{F}_{\textsf{\tiny S}} and DS\mathcal{D}_{\textsf{\tiny S}} as in (8.5). Further let DB=\cW∖DD\mathcal{D}_{\textsf{\tiny B}}=\cW\setminus\mathcal{D}_{\textsf{\tiny D}}.

Now we show that Property 2 holds for \cS=(α,z,FS,DD)\cS=(\alpha,z,\mathcal{F}_{\textsf{\tiny S}},\mathcal{D}_{\textsf{\tiny D}}) with respect to the set DB\mathcal{D}_{\textsf{\tiny B}}. By Lemma 8.11 (which shows that a client j∈\cBj\in\cB only if 181θs≤αj(0)≤25⋅204θs\frac{1}{81}\theta_{s}\leq\alpha^{(0)}_{j}\leq 25\cdot 20^{4}\theta_{s} for some stage ss) we have \cB⊆\cW\cB\subseteq\cW. Thus \cB∖DD⊆DB\cB\setminus\mathcal{D}_{\textsf{\tiny D}}\subseteq\mathcal{D}_{\textsf{\tiny B}}. Now, by Lemma 8.7 for all j∈\cD∖\cBj\in\cD\setminus\cB there exists some tight facility ii such that

Similarly, by Lemma 8.17, for all j∈\cB∩DDj\in\cB\cap\mathcal{D}_{\textsf{\tiny D}}, there exists either some tight facility ii or some special facility i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} such that

Finally, we consider the remaining clients in \cB∖DD⊆DB\cB\setminus\mathcal{D}_{\textsf{\tiny D}}\subseteq\mathcal{D}_{\textsf{\tiny B}}. Lemma 8.7 shows that for every client j∈\cDj\in\cD there is some tight facility ii such that

For each client jj, let w(j)w(j) be this specified tight facility ii. Then,

where the last inequality follows from Corollary 8.15.

Finally, we show that Property 3 must hold. Consider some i∈FSi\in\mathcal{F}_{\textsf{\tiny S}}. By definition of FS\mathcal{F}_{\textsf{\tiny S}}, we must have j∈\cBj\in\cB for some j∈Nγ(0)(i)j\in N^{(0)}_{\gamma}(i). Then, by Lemma 8.11 we must have 181θs≤αj(0)≤25⋅204θs\frac{1}{81}\theta_{s}\leq\alpha^{(0)}_{j}\leq 25\cdot 20^{4}\theta_{s} for some ss. By Lemma 8.8 (which bounds the ratio to be at most 192<20219^{2}<20^{2} between αj\alpha_{j} and αj′\alpha_{j^{\prime}} for any pair of clients j,j′j,j^{\prime} that share a tight edge to some common facility ii), we must have αj′(0)∈\cW\alpha^{(0)}_{j^{\prime}}\in\cW for any j′∈N(0)(i)j^{\prime}\in N^{(0)}(i). Moreover, by Lemma 8.13 (which shows that each dense client pays for at most one dense facility in IS(0)\mathsf{IS}^{(0)}), we have βij(0)=0\beta^{(0)}_{ij}=0 for all j∈DD∖Nγ(0)(i)j\in\mathcal{D}_{\textsf{\tiny D}}\setminus N^{(0)}_{\gamma}(i). Altogether, then we have N(0)(i)⊆\cWN^{(0)}(i)\subseteq\cW and N(0)(i)∩DD=Nγ(0)(i)N^{(0)}(i)\cap\mathcal{D}_{\textsf{\tiny D}}=N^{(0)}_{\gamma}(i) and so

where the first inequality follows from the definition of FS\mathcal{F}_{\textsf{\tiny S}}, which requires that for any i∈FSi\in\mathcal{F}_{\textsf{\tiny S}}, αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j} for all j∈Nγ(0)(i)j\in N^{(0)}_{\gamma}(i). By Invariant 4, every client is decided in α(0)\alpha^{(0)} and so, in particular, FS(0)=∅\mathcal{F}_{\textsf{\tiny S}}^{(0)}=\emptyset and IS(0)\mathsf{IS}^{(0)} contains no special facilities. Then, by Lemma 8.13, ∑i∈FSβij(0)≤∑i∈IS(0)βij(0)≤αj(0)\sum_{i\in\mathcal{F}_{\textsf{\tiny S}}}\beta^{(0)}_{ij}\leq\sum_{i\in\mathsf{IS}^{(0)}}\beta^{(0)}_{ij}\leq\alpha^{(0)}_{j} for all jj. Summing (8.8) over all i∈FSi\in\mathcal{F}_{\textsf{\tiny S}} we thus have

where the final inequality follows from Corollary 8.15. ∎

The following theorem completes the analysis.

RaisePrice runs in polynomial time and produces a polynomial number of close roundable solutions.

That the produced solutions are close follows from Proposition 8.10 and the produced solutions are roundable follows from Proposition 8.18. We continue to bound the running time and the number of produced solutions. RaisePrice produces one solution for each call to Sweep. In Appendix B we argue (similarly as we did for QuasiSweep) that Sweep can be implemented in polynomial time, and it is clear that the remaining operations in RaisePrice can be implemented in polynomial time. Thus, to prove both claims, it suffices bound the number of calls to Sweep in RaisePrice. For that purpose, define:

Using our preprocessing (Lemma 4.1), we note that at all times during any call to RaisePrice, we have αj≤M\alpha_{j}\leq M, since otherwise α\alpha would be infeasible (contradicting Invariant 2).

Let us now bound the number of calls to Sweep in each stage. In stage 1, we make only 1 call to Sweep, as shown in Lemma 8.3. In each stage s>1s>1, RaisePrice calls Sweep only until αj≥θs\alpha_{j}\geq\theta_{s} and αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j} for every undecided client jj. Consider a call to Sweep in stage s>1s>1 and let (α,z)(\alpha,z) be the produced solution. Let jj be the undecided client with the smallest α\alpha-value in (α,z)(\alpha,z) (breaking ties in the order of removal from the set AA). If jj was removed by Rule 44, we have αj≥θs\alpha_{j}\geq\theta_{s} and αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j} and so every undecided client has an α\alpha-value of at least θs\theta_{s} which implies the termination of stage ss. Otherwise, as jj has the smallest α\alpha-value of undecided clients it cannot be removed by Rule 55 (by Property 2) and so it must have been removed by Rule 33. Therefore, by the definition of that rule, jj was undecided in the previous iteration and its α\alpha-value has increased by ϵz\epsilon_{z} in the considered call to Sweep. By the above, we have that either stage ss terminates or the smallest α\alpha-value of the undecided clients increases by at least ϵz\epsilon_{z}. Therefore, the stage must terminate after at most ϵz−1M=nO(ϵ−1γ−4)\epsilon_{z}^{-1}M=n^{O(\epsilon^{-1}\gamma^{-4})} calls to Sweep since no α\alpha-value is larger than MM.

Finally, let us bound the number of stages executed in RaisePrice. By Lemma 8.5 after stage ss, all clients with αj<θs\alpha_{j}<\theta_{s} are decided. Then, for s=(Kϵ)−1Θ(log⁡n)=γ4O(log⁡n)s=(K\epsilon)^{-1}\Theta(\log n)=\gamma^{4}O(\log n) we have θs>M\theta_{s}>M and so all clients must be decided. ∎

References

Appendix A Implementation of QuasiSweep

In Section 4.1, we presented the procedure QuasiSweep in a continuous fashion. We now describe a discrete, polynomial time implementation of QuasiSweep. As presented, QuasiSweep maintains only the α\alpha-values of each client, the value of θ\theta, and the set AA of active clients. We suppose we are increasing θ\theta at the speed of 11, so that the value of θ\theta corresponds to the current time. Then, QuasiSweep changes each α\alpha-value at the speed of either 0, 1, or −∣A∣-|A|. Moreover, this speed does not change until one of the following events happens:

Client jj joins AA: this can happen only if αj=θ\alpha_{j}=\theta.

θ\theta changes buckets: this can only happen when θ\theta has reached the border of a bucket.

Facility ii becomes tight: this can happen if (1)(1) no client with a tight edge to ii is decreasing, and (2)(2) some client in AA has a tight edge to ii.

Client jj gains a tight edge to facility ii: this can happen only if j∈Aj\in A.

Client j∉Aj\notin A changes buckets and enters the same bucket as θ\theta: this can happen only if αj\alpha_{j} is being decreased.

Note that we remove a client from AA either immediately after it is added to AA, at the time that some facility becomes tight, or at the time that it gains a tight edge to some (tight) facility. Therefore, we do not need to add an event for removing a client from AA, since it only happens if one of the above events happen.

The polynomial time QuasiSweep now works as follows: In each step, we find the next time that any one of the above events happens, then increase/decrease each α\alpha-value according to its current speed to obtain a new set of values at this time. Then, we update θ\theta, AA, and our set of speeds and continue. We need to show how we can efficiently compute the next event that happens, and also we need to prove that the number of such events is polynomial. In what follows, we compute the time until each event above happens, assuming that it is the next event that happens. Then the next event that actually happens is the event with the minimum such time (breaking ties arbitrarily).

We now consider each of the above events in turn:

The time until the Event 1 may happen next is min⁡αj>θαj−θ\min_{\alpha_{j}>\theta}\alpha_{j}-\theta. Also we have exactly nn occurrences of this event.

The time until Event 2 may happen next is the difference between θ\theta and the border of the next bucket, i.e., Bnext−θB_{next}-\theta, where Bnext=(1+ϵ)B(θ)B_{next}=(1+\epsilon)^{B(\theta)}. We have at most O(ϵ−1log⁡(n))O(\epsilon^{-1}\log(n)) such events.

For Event 3, if some client with a tight edge to ii is decreasing then (non-tight) facility ii cannot become tight (due to the choice of the speed of decrease). If no decreasing client has a tight edge to facility ii, then the time that ii may become tight is

Notice that the numerator is the current slack of facility ii and the denominator is the speed at which this slack decreases. Moreover, there are at most m=∣\cF∣m=|\cF| such events, since if a facility becomes tight, it will stay tight (as we discussed in our description of QuasiSweep).

The time until Event 4 may happen for some edge (j,i)(j,i) is d(j,i)2−αjd(j,i)^{2}-\alpha_{j} if αj<d(j,i)2\alpha_{j}<d(j,i)^{2}, and there are at most nmnm such events, since if an edge becomes tight, it remains tight afterwards.

Finally, Event 5 may happen only for those clients jj with B(αj)>B(θ)B(\alpha_{j})>B(\theta). For any such jj, the time until Event 5 happens is (αj−Bnext)/∣A∣(\alpha_{j}-B_{next})/|A|. This event can happen also at most nn times, since once B(αj)=B(θ)B(\alpha_{j})=B(\theta), jj is no longer decreased. Note that when αj\alpha_{j} is decreasing, we consider it to change buckets at the moment that it lies on the lower border of its current bucket (i.e., at the moment that 1+log⁡1+ϵαj=Bnext1+\log_{1+\epsilon}\alpha_{j}=B_{next}). It is easy to verify that still (1+ϵ)αj≤αj′(1+\epsilon)\alpha_{j}\leq\alpha_{j^{\prime}} for any jj and j′j^{\prime} placed in the same bucket by this rule.

From the above, it is clear that the number of events are polynomial, and also that the next event can be computed in polynomial time.

Appendix B Implementation of Sweep

In this section, we present a polynomial time implementation of the Sweep procedure. Our general approach is the same as described QuasiSweep in Appendix A, besides the set of events. Recall that the polynomial time algorithm for QuasiSweep is as follows: repeatedly find the next event that happens, then update the α\alpha-values. We increase θ\theta at a rate 1, so that θ\theta corresponds naturally to our notion of time. Let θ(0)\theta^{(0)} denote the value of θ\theta at the time that the preceding event happened.

We now focus on the events, explain them in detail, show the number of times that each can occur, and discuss the way that we can find each one of them. Let AA be the set of active clients (as in Sweep) and let DD denote the set of all clients jj whose value αj\alpha_{j} is being decreased. Then, αj\alpha_{j} is changed at a rate of 1 for every j∈Aj\in A, −∣A∣-|A| for every j∈Dj\in D, and 0 for all other clients. We now consider the events that can cause AA and DD to change. For each such event, we show how to compute (in polynomial time) the time at which it would occur, assuming that AA and DD have not yet changed. The next time that the behavior of Sweep can change (and the next time that an event actually occurs) is then the minimum over all of these event times.

Given this next time θ\theta, we first update all α\alpha-values according to their current rate of change. Then, we compute the set AA of active clients, as follows. We first add to AA all clients jj with αj=θ\alpha_{j}=\theta. Next, we remove clients from AA according to Rules 1-5 in Sweep. Using the updated α\alpha-values and the updated set AA, we then compute the set of decreasing clients as in Sweep. Note that until θ\theta has increased neither the set AA nor any α\alpha-values will change. Thus, we can assume without loss of generality that the next event occurs when θ>θ0\theta>\theta_{0}. For any j∈Aj\in A (after we update AA) we therefore consider αj\alpha_{j} to be strictly greater than its present value when computing the set of potentially tight facilities (and hence decreasing clients): i.e. if j∈Aj\in A, we consider j∈N(i)j\in N(i) if αj≥d(j,i)2\alpha_{j}\geq d(j,i)^{2} and we consider αj>αj(0)\alpha_{j}>\alpha^{(0)}_{j} if αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j}. After computing the set of decreasing clients, we finally set θ0=θ\theta_{0}=\theta and continue.

Let us now describe how to compute the events that may cause AA or DD to change, and argue that they occur at most a polynomial number of times. We consider the following basic events:

θ\theta changes bucket or some client j∈Dj\in D enters the same bucket as θ\theta. The time at which θ\theta changes bucket can be computed exactly as described in Event 2 in our discussion of the running time of QuasiSweep, and this happens at most once for each bucket. Similarly, we can compute the next time that some client j∈Dj\in D enters the same bucket as θ\theta as described in Event 5 in our discussion of QuasiSweep (using the fact that here also, all clients of DD are decreasing at a rate of ∣A∣|A|). Just as in QuasiSweep, here also no client is decreased after entering the same bucket as θ\theta, and so this event can happen at most once per client.

αj\alpha_{j} becomes equal to some constant CC. This can occur only for a client j∈Dj\in D with αj>C\alpha_{j}>C or j∈Aj\in A with αj<C\alpha_{j}<C. Since no value αj\alpha_{j} is decreased by Sweep once it has been increased, this event can happen at most twice for any jj and CC: once when j∈Dj\in D and once when j∈Aj\in A. Moreover, while AA and DD (and so the rate rjr_{j} at which αj\alpha_{j} is changing) remain constant, the time at which this event will occur is the θ\theta satisfying rj(θ−θ0)=C−αjr_{j}(\theta-\theta_{0})=C-\alpha_{j}.

θ=αj\theta=\alpha_{j} for some jj that has not yet been added to AA. This event occurs only if B(αj)=B(θ)B(\alpha_{j})=B(\theta) and so αj\alpha_{j} is not presently decreasing or increasing. Once θ=αj\theta=\alpha_{j} we place j∈Aj\in A and so this event can occur at most once for each jj. The time at which this event occurs is then, by definition, θ=αj\theta=\alpha_{j}.

θ=(C1+C2αj′)2\theta=(C_{1}+C_{2}\sqrt{\alpha_{j^{\prime}}})^{2} for some constants C1C_{1} and C2C_{2} and some client j′j^{\prime} that has already been removed from AA. Once a client j′j^{\prime} has been removed from AA, it is not subsequently changed by Sweep and so (C1+C2αj′)2(C_{1}+C_{2}\sqrt{\alpha_{j^{\prime}}})^{2} is a constant. Thus, this event can happen at most once for each jj, C1C_{1}, and C2C_{2}.

A facility ii becomes tight and a witness for some j∈Aj\in A. As discussed in our analysis of Sweep, once ii is a tight and a witness for some jj it will remain so until the end of Sweep. Thus, this event occurs at most once for each jj and ii. This event can occur only if the contributions to ii are increasing, in which case we must have N(i)∩D=∅N(i)\cap D=\emptyset. The time that ii becomes tight is then the value θ\theta satisfying:

Now, let us show how these events capture the potential changes in AA and DD, in turn. First, suppose that AA changes. If some client is added to AA, we must have θ=αj\theta=\alpha_{j} and so Event 3 occurs. Now suppose that some client jj is removed from AA. We consider the rules for removing clients from AA one by one:

Rule 1: In this case, either jj gains a tight edge to some tight facility ii or a new facility ii becomes tight and a witness for jj. In the first case, αj=d(i,j)2\alpha_{j}=d(i,j)^{2}, and so Event 2 occurs with j∈Aj\in A and C=d(i,j)2C=d(i,j)^{2}. In the second case, Event 5 occurs.

Rule 2: In this case, jj is stopped by some client j′j^{\prime}. Any such j′j^{\prime} must have already been removed from AA. Also, we have 2θ=2αj=d(j,j′)+6αj′2\sqrt{\theta}=2\sqrt{\alpha_{j}}=d(j,j^{\prime})+6\sqrt{\alpha_{j^{\prime}}}. Then, Event 4 occurs with C1=d(j,j′)/2C_{1}=d(j,j^{\prime})/2 and C2=3C_{2}=3.

Rule 3: In this case, we had j∈Uj\in U at the start of Sweep and αj=αj(0)+ϵz\alpha_{j}=\alpha^{(0)}_{j}+\epsilon_{z}. Then, Event 2 occurs with j∈Aj\in A and C=αj(0)+ϵzC=\alpha^{(0)}_{j}+\epsilon_{z}.

Rule 4: In this case, we have that αj≥αj(0)\alpha_{j}\geq\alpha^{(0)}_{j} and αj≥θs\alpha_{j}\geq\theta_{s}. When this first happens, Event 2 occurs with j∈Aj\in A and either C=αj(0)C=\alpha^{(0)}_{j} or C=θsC=\theta_{s}.

Rule 5: In this case, there is a client j′j^{\prime} that has already been removed from AA such that αˉj≥d(j,j′)+αˉj′\bar{\alpha}_{j}\geq d(j,j^{\prime})+\bar{\alpha}_{j^{\prime}}. Then, Event 4 occurs with j∈Aj\in A, C1=d(j,j′)C_{1}=d(j,j^{\prime}) and C2=1C_{2}=1.

From the above discussion, the events that can potentially cause AA to change will occur at most a polynomial number of times.Here, and later we implicitly use that all α(0)\alpha^{(0)}, d(j,j′)d(j,j^{\prime}), d(j,i)d(j,i) are all constant throughout Sweep, and there are at most a polynomial number of distinct such values. That is, we consider Event 2 and Event 4 with only a polynomial number of values for CC, C1C_{1}, and C2C_{2}.

Let us now consider how the set DD may change while the set AA remains constant. We first consider the case in which some client jj is removed from DD. Since j∈Dj\in D presently, we must have that j∈N(i)j\in N(i) and αj=ti\alpha_{j}=t_{i} for some potentially tight facility ii with N(i)∩A≠∅N(i)\cap A\neq\emptyset. Then, αj\alpha_{j} will stop decreasing only if one of the following happen:

Client jj enters the same bucket as θ\theta. Then, Event 1 occurs.

Client jj is removed from N(i)N(i). Then, Event 2 occurs with j∈Dj\in D and C=d(j,i)2C=d(j,i)^{2}.

Facility ii becomes no longer potentially tight. For this case, we first claim that there must in fact be some j∈N(i)j\in N(i) with αj>αj(0)\alpha_{j}>\alpha^{(0)}_{j}. Suppose otherwise; then we must have αj≤αj(0)\alpha_{j}\leq\alpha^{(0)}_{j} for all j∈N(i)j\in N(i) and so N(i)⊆N(0)(i)N(i)\subseteq N^{(0)}(i). Since N(i)∩A≠∅N(i)\cap A\neq\emptyset, there must be some j′∈N(0)(i)∩Aj^{\prime}\in N^{(0)}(i)\cap A. Moreover, since ii is potentially tight αj′=αj′(0)\alpha_{j^{\prime}}=\alpha^{(0)}_{j^{\prime}}. But then, since j′∈Aj^{\prime}\in A we would then consider αj′>αj′(0)\alpha_{j^{\prime}}>\alpha^{(0)}_{j^{\prime}} for the purpose of computing this event, as described in our initial discussion. In summary, as long as jj is decreasing due to some potentially tight facility ii, we must have some client j′j^{\prime} with αj′>αj′(0)\alpha_{j^{\prime}}>\alpha^{(0)}_{j^{\prime}}. Then, ii remains potentially tight until αj′\alpha_{j^{\prime}} decreases to αj′(0)\alpha^{(0)}_{j^{\prime}}. When this happens, Event 2 occurs with j′∈Dj^{\prime}\in D and C=αj′(0)C=\alpha^{(0)}_{j^{\prime}}.

From the above discussion, the number of events that may cause a client jj to be removed from DD can occur at most a polynomial number of times for each value of AA. In particular, any client can be removed from DD at most a polynomial number of times in total.

Finally, let us consider the case in which a client jj is added to DD. Note that if j∈Aj\in A we have B(αj)=B(θ)B(\alpha_{j})=B(\theta) and so jj cannot decrease. Thus, we must have j∉Aj\not\in A. Then jj can begin decreasing only in the following cases:

Some ii such that j∈N(i)j\in N(i) with αj=ti\alpha_{j}=t_{i} and A∩N(i)≠∅A\cap N(i)\neq\emptyset becomes potentially tight. Similar to the discussion above, in this case, we must have that αj′=αj′(0)\alpha_{j^{\prime}}=\alpha^{(0)}_{j^{\prime}} for some j′∈N(i)∩Aj^{\prime}\in N(i)\cap A. Then, Event 2 occurs with j′∈Aj^{\prime}\in A and C=αj′(0)C=\alpha^{(0)}_{j^{\prime}}.

A client j′∈Aj^{\prime}\in A is added to N(i)N(i) for some already potentially tight facility ii such that j∈N(i)j\in N(i) with αj=ti\alpha_{j}=t_{i}. In this case, we must have αj′=d(j,i)2\alpha_{j^{\prime}}=d(j,i)^{2}. Then, Event 2 occurs with j′∈Aj^{\prime}\in A and C=d(j,i)2C=d(j,i)^{2}.

The value αj\alpha_{j} becomes equal to tit_{i} for some already potentially tight facility ii. In this case, let j′∈N(i)j^{\prime}\in N(i) be any client with αj′=ti\alpha_{j^{\prime}}=t_{i} presently. Then either j′j^{\prime} is removed from N(i)N(i), in which case Event 2 occurs with j′∈Aj^{\prime}\in A and C=d(j,i)2C=d(j,i)^{2}, or αj′\alpha_{j^{\prime}} is decreased until it is equal to αj\alpha_{j}. This last case occurs at the time θ\theta satisfying ∣A∣(θ−θ0)=αj′−αj|A|(\theta-\theta_{0})=\alpha_{j^{\prime}}-\alpha_{j}. We now argue that this event occurs at most a polynomial number of times. Indeed, whenever this event occurs we add some j∉Dj\not\in D to the set DD, and we have previously shown that any client jj can be removed from (and hence added back to) DD at most a polynomial number of times.

The above shows that we can calculate the next event in polynomial time and that there are in total at most polynomially many events. It follows that Sweep can be implemented to run in time that is polynomial in the number of clients and facilities.

Appendix C Bounding the Distances

By losing a factor (1+100/n2)(1+100/n^{2}) in the approximation guarantee, we can assume that the squared-distance between any client and any facility is in [1,n6][1,n^{6}], where n=∣\cD∣n=|\cD|.

We prove that for a given instance of the kk-means problem, \cI=(\cF,\cD,d,k)\cI=(\cF,\cD,d,k), we can in polynomial time output an instance \cI′=(\cF,\cD,d′,k)\cI^{\prime}{}=(\cF,\cD,d^{\prime}{},k) such that:

The squared distance between any client and any facility is in [1,n6][1,n^{6}] in \cI′\cI^{\prime}{}, i.e., for any i∈\cF,j∈\cDi\in\cF,j\in\cD, we have 1≤d′(i,j)2≤n61\leq d^{\prime}{}(i,j)^{2}\leq n^{6}.

For any constant ρ\rho, any ρ\rho-approximate solution for \cI′\cI^{\prime}{} is a ρ(1+100/n2)\rho(1+100/n^{2})-approximate solution for \cI\cI.

In what follows, we first prove the lemma for the case that dd can be any metric distance function, then we prove it for the case in which dd must be a Euclidean metric function.

It is easy to see that our clusters have the following properties.

d1(j,j′)2<n6/16d_{1}(j,j^{\prime}{})^{2}<n^{6}/16 for any two clients j,j′j,j^{\prime}{} in the same cluster. This is because when we add any client to a cluster, the maximum distance in the cluster increases by less than n2/4n^{2}/4 and so d1(j,j′)<n3/4d_{1}(j,j^{\prime}{})<n^{3}/4 at the end of the process.

d1(i,j)2≤n6/8d_{1}(i,j)^{2}\leq n^{6}/8 for any client jj and facility ii in the same cluster. Indeed, by the triangle inequality we have that d1(i,j)≤d1(i,j1)+d1(j1,j)d_{1}(i,j)\leq d_{1}(i,j_{1})+d_{1}(j_{1},j) where j1j_{1} is the client such that d1(i,j1)<n2/4d_{1}(i,j_{1})<n^{2}/4. We have d1(j1,j)<n3/4d_{1}(j_{1},j)<n^{3}/4 by the previous property.

d1(i,i′)2≤n6/8d_{1}(i,i^{\prime}{})^{2}\leq n^{6}/8 for any two facilities i,i′i,i^{\prime}{} in the same cluster. Similarly to the previous case, let j,j′j,j^{\prime}{} be the closest client in this cluster to i,i′i,i^{\prime}{} respectively. By the triangle inequality we have that d1(i,i′)≤d1(i,j)+d1(j,j′)+d1(j′,i′)≤n2/4+n3/4+n2/4d_{1}(i,i^{\prime}{})\leq d_{1}(i,j)+d_{1}(j,j^{\prime}{})+d_{1}(j^{\prime}{},i^{\prime}{})\leq n^{2}/4+n^{3}/4+n^{2}/4.

We remove all the facilities that are not part of any cluster, since no client can be connected to them in any solution with approximation guarantee better than n/64n/64 (this follows from the above property 4). From above properties 1, 2, and 3 it is clear that the squared-distance between any two points in the same cluster is at most n6/8n^{6}/8. Then, the squared-distance between any point (whether corresponding to a client jj or a facility jj) in some cluster and the centroid of that cluster is also at most n6/8n^{6}/8.

Clearly, the running time of this procedure is poly⁡(n)\operatorname{poly}(n). ∎