Approximating $k$-Median via Pseudo-Approximation

Shi Li, Ola Svensson

Introduction

Suppose you wish to select kk polling stations for the US election so as to minimize the average distance each voter has to travel to his/her closest polling station. Then you need to solve the classic NP-hard kk-median problem that we shall design better approximation algorithms for in this paper. Formally, a kk-median instance I\mathcal{I} is defined by the tuple (k,F,C,d)(k,\mathcal{F},\mathcal{C},d), where kk is the number of facilities allowed to be opened, F\mathcal{F} is a set of potential facility locations, C\mathcal{C} is a set of clients, and dd is a distance metric over F∪C\mathcal{F}\cup\mathcal{C}. The goal is to open a set S⊆F\mathcal{S}\subseteq\mathcal{F} of kk facilities so as to minimize costI(S)=∑j∈Cd(j,S)cost_{\mathcal{I}}(\mathcal{S})=\sum_{j\in\mathcal{C}}d(j,\mathcal{S}), where d(j,S)d(j,\mathcal{S}) denotes the distance from jj to its nearest facility in S\mathcal{S}. When F=C=X\mathcal{F}=\mathcal{C}=X, a solution S\mathcal{S} partitions the set of points into what is known as clusters and thus the objective measures how well XX can be partitioned into kk clusters. The kk-median problem has numerous applications, starting from clustering and data mining to assigning efficient sources of supplies to minimize the transportation cost().

The difficulty of the kk-median problem lies in the hard constraint that only kk facilities are allowed to be opened. Indeed, without such a constraint, we could simply open all facilities. Early approaches overcame this difficulty by giving pseudo-approximations that obtain better guarantees while violating the mentioned constraint by opening k+Ω(k)k+\Omega(k) facilities. The first constant factor approximation algorithm that opens kk facilities is due to Charikar et al. . Based on LP rounding, their algorithm produces a 6236\frac{2}{3}-approximation. Several of the ideas in are inspired from constant factor approximation algorithms obtained for the closely related metric uncapacitated facility location (UFL) problem. The UFL problem has similar input as kk-median but instead of giving an upper bound kk on the number of facilities we can open, it specifies an opening cost fif_{i} for each facility i∈Fi\in\mathcal{F}. The goal is to open a set of facilities S\mathcal{S} that minimizes the sum of the opening costs and connection costs, i.e., ∑i∈Sfi+costI(S)\sum_{i\in\mathcal{S}}f_{i}+\mathsf{cost}_{\mathcal{I}}(\mathcal{S}).

The connection between UFL and kk-median is motivated by basic economic theory: if we let the opening costs of facilities be small then a “good” solution to UFL will open many facilities whereas if we let the opening costs of facilities be large then a good solution will only open few facilities. By appropriately selecting the cost of facilities, one can therefore expect that an algorithm for UFL opens close to kk facilities and therefore almost also gives a solution to the kk-median problem. This is the intuition of the concept of bi-point solutions that we define in Section 1.2. Jain and Vazirani first exploited this concept in a beautiful paper to obtain a 66-approximation algorithm for kk-median using their 33-approximation primal-dual algorithm for UFL. The factor 33 was later improved by Jain et al. to 22 resulting in a 44-approximation algorithm for kk-median.

In spite of the apparent similarities between UFL and kk-median, current techniques give a considerable better understanding of the approximability of UFL. For UFL and its variants, there has indeed been a steady stream of papers giving improved algorithms . The current best approximation algorithm is due to Li . He combined an algorithm by Byrka and an algorithm by Jain et al to achieve an approximation guarantee of 1.4881.488. This is close to being best possible, as it is hard to approximate UFL within a factor of 1.4631.463 . In contrast there has been less progress for kk-median and the approximability gap is larger. The best known approximation algorithm is the local search algorithm given by Arya et al. . They showed that if there is a solution F′\mathcal{F}^{\prime}, where any pp swaps of the open facilities cannot improve the solution, then F′\mathcal{F}^{\prime} is a 3+2/p3+2/p approximation. This leads to a 3+ϵ3+\epsilon approximation that runs in time n2/ϵn^{2/\epsilon}. On the negative side, Jain et al. proved that the kk-median problem is hard to approximate within a factor 1+2/e≈1.7361+2/e\approx 1.736. Moreover, the natural linear programming relaxation of kk-median is known to have an integrality gap of at least 22. The best upper bound is by Archer et al. , who showed that the integrality gap is at most 3 by giving an exponential time rounding algorithm that requires to solve the maximum independent set problem.

As alluded to above, the main difficulty of the kk-median problem is the hard constraint that we can open at most kk facilities. In this paper we take a different approach that allows us to relax this constraint and thereby addressing the problem from a novel point of view using what we call a pseudo-approximation algorithm. This leads to the improved approximation algorithm breaking the barrier of 33 that we discuss next.

Our improved approximation algorithm can be stated as follows.

There is an algorithm which, given a kk-median instance I\mathcal{I} and a number ϵ>0\epsilon>0, produces a 1+3+ϵ1+\sqrt{3}+\epsilon-approximate solution to I\mathcal{I} in running time O(nO(1/ϵ2))O\left(n^{O(1/\epsilon^{2})}\right).

Our algorithm contains two main components, each of which, we believe, is of independent interest. First, we show that in order to give an approximation algorithm for kk-median, it suffices to give a pseudo-approximation algorithm A\mathcal{A} which, given a kk-median instance I\mathcal{I}, outputs a set S⊆F\mathcal{S}\subseteq\mathcal{F} of k+ck+c facilities with costI(S)≤αoptI\mathsf{cost}_{\mathcal{I}}(\mathcal{S})\leq\alpha\mathsf{opt}_{\mathcal{I}}, where optI\mathsf{opt}_{\mathcal{I}} is the cost of optimum solution for I\mathcal{I}. Given such an algorithm A\mathcal{A} as a black box, we can design an α+ϵ\alpha+\epsilon-approximation algorithm A′\mathcal{A}^{\prime} whose running time is nO(c/ϵ)n^{O(c/\epsilon)} times that of A\mathcal{A}. Interestingly, the instance (see Figure 1) that gives the integrality gap of 22 for the natural LP relaxation of kk-median vanishes if we allow the integral solution to open k+1k+1 facilities. This suggests that our reduction may bring in new avenues for approximating kk-median. In particular, we find the following open problem interesting: given a kk-median instance I\mathcal{I}, what is the maximum ratio between the cost of the optimum integral solution of I\mathcal{I} with k+1k+1 open facilities, and the LP value (with kk open facilities)?

To complement the first component, we give the aforementioned pseudo-approximation algorithm A\mathcal{A} with α=1+3+ϵ\alpha=1+\sqrt{3}+\epsilon. Prior to our work, it was not even known whether opening k+o(k)k+o(k) facilities would help improve the approximation ratio; all known pseudo-approximation algorithms require k+Ω(k)k+\Omega(k) open facilities. In contrast, our algorithm only opens k+O(1/ϵ)k+O(1/\epsilon) facilities. The algorithm A\mathcal{A} contains 2 steps. We obtain a bi-point solution for kk-median using the algorithm of . We lose a factor of 22 in this step. Then, we convert the bi-point solution into an integral solution with k+O(1/ϵ)k+O(1/\epsilon) open facilities, losing another factor of 1+3+ϵ2\frac{1+\sqrt{3}+\epsilon}{2} in the approximation ratio. We remark that if we had insisted on opening kk facilities, then a factor of 22 has to be lost in the last step as the instance achieving an integrality gap of 22 has a bi-point solution.

