Achieving anonymity via weak lower bound constraints for k-median and k-means
aa r X i v : . [ c s . D S ] N ov Achieving anonymity via weak lower boundconstraints for k -median and k -means Anna Arutyunova ∗ Melanie Schmidt † November 30, 2020
We study k -clustering problems with lower bounds, including k -median and k -means clustering with lower bounds. In addition to the point set P and the numberof centers k , a k -clustering problem with (uniform) lower bounds gets a number B . The solution space is restricted to clusterings where every cluster has at least B points. We demonstrate how to approximate k -median with lower bounds viaa reduction to facility location with lower bounds, for which O (1) -approximationalgorithms are known.Then we propose a new constrained clustering problem with lower bounds wherewe allow points to be assigned multiple times (to different centers). This meansthat for every point, the clustering specifies a set of centers to which it is assigned.We call this clustering with weak lower bounds . We give an -approximation for k -median clustering with weak lower bounds and an O (1) -approximation for k -meanswith weak lower bounds.We conclude by showing that at a constant increase in the approximation factor, wecan restrict the number of assignments of every point to (or, if we allow fractionalassignments, to ǫ ). This also leads to the first bicritera approximation algorithmfor k -means with (standard) lower bounds where bicriteria is interpreted in the sensethat the lower bounds are violated by a constant factor.All algorithms in this paper run in time that is polynomial in n and k (and d forthe Euclidean variants considered). ∗ University of Bonn, Germany, [email protected] † University of Cologne, Germany, [email protected] . Introduction We study k -clustering problems with lower bound constraints. Imagine the following approachto publish a reduced version of a large data set: Partition the data into clusters of similarobjects, then replace every cluster by one (weighted) point that represents it best. Publishthese weighted representatives. For example, it is a fairly natural approach for data that can bemodeled as vectors from R d to replace a data set by a set of mean vectors, where every meanvector represents a cluster. When representing a cluster by one point, the mean vector minimizesthe squared error of the representation. This is a common use case of k -means clustering.In this paper, we ask the following: If we want to publish the representatives, it would be veryconvenient if the clusters were of sufficient size to ensure a certain level of anonymity of theindividual data points that they represent. Can we achieve this, say, in the case of k -meansclustering or for the related k -median problem?Using clustering with lower bounds on the cluster sizes to achieve anonymity is an idea posedby Aggarwal et al. [3]. They introduce it in the setting of radii-based clustering, and define the r -gather problem : Given a set of points P from a metric space, find a clustering and centers forthe clusters such that the maximum distance between a point and its center is minimized andsuch that every cluster has at least r points. They also define the ( k, r ) -center problem which isthe same problem as the r -gather problem except that the number of clusters is also boundedby the given number k . So the ( r, k ) -gather problem takes the k -center clustering objective butrestricts the solution space to clusterings where every cluster has at least r points. Aggarwal etal. [3] give a -approximation for both problems.We pose the same question, but for sum-based objectives as k -median and k -means. Here insteadof the maximum distance between a point and its center, the (squared) distances are added upfor all points. For a set of points P from a metric space and a number k , the k -median problemis to find a clustering and centers such that the sum of the distances of every point to its closestcenter is minimized. For k -means clustering, the distances are squared, the metric is usuallyEuclidean, and the centers are allowed to come from all of R d . Now for k -median/ k -meansclustering with lower bounds, the situation differs in two aspects. We are given an additionalparameter B and solutions now satisfy the additional constraint that every cluster has at least B points . To achieve this, points are no longer necessarily assigned to their closest center butthe solution now involves an assignment function of points to centers. The objective then is tominimize the (squared) sum of distances from every point to its assigned center. To the best ofthe authors’ knowledge, k -median and k -means with lower bounds have not been studied, butfor k -median, a O (1) -approximation follows from known work (see below).For the related (also sum-based) facility location problem, finding solutions with lower boundson the cluster sizes appeared in very different contexts. Given sets P and F from a finite metricspace and opening costs for the points in F , the facility location problem asks to partition P into clusters and to assign a center from F to each cluster such that the sum of the distancesof every point to its cluster plus the sum of the opening costs of open centers is minimized. Forfacility location with lower bounds, an additional parameter B is given and every cluster has tohave at least B points. Karger and Minkoff [19] as well as Guha, Meyerson and Munagala [12]use relaxed versions of facility location with (uniform) lower bounds as subroutines for solvingnetwork design problems. This inspired the seminal work of Svitkina [25] who gives a constant-factor approximation algorithm for the facility location problem with (uniform) lower bounds.Ahmadian and Swamy [5] improve the approximation ratio to 82.6. Ahmadian and Swamy [6]state that the algorithm by Svitkina can be adapted for k -median by adequately replacing thefirst reduction step at the cost of an increase in the approximation factor.It is often the case that restricting the number of clusters to k instead of having facility costs In the introduction, we stick to uniform lower bounds since this is what we want for anonymity. In the technicalpart, we also discuss non-uniform lower bounds. − B − Figure 1: On the difference between lower-bounded clustering and weakly lower-bounded clus-tering.makes the design of approximation algorithms much more cumbersome, in particular when con-straints are involved. For example, the related problem of finding a facility location solutionwhere every cluster has to satisfy an upper bound, usually referred to as capacitated facility loca-tion , can be -approximated (see Aggarwal et al [2]), but finding a constant-factor approximationfor capacitated k -median clustering is a long standing open problem [1, 15].We demonstrate that the situation for lower bounds is different. By a relatively straightforwardapproach that we borrow from the area of approximation algorithms for hierarchical clustering,we show that approximation algorithms for facility location with lower bounds can be convertedinto approximation algorithms for k -median with lower bounds (at the cost of an increase inthe approximation ratio), and this reduction works also for more general k -clustering problemsincluding k -means. This leaves us with two challenges:1. The resulting approximation algorithm has a very high approximation ratio.2. For k -means clustering with lower bounds, no bicriteria or true approximation algorithmis known, and the results for standard facility location with lower bounds do not extendto the case for squared Euclidean distances: Both known algorithms for facility locationuse the triangle inequality an uncontrolled number of times to bound the cost of multiplereassignment steps. Thus the relaxed triangle inequality is not sufficient, as the result-ing bound would depend on this number. Also the bicriteria algorithms by Karger andMinkoff [19] and Guha, Meyerson and Munagala [12] require repeated application of thetriangle inequality. Thus, k -means with lower bounds needs a new technique.To tackle these challenges, we define a new variation of lower-bounded clustering that we call weakly lower-bounded k -clustering. Here we allow points to be allocated multiple times . Howevera point may not be assigned more than once to the same center. This means that our ‘clustering’is not a partitioning into subsets, but consists of non necessarily disjoint clusters (whose union is P ). Each cluster has to respect the lower bound. To explain this idea, consider Figure 1. Thereare two locations with B − points each, and the distance between the two locations is ∆ . Forclustering with a lower bound of B , we can only open one center, which results in a clusteringcost of ( B − for k -median (and Ω( B ∆ ) for k -means). For clustering with weak lower bound B , we allow to assign points multiple times (but only to different centers). For each allocation,we pay the connection cost. In Figure 1, this allows us to open two centers while assigning onepoint from every location to the other location. This costs for k -median (and Ω(∆ ) for k -means) for the two extra assignments. So even though we pay for more connections, the overallcost is smaller. This means that clustering with weak lower bounds can have an arbitrarilysmaller cost than clustering with lower bounds, and in a way, this is a benefit: it means that wepotentially pay less for having the lower bounds satisfied. Of course it also means that the gapbetween the optimal costs of the two problem variants with (standard) lower bounds and weaklower bounds is unbounded. We obtain the following results.• We design an -approximation algorithm for weakly lower-bounded k -median and an O (1) -approximation algorithm for weakly lower-bounded k -means. The algorithm is conceptu-ally simpler than its counterparts for lower-bounded facility location.• Then we show that we can adapt the solutions such that every point is assigned to onlytwo centers at the cost of a constant factor increase in the approximation ratio. We say3hat a solution has b -weak lower bounds if every point is assigned to at most b centers, soour results satisfy -weak lower bounds.• Furthermore, we show that for ǫ ∈ (0 , we can also get O (1 /ǫ ) -approximate solutionsthat satisfy (1 + ǫ ) -weak lower bounds if we allow fractional assignments of points.• Finally, we show that our result on -weak lower bounds also implies a ( O (1) , O (1)) -bicriteria approximation result for lower bounds, where the lower bounds are satisfied onlyto an extent of B/O (1) . Applying this result to squared Euclidean distances yields abicriteria approximation for k -means with lower bounds, which is the first to the best ofour knowledge.• Our results also extend to non-uniform lower bounds.Recall our anonymization goal. When using weakly lower-bounded clustering, we still get thenumber of clusters that we desire and we also fully satisfy the anonymity requirement. Weachieve this by distorting the data slightly by allowing data points to influence two clusters. Inthe fractional case, we get a solution where every data point is assigned to one main cluster andthen contributes an ǫ -connection to a different cluster. By this small disturbance of the dataset, we can meet the anonymity lower bound requirement for all clusters. Techniques
The proof that k -clustering can be reduced to facility location builds upon aknown nesting technique from the area of approximation algorithms for hierarchical clusteringand is relatively straightforward. Our conceptional contribution is the definition of weakly lower-bounded clustering as a means to achieve anonymity. To obtain constant-factor approximationsfor weakly lower-bounded clustering, the idea is to incorporate an estimate for the cost ofestablishing lower bounds via facility costs, approximate a k -clustering problem with facilitycosts and then enforce lower bounds on a solution by connecting the closest B − ℓ points to acenter which previously only had ℓ points. Similar ideas are present in the literature, which weadapt to our new problem formulation.The main technical contribution in our paper is the proof that a solution assigning points toarbitrarily many centers can be converted into a solution where every point is assigned at mosttwice (or (1 + ǫ ) -times, respectively), not only for k -median, but also for k -means. The lattermeans that the proof can not use subsequent reassigning steps as it is the case in previousalgorithms but has to carefully ensure that points are only reassigned once. We can also bypassthis problem in the construction of a bicriteria algorithm. Previous bicriteria algorithms forlower bounds do not extend to k -means due to using multiple reassignments. Related work
Approximation algorithms for clustering have been studied for decades. Theunconstrained k -center problem can be -approximated [10, 13] and this is tight under P = NP [14]. The ( k, r ) -center problem we discussed above is introduced and -approximated in [3].We also call this problem k -center with lower bounds. McCutchen and Khuller [24] study k -center with lower bounds in a streaming setting and provide a (6 + ǫ ) -approximation. One canalso consider non-uniform lower bounds, i.e., every center has an individual lower bound thathas to be satisfied if the center is opened. This variant is studied by Ahmadian and Swamyin [6] and they give a -approximation (for the slightly more general k -supplier problem withnon-uniform lower bounds).The facility location problem has a rich history of approximation algorithms and the currentlybest achieving an approximation ratio of 1.488 due to Li [21] is very close to the best known lowerbound of 1.463 [11]. Bicriteria approximation algorithms for facility location with lower boundsare developed by Karger and Minkoff [19] and Guha, Meyerson and Munagala [12]. Svitkina [25]gives the first O (1) -approximation algorithm. The core of the algorithm is a reduction to facilitylocation with capacities, embedded in a long chain of pre- and postprocessing steps. Ahmadian4nd Swamy [5] improve the approximation guarantee to . . For the case of non-uniform lowerbounds, Li [22] gives a O (1) -approximation algorithm. Although we did not discuss this in theintroduction because it is less relevant to the anonymity motivation, we show in Appendix Athat this result also implies a O (1) -approximation for k -median with non-uniform lower bounds.The k -median and k -means problems are APX-hard with the best known lower bounds being /e [17] and 1.0013 [7, 20]. The k -median problem can be (2 .
675 + ǫ ) -approximated [8] andthe best known approximation ratio for the k -means problem is .
357 + ǫ [4]. To the best ofour knowledge, k -median and k -means with lower bounds have not been studied before. For the k -median problem, O (1) -approximations follow relatively easy from the work on facility locationas outlined in Appendix A and there is a possible adaptation of the algorithm by Svitkina asmentioned above. We are not aware of an approximation algorithm for facility location withlower bounds that works for squared metrics. Indeed for k -means with lower bounds, we do notknow a true or even bicriteria approximation algorithm; we propose a bicriteria result that isapplicable to k -means in Appendix D.Finding a polynomial constant-factor approximation algorithm for the k -median problem with upper bounds , i.e., with capacities, is a long standing open problem. Recently, efforts have beenmade to obtain FPT approximation algorithms for the problem [1, 9].
2. Preliminaries A k -clustering problem gets a finite set of input points P , a possibly infinite set of possiblecenters F , and a number k ∈ N and asks for a set of centers C ⊂ F with | C | ≤ k and a mapping a : P → C such that cost( P, C, a ) = cost(
C, a ) = X x ∈ P d ( x, a ( x )) is minimized, where d : ( P ∪ F ) × ( P ∪ F ) → R + is a distance function that is symmetricand satisfies that d ( x, y ) = 0 iff x = y . For the generalized k -median problem , the distance d satisfies the α -relaxed triangle inequality, i.e., for all x, y, z ∈ P ∪ F , it holds that d ( x, y ) ≤ αd ( x, z ) + αd ( y, z ) .We define the k -median problem as a generalized k -median problem with P = F (finite) and α = 1 , and the k -means problem by setting F = R d and P ⊂ F , and choosing d as the squaredEuclidean distance, then α = 2 . For these two problems, choosing the mapping a : P → C isalways optimally done by assigning every point to (one of) its closest center(s). A generalizedfacility location problem has the same input as a generalized k -median problem except that itgets facility costs f : F → R instead of a number k . The goal is to find a set of centers C ⊂ F without cardinality constraint that minimizes P x ∈ P d ( x, a ( x )) + P c ∈ C f ( c ) . We use the termfacility location not only if d is a metric but also in the case of a distance function satisfying the α -relaxed triangle inequality, analogously to the generalized k -median problem defined above.We study generalized k -median and generalized facility location problems under side constraintswhich means that the choice of the mapping a is restricted. The side constraints that we studyare versions of lower bounded clustering, i.e., they demand that every center gets a minimumnumber of points that are assigned to it. For clustering with (uniform) lower bounds, the inputcontains a number B and every cluster in the solution has to have at least B points. Non-uniformlower bounds are meaningful in the case of a finite set F and then, non-uniform lower boundsare given via a function B : F → N . If any points are assigned to center c ∈ F in a feasiblesolution, then it has to be at least B ( c ) points.When adding constraints, there is a subtle detail in the definition of generalized k -median prob-lems for the case P = F : The question whether the center of a cluster has to be part of thecluster. Notice that without constraints, this makes no difference because assigning a center toa different center than itself cannot be beneficial. When we add lower bounds, this can change.5e assume that choosing a center outside of the cluster is allowed and specifically say when thesolution is such that centers are members of their clusters.Our new problem variant is defined as follows. Given an instance of the same form as for theunconstrained generalized k -median or generalized facility location problem plus lower bounds B : F → N , the goal is to compute a set of at most k centers C ⊂ F and an assignment a : P → P ( C ) such that the lower bound is satisfied, i.e., |{ x ∈ P | c ∈ a ( x ) }| ≥ B ( c ) for all c ∈ C and every point is assigned at least once. If a point is assigned multiple times the distanceof the point to all assigned centers is paid by the solution. The total cost of a solution is givenby cost( C, a ) = X x ∈ P X c ∈ a ( x ) d ( x, c ) . If a solution of a weakly lower-bounded clustering problem satisfies that every point is assignedto at most b centers, then we say that the solution satisfies b -weak lower bounds.
3. Reducing lower-bounded k -clustering to facility location In this section, we observe that by using a known technique from the area of approximationalgorithms for hierarchical clustering, we can turn an approximation algorithm for generalizedfacility location with lower bounds into an algorithm for generalized k -median with lower bounds.The technique is called nesting . Given two solutions S and S for the same generalized facilitylocation problem with different number of centers k > k , nesting describes how to find asolution S with k centers which has a cost bounded by a constant times the costs of S and S and which is hierarchically compatible with S , i.e., the clusters in S result from mergingclusters in S . We use this by computing a solution S with an approximation algorithm forgeneralized facility location satisfying the lower bounds and a solution S for unconstrainedgeneralized k -median and then combining them via a nesting step. The resulting solution S has at most k centers and the clusters result from clusters that satisfy the lower bound – thusthey satisfy the lower bound as well. For uniform lower bounds, the execution of this planis very straightforward, for non-uniform lower bounds we have to be a bit more careful andadjust the nesting appropriately. Since most of this section follows relatively straightforwardlyfrom known work, we defer the details to Appendix A. Although the reduction is applicableto generalized k -median, this only helps to obtain constant-factor approximations for k -medianbecause no approximation algorithms for generalized facility location with lower bounds areknown for α > . We get the following statement from combining Lemma 14 in Appendix Awith the (adjusted) nesting results from Lin et al. [23] (see Lemma 15 in Appendix A) andthe approximation algorithms for facility location with uniform lower bounds by Ahmadian andSwamy [5] and non-uniform lower bounds by Li [22]. Corollary 1.
There exist polynomial-time O (1) -approximation algorithms for the k -medianproblem with uniform and non-uniform lower bounds. As a final note we observe that the crucial property of lower bound constraints that we use hereis mergeability : If a uniform lower bound is satisfied for a solution, then merging clusters resultsin a solution that is still feasible. This is in stark contrast to for example capacitated clustering.Our reduction in Lemma 14 works for mergeable constraints in general.
4. Generalized k -median with weak lower bounds Now we consider a relaxed version of generalized k -median with lower bounds where points in P can be assigned multiple times. This relaxation does make sense since we have lower bounds onthe centers, so it can be more valuable to assign points to multiple centers to satisfy the lower6ounds instead of closing the respective centers. To see this we refer to Figure 1. We call thisproblem generalized k-median with weak lower bounds .For ease of presentation, it is sensible to assume that F is finite. We observe that we can alwaysset F = P at a constant increase in the cost function (see Lemma 17 in Appendix B) if we aregiven a uniform lower bound. In particular, we assume in this section that F = P holds for k -means.To achieve anonymity it is enough to have a uniform lower bound. However if we assume F = P from the beginning, then our results also hold for non-uniform lower bounds , so we consider thismore general case in this section.For standard k -median/ k -means with weak lower bounds we give an -approximate algorithmand an O (1) -approximate algorithm respectively. Furthermore we show that such a solution canbe transformed into a solution to generalized k -median with in polynomialtime. We show that this transformation increases the cost only by a factor of α ( α + 1) . Wecombine this with the approximation algorithm for standard k -median/ k -means with weak lowerbounds and obtain an approximation algorithm for standard k -median/ k -means with 2-weaklower bounds. If we allow fractional assignments we show how to obtain a solution whichassigns every point by an amount of at most ǫ for arbitrary ǫ ∈ (0 , losing ⌈ ǫ ⌉ α ( α + 1) + 1 in the approximation factor. Computing a solution
To approximate generalized k -median with weak non-uniform lowerbounds, we reduce this problem to generalized k -median with center costs. In this variant ofgeneralized k -median, the input contains both a number k and center opening costs f : F → R + .The objective is then cost f ( C, a ) = X x ∈ P d ( x, a ( x )) + X c ∈ C f ( c ) while the solution space is constrained to center sets of size at most k as for generalized k -median.The reduction that we use works by introducing a center cost of f ( c ) = X p ∈ D c d ( p, c ) (1)for every point c ∈ F . This cost is paid if c becomes a center. Here D c is the set consistingof the B ( c ) nearest points in P to c . The idea for this reduction is adapted from the bicriteriaalgorithm for lower-bounded facility location presented by Guha, Meyerson and Munagala [12]and Karger, Minkoff [19].Note that for a center c in a feasible solution ( C, a ) to generalized k -median with weak lowerbounds, the term P p ∈ D c d ( p, c ) is a lower bound on the assignment cost caused by c . This leadsto the following lemma (its proof is deferred to Appendix C which contains all missing proofsfrom this section). Lemma 2.
Let
OP T ′ be an optimal solution to the generalized k -median problem with centercosts as defined in (1) and OP T = (
O, h ) be an optimal solution to generalized k -median withweak lower bounds. It holds that cost f ( OP T ′ ) ≤ OP T ) . Let ( C, a ) be a solution for the generalized k -median problem with center costs. To turn it intoa solution for generalized k -median with weak lower bounds we have to modify the assignment.Let c ∈ C and n c = | a − ( c ) | . We additionally assign m c = max { , B ( c ) − n c } points to c tosatisfy the lower bound. Let S c ⊂ D c be the set of points in D c which are not assigned to c . Wechoose m c points from S c and assign them to c . This is feasible since we are allowed to assignpoints multiple times. Let ( C, a ′ ) be the corresponding solution. Lemma 3.
It holds that cost(
C, a ′ ) ≤ cost f ( C, a ) . orollary 4. Given an γ -approximation for the generalized k -median problem with center costs,we get a γ -approximation for the generalized k -median problem with weak lower bounds inpolynomial time. For k -median, we combine Corollary 4 with Corollary 5.5 from [26] which shows that an algorithmby Jain et al. [16] can be used to obtain a -approximation for the k -median problem with centercosts. This gives an -approximation for k -median with weak lower bounds. For k -means, we usethe algorithm by Jain and Vazirani [18] which was originally designed for k -median. However,as outlined in the journal version [18], it can be used for k -means when F = P , and also for k -median with center costs. The two extensions are not conflicting and can both be applied toobtain a O (1) -approximation for k -means with center costs for the case F = P . We see that the solution for standard k -median/ k -means with weak lower bounds computedabove can assign a point to all centers in the worst case. The number of assigned centers perpoint can not be bounded by a constant. This may not be desirable in the context of publishinganonymized representatives since the distortion of the original data set is not bounded.However, we show that such a solution can be transformed into a solution assigning every pointat most twice. This increases the cost by a factor of α ( α + 1) . Recall that α is the constantappearing in the relaxed triangle inequality. This leads to the following theorem. Theorem 5.
Given a solution ( C, a ) to generalized k-median with weak lower bounds, we cancompute a solution ( e C, e a ) to generalized k-median with 2-weak lower bounds (assigning everypoint at most twice) in polynomial time such that cost( e C, e a ) ≤ α ( α + 1) cost( C, a ) . Reassignment process.
We start by setting e C = C and e a = a and modify both e C and e a until we obtain a valid solution to generalized k -median with 2-weak lower bounds. During theprocess, the centers in e C are called currently open , and when a center is deleted from e C , wesay it is closed . The centers are processed in an arbitrary but fixed order, i.e., we assume that C = { c , . . . , c k ′ } for some k ′ ≤ k and process them in order c , . . . , c k ′ . We say that c i is smaller than c j if i < j .Let c = c i be the currently processed center. By P c , we denote the set of points assigned to c under e a . We divide P c into three sets P c = { q ∈ P c | | e a ( q ) | = 1 } , P c = { q ∈ P c | | e a ( q ) | = 2 } and P c = { q ∈ P c | | e a ( q ) | ≥ } . Furthermore with C ( P c ) we denote all centers which are connectedto at least one point in P c under e a .If P c is empty, we are done and proceed with the next center in e C . Otherwise we need to empty P c . Observe that points in P c are assigned to multiple centers, so if we delete the connectionbetween one of these points and c , the point is still served by some other center. However, doingso may violate the lower bound at c . So we have to replace this connection.As long as P c is non-empty, we do the following. We pick a center d = min C ( P c ) \{ c } and apoint x ∈ P c connected to d . We want to assign a point y from P d to c to free x . For technicalreasons, we restrict the choice of y : We exclude all points from the subset P d := { q ∈ P d || a ( q ) | ≥ and a ( q ) ∩ { c , . . . , c i − } ∩ e C = ∅} , i.e., all points which were assigned to at least centers under the initial assignment a , and where one of these at least centers is still open and smaller than c .If P d \ P d is non-empty, we pick a point y ∈ P d \ P d arbitrarily. We set e a ( y ) = { d, c } and e a ( x ) = e a ( x ) \{ c } . So x is no longer connected to c , but to satisfy the lower bound at c we replace x by y (Figure 2).If P d \ P d is empty, our replacement plan does not work. Instead, we close d . This means that x is now assigned to one center less, and, if this happens repeatedly, x will at some point nolonger be in P c . Since we close d , all points in P d have to be reassigned because they are only8 lgorithm 1: Reducing the number of assigned centers per point to two define an ordering on the centers c ≤ c . . . ≤ c k ′ set e C := C and e a := a for all c ∈ C P c := { q ∈ P | c ∈ e a ( q ) } P c := { q ∈ P c | | e a ( q ) | ≥ } , P ic := { q ∈ P c | | e a ( q ) | = i } for i = 1 , C ( P c ) := S q ∈ P c e a ( q ) for i = 1 to l do while P c i = ∅ do d = min C ( P c i ) \{ c i } P d = { q ∈ P d | | a ( q ) | ≥ and a ( q ) ∩ { c , . . . , c i − } ∩ e C = ∅}} if P d \ P d = ∅ then for all q ∈ P d let e = min( a ( q ) ∩ e C ) set e a ( q ) = { e } delete d from e C and all connections to d in e a else pick x ∈ P c i connected to d and y ∈ P d \ P d set e a ( x ) = e a ( x ) \{ c i } , e a ( y ) = { c i , d } connected to d . For each q ∈ P d , we reassign q to the smallest currently open center in a ( q ) .Notice that such a center exists and is smaller than c because P d = P d and for every q ∈ P d ,there is at least one center in a ( q ) ∩ e C which is smaller than c .The entire process is described in Algorithm 1. It satisfies the following invariants which can beobserved from the procedure; a proof of the lemma can be found in Appendix C. Lemma 6.
Algorithm 1 computes a feasible solution ( e C, e a ) to generalized k -median with 2-weaklower bounds. Furthermore the following properties hold during all steps of the algorithm.1. The algorithm never establishes connections for points currently assigned more than once.2. For any center c ∈ C , P c does not change before c is processed or closed.3. If a connection between x ∈ P and the currently processed center c ∈ e C is deleted by thealgorithm, we have from this time on x / ∈ P c until termination. Moreover P c remainsempty after c is processed.4. While the algorithm processes c ∈ C we always have c < min C ( P c ) \{ c } . Moreover allcurrently open centers which are smaller than c remain open until termination.5. If the algorithm establishes a new connection in Line 14 or Line 18 it remains until ter-mination. x yc d x yc d Figure 2: Connection between x ∈ P c and c is deleted. A point y ∈ P d replaces x .9 y yc d y α α α Figure 3: Bounding the distance between y and c . The respective distances appear with a factorof α or α . Tuple ( x y , c ) is of Type 1 and ( x y , d y ) , ( y, d y ) are of Type 2.We now want to charge the cost of new connections created by the algorithm to the cost of theoriginal solution. Notice that only Line 18 generates new connections, Line 14 re-establishesconnections that were originally present. So let N c be the set of all points newly assigned to c by the algorithm in Line 18 while center c is processed. For y ∈ N c let d y be the respectivecenter in Line 9 of Algorithm 1 and x y the point in Line 17 contained in P c and connected to d y . Using the α -relaxed triangle inequality, we obtain the following upper bound. d ( y, c ) ≤ α ( d ( y, x y ) + d ( x y , c )) ≤ α (cid:16) α (cid:0) d ( y, d y ) + d ( d y , x y ) (cid:1) + d ( x y , c ) (cid:17) = α (cid:0) d ( y, d y ) + d ( d y , x y ) (cid:1) + αd ( x y , c ) . (2)We can apply (2) to all c ∈ e C and all y ∈ N c . This yields the following upper bound on the costof the final solution ( e C, e a ) . cost( e C, e a ) = X c ∈ e C X y ∈ P : c ∈ e a ( y ) d ( y, c ) = X c ∈ e C (cid:16) X y ∈ P c \ N c d ( y, c ) + X y ∈ N c d ( y, c ) (cid:17) ≤ X c ∈ e C (cid:16) X y ∈ P c \ N c d ( y, c ) + X y ∈ N c α ( d ( y, d y ) + d ( d y , x y )) + αd ( x y , c ) (cid:17) . (3)Expression (3) is what we want to pay for. Observe that all involved distances contribute to theoriginal cost as well (we state this formally in Observation 18 in Appendix C). So in principle,we can charge each summand to a term in the original cost. But what we need to do is tobound the number of times that each term in the original cost gets charged. To organize thecounting, we count how many times a specific tuple of a point z and a center f occurs as d ( z, f ) in (3). Since it is important at which position a tuple appears, we give names to the differentoccurrences (also see Figure 3). We say that that a tuple appears as a tuple of Type 0 if itappears as d ( y, c ) in (3), as tuple of Type 1 if it appears as d ( x y , c ) , and as tuple of Type 2if it appears as d ( y, d y ) or d ( d y , x y ) . We distinguish the latter type further by calling a tupleoccurring as d ( y, d y ) a tuple of Type 2.1 and a tuple occurring as d ( x y , d y ) a tuple of Type 2.2.We say that ( y, d y ) , ( d y , x y ) and ( x y , c ) contribute to the cost of ( y, c ) , where by the cost of ( y, c ) we mean the upper bound on d ( y, c ) in (2) which we want to pay for. As indicated above, atuple ( z, f ) can contribute to the cost of multiple tuples. Notice that a tuple occurs at mostonce as a tuple of Type 0 in (3). To bound the cost of ( e C, e a ) we bound the number of times atuple appears as Type 1 or Type 2 tuple in (3). Lemma 7.
For all z ∈ P, f ∈ C , the tuple ( z, f ) can appear in (3) at most once as tuple ofType 1 and at most once as tuple of Type 2.Proof. In the following, the tuple whose cost the tuple ( z, f ) contributes to will always be named ( y, c ) , and we denote the time at which y is newly assigned to c by t . Type 1:
Assume ( z, f ) contributes to the cost of ( y, c ) as a Tuple of Type 1. Then f = c .Notice that at the time step before t we must have z ∈ P c and afterwards, z is never againcontained in P c by Property 3 of Lemma 6. Thus the pair ( z, c ) can never again be responsible10or any reassignment to c , i.e., ( z, c ) = ( z, f ) does not contribute to any further cost as a tupleof Type 1. Type 2.1:
Assume that ( z, f ) contributes to the cost of ( y, c ) as a Tuple of Type 2.1. Then z = y . At the time step before t , we have y ∈ P f , f ∈ C ( P c ) , and at time t , we have y ∈ P c ∩ P f .By Property 5 of Lemma 6, newly established connections stay, so after time t , it always holdsthat y ∈ P c . So even if y is in P f at a later time, it can not be in P f since it is also connected to c . So ( y, f ) = ( z, f ) does not contribute to any further cost as tuple of Type 2.1. Furthermoreby Property 1 of Lemma 6 we know that y is always assigned to fewer than three centers after t which means that ( y, f ) does not contribute as tuple of Type 2.2 to the cost of any connectionestablished by the algorithm after t either. Type 2.2:
Finally we consider the case where ( z, f ) contributes to the cost of ( y, c ) as a tupleof Type 2.2. At time t , the algorithm processes c . By the way the algorithm chooses f and z ,we know that z ∈ P c (at the beginning of the process, i.e., before t ) and f = min C ( P c ) \{ c } .After t , Property 3 of Lemma 6 implies z / ∈ P c , which means that as a tuple of Type 2.2, it cannever again contribute to the cost of any tuple containing c . Assume instead that it contributes(as Type 2.2) to the cost of a tuple ( y ′ , c ′ ) for a center c ′ = c , and some point y ′ ∈ P . Thisis supposed to happen after t , so y ′ is newly assigned to c ′ at some time t ′ > t . Before c ′ isprocessed, we must always have z ∈ P c ′ by Property 1 and 2 of Lemma 6. So in particular, attime t < t ′ we have c ′ ∈ C ( P c ) \{ c } . Moreover we know that at some time while c ′ is processedby the algorithm we have f = min C ( P c ′ ) \{ c ′ } . Using Property 4 of Lemma 6 we concludethat c ′ < f . Which is a contradiction since the algorithm chose f and not c ′ at time t , i.e., f = min C ( P c ) \{ c } must hold. Thus, ( z, f ) can not contribute to the cost of ( y ′ , c ′ ) as a tupleof Type 2.2.It is left to show that ( z, f ) can not contribute to the cost of any ( y ′ , c ′ ) as a tuple of Type 2.1at some time t ′ > t . For a contribution as Type 2.1, we would have z = y ′ and y ′ ∈ P f . Weshow that in this case y ′ is fact contained in P f . Remember that at time t we have y ′ = z ∈ P c and that this only happens if | a ( y ′ ) | ≥ by Property 1 of Lemma 6. Moreover c is sill open byProperty 4 of Lemma 6 and is smaller than c ′ . Thus c ∈ a ( y ′ ) ∩ { e | e < c ′ } ∩ e C , which proves y ′ ∈ P f . Therefore the algorithm does not assign y ′ to c ′ (see Lines 11-15) and ( z, f ) does notcontribute as tuple of Type 2.1 to the cost of any connection established by the algorithm after t .We now know that a tuple only appears at most once as any of the three tuple types. For thefinal counting, we define T , T and T as the sets of all tuples of Type 1, 2 and 3, respectively.We could already prove a bound on the cost now, but to make it slightly smaller and proveTheorem 5, we need one final statement. Lemma 8.
The set T ∩ T ∩ T is empty.Proof of Theorem 5. Slightly abusing the notation we write d ( e ) for a tuple e = ( z, f ) by whichwe mean the distance d ( z, f ) . Combining Lemma 7 and 8 we obtain cost( e C, e a ) ≤ X c ∈ e C (cid:16) X y ∈ P c \ N c d ( y, c ) + X y ∈ N c α ( d ( y, d y ) + d ( d y , x y )) + αd ( x y , c ) (cid:17) (3) = X e ∈ T d ( e ) + α X e ∈ T d ( e ) + α X e ∈ T d ( e ) (4) ≤ ( α + α ) cost( C, a ) . (5)By Lemma 7 we know that a tuple only appears at most once as any of the three tuple types.We replace (3) by summing up the cost of all tuples in T i for i = 1 , , with the respective factorfor each type and obtain (4).Finally by Observation 18 the cost d ( e ) for e ∈ T ∪ T ∪ T occurs as a term in the originalsolution and T ∩ T ∩ T = ∅ by Lemma 8, which proves (5).11o it is possible to reduce the number of assignments per point to two at a constant factorincrease in the approximation factor. We can go even further and allow points to be fractionallyassigned to centers which poses the question if it is possible to bound the assigned amount bya number smaller than two. Indeed we can prove for every ǫ ∈ (0 , that we can modify asolution to generalized k -median with weak lower bounds such that every point is assigned byan amount of at most ǫ and the cost increases by a factor of O ( ǫ α ) . Note that even if weallow fractional assignments of points to centers, the centers remain either open or closed, whichdifferentiates our result from a truly fractional solution, where it is also allowed to open centersfractionally. Furthermore, the new assignment assigns every point to at most two centers. It isassigned by an amount of one to one center and eventually by an additional amount of ǫ to asecond center.Since we consider fractional assignments we modify our notation and denote with e a cx ∈ [0 , theamount by which x ∈ P is assigned to c ∈ e C , where e C is the set of centers. Let e a x = P c ∈ e C e a cx be the amount by which x ∈ P is assigned to e C . The assignment e a is feasible if e a x ≥ for all x ∈ P and P x ∈ P e a cx ≥ B ( c ) for all c ∈ e C , and its cost is cost( e C, e a ) = X c ∈ e C X x ∈ P e a cx d ( x, c ) . The proof of the following theorem is in Appendix C.1. It is similar to the proof of Theorem 5but to satisfy lower bounds we can only assign an amount of ǫ from points which are alreadyassigned once. Therefore we consider suitable sets with ⌈ ǫ ⌉ points, which leads to the increaseof O ( ǫ ) in the approximation factor. Theorem 9.
Given < ǫ < and a solution ( C, a ) to generalized k -median with weak lowerbounds. We can compute a solution ( e C, e a ) to generalized k -median with (1+ ǫ ) -weak lower bounds,i.e., e a x ≤ ǫ for all x ∈ P in polynomial time such that cost( e C, e a ) ≤ ( ⌈ ǫ ⌉ α ( α +1)+1) cost( C, a ) . On pages 7-8 we reduce generalized k -median with weak lower bounds to generalized k -medianwith center cost and obtain an or O (1) -approximation for k -median or k -means with weaklower bounds, respectively. We combine this with Theorem 5 to get a solution with -weaklower bounds whose cost is a constant factor away from the problem with weak lower bounds.Since weak lower bounds are a relaxation of 2-weak lower bounds, we get: Corollary 10.
Let
OP T be an optimal solution to k -median/ k -means with 2-weak lower bounds.We can compute a solution ( C, a ) in polynomial time for1. k-median with 2-weak lower bounds with cost( C, a ) ≤
16 cost(
OP T )
2. k-means with 2-weak lower bounds with cost(
C, a ) ≤ O (1) cost( OP T ) . Combining the results from Section 4 with Theorem 9 we obtain:
Corollary 11.
Let
OP T be an optimal solution to k -median/ k -means with (1 + ǫ ) -weak lowerbounds. We can compute a solution ( C, a ) in polynomial time for1. k-median with (1 + ǫ ) -weak lower bounds with cost( C, a ) ≤ (16 ⌈ ǫ ⌉ + 8) cost( OP T )
2. k-means with (1 + ǫ ) -weak lower bounds with cost( C, a ) ≤ O ( ǫ ) cost( OP T ) . k -median with lower bounds A ( β, δ ) -bicriteria solution for generalized k -median with lower bounds consists of at most k centers C ′ ⊂ F and an assignment a ′ : P → C such that at least βB ( c ) points are assignedto c ∈ C ′ by a ′ and cost( C ′ , a ′ ) ≤ δ cost( OP T ) . Here OP T denotes an optimal solution togeneralized k -median with lower bounds. 12iven a β ≥ and a γ -approximate solution to generalized k -median with 2-weak lower bounds ( C, a ) , we can compute a ( β, γ max { αβ − β + 1 , α β − β } ) -bicriteria solution in the following way. Inthe beginning all points are unassigned. Let C = { c , . . . , c k ′ } . Starting at c we decide for allcenters in C if they are closed or not. If we decide that a center c is open we directly assign atleast ⌈ βB ( c ) ⌉ points to c . Let A i denote the points assigned to c i under a . When consideringa center c i , we check if at least ⌈ βB ( c i ) ⌉ points in A i are not assigned so far. If so, we open c i and assign all currently unassigned points from A i to it. Otherwise, we know that a significantfraction of the points in A i are already assigned to some earlier centers. We close c i and usethe existing connections to reassign the unassigned points in A i . We can bound the cost of thereassignment because a constant fraction of the points in A i is already assigned. For this it iscrucial that every point is assigned at most twice in the original solution. Details of the proofare in Appendix D. Theorem 12.
Given a γ -approximate solution ( C, a ) to generalized k -median with 2-weak lowerbounds and a fixed β ∈ [0 . , , Algorithm 3 (on page 29) computes a ( β, γ max { αβ − β + 1 , α β − β } ) -bicriteria solution to generalized k -median with lower bounds in polynomial time. In particular,there exists a polynomial-time ( , O (1)) -bicriteria approximation algorithm for k -means withlower bounds. References [1] Marek Adamczyk, Jaroslaw Byrka, Jan Marcinkowski, Syed Mohammad Meesum, andMichal Wlodarczyk. Constant-factor FPT approximation for capacitated k-median. In
Proc. of the 27th Ann. Europ. Symp. on Algorithms (ESA) , pages 1:1–1:14, 2019.[2] Ankit Aggarwal, Anand Louis, Manisha Bansal, Naveen Garg, Neelima Gupta, ShubhamGupta, and Surabhi Jain. A 3-approximation algorithm for the facility location problemwith uniform capacities.
Mathematical Programming , 141(1-2):527–547, 2013.[3] Gagan Aggarwal, Rina Panigrahy, Tomás Feder, Dilys Thomas, Krishnaram Kenthapadi,Samir Khuller, and An Zhu. Achieving anonymity via clustering.
ACM Transactions onAlgorithms (TALG) , 6(3):49:1–49:19, 2010.[4] Sara Ahmadian, Ashkan Norouzi-Fard, Ola Svensson, and Justin Ward. Better guaranteesfor k-means and Euclidean k-median by primal-dual algorithms. In
Proceedings of the 58thAnnual Symposium on Foundations of Computer Science (FOCS) , pages 61–72, 2017.[5] Sara Ahmadian and Chaitanya Swamy. Improved approximation guarantees for lower-bounded facility location. In
Proceedings of the 10th International Workshop on Approxi-mation and Online Algorithms (WAOA) , pages 257–271, 2012.[6] Sara Ahmadian and Chaitanya Swamy. Approximation algorithms for clustering problemswith lower bounds and outliers. In
Proceedings of the 43rd International Colloquium onAutomata, Languages, and Programming, (ICALP) , pages 69:1–69:15, 2016.[7] Pranjal Awasthi, Moses Charikar, Ravishankar Krishnaswamy, and Ali Kemal Sinop. Thehardness of approximation of Euclidean k-means. In
Proceedings of the 31st InternationalSymposium on Computational Geometry (SoCG) , pages 754–767, 2015.[8] Jaroslaw Byrka, Thomas W. Pensyl, Bartosz Rybicki, Aravind Srinivasan, and Khoa Trinh.An improved approximation for k -median and positive correlation in budgeted optimization. ACM Transaction on Algorithms (TALG) , 13(2):23:1–23:31, 2017.139] Vincent Cohen-Addad, Anupam Gupta, Amit Kumar, Euiwoong Lee, and Jason Li. TightFPT approximations for k-median and k-means. In
Proc. of the 46th Int. Colloq. on Au-tomata, Languages, and Programming (ICALP) , pages 42:1–42:14, 2019.[10] Teofilo F. Gonzalez. Clustering to minimize the maximum intercluster distance.
TheoreticalComputer Science (TCS) , 38:293–306, 1985.[11] Sudipto Guha and Samir Khuller. Greedy strikes back: Improved facility location algo-rithms.
Journal of Algorithms , 31(1):228–248, 1999.[12] Sudipto Guha, Adam Meyerson, and Kamesh Munagala. Hierarchical placement and net-work design problems. In
Proceedings of the 41st Annual Symposium on Foundations ofComputer Science (FOCS) , pages 603–612, 2000.[13] Dorit S. Hochbaum and David B. Shmoys. A unified approach to approximation algorithmsfor bottleneck problems.
Journal of the ACM , 33(3):533–550, 1986.[14] Wen-Lian Hsu and George L. Nemhauser. Easy and hard bottleneck location problems.
Discrete Applied Mathematics (DAM) , 1(3):209–215, 1979.[15] Tanmay Inamdar and Kasturi Varadarajan. Capacitated sum-of-radii clustering: An FPTapproximation. In , volume 173 of
LeibnizInternational Proceedings in Informatics (LIPIcs) , pages 62:1–62:17, 2020.[16] Kamal Jain, Mohammad Mahdian, Evangelos Markakis, Amin Saberi, and Vijay V. Vazi-rani. Greedy facility location algorithms analyzed using dual fitting with factor-revealingLP.
Journal of the ACM , 50(6):795–824, 2003.[17] Kamal Jain, Mohammad Mahdian, and Amin Saberi. A new greedy approach for facil-ity location problems. In
Proceedings of the 34th Annual ACM Symposium on Theory ofComputing (STOC) , pages 731–740, 2002.[18] Kamal Jain and Vijay V. Vazirani. Approximation algorithms for metric facility locationand k-median problems using the primal-dual schema and Lagrangian relaxation.
Journalof the ACM , 48(2):274–296, 2001.[19] David R. Karger and Maria Minkoff. Building Steiner trees with incomplete global knowl-edge. In
Proceedings of the 41st Annual Symposium on Foundations of Computer Science(FOCS) , pages 613–623, 2000.[20] Euiwoong Lee, Melanie Schmidt, and John Wright. Improved and simplified inapproxima-bility for k-means.
Information Processing Letters (IPL) , 120:40–43, 2017.[21] Shi Li. A 1.488 approximation algorithm for the uncapacitated facility location problem.
Information and Computation , 222:45–58, 2013.[22] Shi Li. On facility location with general lower bounds. In
Proceedings of the 30th AnnualACM-SIAM Symposium on Discrete Algorithms (SODA) , pages 2279–2290, 2019.[23] Guolong Lin, Chandrashekhar Nagarajan, Rajmohan Rajaraman, and David P. Williamson.A general approach for incremental approximation and hierarchical clustering.
SIAM Jour-nal on Computing (SICOMP) , 39(8):3633–3669, 2010.[24] Richard Matthew McCutchen and Samir Khuller. Streaming algorithms for k-center cluster-ing with outliers and with anonymity. In
Proceedings of the 11th International Workshop onApproximation, Randomization and Combinatorial Optimization (APPROX) , pages 165–178, 2008. 1425] Zoya Svitkina. Lower-bounded facility location.
ACM Transactions on Algorithms (TALG) ,6(4):69, 2010.[26] Jens Vygen. Lecture notes – approximation algorithms for facil-ity location problems, 2004/2005. accessed May 8th, 2019. URL: http://gett.or.uni-bonn.de/~vygen/files/fl.pdf . A. Reducing lower-bounded k -clustering to facility location Assume we want to approximate the generalized k -median problem under a side constraint wherethe side constraint is benign in the following sense: If a clustering satisfies the constraint, thenthe clustering resulting from merging two clusters is also feasible under the constraint. This istrue for lower-bounded clustering since a cluster arising from merging two clusters with B pointseach definitely has at least B points, too. We call such constraints mergeable constraints . Aslightly weaker mergability property holds for non-uniform lower bounds where the constraintdepends on the center: If we merge two clusters that satisfy lower bounds B and B of theircenters c and c , then the merged cluster still satisfies the lower bounds of c and c , so as longas the merged cluster uses one of these two centers, the lower bound is still satisfied.For many clustering problems, solving the version where the number of centers is constrainedto k is much more difficult to tackle than solving the facility location variant.For example, (uniform) capacitated facility location allows for a -approximation, while findinga constant-factor approximation for uniform capacitated k -median is a long-standing open prob-lem. However, this is not the case for lower-bounded clustering because of the above describedmergability property.Roughly speaking, we show that for mergable constraints, we can turn an unconstrained general-ized k -median solution and a constrained facility location solution into a constrained generalized k -median solution which does not cost much more. To do this, we borrow a concept from thearea of hierarchical clustering which formalizes what it costs to merge clusters under a specificclustering objective. Definition 13 (adapted from [23]) . A generalized facility location problem satisfies the ( γ, δ ) -nesting property for reals γ, δ ≥ if for any input point set P and any two solutions S = ( C , a ) and S = ( C , a ) with | C | > | C | , a solution S = ( C, a ) can be computed such that• S and S are hierarchically compatible, i.e., for all c ∈ C there exists a c ′ ∈ C such thatfor all x ∈ P with a ( x ) = c it holds that a ( x ) = c ′ ,• cost( P, S ) ≤ γ · cost( P, S ) + δ cost( P, S ) , and• | C | ≤ | C | .We call such a solution S ( γ, δ ) -nested with respect to S and S . Lin et al. [23] show that the standard facility location / k -median cost function satisfies the (2 , -nesting property (also see Lemma 15 below). Combining this with the best-known constant-factor approximation for k -median [8] which achieves a .
675 + ǫ approximation and the . -approximation for facility location with uniform lower bounds by Ahmadian and Swamy [5], thefollowing lemma implies a (167 .
875 + ǫ ) -approximation for k -median with lower bounds. Lemma 14.
Assume that we are given a generalized facility location problem that satisfies the ( γ, δ ) -nesting property, an β -approximation algorithm for its generalized k -median variant anda α -approximation algorithm for the constrained generalized facility location variant under amergeable constraint. Then there is a ( γ · α + δ · β ) -approximation algorithm for the generalized k -median problem under the same constraint. roof. We compute two solutions: An α -approximate solution S = ( C , a ) for the constrainedfacility location variant and a β -approximate solution S = ( C , a ) for the unconstrained gen-eralized k -median problem. For the facility location variant, we need no opening costs, so weset the cost of all facilities to zero.By the nesting property, we get a solution S = ( C, a ) which costs cost( P, S ) ≤ γ · cost( P, S ) + δ cost( P, S ) that is hierarchically compatible with S and satisfies that | C | ≤ | C | ≤ k . Theunconstrained generalized k -median problem is a relaxation of the constrained generalized k -median problem because all we do is drop the constraint. The constraint facility location problemwithout facility cost arises from dropping the condition that | C | ≤ k , so it is also a relaxation.Thus, cost( P, S ) ≤ γ · cost( P, S ) + δ cost( P, S ) ≤ γ · α · cost( OP T ) + δ · β · cost( OP T ) , where OP T is an optimal solution for the constrained generalized k -median problem. Since S is hierarchically compatible with S , we know that every cluster in S results from merging twoclusters in S . Since S satisfies the constraint and the constraint is mergeable, S also satisfiesthe constraint.We notice one detail: Lemma 14 implicitly assumes that we are allowed to choose centers forclusters that are not part of the cluster themselve. We stated in the introduction that we definethe generalized k -median problem such that this is allowed. Indeed, Definition 13 above allows usto choose the set of centers C such that it does not necessarily have one point from every cluster,and it allows a to assign a point that is itself a cluster to a different center in C . For (truly)mergable constraints like uniform lower bounds, this poses no problem because the constraintis not affected by the choice of center. However, for non-uniform lower bounds, we have to bea little more careful: We need that the merged cluster is a assigned to a center whose lowerbound is indeed satisfied. Definition 13 does not guarantee this. We thus prove the followingslight generalization of the nesting step by Lin et al. [23] (Statement 1 only generalizes to thecase of arbitrary α , but Statement 2 gives the generalization that we need for non-uniform lowerbounds). Lemma 15.
Let S = ( C , a ) and S = ( C , a ) be two solutions with | C | > | C | for thegeneralized facility location problem. We can compute1. a solution S = ( C ′ , a ) with C ′ ⊆ C that is ( α + α , α ) -nested with respect to S and S ,2. a solution S = ( C ′ , a ) with C ′ ⊆ C that is ( α + 2 α , α + α ) -nested with respect to S and S , and which satisfies that for all c ∈ C ′ and for all x ∈ P with a ( x ) = c , it holdsthat a ( x ) = c .Proof. We get two solutions S = ( C , a ) and S = ( C , a ) with | C | > | C | . Let || · || denotethe metric.For all c i ∈ C , let P i be the set of all points assigned to c i ∈ C by a , and for all o j ∈ C ,let O j be the set of all points assigned to o j by a . First we create a solution S = ( C ′ , a ) with C ′ ⊆ C . For all i , we assign every point x ∈ P i the center o j which is closest to c i , i.e., a ( x ) =arg min o j ∈ C || c i − o j || . By this choice we know that for any x ∈ P i , || c i − o j || ≤ || c i − a ( x ) || .16y two applications of the relaxed triangle inequality, we get that X x ∈ P i || x − o j || ≤ X x ∈ P i α · || x − c i || + X x ∈ P i α · || c i − o j ||≤ α · X x ∈ P i || x − c i || + α · X x ∈ P i || c i − a ( x ) ||≤ α · X x ∈ P i || x − c i || + α · X x ∈ P i α · ( || c i − x || + || x − a ( x ) || )= ( α + α ) · X x ∈ P i || x − a ( x ) || + α · X x ∈ P i || x − a ( x ) || . Adding the cost of all clusters yields the statement.Now we convert S into a solution ( C ′ , a ′ ) with C ′ ⊂ C at the cost of an increase in the nestingfactors. Let i be fixed. So far, we have reassigned the points in P i to the center o j in C closestto c i . Now among all c i ′ for which o j was the closest center, we choose a center that is closestto o j and reassign the points there, i.e., a ′ ( x ) = arg min {|| o j − c i ′ || | a ( c i ′ ) = o j } . The points arenow assigned only to points in C . Since a ( c i ′ ) = o j , we know that all points originally assignedto c i ′ are (re)assigned to c i ′ . And because we only reassign a new center to the solution C ′ , weknow that it still has at most | C ′ | ≤ | C | many clusters. The cost is bounded by X x ∈ P i || x − a ′ ( o j )) || ≤ X x ∈ P i α · || x − o j || + α · || o j − a ′ ( o j ) ||≤ X x ∈ P i α · || x − o j || + α · || o j − c i ||≤ X x ∈ P i α · || x − c i || + ( α + α ) · || o j − c i ||≤ X x ∈ P i α || x − c i || + ( α + α ) X x ∈ P i α · ( || c i − x || + || x − a ( x ) || )= ( α + 2 α ) · X x ∈ P i || x − a ( x ) || + ( α + α ) · X x ∈ P i || x − a ( x ) || . Statement 2 of Lemma 15 guarantees a solution where the centers are a subset of the centersin solution S , and the assignment ensures that points that were previously assigned to thechosen centers C ′ are still assigned to their previous center. This has two benefits: a) If wepreviously had a solution where the centers are part of their own cluster, then this property ispreserved and b) If the mergeability of the constraint depends on the center as for non-uniformlower bounds, we still satisfy the constraint. Indeed, for all c ∈ C ′ we now know that all pointspreviously assigned to c are still assigned to c , then this means that if the lower bound for c was satisfied by S , then it is also satisfied for S . Thus, we plug in the the O (1) -approximationfor facility location with non-uniform lower bounds by Li [22] as S and the already mentionedapproximation .
675 + ǫ approximation for k -median as S and get an O (1) -approximation for k -median with non-uniform lower bounds. Corollary 16.
There exist O (1) -approximations for the k -median problem with uniform andnon-uniform lower bounds. . Assuming that F is finite Lemma 17.
Let P be a point set and F be a possibly infinite set of centers from the same metricspace. Let a : P → F be a mapping and define a ′ ( x ) = arg min y ∈ P d ( y, a ( x )) . Then it holds that X x ∈ P d ( x, a ′ ( x )) ≤ α · X x ∈ P d ( x, a ( x )) . Proof.
The lemma follows from the relaxed triangle inequality: X x ∈ P d ( x, a ′ ( x )) ≤ α X x ∈ P ( d ( x, a ( x )) + d ( a ( x ) , a ′ ( x ))) ≤ α · X x ∈ P d ( x, a ( x )) . Notice that the factor can be improved for k -means, but here and in other places of the paper,we do not optimize the constant for k -means. C. Missing proofs from Section 4
Lemma 2.
Let
OP T ′ be an optimal solution to the generalized k -median problem with centercosts as defined in (1) and OP T = (
O, h ) be an optimal solution to generalized k -median withweak lower bounds. It holds that cost f ( OP T ′ ) ≤ OP T ) . Proof.
For p ∈ P let c p = argmin { d ( p, c ) | c ∈ h ( p ) } be the closest center to which p is assignedin OP T . We define h ′ ( p ) = c p for all p ∈ P and obtain a feasible solution ( O, h ′ ) to thegeneralized k -median problem with center cost. Furthermore we have cost f ( OP T ′ ) ≤ cost f ( O, h ′ ) = X c ∈ O f ( c ) + X p ∈ P d ( p, h ′ ( p ))= X c ∈ O X p ∈ D c d ( p, c ) + X p ∈ P d ( p, h ′ ( p )) ≤ X p ∈ P X c ∈ h ( p ) d ( p, c )= 2 cost( OP T ) where the second inequality follows from the fact that P c ∈ O P p ∈ D c d ( p, c ) and P p ∈ P d ( p, h ′ ( p )) are both lower bounds on the assignment cost of OP T . Lemma 3.
It holds that cost(
C, a ′ ) ≤ cost f ( C, a ) .Proof. The additional assignment cost for each center c ∈ C can be upper bounded by P p ∈ D c d ( p, c ) .We obtain cost( C, a ′ ) ≤ X c ∈ C X p ∈ D c d ( p, c ) + X p ∈ P d ( p, a ( p ))= cost f ( C, a ) . Lemma 6.
Algorithm 1 computes a feasible solution ( e C, e a ) to generalized k -median with 2-weaklower bounds. Furthermore the following properties hold during all steps of the algorithm.1. The algorithm never establishes connections for points currently assigned more than once. . For any center c ∈ C , P c does not change before c is processed or closed.3. If a connection between x ∈ P and the currently processed center c ∈ e C is deleted by thealgorithm, we have from this time on x / ∈ P c until termination. Moreover P c remainsempty after c is processed.4. While the algorithm processes c ∈ C we always have c < min C ( P c ) \{ c } . Moreover allcurrently open centers which are smaller than c remain open until termination.5. If the algorithm establishes a new connection in Line 14 or Line 18 it remains until ter-mination.Proof. The process terminates: For every iteration of the while loop starting in Line 8, eithera point is deleted from P c i or there is at least one point x ∈ P c i for which | e a ( x ) | is reduced byone. Furthermore | e a ( x ) | does never increase for any x ∈ P c i .The final solution satisfies lower bounds: Every time we delete a connection between a point anda center it either happens because the center is closed or we replace this connection by assigninga new point to it. So the lower bounds are satisfied at all open centers.All points stay connected to a center: Assume that the algorithm deletes the connection betweena point p and the center d it is exclusively assigned to. This only happens if at this time d isclosed by the algorithm. Then p is assigned to an other center as defined in Line 14.We conclude that the solution is feasible. Property 1 : The algorithm establishes connections in Line 14 and Line 18 which always involvea point currently assigned once.
Property 2:
Let c ∈ C . Connections are only changed for the center that is currently processedor for a smaller center which has been processed already. Thus, the algorithm does not add ordelete any connections involving c before c is processed or closed. Property 3:
Assume that after the connection between x ∈ P c and c is deleted by the algorithm, x is again part of P c . That would require that the algorithm establishes a new connection for apoint which is connected more than once, which does not happen by Property 1. For the samereason P c remains empty after c is processed by the algorithm. Property 4:
Assume c is currently processed by the algorithm and d = min C ( P c ) \{ c } . Weknow that at this time P d is non-empty. Which is by Property 3 only possible if d is processedafter c . Thus we have c < d . This also means that centers can only be closed by the algorithmif they are not processed so far. Property 5:
If a connection is deleted, the respective point is either connected to more thantwo centers or to a center which is closed at this time. A connection in Line 14 or Line 18 isestablished by the algorithm between a point which is at this time assigned exactly once anda center which is already processed or currently processed by the algorithm. Thus the point isfrom this time on never assigned to more than two centers and the center remains open untiltermination by Property 4. So the necessary conditions for a deletion of this connection arenever fulfilled.
Observation 18.
If a tuple ( z, f ) , z ∈ P, f ∈ C , occurs as Type 0, 1 or 2, then f ∈ a ( z ) , so inparticular, d ( z, f ) occurs as a term in the cost of the original solution.Proof. For a center c the set P c \ N c contains points which are assigned to c by the initial assign-ment a or assigned to c while c is not processed by the algorithm. Latter can only happen if aconnection is reestablished in Line 14 which requires that the connection was already present in ( C, a ) . So Type 0 tuples satisfy the statement.For Type 1 and 2 tuples, consider y ∈ N c for some center c and the respective tuples ( x y , c ) , ( y, d y ) , ( x y , d y ) . Notice that both y and x y are connected to d y the step before y is assigned to c . ByProperty 4 of Lemma 6 we have c < d y . Thus we know by Property 2 of Lemma 6 that P d y isnot changed by the algorithm at least until y is assigned to c . So d y ∈ a ( y ) and d y ∈ a ( x y ) which19roves that Type 2 tuples satisfy the statement. Moreover it holds that c ∈ a ( x y ) since thereis a time where x y ∈ P c . This can, by Property 1 of Lemma 6, only happen if the connectionbetween x y and c is already part of ( C, a ) . Thus, Type 1 tuples satisfy the statement. Lemma 8.
The set T ∩ T ∩ T is empty.Proof. Let ( z, f ) ∈ T ∩ T ∩ T . Since ( z, f ) is of Type 0, point z must be connected to f inthe final assignment e a. We distinguish whether the connection between z and f was deleted atsome point by the algorithm or not. If it is not deleted, ( z, f ) can not be of Type 1 since thiswould require that z is temporarily not assigned to f . Otherwise the connection between z and f was deleted while f was processed and later reestablished by the algorithm in Line 14.By assumption the tuple is also of Type 2. Assume it is of Type 2.1 and contributes to the costof a tuple ( y, c ) with z = y . We know that c < f by Property 4 of Lemma 6. Consider the timewhen z is newly assigned to c . The step before we have z ∈ P f . On the other hand while f isprocessed we have z ∈ P f in contradiction to Property 1 of Lemma 6.Assume finally that ( z, f ) is of Type 2.2 and contributes to the cost of a tuple ( y, c ) . Again wehave c < f . Consider the time y is newly assigned to c . The step before we have z ∈ P c and,by Property 1 and 2 of Lemma 6, also z ∈ P f . At the time the connection between z and f isreestablished by the algorithm, both centers are contained in a ( z ) ∩ e C . This is a contradictionto c < f = min( a ( z ) ∩ e C ) . This completes the proof. C.1. Decreasing the extra connections to an ǫ -fraction Theorem 9.
Given < ǫ < and a solution ( C, a ) to generalized k -median with weak lowerbounds. We can compute a solution ( e C, e a ) to generalized k -median with (1+ ǫ ) -weak lower bounds,i.e., e a x ≤ ǫ for all x ∈ P in polynomial time such that cost( e C, e a ) ≤ ( ⌈ ǫ ⌉ α ( α +1)+1) cost( C, a ) . Reassignment process.
In the beginning we set e C = C . For q ∈ P let e a cq = 1 if c ∈ a ( q ) andotherwise let e a cq = 0 . We modify both e C and e a until we obtain a valid solution to generalized k -median with (1 + ǫ ) -weak lower bounds. During the process, the centers in e C are called currentlyopen , and when a center is deleted from e C , we say it is closed . The centers are processed in anarbitrary but fixed order, i.e., we assume that C = { c , . . . , c k ′ } for some k ′ ≤ k and processthem in order c , . . . , c k ′ . We say that c i is smaller than c j if i < j .Before we start explaining the reassignment we observe that the following properties hold for ( e C, e a ) in the beginning.1. for all q ∈ P we have either e a q ∈ N or e a q = 1 + ǫ.
2. if e a q = 1 + ǫ then q is assigned to one center by an amount of one and to a second centerby an amount of ǫ.
3. if e a q ∈ N then e a cq ∈ { , } for all c ∈ C .We ensure that these properties also hold during the whole reassignment process.Let c = c i be the currently processed center. By P c we denote the set of points assigned to c by a positive amount under e a. We divide P c into the four sets P c = { q ∈ P c | e a q = e a cq = 1 } , P ǫc = { q ∈ P c | e a q = 1 + ǫ, e a cq = ǫ } , Q ǫc = { q ∈ P c | e a q = 1 + ǫ, e a cq = 1 } and finally P c = { q ∈ P c | e a q ≥ , e a cq = 1 } . Thus we differentiate between points which are assigned exclusively to c ,points which are assigned by an amount of ǫ to c and by an amount of one to an other center orvice versa and points which are assigned by an amount of one to c and by an amount of at leastone to some other centers. Furthermore with C ( P c ) we denote all centers which are connectedto at least one point in P c under e a . Observe that indeed P c = P c ∪ P ǫc ∪ Q ǫc ∪ P c if the aboveproperties hold at that time. 20 lgorithm 2: Reducing the number of assigned centers per point to ǫ define an ordering on the centers c < c . . . < c k ′ set e C := C and e a cq = 1 if c ∈ a ( q ) otherwise set e a cq = 0 for all c ∈ C P c = { q ∈ P | e a cq > } P c = { q ∈ P c | e a q = e a cq = 1 } P ǫc = { q ∈ P c | e a q = 1 + ǫ, e a cq = ǫ } Q ǫc = { q ∈ P c | e a q = 1 + ǫ, e a cq = 1 } P c = { q ∈ P c | e a q ≥ , e a cq = 1 } for i = 1 to k ′ do while P c i = ∅ do d = min C ( P c i ) \{ c i } P d = P d ∩ { q ∈ P | | a ( q ) | ≥ and a ( q ) ∩ { c , . . . , c i − } ∩ e C = ∅} if | P d \ P d | < ǫ then delete d from e C and all connections to d in e a for all q ∈ P d let e = min( a ( q ) ∩ e C ) set e a eq = 1 for all q ∈ Q ǫd let e ∈ e C such that e a eq = ǫ set e a eq = 1 if P d \ P d = ∅ then pick x ∈ P c i connected to d if e a x ≥ set e a c i x = 0 for all q ∈ P d \ P d set e a c i q = 1 else pick x ∈ P c i connected to d and A ⊂ P d \ P d of cardinality ⌈ ǫ ⌉ set e a c i x = 0 and e a c i y = ǫ for all y ∈ A Notice that points in P c \ P c are already assigned by an amount of at most ǫ , so we onlycare about points in P c . If P c is empty, we are done and proceed with the next center in e C .Otherwise we need to empty P c . Observe that points in P c are assigned to multiple centers,so if we delete the connection between one of these points and c , the point is still served bysome other center. However, doing so violates the lower bound at c . So we have to replace thisconnection.As long as P c is non-empty, we do the following. We pick a center d = min C ( P c ) \{ c } and apoint x ∈ P c connected to d . We want to assign points from P d by amount of ǫ to c to free x . For technical reasons, we restrict the choice of these points: We exclude all points from thesubset P d := { q ∈ P d | | a ( q ) | ≥ and a ( q ) ∩ { c , . . . , c i − } ∩ e C = ∅} , i.e., all points which wereassigned to at least centers under the initial assignment a , and where one of these at least centers is still open and smaller than c .We can only assign points from P d \ P d to c if its cardinality is at least ⌈ ǫ ⌉ . If this is the casewe choose a set A of ⌈ ǫ ⌉ points from P d \ P d and set e a cq = ǫ for all q ∈ A . Furthermore weset e a cx = 0 . So x is no longer connected to c , but to satisfy the lower bound at c we replace x
21y a set of ⌈ ǫ ⌉ points which are now connected to c by an amount of ǫ (Figure 4). By this weguarantee that the lower bound at c is still satisfied.If | P d \ P d | < ⌈ ǫ ⌉ our replacement plan does not work. Instead we close d and set e a dq = 0 for all q ∈ P. If we close d , points in P d ∪ Q ǫd will be assigned by an amount smaller than one, thus wedo the following. All points in P d \ P d are reassigned to c , i.e., e a cq = 1 for q ∈ P d \ P d (Figure5). Since we assign all points in P d \ P d to c , we could delete this many connections betweenclients in P c and c . But for simplicity, if P d \ P d is non-empty and e a x ≥ , we only delete theconnection between x and c . A point q ∈ P d is reassigned to the smallest open center in a ( q ) byan amount of one. And finally every point in Q ǫd is assigned by an amount of ǫ to some othercenter than d , so we add an additional amount of − ǫ to this assignment.Observe that none of the above reassignments violates the claimed properties for ( e C, e a ) above.The entire procedure is described in Algorithm 2. Lemma 19.
Algorithm 2 computes a feasible solution ( e C, e a ) to generalized k -median with (1+ ǫ ) -weak lower bounds. Furthermore the following properties hold during all steps of the algorithm.1. For any center c ∈ C , P c does not change before c is processed or closed. Up to that pointall points in P c are assigned by an amount of to c .2. If a connection between x ∈ P and the currently processed center c ∈ e C is deleted by thealgorithm, we have from this time on x / ∈ P c until termination. Moreover P c remainsempty after c is processed.3. While the algorithm processes c ∈ C we always have c < min C ( P c ) \{ c } . Moreover allcurrently open centers which are smaller than c remain open until termination.4. If the algorithm establishes a new connection in Line 17, Line 25 or Line 28 it remainsuntil termination.Proof. The process terminates: For every iteration of the while loop starting in Line 10, eithera point is deleted from P c i or there is at least one point x ∈ P c i for which e a x is reduced by one.Furthermore e a x does never increase for any x ∈ P c i .The final solution satisfies lower bounds: Every time we delete a connection between a pointand a center it either happens because the center is closed or we replace this connection byassigning ⌈ ǫ ⌉ new points each by an amount of ǫ to it. So the lower bounds are satisfied at allopen centers.All points are assigned by an amount of at least 1: Assume that the algorithm deletes theconnection between a point p and a center d . This either happens if p is assigned by a totalamount of at least at this time or d is closed by the algorithm. In the last case we ensure inLine 17, Line 20 or Line 25 that p is assigned by an amount of one to an other center after weclose d .All points are assigned by an amount of at most ǫ : For c ∈ C we know by Property 2 that P c is empty after termination. Then P c = P c ∪ P ǫc ∪ Q ǫc , so all points connected to c are assignedby a total amount of at most ǫ. We conclude that the solution is feasible.
Property 1:
Let c ∈ C . Assume the property is true up to a time t . In the next stepconnections may change for the center that is currently processed, for a smaller center whichhas been processed already or for a center which is currently connected to a point by an amountof ǫ . If c is not processed so far none of this applies to it, so the property also holds in the nextstep. Property 2:
Assume that after the connection between x ∈ P c and c is deleted by the algorithm, x is part of P c . That would require that the algorithm assigns x to a center by an amount of22ne while it is already assigned to a second center by an amount of one, which does not happen.For the same reason P c remains empty after c is processed by the algorithm. Property 3:
Assume c is currently processed by the algorithm and d = min C ( P c ) \{ c } . Weknow that at this time P d is non-empty. Which is by Property 2 only possible if d is processedafter c . Thus we have c < d . This also means that centers can only be closed by the algorithmif they are not processed so far. Property 4:
A connection established in Line 17 involves a center which is already processedby the algorithm. By Property 3 such centers remain open, thus the connection is not deleteduntil termination. In Line 25 and Line 28 the algorithm establishes a connection between thecurrently processed center c and some point p which is assigned by an amount of at most 1 atthis time. If this connection is deleted at some later point in time, this would require that c isclosed by the algorithm or p ∈ P c . Both can not happen.We bound the cost of ( e C, e a ) in a similar way we bounded the cost of the solution in Theorem 5.Let N c denote the set of points which are newly assigned by ǫ respectively to c while c isprocessed. This happens in Line 25 and Line 28 of the algorithm. We want to charge the costof these new connections to the cost of the original solution.For y ∈ N c let d y be the respective center in Line 11 of Algorithm 2 and x y the point inLine 22 respectively Line 27 contained in P c and connected to d y . Using the α -relaxed triangleinequality, we obtain the following upper bound. d ( y, c ) ≤ α ( d ( y, x y ) + d ( x y , c )) ≤ α (cid:16) α (cid:0) d ( y, d y ) + d ( d y , x y ) (cid:1) + d ( x y , c ) (cid:17) ≤ α (cid:0) d ( y, d y ) + d ( d y , x y ) (cid:1) + αd ( x y , c ) . (6)We can apply (6) to all c ∈ e C and all y ∈ N c . This yields the following upper bound on the costof the final solution ( e C, e a ) . cost( e C, e a ) = X c ∈ e C X y ∈ P d ( y, c ) e a cy ≤ X c ∈ e C (cid:16) X y ∈ P c \ N c d ( y, c ) + X y ∈ N c d ( y, c ) (cid:17) ≤ X c ∈ e C (cid:16) X y ∈ P c \ N c d ( y, c ) + X y ∈ N c α ( d ( y, d y ) + d ( d y , x y )) + αd ( x y , c ) (cid:17) . (7)Notice that in the first inequality we use the fact that e a cy ≤ . So we pay the the price ofconnecting y to c by an amount of independent of whether e a cy is or ǫ. Expression (7) is what we want to pay for. Observe that all involved distances contribute to theoriginal cost as well (we state this formally in Observation 20 below). So in principle, we cancharge each summand to a term in the original cost. But what we need to do is to bound thenumber of times that each term in the original cost gets charged. To organize the counting, wecount how many times a specific tuple of a point z and a center f occurs as d ( z, f ) in (7). Sinceit is important at which position a tuple appears, we give names to the different occurrences.We say that that a tuple appears as a tuple of Type 0 if it appears as d ( y, c ) in (7), as tupleof Type 1 if it appears as d ( x y , c ) , and as tuple of Type 2 if it appears as d ( y, d y ) or d ( d y , x y ) .We distinct the latter type further by calling a tuple occurring as d ( y, d y ) a tuple of Type 2.1and a tuple occurring as d ( x y , d y ) a tuple of Type 2.2. We say that ( y, d y ) , ( d y , x y ) and ( x y , c ) contribute to the cost of ( y, c ) , where by the cost of ( y, c ) we mean the upper bound on d ( y, c ) in (6) which we want to pay for. Observation 20.
If a tuple ( z, f ) , z ∈ P, f ∈ C , occurs as Type 0, 1 or 2, then f ∈ a ( z ) , so inparticular, d ( z, f ) occurs as a term in the cost of the original solution.Proof. For a center c the set P c \ N c contains points which are assigned to c by the initial assign-ment a or assigned to c while c is not processed by the algorithm. Latter can only happen if a23onnection is reestablished in Line 17 which requires that the connection was already present in ( C, a ) . So Type 0 tuples satisfy the statement.For Type 1 and 2 tuples, consider y ∈ N c for some center c and the respective tuples ( x y , c ) , ( y, d y ) , ( x y , d y ) . Notice that both y and x y are connected to d y before y is assigned to c . By Property3 of Lemma 19 we have c < d y . Thus we know by Property 1 of Lemma 19 that d y ∈ a ( y ) and d y ∈ a ( x y ) which proves that Type 2 tuples satisfy the statement. Moreover it holds that c ∈ a ( x y ) since there is a time where x y ∈ P c , which can only happen if the connection between x y and c is already part of ( C, a ) . Thus, Type 1 tuples satisfy the statement.As indicated above, a tuple ( z, f ) can contribute to the cost of multiple tuples. Notice that atuple occurs at most once as a tuple of Type 0 in (7). To bound the cost of ( e C, e a ) we bound thenumber of times a tuple appears as Type 1 or Type 2 tuple in (7).Remember that we used a similar statement in the proof of Theorem 5, where we proved thatevery tuple can appear at most once as each type. However here we can only bound the ap-pearance by ⌈ ǫ ⌉ for Type 1 and Type 2 tuples due to Line 25 and Line 28 where we assign upto ⌈ ǫ ⌉ points from P d to c . Notice that even if we assign each of these points initially by anamount of ǫ to c as it is done in Line 28, that amount can be increased to at some later timein Line 20. The proof is similar to that of Lemma 7 but we carry out the arguments again forsake of completeness. Lemma 21.
For all z ∈ P, f ∈ C , the tuple ( z, f ) appears in (7) at most ⌈ ǫ ⌉ times as tuple ofType 1 and at most ⌈ ǫ ⌉ times as tuple of Type 2.Proof. In the following, the tuple whose cost the tuple ( z, f ) contributes to will always be named ( y, c ) , and we denote the time at which y is newly assigned to c by t . Type 1:
Assume ( z, f ) contributes to the cost of ( y, c ) as a Tuple of Type 1. Then f = c . At t we assign up to ⌈ ǫ ⌉ points to c . So ( z, f ) contributes to the cost of at most ⌈ ǫ ⌉ connectionsestablished by the algorithm at t as tuple of Type 1. Notice that at the time step before t wemust have z ∈ P c and afterwards, z is never again contained in P c by Property 2 of Lemma 19.Thus the tuple ( z, c ) can not be responsible for any assignment to c after t , i.e., ( z, c ) = ( z, f ) does not contribute to any further cost as a tuple of Type 1. Type 2.1:
Assume that ( z, f ) contributes to the cost of ( y, c ) as a Tuple of Type 2.1. Then z = y . At the time step before t , we have y ∈ P f , f ∈ C ( P c ) . By Property 4 of Lemma 19,newly established connections stay, so after time t , it always holds that y ∈ P c . So even if y is in P f at a later time, it can not be in P f since it is also connected to c . So ( y, f ) = ( z, f ) does not contribute to any further cost as tuple of Type 2.1. Furthermore, observe that thealgorithm never adds a connection to a point which is assigned more than once. So we knowthat y is always assigned by an amount of at most ǫ after t which means that ( y, f ) does notcontribute as tuple of Type 2.2 to the cost of any connection established by the algorithm after t either. Type 2.2:
Finally we consider the case where ( z, f ) contributes to the cost of ( y, c ) as a tupleof Type 2.2. At time t , the algorithm processes c . By the way the algorithm chooses f and z ,we know that z ∈ P c (at the beginning of the process, i.e., before t ) and f = min C ( P c ) \{ c } .After t , Property 2 of Lemma 19 implies z / ∈ P c , which means that as a tuple of Type 2.2, itcan not contribute to the cost of any tuple containing c after t . However it contributes as tupleof Type 2.2 to the cost of up to ⌈ ǫ ⌉ − additional connections at time t (see Line 25 and Line28). Assume instead that it contributes (as Type 2.2) to the cost of a tuple ( y ′ , c ′ ) for a center c ′ = c , and some point y ′ ∈ P . This is supposed to happen after t , so y ′ is newly assigned to c ′ at some time t ′ > t . The step before t ′ we have z ∈ P c ′ . Thus before c ′ is processed, wemust always have z ∈ P c ′ by Property 1 of Lemma 19. So in particular, at time t < t ′ we have c ′ ∈ C ( P c ) \{ c } . Moreover we know that at some time while c ′ is processed by the algorithm wehave f = min C ( P c ′ ) \{ c ′ } . Using Property 3 of Lemma 19 we conclude that c ′ < f . Which is24 P d \ P d c d x Ac d ǫ ǫ Figure 4: Shows case | P d \ P d | > ⌈ ǫ ⌉ . Pick a set A ⊂ P d \ P d of cardinality ⌈ ǫ ⌉ and assign anamount of ǫ from points in A to c . Here A = P d \ P d . a contradiction since the algorithm chose f and not c ′ at time t , i.e., f = min C ( P c ) \{ c } musthold. Thus, ( z, f ) can not contribute to the cost of ( y ′ , c ′ ) as a tuple of Type 2.2.It is left to show that ( z, f ) can not contribute to the cost of any ( y ′ , c ′ ) as a tuple of Type 2.1at some time t ′ > t . For a contribution as Type 2.1, we would have z = y ′ and y ′ ∈ P f . Weshow that in this case y ′ is even contained in P f . Remember that at time t we have y ′ = z ∈ P c and that this only happens if | a ( y ′ ) | ≥ . Moreover c is sill open by Property 3 of Lemma 19and is smaller than c ′ . Thus c ∈ a ( y ′ ) ∩ { e | e < c ′ } ∩ e C , which proves y ′ ∈ P f . Therefore thealgorithm does not assign y ′ to c ′ (see Line 17) and ( z, f ) does not contribute as tuple of Type2.1 to the cost of any connection established by the algorithm after t .For the final counting, we define T , T and T as the sets of all tuples of Type 1, 2 and 3,respectively. Proof of Theorem 5.
Slightly abusing the notation we write d ( e ) for a tuple e = ( z, f ) by whichwe mean the distance d ( z, f ) . We obtain cost( e C, e a ) ≤ X c ∈ e C (cid:16) X y ∈ P c \ N c d ( y, c ) + X y ∈ N c α ( d ( y, d y ) + d ( d y , x y )) + αd ( x y , c ) (cid:17) (7) = X e ∈ T d ( e ) + α l ǫ m X e ∈ T d ( e ) + α l ǫ m X e ∈ T d ( e ) (8) ≤ (cid:0)l ǫ m α ( α + 1) + 1 (cid:1) cost( C, a ) . (9)Here we replace (7) by summing up the cost of all tuples in T i for i = 1 , , with the respectivefactor times the maximal number of appearances for each type. Thus by Lemma 21 we obtaina total factor of 1 for Type 0, α ⌈ ǫ ⌉ for Type 1 and α ⌈ ǫ ⌉ for Type 2 (see (8)).Finally by Observation 20 the cost d ( e ) for e ∈ T ∪ T ∪ T occurs as a term in the originalsolution which proves (9).Note that we also prove that we can find a fractional assignment of a special structure. Theassignment e a assigns every point to at most two centers. It is assigned by an amount on one toone center and eventually by an additional amount of ǫ to a second center. D. A bicriteria algorithm to generalized k -median with lowerbounds So far we presented an algorithm that computes a set of at most k centers C ⊂ F and anassignment a : P → P ( C ) such that the lower bound is satisfied at all centers and every point is25 P d \ P d c d | P d \ P d | < ⌈ ǫ ⌉ . Center d is closed and points from P d \ P d are assigned to c . x P d \ P d c d ≤ ⌈ ǫ ⌉ α ≤ ⌈ ǫ ⌉ α α d is closed. To bound the distance from points in P d \ P d to c the respective distances appear with a factor of ⌈ ǫ ⌉ α, ⌈ ǫ ⌉ α or α .assigned at least once and at most twice.An ( β, δ ) -bicriteria solution for generalized k -median with lower bounds consists of at most k centers C ′ ⊂ F and an assignment a ′ : P → C such that at least βB ( c ) points are assignedto c ∈ C ′ by a ′ and cost( C ′ , a ′ ) ≤ δ cost( OP T k ) . Here OP T k denotes an optimal solution togeneralized k -median with lower bounds.Given a β ≥ and a γ -approximate solution to generalized k -median with 2-weak lower bounds ( C, a ) , we can compute a ( β, γ max { αβ − β + 1 , α β − β } ) -bicriteria solution in the following way. Let C = { c , . . . , c k ′ } for some k ′ ≤ k . We process the centers in order c , . . . , c k ′ and decide if theyare open or closed. We say that c i is smaller than c j if i < j . If we decide that a center c isopen we directly assign at least ⌈ βB ( c ) ⌉ points to c . In the beginning all points are unassigned.Consider center c i . Let A i be the set of all points assigned to c i under a . We know that | A i | ≥ B ( c i ) . If at least ⌈ βB ( c i ) ⌉ points in A i are not assigned so far, c i remains open and allcurrently unassigned points from A i are assigned to c i (Figure 7). If less than ⌈ βB ( c i ) ⌉ pointsfrom A i are unassigned, the center is closed.Let C ′ denote the centers from { c , . . . , c i − } which are open and B i the set of unassignedpoints from A i which are not connected to any center larger than c i under a . To guaranteethat all points are assigned at the end, we have to care about points in B i . By assumptionthere are at most ⌊ βB ( c i ) ⌋ such points. We simply assign point p ∈ B i to the nearest center arg min c ∈ C ′ d ( c, p ) in C ′ . The whole procedure is described in Algorithm 3.To upper bound the assignment cost in the case c i is closed by the algorithm we consider asecond assignment b , which may be fractional. We define for p ∈ B i and c ∈ C ′ a value b cp ∈ [0 , which indicates the amount by which p is assigned to c . We claim that we can find afractional assignment such that for every q ∈ B i and f ∈ C ′ the following holds26 i c i Figure 7: Shows the case where A i contains at least ⌈ βB ( c i ) ⌉ unassigned points. The threepoints on the left are already assigned to other centers and the three points on theright are newly assigned to c i . The gray connections come from a .1. point q is assigned by an amount of one, i.e., X c ∈ C ′ b cq = 1
2. and at most β − β |{ p ∈ A i | f ∈ a ( p ) }| amount is assigned to f , i.e., X p ∈ B i b pf ≤ β − β |{ p ∈ A i | f ∈ a ( p ) }| Such an assignment can be found since β − β X c ∈ C ′ |{ p ∈ A i | c ∈ a ( p ) }| = β − β |{ p ∈ A i | a ( p ) ∩ C ′ = ∅}|≥ β (1 − β )1 − β B ( c i ) ≥ | B i | . To see the first inequality we observe the following. If a point p ∈ A i is connected to an opencenter c ∈ C ′ under a , it is already assigned to c by the algorithm. So the set of points from A i which are already assigned to some center equals { p ∈ A i | a ( p ) ∩ C ′ = ∅} . We knowthat | A i | ≥ B ( c i ) and that at most ⌊ βB ( c i ) ⌋ points from A i are unassigned. Thus we have |{ p ∈ A i | a ( p ) ∩ C ′ = ∅}| ≥ (1 − β ) B ( c i ) .Let b be an assignment satisfying the above properties. We obtain the following upper boundto the cost of b . X c ∈ C ′ X p ∈ B i b cp d ( p, c ) ≤ X c ∈ C ′ (cid:16) X x ∈ A i : c ∈ a ( x ) β − β (cid:0) α d ( c i , x ) + αd ( x, c ) (cid:1) + X p ∈ B i b cp α d ( p, c i ) (cid:17) = αβ − β X c ∈ C ′ X x ∈ A i : c ∈ a ( x ) d ( x, c ) + α β − β X x ∈ A i d ( x, c i ) . For the first inequality we used above bound on P p ∈ B i b cp . We can charge every point in { x ∈ A i | c ∈ a ( x ) } up to an amount of β − β for the assignment cost of B i to c . Assume such a point x gets charged by an amount of γ ≤ b cp for the distance d ( p, c ) . We obtain the following upperbound on the cost γd ( p, c ) ≤ γ ( α d ( p, c i ) + α d ( c i , x ) + αd ( x, c )) . Thus in total the distance d ( p, c i ) appears with a factor of b cp α , distance d ( c i , x ) with factor β − β α and d ( x, c ) with factor β − β α in the upper bound on the assignment cost of B i to c .27 i α α α Figure 8: Showing assignment b in the case where c i is closed. The two points from B i aredistributed to centers in C ′ . The gray connections come from a . α and α are thefactors with which the respective distances appear in the upper bound of the newconnection.The equality follows immediately from P c ∈ C ′ b cp = 1 and B i ∩ { x ∈ A i | a ( x ) ∩ C ′ = ∅} = ∅ .Assigning every point in B i to its nearest center can only be cheaper than distributing B i tocenters in C ′ via b . We obtain X p ∈ B i min c ∈ C ′ d ( p, c ) ≤ X c ∈ C ′ X p ∈ B i b cp d ( p, c ) ≤ αβ − β X c ∈ C ′ X x ∈ A i : c ∈ a ( x ) d ( x, c ) + α β − β X x ∈ A i d ( x, c i ) . (10)Let ( C ′ , a ′ ) be the final solution computed by the algorithm. cost( C ′ , a ′ ) = X c ∈ C ′ X x ∈ P : a ′ ( x )= c d ( x, c ) ≤ X c ∈ C ′ X x ∈ P : c ∈ a ( x ) d ( x, c ) + αβ − β X c ∈ C ′ X x ∈ P : c ∈ a ( x ) d ( x, c ) + α β − β X c ∈ C \ C ′ X x ∈ P : c ∈ a ( x ) d ( x, c ) ≤ max { αβ − β + 1 , α β − β } X c ∈ C X x ∈ P : c ∈ a ( x ) d ( x, c )= max { αβ − β + 1 , α β − β } cost( C, a ) . To see the first inequality we use the upper bound in (10). Let x ∈ P and c ∈ a ( x ) . If c is closedin the final solution the distance d ( x, c ) is only charged with a factor of α β − β in (10) for closing c .If c is open in the final solution the distance d ( x, c ) is charged with factor one if a ′ ( x ) = c andcan also be charged with a factor of αβ − β in (10) for closing a center d ∈ a ( x ) . This can happenat most once since | a ( x ) | ≤ . This proves the first inequality.Since generalized k -median with 2-weak lower bounds is a relaxation of generalized k -medianwith lower bounds we obtain cost( C ′ , a ′ ) ≤ γ max { αβ − β + 1 , α β − β } cost( OP T ) . This leads to the following theorem.
Theorem 12.
Given a γ -approximate solution ( C, a ) to generalized k -median with 2-weak lowerbounds and a fixed β ∈ [0 . , , Algorithm 3 (on page 29) computes a ( β, γ max { αβ − β + 1 , α β − β } ) -bicriteria solution to generalized k -median with lower bounds in polynomial time. In particular, lgorithm 3: A ( β, γ max { αβ − β + 1 , α β − β } ) -bicriteria approximation algorithm to gen-eralized k -median with lower bounds Input : γ -approximate solution ( C, a ) to generalized k -median with 2-weak lowerbounds, C = { c , . . . , c k ′ } Output:
Bicriteria solution ( C ′ , a ′ ) to generalized k -median with lower bounds. set C ′ = ∅ , a ′ ( x ) = ⊥ for all x ∈ P N = P for i = 1 to k ′ do A i = { x ∈ P | c i ∈ a ( x ) } B i = { x ∈ A i | a ( x ) ⊂ { c . . . , c i }} ∩ N if A i ∩ N ≥ βB ( c i ) then set a ′ ( x ) = c i for all x ∈ A i ∩ N N = N \ A i C ′ = C ′ ∪ { c i } else set a ′ ( x ) = arg min c ∈ C ′ d ( x, c ) for all x ∈ B i there exists a polynomial-time ( , O (1)) -bicriteria approximation algorithm for k -means withlower bounds.-means withlower bounds.