Theorem 1 does not give a better upper bound on the integrality gap of the natural LP due to the following reason: instead of running the pseudo-approximation algorithm A\mathcal{A} on the input instance I\mathcal{I}, we run it on a residual instance I′\mathcal{I}^{\prime} obtained from I\mathcal{I} by removing a subset of facilities that the optimal solution does not open. The way we obtain I′\mathcal{I}^{\prime} is to guess O(1/ϵ2)O(1/\epsilon^{2}) “events” and let I′\mathcal{I}^{\prime} be the instance conditioned on these events. Due to this nature, our algorithm can be converted to a rounding algorithm based on solving an O(1/ϵ2)O(1/\epsilon^{2})-level LP in the Sherali-Adams hierarchy. Instead of guessing the O(1/ϵ2)O(1/\epsilon^{2}) events, we can now find these events explicitly by looking at the LP solution. Conditioning on these events, we obtain a fractional solution of the basic LP. By rounding this LP, we obtain a 1+3+ϵ1+\sqrt{3}+\epsilon-approximate solution. Thus, our approach can be seen to give an 1+3+ϵ1+\sqrt{3}+\epsilon-upper bound on the integrality gap of the O(1/ϵ2)O(1/\epsilon^{2})-level LP in the Sherali-Adams hierarchy. Our result was in fact first obtained by studying the power of the Sherali-Adams hierarchy for the kk-median problem. However, as it can also be obtained using a combinatorial approach with less cumbersome notation, we have chosen to present that approach.

2 Preliminaries

Given a kk-median instance I=(k,F,C,d)\mathcal{I}=(k,\mathcal{F},\mathcal{C},d), a pseudo-solution to I\mathcal{I} is a set S⊆F\mathcal{S}\subseteq\mathcal{F}. A pseudo-solution S\mathcal{S} satisfying ∣S∣≤k\left|\mathcal{S}\right|\leq k is a solution to I\mathcal{I}; a pseudo-solution S\mathcal{S} with ∣S∣≤k+c\left|\mathcal{S}\right|\leq k+c, for some number c≥0c\geq 0, is called a cc-additive (pseudo-)solution. The cost of a pseudo-solution S\mathcal{S} to I\mathcal{I} is defined as costI(S)=∑j∈Cd(j,S)\mathsf{cost}_{\mathcal{I}}(\mathcal{S})=\sum_{j\in\mathcal{C}}d(j,\mathcal{S}), where d(j,S)d(j,\mathcal{S}) denotes the distance from jj to its closest facility in S\mathcal{S}. We let OPTI\mathsf{OPT}_{\mathcal{I}} denote an optimal solution to I\mathcal{I}, i.e., one of minimum cost, and we let optI=costI(OPTI)\mathsf{opt}_{\mathcal{I}}=\mathsf{cost}_{\mathcal{I}}(\mathsf{OPT}_{\mathcal{I}}). To avoid confusion we will throughout the paper assume that the optimal solution is unique and that the concept of closest facility (or client) is also uniquely defined. This can be achieved either by slightly perturbing the metric or by simply breaking ties in an arbitrary but fixed way.

The standard linear programming relaxation for the kk-median problem is formulated as follows.

Constraint (1a) says that we are allowed to open at most kk facilities, Constraint (1b) says that we must connect each client, and Constraint (1c) says that if we connect a client to a facility then that facility has to be opened.

As mentioned earlier, the above linear programming has an integrality gap of 22, even when the underlying metric is a tree. The instance that gives the integrality gap of 22 is depicted in Figure 1. It is a star with k+1k+1 leaves. The center of the star is a facility and the leaves are both facilities and clients. Note that a pseudo-solution that opens all leaves, i.e., k+1k+1 facilities, has cost whereas any solution that opens only kk facilities has cost 22. The solution to the linear program obtained by a linear combination of the pseudo-solution that opens all leaves and the solution that only opens the center of the star has cost 1+1/k1+1/k yielding the integrality gap of 22 when kk tends to infinity. In general, a solution that is a linear combination of two pseudo-solutions is called a bi-point (fractional) solution. As this concept is important for our pseudo-approximation algorithm, we state its formal definition.

Let I=(k,F,C,d)\mathcal{I}=(k,\mathcal{F},\mathcal{C},d) be a kk-median instance. Let S1\mathcal{S}_{1} and S2\mathcal{S}_{2} be two pseudo-solutions to I\mathcal{I} such that ∣S1∣≤k<∣S2∣\left|\mathcal{S}_{1}\right|\leq k<\left|\mathcal{S}_{2}\right|. Let a≥0,b≥0a\geq 0,b\geq 0 be the real numbers such that a+b=1a+b=1 and a∣S1∣+b∣S2∣=ka\left|\mathcal{S}_{1}\right|+b\left|\mathcal{S}_{2}\right|=k. Then, the following fractional solution to I\mathcal{I}, denoted by aS1+bS2a\mathcal{S}_{1}+b\mathcal{S}_{2}, is called a bi-point (fractional) solution:

yi=a1i∈S1+b1i∈S2y_{i}=a1_{i\in\mathcal{S}_{1}}+b1_{i\in\mathcal{S}_{2}};

xi,j=a1clst(i,S1,j)+b1clst(i,S2,j)x_{i,j}=a1_{\mathsf{clst}(i,\mathcal{S}_{1},j)}+b1_{\mathsf{clst}(i,\mathcal{S}_{2},j)}, where clst(i,S,j)\mathsf{clst}(i,\mathcal{S},j) denotes the event that ii is the closest facility in S\mathcal{S} to jj.

It is easy to see that the cost of the fractional solution aS1+bS2a\mathcal{S}_{1}+b\mathcal{S}_{2} is exactly acostI(S1)+bcostI(S2)a\mathsf{cost}_{\mathcal{I}}(\mathcal{S}_{1})+b\mathsf{cost}_{\mathcal{I}}(\mathcal{S}_{2}). Jain and Vazirani gave a Lagrangian multiplier preserving 33-approximation for UFL, which immediately yields an algorithm which produces a bi-point solution whose cost is at most 33 times the optimum. Together with an algorithm which converts a bi-point solution to an integral solution at the cost of a factor 22, gave a 66-approximation for kk-median. Later, the factor 33 was improved by Jain et al. to 22. We now formally state the result of .

Given a kk-median instance I\mathcal{I}, we can find in polynomial time a bi-point solution aS1+bS2a\mathcal{S}_{1}+b\mathcal{S}_{2} to I\mathcal{I} whose cost is at most 2 times the cost of an optimal solution to I\mathcal{I}.

3 Overview of the Algorithm

The two components of our algorithm are formally stated in Theorem 4 and Theorem 5, whose proofs will be given in Sections 2 and 3, respectively. Together they immediately imply Theorem 1.

Let A\mathcal{A} be a cc-additive α\alpha-approximation algorithm for kk-median, for some α>1\alpha>1. Then, for every ϵ>0\epsilon>0 there is a α+ϵ\alpha+\epsilon-approximation algorithm A′\mathcal{A}^{\prime} for kk-median whose running time is O(nO(c/ϵ))O\left(n^{O(c/\epsilon)}\right) times the running time of A\mathcal{A}.

There exists a polynomial time algorithm which, given a kk-median instance I=(k,F,C,d)\mathcal{I}=(k,\mathcal{F},\mathcal{C},d) and ϵ>0\epsilon>0, produces an O(1/ϵ)O(1/\epsilon)-additive 1+3+ϵ1+\sqrt{3}+\epsilon-approximate solution to I\mathcal{I}.

We now provide more details about the proof of the two theorems. At first glance, it seems that the transformation from a pseudo-approximation to a real approximation stated in Theorem 4 is impossible, since there are cases where allowing k+1k+1 open facilities would give much smaller cost than only allowing kk open facilities. However, we show that we can pre-process the input instance so as to avoid these problematic instances. Roughly speaking, we say that a facility ii is dense if the clients in a small ball around ii contribute a lot to the cost of the optimum solution OPT\mathsf{OPT} (see Definition 6). We guess the O(1/ϵ)O(1/\epsilon) densest facilities and their respective nearest open facilities in OPT\mathsf{OPT}. Then for each such dense facility ii whose nearest open facility in OPT\mathsf{OPT} is i′i^{\prime}, we remove all facilities that are closer to ii than i′i^{\prime} (including the dense facility ii). Then we get a residual instance in which the gap between the costs of opening k+O(1)k+O(1) and kk facilities is small. The pseudo-approximation algorithm is then applied to this residual instance.

For example, consider the integrality gap instance depicted in Figure 1 and let OPT\mathsf{OPT} be the optimal solution that opens the center and k−1k-1 leaves. Then the two leaves that were not opened contribute a large fraction of the total cost (each contributes opt/2\mathsf{opt}/2 to be precise) and the two corresponding facilities are dense. By removing these dense facilities in a preprocessing step, the gap between the costs of opening k+O(1)k+O(1) facilities and kk facilities for the residual instance becomes small (actually in this example).

Regarding the proof of Theorem 5, we first use Theorem 3 to obtain a bi-point solution for kk-median whose cost is at most twice the optimum cost. Jain and Vazirani showed how to convert a bi-point solution to an integral solution, losing a multiplicative factor of 22 in the approximation. As we previously mentioned, this factor of 22 is tight, as the fractional solution for the gap instance in Figure 1 is a bi-point solution. Thus, this approach can only yield a 44-approximation.

This is where the cc-additive pseudo-approximation is used and again the integrality gap instance depicted in Figure 1 inspired our approach. Recall that if we open the k+1k+1 leaves of that instance, then we get a solution of cost . In other words, by opening 11 additional facility, we can do better than the fractional solution. One may argue that this trick is too weak to handle more sophisticated cases and try to enhance the gap instance. A natural way to enhance it is to make many separate copies of the instance to obtain several “stars”. One might expect that the fractional cost in each copy is 1, the integral cost in each copy is 2 and opening 11 more facility can only improve the integral solution of one copy and thus does not improve the overall ratio by too much. However, the integral solution can do much better since one cannot restrict the integral solution to open kk facilities in each star. As an example, consider the case where we have 22 copies. The integral solution can open k−1k-1 facilities in the first star, and k+1k+1 facility in the second star. Then, the cost of this solution is 33, as opposed to 44 achieved by opening kk facilities in each star. The gap is already reduced to 1.51.5, without opening additional facilities. Thus, this simple way to enhance the instance failed.

Our pseudo-approximation algorithm is based on this intuition. From the bi-point solution aF1+bF2a\mathcal{F}_{1}+b\mathcal{F}_{2}, we obtain copies of “stars” (similar to the integrality gap instance). Then for each star we (basically) open either its center with probability aa or all its leaves with probability bb. Note that since either the center or all leaves of a star is open we have that a client always has a “close” facility opened. With this intuition we prove in Section 3 that the expected cost of the obtained pseudo-solution is at most 1+3+ϵ2\frac{1+\sqrt{3}+\epsilon}{2} times the cost of the bi-fractional solution if we open O(1/ϵ)O(1/\epsilon) additional facilities. The O(1/ϵ)O(1/\epsilon) additional facilities (and the case distinction in Section 3) comes from the difficulty of handling stars of different sizes. If all stars are of the same size the pseudo-approximation algorithm becomes easier (run the algorithm in Section 3.2 with one group of stars) and one obtains a 1+32\frac{1+\sqrt{3}}{2}-approximate solution that opens at most k+3k+3 facilities.

Obtain solutions from additive pseudo-solutions

In this section, we prove Theorem 4. As we mentioned earlier, there are instances where pseudo-solutions opening k+1k+1 facilities may have much smaller cost than solutions opening kk facilities. A key concept to overcome this issue is the notion of sparse instances:

For A>0A>0, an instance I=(k,F,C,d)\mathcal{I}=(k,\mathcal{F},\mathcal{C},d) is AA-sparse if for each facility i∈Fi\in\mathcal{F},

where ξ:=1/3\xi:=1/3. We shall also say that a facility ii is AA-dense if it violates (2).

Recall that d(i,OPTI)d(i,\mathsf{OPT}_{\mathcal{I}}) is the distance from ii to its nearest facility in OPTI\mathsf{OPT}_{\mathcal{I}}.

The idea of the above definition is to avoid instances where we can significantly reduce the cost by opening O(1)O(1) additional facilities. Consider the gap instance I\mathcal{I} in Figure 1 and suppose OPTI\mathsf{OPT}_{\mathcal{I}} opens the center and the first k−1k-1 leaf-facilities. Then I\mathcal{I} is not AA-sparse for A<optI/2A<\mathsf{opt}_{\mathcal{I}}/2 since the last two leaf-facilities are AA-dense.

The usefulness of the definition is twofold. On the one hand, we show that we can concentrate on very sparse instances without loss of generality. On the other hand, we show that any cc-additive pseudo-solution to a sparse instance can be turned into a solution that opens kk facilities by only increasing the cost slightly. The intuition behind the result that we can only concentrate on sparse instances is the following. Consider an instance I\mathcal{I} that is not optI/t\mathsf{opt}_{\mathcal{I}}/t-sparse for some constant tt. If we consider a facility ii that is optI/t\mathsf{opt}_{\mathcal{I}}/t-dense then the connection cost of the clients contained in CBall(i,ξd(i,OPTI))\mathsf{CBall}(i,\xi d(i,\mathsf{OPT}_{\mathcal{I}})) in the optimal solution OPTI\mathsf{OPT}_{\mathcal{I}} is at least (1−ξ)d(i,OPTI)∣CBall(i,ξd(i,OPTI))∣>optI/t(1-\xi)d(i,\mathsf{OPT}_{\mathcal{I}})|\mathsf{CBall}(i,\xi d(i,\mathsf{OPT}_{\mathcal{I}}))|>\mathsf{opt}_{\mathcal{I}}/t. So, there can essentially (assuming disjointedness of the balls of clients) only be a constant tt number of facilities that violate the sparsity condition. We can guess this set of dense facilities, as well as their nearest facility in OPTI\mathsf{OPT}_{\mathcal{I}} in time nO(t)n^{O(t)}.

This is the intuition of Algorithm 1 (that tries to guess and remove opt/t\mathsf{opt}/t-dense facilities) and the proof of the following lemma which is given in Section 2.1.

Given a kk-median instance I=(k,F,C,d)\mathcal{I}=(k,\mathcal{F},\mathcal{C},d) and a positive integer tt, Algorithm 1 outputs in time nO(t)n^{O(t)} many kk-median instances obtained by removing facilities from I\mathcal{I} so that at least one, say I′=(k,F′⊆F,C,d)\mathcal{I}^{\prime}=(k,\mathcal{F}^{\prime}\subseteq\mathcal{F},\mathcal{C},d), satisfies

the optimal solution OPTI\mathsf{OPT}_{\mathcal{I}} to I\mathcal{I} is also an optimal solution to I′\mathcal{I}^{\prime}; and

I′\mathcal{I}^{\prime} is optI/t\mathsf{opt}_{\mathcal{I}}/t-sparse.

Note that I′\mathcal{I}^{\prime} is obtained by removing facilities from I\mathcal{I}. Therefore any solution to I′\mathcal{I}^{\prime} defines a solution to I\mathcal{I} of the same cost and we can thus restrict our attention to sparse instances. The next lemma shows the advantage of considering such instances. Assume we now have a cc-additive solution T\mathcal{T} to a sparse instance I\mathcal{I}. Algorithm 2 tries first in Lines 2-3 to identify facilities in T\mathcal{T} whose removal does not increase the cost by too much. If the removal results in a set of at most kk facilities, we have obtained a “good” solution returned at Step 4 of the algorithm. Otherwise, as we prove in Section 2.2 using sparsity, more than k−tk-t of the facilities of the solution T\mathcal{T} are very close to facilities in OPTI\mathsf{OPT}_{\mathcal{I}}. Algorithm 2 therefore tries to guess these facilities (the set D\mathcal{D}) and the remaining facilities of OPTI\mathsf{OPT}_{\mathcal{I}} (the set V\mathcal{V}). The obtained bounds are given in the following lemma.

Given an AA-sparse instance I=(k,F,C,d)\mathcal{I}=(k,\mathcal{F},\mathcal{C},d), a cc-additive pseudo-solution T\mathcal{T}, δ∈(0,1/8)\delta\in(0,1/8), and an integer t≥2c/(δξ)t\geq 2c/(\delta\xi), Algorithm 2 finds in time nO(t)n^{O(t)} a set S⊆F\mathcal{S}\subseteq\mathcal{F} such that:

S\mathcal{S} is a solution to I\mathcal{I}, i.e, ∣S∣≤k|\mathcal{S}|\leq k; and

costI(S)≤max⁡{costI(T)+cB,1+3δ1−3δ⋅optI}\mathsf{cost}_{\mathcal{I}}(\mathcal{S})\leq\max\left\{\mathsf{cost}_{\mathcal{I}}(\mathcal{T})+cB,\frac{1+3\delta}{1-3\delta}\cdot\mathsf{opt}_{\mathcal{I}}\right\}, where B:=2⋅A+costI(T)/tξδB:=2\cdot\frac{A+\mathsf{cost}_{\mathcal{I}}(\mathcal{T})/t}{\xi\delta}.

Before giving the proofs of Lemmas 7 and 8 let us see how they imply the main result of this section.

Select the largest δ∈(0,1/8)\delta\in(0,1/8) such that (1+3δ)/(1−3δ)≤α(1+3\delta)/(1-3\delta)\leq\alpha and t:=4ϵ⋅αcξ⋅δ=O(c/ϵ)t:=\frac{4}{\epsilon}\cdot\frac{\alpha c}{\xi\cdot\delta}=O(c/\epsilon). Given a kk-median instance I\mathcal{I}, use Algorithm 1 to obtain a set of kk-median instances such that at least one of these instances, say I′\mathcal{I}^{\prime}, satisfies the properties of Lemma 7. In particular, I′\mathcal{I}^{\prime} is optI/t\mathsf{opt}_{\mathcal{I}}/t-sparse. Now use algorithm A\mathcal{A} to obtain cc-additive pseudo-solutions to each of these instances. Note that when we apply A\mathcal{A} to I′\mathcal{I}^{\prime}, we obtain a solution T\mathcal{T} such that costI(T)=costI′(T)≤α⋅optI′=α⋅optI\mathsf{cost}_{\mathcal{I}}(\mathcal{T})=\mathsf{cost}_{\mathcal{I}^{\prime}}(\mathcal{T})\leq\alpha\cdot\mathsf{opt}_{\mathcal{I}^{\prime}}=\alpha\cdot\mathsf{opt}_{\mathcal{I}}. Finally, use Algorithm 2 (with the same tt and δ\delta selected as above) to transform the pseudo-solutions into real solutions and return the solution to I\mathcal{I} of minimum cost. The cost of the returned solution is at most the cost of S\mathcal{S} where S\mathcal{S} is the solution obtained by transforming T\mathcal{T}. By Lemmas 7 and 8, we have that costI(S)=costI′(S)\mathsf{cost}_{\mathcal{I}}(S)=\mathsf{cost}_{\mathcal{I}^{\prime}}(S) is at most

which in turn, by the selection of δ,ξ\delta,\xi, and tt, is at most αoptI+c⋅4αoptItξδ≤(α+ϵ)optI\alpha\mathsf{opt}_{\mathcal{I}}+c\cdot\frac{4\alpha\mathsf{opt}_{\mathcal{I}}}{t\xi\delta}\leq(\alpha+\epsilon)\mathsf{opt}_{\mathcal{I}}.

We conclude the proof of Theorem 4 by observing that the runtime of the algorithm is nO(t)=nO(c/ϵ)n^{O(t)}=n^{O(c/\epsilon)} times the runtime of A\mathcal{A}.

1 Proof of Lemma 7: obtaining a sparse instance

ib∈F∖⋃z=1b−1FBall(iz,d(iz,iz′))i_{b}\in\mathcal{F}\setminus\bigcup_{z=1}^{b-1}\mathsf{FBall}(i_{z},d(i_{z},i^{\prime}_{z})) is an optI/t\mathsf{opt}_{\mathcal{I}}/t-dense facility; and

ib′i^{\prime}_{b} is the closest facility to ibi_{b} in OPTI\mathsf{OPT}_{\mathcal{I}}.

which implies that the balls do not overlap.

2 Proof of Lemma 8: obtain solution to sparse instance from pseudo-solution

We start by analyzing the running time of Algorithm 2. Clearly the while loop can run at most cc iterations (a constant). The number of different pairs (D,V)(\mathcal{D},\mathcal{V}) in the for loop is at most

We proceed by proving that S\mathcal{S} satisfies (8b) of Lemma 8. Suppose first that the algorithm returns at Line 4. By the condition of the while loop from Line 2 to 3, we increase costI(T′)\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime}) by at most BB each time we remove an element from T′\mathcal{T}^{\prime}. We remove at most cc elements and thus we increase the total cost by at most cBcB. It follows that (8b) is immediately satisfied in this case.

From now on suppose instead that we reached Line 5 of Algorithm 2 and thus ∣T′∣>k\left|\mathcal{T}^{\prime}\right|>k. We shall exhibit sets D0\mathcal{D}_{0} and V0\mathcal{V}_{0} such that ∣D0∣+∣V0∣=k|\mathcal{D}_{0}|+|\mathcal{V}_{0}|=k, ∣V0∣<t|\mathcal{V}_{0}|<t and cost(SD0,V0)≤1+3δ1−3δoptI\mathsf{cost}(\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}})\leq\frac{1+3\delta}{1-3\delta}\mathsf{opt}_{\mathcal{I}}. As Algorithm 2 selects D0\mathcal{D}_{0} and V0\mathcal{V}_{0} in one iteration and it returns the minimum cost solution, this concludes the proof of Lemma 8. In order to define the sets D0\mathcal{D}_{0} and V0\mathcal{V}_{0} it shall be convenient to use the following definitions.

The sets D0\mathcal{D}_{0} and V0\mathcal{V}_{0} are now defined as follows. Set D0\mathcal{D}_{0} contain all facilities in i∈T′i\in\mathcal{T}^{\prime} that are determined. If we let fi∗f_{i}^{*} for i∈D0i\in\mathcal{D}_{0} be the facility in OPTI\mathsf{OPT}_{\mathcal{I}} that is closest to ii, then set V0:=OPTI∖{fi∗:i∈D0}\mathcal{V}_{0}:=\mathsf{OPT}_{\mathcal{I}}\setminus\{f_{i}^{*}:i\in\mathcal{D}_{0}\}. The intuition of D0\mathcal{D}_{0} and V0\mathcal{V}_{0} is that the solution SD0,V0\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}} is very close to OPTI\mathsf{OPT}_{\mathcal{I}}: the only difference is the selection of fif_{i} at Line 6 of Algorithm 2 instead of fi∗f_{i}^{*}. Since each i∈D0i\in\mathcal{D}_{0} is determined, selecting fif_{i} greedily using a “locally” optimal strategy gives a good solution.

We first show that sets D0\mathcal{D}_{0} and V0\mathcal{V}_{0} are indeed selected by Algorithm 2 and then we conclude the proof of the lemma by bounding the cost of SD0,V0\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}}.

∣D0∣+∣V0∣=k|\mathcal{D}_{0}|+|\mathcal{V}_{0}|=k and ∣V0∣<t|\mathcal{V}_{0}|<t.

We start by proving that ∣D0∣+∣V0∣=k|\mathcal{D}_{0}|+|\mathcal{V}_{0}|=k. Recall that V0=OPTI∖{fi∗:i∈D0}\mathcal{V}_{0}=\mathsf{OPT}_{\mathcal{I}}\setminus\{f_{i}^{*}:i\in\mathcal{D}_{0}\}. It is not hard to see that fi∗≠fi′∗f^{*}_{i}\neq f^{*}_{i^{\prime}} for two distinct facilities in D0\mathcal{D}_{0}. This is indeed true since d(i,i′)≥max⁡(Li,Li′),d(i,fi∗)≤δLi,d(i′,fi′∗)≤δLi′d(i,i^{\prime})\geq\max(L_{i},L_{i^{\prime}}),d(i,f^{*}_{i})\leq\delta L_{i},d(i^{\prime},f^{*}_{i^{\prime}})\leq\delta L_{i^{\prime}} and δ≤1/8\delta\leq 1/8. Thus, f∗(D0):={fi∗:i∈D0}f^{*}(\mathcal{D}_{0}):=\left\{f^{*}_{i}:i\in\mathcal{D}_{0}\right\} has size ∣D0∣\left|\mathcal{D}_{0}\right|, which in turn implies that (to simplify calculations we assume w.l.o.g. that ∣OPTI∣=k|\mathsf{OPT}_{\mathcal{I}}|=k)

We proceed by proving ∣V0∣<t|\mathcal{V}_{0}|<t. Note that the sets of determined and undetermined facilities partition T′\mathcal{T}^{\prime}. Therefore, if we let U0\mathcal{U}_{0} be the set of undetermined facilities, we have that ∣D0∣=∣T′∣−∣U0∣.|\mathcal{D}_{0}|=|\mathcal{T}^{\prime}|-|\mathcal{U}_{0}|. Combining this with the above expression for ∣V0∣|\mathcal{V}_{0}| gives us

We complete the proof of the claim by showing that ∣U0∣<t|\mathcal{U}_{0}|<t.

By the assumption that we reached Line 5 of Algorithm 2, we have ∣T′∣>k\left|\mathcal{T}^{\prime}\right|>k and costI(T′∖{i})>costI(T′)+B\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime}\setminus\left\{i\right\})>\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime})+B for every i∈T′i\in\mathcal{T}^{\prime}. Assume towards contradiction that ∣U0∣≥t\left|\mathcal{U}_{0}\right|\geq t. For every i∈T′i\in\mathcal{T}^{\prime}, let Ci\mathcal{C}_{i} be the set of clients in C\mathcal{C} connected to ii in the solution T′\mathcal{T}^{\prime} and CiC_{i} be the total connection cost of these clients. Thus, costI(T′)=∑i∈T′Ci\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime})=\sum_{i\in\mathcal{T}^{\prime}}C_{i}. Take the facility i∈U0i\in\mathcal{U}_{0} with the minimum CiC_{i}. Then, we have Ci≤costI(T′)/tC_{i}\leq\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime})/t. Let i′i^{\prime} be the nearest neighbor of ii in T′\mathcal{T}^{\prime}; thus d(i,i′)=Lid(i,i^{\prime})=L_{i}.

We shall remove the facility ii from T′\mathcal{T}^{\prime} and connect the clients in Ci\mathcal{C}_{i} to i′i^{\prime}. In order to consider incremental connection cost incurred by the operation, we divide Ci\mathcal{C}_{i} into two parts.

Then, as each client in Ci∩CBall(i,δξLi)\mathcal{C}_{i}\cap\mathsf{CBall}(i,\delta\xi L_{i}) has distance at most (1+δξ)Li(1+\delta\xi)L_{i} to i′i^{\prime} (by triangle inequalities), connecting all clients in Ci∩CBall(i,δξLi)\mathcal{C}_{i}\cap\mathsf{CBall}(i,\delta\xi L_{i}) to i′i^{\prime} can cost at most A/(δξ)A/(\delta\xi).

Consider any client jj in this set. Since d(j,i′)≤d(j,i)+Lid(j,i^{\prime})\leq d(j,i)+L_{i} and d(j,i)≥δξLid(j,i)\geq\delta\xi L_{i}, we have d(j,i′)−d(j,i)d(j,i)≤LiδξLi=1/(δξ)\frac{d(j,i^{\prime})-d(j,i)}{d(j,i)}\leq\frac{L_{i}}{\delta\xi L_{i}}=1/(\delta\xi). Hence, the connection cost of a single client is increased by at most a factor 1/(δξ)1/(\delta\xi). Therefore, the total connection cost increases by at most Ci/(δξ)C_{i}/(\delta\xi), which by the selection of ii is at most costI(T′)/(δξt).\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime})/(\delta\xi t).

Summing up the two quantities, removing ii from T′\mathcal{T}^{\prime} can only increase the connection cost by at most A+costI(T′)/tδξ\frac{A+\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime})/t}{\delta\xi}. As the while loop of Algorithm 2 ran for less than cc iterations, costI(T′)<costI(T)+cB\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime})<\mathsf{cost}_{\mathcal{I}}(\mathcal{T})+cB. Therefore, A+costI(T′)/tδξ<A+(costI(T)+cB)/tδξ\frac{A+\mathsf{cost}_{\mathcal{I}}(\mathcal{T}^{\prime})/t}{\delta\xi}<\frac{A+(\mathsf{cost}_{\mathcal{I}}(\mathcal{T})+cB)/t}{\delta\xi} which since t≥2c/(δξ)t\geq 2c/(\delta\xi) is at most A+costI(T)/tδξ+B/2=B\frac{A+\mathsf{cost}_{\mathcal{I}}(\mathcal{T})/t}{\delta\xi}+B/2=B leading to a contradiction. Hence, ∣U0∣<t|\mathcal{U}_{0}|<t which concludes the proof of the claim. □\square

Having proved that the instance SD0,V0\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}} is selected by Algorithm 2, we conclude the proof of Lemma 8 by bounding the cost of SD0,V0\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}}.

Recall that, for every i∈D0i\in\mathcal{D}_{0}, Algorithm 2 opens one facility fif_{i} in the ball FBall(i,δLi)\mathsf{FBall}(i,\delta L_{i}). We know we can do this so that the connection cost of C\mathcal{C} is optI\mathsf{opt}_{\mathcal{I}}. We show that we can approximate this instance within a factor of 1+O(δ)1+O(\delta). Roughly speaking, if a client is far away from any of these balls, then it does not care which facilities to open inside the balls, up to a factor 1+O(δ)1+O(\delta). If a client is close to one of these balls, say FBall(i,δLi)\mathsf{FBall}(i,\delta L_{i}), then we put the client into the “care-set” of ii. For each ii, we open a facility in the ball that is best for its care-set.

To be more specific, let the care-set of ii be CBall(i,Li/3)\mathsf{CBall}(i,L_{i}/3) for any i∈D0i\in\mathcal{D}_{0}. Clearly, the balls CBall(i,Li/3),i∈D0\mathsf{CBall}(i,L_{i}/3),i\in\mathcal{D}_{0} are disjoint. As stated in Line 6 of Algorithm 2, we open a facility fif_{i} in FBall(i,δLi)\mathsf{FBall}(i,\delta L_{i}) that minimizes

costI(SD0,V0)≤1+3δ1−3δoptI\mathsf{cost}_{\mathcal{I}}(\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}})\leq\frac{1+3\delta}{1-3\delta}\mathsf{opt}_{\mathcal{I}}.

We compare OPTI\mathsf{OPT}_{\mathcal{I}} and SD0,V0\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}}. Consider a client j∈CBall(i,Li/3)j\in\mathsf{CBall}(i,L_{i}/3) for some i∈D0i\in\mathcal{D}_{0}. The distance from jj to any facility in FBall(i,δLi)\mathsf{FBall}(i,\delta L_{i}) is at most (1/3+δ)Li(1/3+\delta)L_{i}. For any distinct facility i′∈D0i^{\prime}\in\mathcal{D}_{0}, the distance from jj to any facility in FBall(i′,δLi′)\mathsf{FBall}(i^{\prime},\delta L_{i^{\prime}}) is at least d(i,i′)−Li/3−δLi′≥d(i,i′)−d(i,i′)/3−δd(i,i′)=(2/3−δ)d(i,i′)≥(2/3−δ)Lid(i,i^{\prime})-L_{i}/3-\delta L_{i^{\prime}}\geq d(i,i^{\prime})-d(i,i^{\prime})/3-\delta d(i,i^{\prime})=(2/3-\delta)d(i,i^{\prime})\geq(2/3-\delta)L_{i}. For δ≤1/8\delta\leq 1/8, 1/3+δ<2/3−δ1/3+\delta<2/3-\delta. Thus, jj is either connected to fi∗f^{*}_{i} or some facility in V0\mathcal{V}_{0} in the solution OPTI\mathsf{OPT}_{\mathcal{I}}. Noticing that we are selecting the best fif_{i} for every i∈D0i\in\mathcal{D}_{0}, the total connection cost of ⋃i∈D0CBall(i,Li/3)\bigcup_{i\in\mathcal{D}_{0}}\mathsf{CBall}(i,L_{i}/3) in the solution SD0,V0\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}} is at most that in OPTI\mathsf{OPT}_{\mathcal{I}}.

Now, consider a client jj that is not in ⋃i∈D0CBall(i,Li/3)\bigcup_{i\in\mathcal{D}_{0}}\mathsf{CBall}(i,L_{i}/3). If it is connected to some facility in V0\mathcal{V}_{0} in the solution OPTI\mathsf{OPT}_{\mathcal{I}}, then the connection cost of jj in the solution SD0,V0\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}} can not be larger, since V0⊆S\mathcal{V}_{0}\subseteq\mathcal{S}. Assume jj is connected to fi∗∈CBall(i,Li/3)f^{*}_{i}\in\mathsf{CBall}(i,L_{i}/3) for some i∈D0i\in\mathcal{D}_{0}. We compare d(j,fi∗)d(j,f^{*}_{i}) to d(j,fi)d(j,f_{i}):

Thus, SD0,V0\mathcal{S}_{\mathcal{D}_{0},\mathcal{V}_{0}} has connection cost at most 1+3δ1−3δoptI\frac{1+3\delta}{1-3\delta}\mathsf{opt}_{\mathcal{I}}. □\square

An O​(1/ϵ)𝑂1italic-ϵO(1/\epsilon)-additive 1+3+ϵ13italic-ϵ1+\sqrt{3}+\epsilon approximation for k𝑘k-median

13italic-ϵ1+\sqrt{3}+\epsilon approximation for kk-median This section is dedicated to prove Theorem 5. Given a kk-median instance I=(k,F,C,d)\mathcal{I}=(k,\mathcal{F},\mathcal{C},d), we first use Theorem 3 to obtain a bi-point solution aS1+bS2a\mathcal{S}_{1}+b\mathcal{S}_{2} whose cost is at most 22 times the optimum cost of I\mathcal{I}. Then it suffices to convert aS1+bS2a\mathcal{S}_{1}+b\mathcal{S}_{2} into an O(1/ϵ)O(1/\epsilon)-additive solution, whose cost is at most 1+3+ϵ2\frac{1+\sqrt{3}+\epsilon}{2} times that of aS1+bS2a\mathcal{S}_{1}+b\mathcal{S}_{2}.

By the definition of bi-point solutions, we have a+b=1,∣F1∣≤k<∣F2∣a+b=1,|\mathcal{F}_{1}|\leq k<|\mathcal{F}_{2}| and a∣F1∣+b∣F2∣=ka|\mathcal{F}_{1}|+b|\mathcal{F}_{2}|=k. It shall be convenient to think of aF1+bF2a\mathcal{F}_{1}+b\mathcal{F}_{2} as a bipartite graph (see Figure 3) with vertex sets F1\mathcal{F}_{1} and F2\mathcal{F}_{2} and an edge for each client j∈Cj\in\mathcal{C} that is incident to its closest facilities in F1\mathcal{F}_{1} and F2\mathcal{F}_{2} denoted by i1(j)i_{1}(j) and i2(j)i_{2}(j), respectively. Moreover, let d1(j):=d(j,i1(j))d_{1}(j):=d(j,i_{1}(j)) and d2(j):=d(j,i2(j))d_{2}(j):=d(j,i_{2}(j)). Then, the (fractional) connection cost of jj in the bi-point solution is ad1(j)+bd2(j)ad_{1}(j)+bd_{2}(j). Similarly, if we let d1:=cost(F1)=∑j∈Cd1(j)d_{1}:=\mathsf{cost}(\mathcal{F}_{1})=\sum_{j\in\mathcal{C}}d_{1}(j) and d2:=cost(F2)=∑j∈Cd2(j)d_{2}:=\mathsf{cost}(\mathcal{F}_{2})=\sum_{j\in\mathcal{C}}d_{2}(j) then the bi-point solution has cost ad1+bd2ad_{1}+bd_{2}.

We shall prove Theorem 5 by exhibiting different algorithms based on the value of aa. Specifically, we shall distinguish between the cases when aa is in (0,3−14],(3−14,21+3],\left(0,\frac{\sqrt{3}-1}{4}\right],\left(\frac{\sqrt{3}-1}{4},\frac{2}{1+\sqrt{3}}\right], and (21+3,1]\left(\frac{2}{1+\sqrt{3}},1\right]. The simplest case is when a∈(21+3,1]a\in\left(\frac{2}{1+\sqrt{3}},1\right]: the solution where we open all facilities in F1\mathcal{F}_{1} is then a d1ad1+bd2≤1/a=(1+3)/2\frac{d_{1}}{ad_{1}+bd_{2}}\leq 1/a=(1+\sqrt{3})/2 approximation.

For the two remaining cases, we will use the concept of stars. For each facility i∈F2i\in\mathcal{F}_{2} define π(i)\pi(i) to be the facility in F1\mathcal{F}_{1} that is closest to ii. For a facility i∈F1i\in\mathcal{F}_{1} , let Si={i′∈F2:π(i′)=i}S_{i}=\{i^{\prime}\in\mathcal{F}_{2}:\pi(i^{\prime})=i\}. We think of SiS_{i} as a star with center ii and leaves SiS_{i}. Note that by the definition of stars, we have that any client jj with i2(j)∈Sii_{2}(j)\in S_{i} has d(i2(j),i)≤d(i2(j),i1(j))=d2(j)+d1(j)d(i_{2}(j),i)\leq d(i_{2}(j),i_{1}(j))=d_{2}(j)+d_{1}(j) and therefore d(j,i)≤d(j,i2(j))+d(i2(j),i)≤2d2+d1d(j,i)\leq d(j,i_{2}(j))+d(i_{2}(j),i)\leq 2d_{2}+d_{1}. Our algorithms will ensure that there is an open facility “close” to every client by always opening ii if not all facilities in SiS_{i} are opened. The strategy for either opening the center of a star or its leaves (or sometimes both) depends on the value of aa. We start in Section 3.1 by explaining the simpler case when a∈(0,3−14]a\in\left(0,\frac{\sqrt{3}-1}{4}\right] and then complete the proof of Theorem 5 by considering the final case in Section 3.2.

The idea behind our algorithm is that when aa is small then we can open most facilities in F2\mathcal{F}_{2}. We shall do so by starting with the trivial solution F1\mathcal{F}_{1} that we will improve by almost greedily selecting stars and open all their leaves while closing their centers.

As we will maintain the property that ii is open if not all facilities in SiS_{i} are open, we have that the connection cost of a client jj is d2(j)d_{2}(j) if i2(j)i_{2}(j) is open and at most d1(j)+2d2(j)d_{1}(j)+2d_{2}(j) otherwise. Consider the trivial solution where we open all facilities in F1\mathcal{F}_{1}. Then the total connection cost is upper-bounded by ∑j(d1(j)+2d2(j))\sum_{j}(d_{1}(j)+2d_{2}(j)). If we open the facilities in SiS_{i} instead of ii this will save us the cost ∑j∈δ(Si)(d1(j)+d2(j))\sum_{j\in\delta(S_{i})}(d_{1}(j)+d_{2}(j)), where δ(Si)\delta(S_{i}) denotes the clients that are incident to the facilities in SiS_{i}. This motivates the following linear program that maximizes the cost we will save compared to the trivial solution:

Intuitively, xix_{i} takes value 11 if we open all the facilities in SiS_{i} and if we open ii. If xi=1x_{i}=1, we need to open ∣Si∣−1\left|S_{i}\right|-1 more facilities (i.e, close ii and open all facilities in SiS_{i}). Thus, the constraint says that we can only open kk facilities. Note that this is a Knapsack LP and hence it is easy to see that an optimal solution has at most one fractional variable. Furthermore, xi=bx_{i}=b is a feasible solution since b∣F2∣−b∣F1∣=k−∣F1∣b\left|\mathcal{F}_{2}\right|-b\left|\mathcal{F}_{1}\right|=k-\left|\mathcal{F}_{1}\right|. Therefore, the optimal solution to the LP has value at least b(d1+d2)b(d_{1}+d_{2}).

Consider an optimal solution to the Knapsack LP with at most 1 fractional variable. Then, we open all the facilities in SiS_{i} with xi=1x_{i}=1, all the facilities i∈F1i\in\mathcal{F}_{1} with xi=0x_{i}=0, and for the ii with fractional xix_{i} we open ii and ⌈xi∣Si∣⌉\left\lceil x_{i}|S_{i}|\right\rceil facilities in SiS_{i} uniformly at random. (This step can easily be derandomized by greedily selecting the ⌈xi∣Si∣⌉\left\lceil x_{i}|S_{i}|\right\rceil facilities in SiS_{i} that maximizes the reduced cost.)

Note that we opened the facilities so that the (expected) saved cost compared to the trivial solution is at least the value of the optimal solution to the linear program. Therefore, this gives us a solution of (expected) cost at most 2d2+d1−b(d2+d1)=(1+a)d2+ad12d_{2}+d_{1}-b(d_{2}+d_{1})=(1+a)d_{2}+ad_{1}. Also, the solution opens at most k+2k+2 facilities, where the additive term 2 comes from the star SiS_{i} with fractional xix_{i} value.

Since we can assume that d2≤d1d_{2}\leq d_{1} (otherwise we can simply open all facilities in F1\mathcal{F}_{1}), the algorithm has an approximation guarantee of

which is at most 1+32\frac{1+\sqrt{3}}{2} if a≤3−14a\leq\frac{\sqrt{3}-1}{4}.

2 Algorithm for a∈(3−14,21+3]𝑎314213a\in\left(\frac{\sqrt{3}-1}{4},\frac{2}{1+\sqrt{3}}\right]

13a\in\left(\frac{\sqrt{3}-1}{4},\frac{2}{1+\sqrt{3}}\right] In this subsection, we give the algorithm for the most complex case. To simplify the arguments, we give a randomized algorithm that can easily be derandomized using the standard method of conditional probabilities. The idea is that we wish to describe a randomized rounding that opens a facility in F1\mathcal{F}_{1} with probability ≈a\approx a and a facility in F2\mathcal{F}_{2} with probability ≈b\approx b and at the same time ensuring that there always is an open facility “close” to a client by maintaining the property: if ii is not open then all facilities in SiS_{i} are open for all stars.

We now describe such a randomized rounding that takes a parameter η>0\eta>0 that balances the achieved approximation guarantee with the amount of additional facilities we open: the achieved approximation ratio is (1+η)1+32(1+\eta)\frac{1+\sqrt{3}}{2} while we open at most k+O(1/η)k+O(1/\eta) facilities. It shall be convenient to distinguish between large and small stars. We say that a star SiS_{i} is large if ∣Si∣≥2/(abη)|S_{i}|\geq 2/(ab\eta) and small otherwise. Moreover, we partition the small stars into ⌈2/(abη)⌉\left\lceil 2/(ab\eta)\right\rceil groups according to their sizes:

The randomized algorithm can now be described as follows:

We start by showing that the algorithm does not open too many facilities; we then continue by bounding the expected cost of the obtained solution.

The algorithm opens at most k+3⌈2/(abη)⌉k+3\left\lceil 2/(ab\eta)\right\rceil facilities.

Recall that we have that a∣F1∣+b∣F2∣=ka\left|\mathcal{F}_{1}\right|+b\left|\mathcal{F}_{2}\right|=k and therefore

First, consider a large star i∈F1i\in\mathcal{F}_{1}, i.e., a∣Si∣≥1/(bη)≥1/ηa|S_{i}|\geq 1/(b\eta)\geq 1/\eta. For such a star, the algorithm opens 1+⌊b(∣Si∣−1)⌋≤1+b(∣Si∣−1)=a+b∣Si∣1+\lfloor b(|S_{i}|-1)\rfloor\leq 1+b(|S_{i}|-1)=a+b|S_{i}| facilities, which is the contribution of star ii to (3).

Second, consider a group Uh\mathcal{U}_{h} of small stars and let m:=∣Uh∣m:=|\mathcal{U}_{h}|. When considering this group, the algorithm opens ⌈am⌉+1≤am+2\lceil am\rceil+1\leq am+2 facilities in F1\mathcal{F}_{1}, and at most

facilities in F2\mathcal{F}_{2}. Thus, the total number of facilities open from the group Uh\mathcal{U}_{h} of small stars is at most m(a+bh)+3m(a+bh)+3. As mm is the size of Uh\mathcal{U}_{h} and a+bha+bh is the contribution of each star in Uh\mathcal{U}_{h} to (3), the statement follows from that we have at most ⌈2/(abη)⌉\left\lceil 2/(ab\eta)\right\rceil groups. □\square

We proceed by bounding the expected cost of the obtained solution. The intuition behind the following claim is that we have designed a randomized algorithm that opens a facility in F2\mathcal{F}_{2} with probability ≈b\approx b and a facility in F1\mathcal{F}_{1} with probability ≈a\approx a. Therefore, if we connect a client jj to i2(j)i_{2}(j) with connection cost d2(j)d_{2}(j) if that facility is open, to i1(j)i_{1}(j) with connection cost d1(j)d_{1}(j) if that facility but not i2(j)i_{2}(j) is open, and to the center ii of the star Si:i2(j)∈SiS_{i}:i_{2}(j)\in S_{i} with connection cost at most 2d2(j)+d1(j)2d_{2}(j)+d_{1}(j) if neither i1(j)i_{1}(j) or i2(j)i_{2}(j) are opened (recall that ii is open if not all facilities in SiS_{i} are open), then the expected connection cost of client jj is at most

The following claim then follows by linearity of expectation.

The algorithm returns a solution with expected cost at most

Focus on a client jj with i1(j)=i1i_{1}(j)=i_{1} and i2(j)=i2i_{2}(j)=i_{2} as depicted in Figure 3. Let i3=π(i2)i_{3}=\pi(i_{2}) be the closest facility in F1\mathcal{F}_{1} to i2i_{2}, i.e., i3i_{3} is the center of the star Si3S_{i_{3}} with i2∈Si3i_{2}\in S_{i_{3}}. Notice that d(i3,i2)≤d(i1,i2)≤d1(j)+d2(j)d(i_{3},i_{2})\leq d(i_{1},i_{2})\leq d_{1}(j)+d_{2}(j) by the definition of π\pi. Thus, d(j,i3)≤d2(j)+d(i3,i2)≤d1(j)+2d2(j)d(j,i_{3})\leq d_{2}(j)+d(i_{3},i_{2})\leq d_{1}(j)+2d_{2}(j). We connect jj to i2i_{2}, if i2i_{2} is open; otherwise, we connect jj to i1i_{1} if i1i_{1} is open. We connect jj to i3i_{3} if both i1i_{1} and i2i_{2} are not open. (Notice that for a star SiS_{i}, if ii is not open, then all facilities in SiS_{i} are open. Thus, either i2i_{2} or i3i_{3} is open.) Connecting jj to the nearest open facility can only give smaller connection cost. By abusing notations we let i1i_{1} (i2i_{2}, resp.) denote the event that i1i_{1} (i2i_{2}, resp.) is open and i‾1\overline{i}_{1} (i‾2\overline{i}_{2}, resp.) denote the event that i1i_{1} (i2i_{2}, resp.) is not open. Then, we can upper bound the expected connection cost of jj by

which, by substituting Pr⁡[i‾1i‾2]=1−Pr⁡[i2]−Pr⁡[i1i‾2]\Pr\left[\overline{i}_{1}\overline{i}_{2}\right]=1-\Pr[i_{2}]-\Pr\left[i_{1}\overline{i}_{2}\right], equals

We upper bound this expression by analyzing these probabilities.

Let us start with Pr⁡[i1i‾2]\Pr\left[i_{1}\overline{i}_{2}\right]. If i2∈Si1i_{2}\in S_{i_{1}} (i.e., i1=i3i_{1}=i_{3}) then i1i_{1} is always open if i2i_{2} is closed and thus we have Pr⁡[i1i‾2]=Pr⁡[i‾2]\Pr\left[i_{1}\overline{i}_{2}\right]=\Pr\left[\overline{i}_{2}\right]. If Si1S_{i_{1}} is a large star, then i1i_{1} is always open and we also have Pr⁡[i1i‾2]=Pr⁡[i‾2]\Pr\left[i_{1}\overline{i}_{2}\right]=\Pr\left[\overline{i}_{2}\right]. In both cases, we have Pr⁡[i1i‾2]=1−Pr⁡[i2]\Pr\left[i_{1}\overline{i}_{2}\right]=1-\Pr[i_{2}].

We now consider the case where Si1S_{i_{1}} is a small star in a group Uh\mathcal{U}_{h} with m:=∣Uh∣m:=|\mathcal{U}_{h}| and i1≠i3i_{1}\neq i_{3}. Note that if Si3S_{i_{3}} is either a large star or a small star not in Uh\mathcal{U}_{h} then the events i1i_{1} and iˉ2\bar{i}_{2} are independent. We have thus in this case that

It remains to consider the case when Si3S_{i_{3}} is a star in Uh\mathcal{U}_{h}. Notice that the dependence between i1i_{1} and i2i_{2} comes from that if i2i_{2} is closed then i3i_{3} is opened. Therefore, we have

We have thus showed that Pr⁡[i1i‾2]\Pr\left[i_{1}\overline{i}_{2}\right] is always at least a⋅(1−Pr⁡[i2])a\cdot(1-\Pr\left[i_{2}\right]). Substituting in this bound in (4) allows us to upper bound the connection cost of jj by

We proceed by analyzing Pr⁡[i2]\Pr\left[i_{2}\right]. On the one hand, if i2i_{2} is a leaf of some big star SiS_{i} with s=∣Si∣≥2/(baη)s=\left|S_{i}\right|\geq 2/(ba\eta) then Pr⁡[i2]=⌊b(s−1)⌋s\Pr[i_{2}]=\frac{\left\lfloor b(s-1)\right\rfloor}{s} is greater than b−2/s≥b(1−aη)b-2/s\geq b(1-a\eta) and smaller than bb. On the other hand, if i2i_{2} is a leaf of a small star SiS_{i} in group Uh\mathcal{U}_{h} with m:=∣Uh∣m:=|\mathcal{U}_{h}| then in expectation we open exactly a bb fraction of the leaves so Pr⁡[i2]=b\Pr\left[i_{2}\right]=b. We have thus that b(1−aη)≤Pr⁡[i2]≤bb(1-a\eta)\leq\Pr\left[i_{2}\right]\leq b. Since (1+η)⋅(1−aη)≥1(1+\eta)\cdot(1-a\eta)\geq 1 we have that the expected connection cost of facility jj is at most (1+η)(1+\eta) times

The claim now follows by summing up the expected connection cost of all clients. □\square

We complete the analysis by balancing the solution obtained by running our algorithm with the trivial solution of cost d1d_{1} that opens all facilities in F1\mathcal{F}_{1}.

We have that min⁡{d1,ad1+b(1+2a)d2}≤1+32(ad1+bd2)\min\left\{d_{1},ad_{1}+b(1+2a)d_{2}\right\}\leq\frac{1+\sqrt{3}}{2}(ad_{1}+bd_{2}).

We change d1d_{1} and d2d_{2} slightly so that ad1+bd2ad_{1}+bd_{2} does not change. Apply the operation to the direction that increases the left-hand-side of the inequality. This operation can be applied until one of the 3 conditions is true: (1) d1=0d_{1}=0; (2) d2=0d_{2}=0 or (3) d1=ad1+b(1+2a)d2d_{1}=ad_{1}+b(1+2a)d_{2}.

For the first two cases, the inequality holds. In the third case, we have d1=(1+2a)d2d_{1}=(1+2a)d_{2}. Then d1ad1+bd2=1+2aa(1+2a)+1−a=1+2a1+2a2\frac{d_{1}}{ad_{1}+bd_{2}}=\frac{1+2a}{a(1+2a)+1-a}=\frac{1+2a}{1+2a^{2}}. The maximum value of the quantity is 1+32\frac{1+\sqrt{3}}{2}, achieved when a=3−12a=\frac{\sqrt{3}-1}{2}. □\square

We have shown that, by letting η=ϵ/(1+3)\eta=\epsilon/(1+\sqrt{3}), we can efficiently obtain a O(1/ϵ)O(1/\epsilon)-additive 1+3+ϵ2\frac{1+\sqrt{3}+\epsilon}{2}-approximation to a bi-point solution with constant aa and bb, which proves Theorem 5 when a∈(3−14,21+3]a\in\left(\frac{\sqrt{3}-1}{4},\frac{2}{1+\sqrt{3}}\right].

Discussion

We have given a 1+3+ϵ1+\sqrt{3}+\epsilon-approximation algorithm for kk-median, improving upon the previous best 3+ϵ3+\epsilon-approximation algorithm. Besides the improved approximation guarantee, we believe that the most interesting technical contribution is Theorem 4, namely that we can approximate kk in kk-median without loss of generality. More specifically, any pseudo-approximation algorithm which outputs a solution that opens k+O(1)k+O(1) facilities can be turned into an approximation algorithm with essentially the same approximation guarantee but that only opens kk facilities.

For kk-median this new point of view has the potential to overcome a known barrier for obtaining an approximation algorithm that matches the 1+2/e1+2/e hardness of approximation result: the lower bound of 22 on the integrality gap of the natural LP for kk-median. In particular, the known instances that give the integrality gap of 22 vanish if we allow k+1k+1 open facilities in the integral solution. Following our work, we therefore find it important to further understand the following open question: what is the maximum ratio between the cost of the optimum solution with k+O(1)k+O(1) open facilities, and the value of the LP with kk open facilities? One can note that the hardness of approximation reduction in implies that the integrality gap is at least 1+2/e1+2/e even if we open k+o(k)k+o(k) facilities. Moreover our O(1/ϵ)O(1/\epsilon)-additive approximation for bi-point solutions achieving a guarantee of 1+3+ϵ2<1+2/e\frac{1+\sqrt{3}+\epsilon}{2}<1+2/e shows that the worst case integrality gap instances are not of this type when pseudo-approximation is allowed.

Finally, we would like to mention that Theorem 4 naturally motivates the question if other hard constraints can be relaxed to soft constraints with a “violation-dependent” increase in the runtime. Soft constraints often greatly help when designing algorithms. For example, the capacitated versions of facility location and kk-median are notorious problems when the capacities are hard constraints but better approximation algorithms are known if the capacities are allowed to be slightly violated (see e.g. ). As our approach was inspired by studying the power of the Sherali-Adams hierarchy for the kk-median problem, we believe that a promising research direction is to understand the power of that hierarchy and the stronger Lasserre hierarchy when applied to these kinds of problems.

References