Connected -Median with Disjoint and Non-Disjoint Clusters
Abstract
The connected -median problem is a constrained clustering problem that combines distance-based -clustering with connectivity information. The problem allows to input a metric space and an unweighted undirected connectivity graph that is completely unrelated to the metric space. The goal is to compute centers and corresponding clusters such that each cluster forms a connected subgraph of , and such that the -median cost is minimized.
The problem has applications in very different fields like geodesy (particularly districting), social network analysis (especially community detection), or bioinformatics. We study a version with overlapping clusters where points can be part of multiple clusters which is natural for the use case of community detection. This problem variant is -hard to approximate, and our main result is an -approximation algorithm for the problem. We complement it with an -hardness result for the case of disjoint clusters without overlap with general connectivity graphs, as well as an exact algorithm in this setting if the connectivity graph is a tree.
Keywords and phrases:
Clustering, Connectivity constraints, Approximation algorithmsCopyright and License:
2012 ACM Subject Classification:
Theory of computation Facility location and clusteringFunding:
This work has been funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – 390685813; 459420781 and by the Lamarr Institute for Machine Learning and Artificial Intelligence lamarr-institute.org.Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz HermanSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Clustering problems, like the -center and the -median problem, are classical optimization problems that have been widely studied both in theory and practice. In a typical center-based clustering problem, the input consists of a given set of data points in some metric space and a positive integer . The goal is to partition the data points into groups (clusters) and to find a center for each of these groups so as to optimize some objective: In the -center problem, the goal is to minimize the maximal distance of any point to the center of its cluster; in the -median problem, the goal is to minimize the sum of the distances of the points to their corresponding cluster centers.
Both the -center and the -median problem are NP-hard but various constant-factor approximation algorithms are known. For the -center problem, there are 2-approximation algorithms [9, 13], and this is best possible [14]. The best known approximation algorithm for the -median problem achieves a -approximation [2], while it is known that no approximation factor better than can be achieved, unless P=NP [10].
Beyond these vanilla clustering problems, there has been a lot of interest in variants of clustering problems motivated by specific applications. These variants often introduce additional constraints. For example, in capacitated clustering problems, constraints are added that limit the number of data points that can be assigned to each cluster [17]. There are also models to address outliers in data sets [18], and in the last decade, different variants of fair clustering problems have been studied [4, 20, 21]. These are just a few examples of the numerous variants of clustering problems that have been studied to address diverse challenges in different application domains. Each of these variants requires specialized algorithms, often inspiring novel methodologies and insights in the broader field of clustering and data analysis.
In this paper, we study a connectivity constraint. The basic idea of this constraint is that clusters have to correspond to connected subgraphs of a given undirected and unweighted connectivity graph. This graph is independent of the metric that defines the distances between the input points.
This model has been studied in different contexts. One line of research, see Ge et al. [8], considers the connected -center problem to allow for a joint analysis of two type of data: attribute data and relationship data. Attribute data can be used for clustering by finding a suitable metric distance function on the attribute vectors and then applying a popular clustering method like -means or -center. Relationship data arises in the context of social networks or other network structures and gives information on pairwise relationships. Clustering on relationship data can be done via methods like correlation clustering. Both types of data thus allow for well studied clustering methods, but the focus by Ge et al. [8] is a joint analysis. Connected clustering gives one option to combine relationship and attribute data by defining a constraint based on the relationships and then optimizing over the attribute vector distances.
More precisely, connected clustering expects as input a set of points in a metric space (stemming from the attribute data) and an unweighted graph (representing the relationship data), and the goal is to cluster with respect to the metric distance function but under the constraint that clusters are connected in . We call the connectivity graph in the following.
Ge et al. [8] study the connected -center problem. For this problem, the goal is to compute centers and corresponding clusters such that all are connected in the connectivity graph , and such that the largest radius is minimized (the radius of is ). They provide an optimal algorithm via dynamic programming for the special case of a tree connectivity graph which was rediscovered by Drexler et al. [6] in a later publication. Ge et al. also present algorithms for the general case with unknown approximation guarantee111There is a proof in the paper that claims a guarantee of , but [6] gives a counterexample. and provide an experimental evaluation.
The best-known approximation guarantee for the connected -center problem is a -approximation given by Drexler et al. [6]. For Euclidean metrics with constant dimension and metrics with constant doubling dimension, they provide an -approximation algorithm. Their paper studies the problem from a very different context: Motivated by an application from geodesy and sea level analysis, they use the distance function to model differences in tide gauge measurements and the connectivity graph to model geographic closeness, and their modelling results in the same problem definition as Ge et al. [8].
In this paper, we study the connected -median problem, i.e., the related problem with the -median objective instead of the -center objective. We give a formal definition now.
Definition 1 (Connected -Median Problem (disjoint)).
In an instance of the (disjoint) connected -median problem, we are given a set of points, a metric on , a positive integer , and an unweighted and undirected connectivity graph . A feasible solution is a partition of into disjoint clusters with corresponding centers which satisfies that for every the subgraph of induced by is connected and . The connected -median problem aims to find a feasible solution that minimizes
The connected -median has also appeared in different contexts. For example, Validi et al. [22] study connected -median for a districting problem. Here the goal is to partition given administrative or geographic units into districts. The clusters should usually correspond to connected areas on the map which can be formulated via introducing centers for each unit and a graph to model which units are neighbors on the map. The -median objective is one way to model compactness of districts. Validi et al. [22] study various districting methods, and connected -median is one of them. They solve it via an integer linear programming approach, i.e., to optimality but with exponential worst-case running time. A related variant is the connected -means problem, which for example has been considered in [19] where a heuristic approach to minimize it is employed.
Gupta et al. [12] study -median/-means from the point of view of approximation algorithms. They consider the special case where the number of clusters is and the connectivity graph is star-like (there exists a point that is connected to all other points). The paper shows that even this case is -hard to approximate for both problems and proposed an -approximation algorithm for this special case. There is nothing known about the general case, and our work is motivated by the following question:
Can the connected -median problem be approximated for general connectivity graphs?
Unfortunately, we quickly arrive at the conclusion that no reasonable approximation guarantee is possible if (see Thm 4). We do derive a dynamic programming based exact algorithm for trees that runs in time (see Thm 6), thus extending the landscape for the problem, but the answer to our main question is still negative.
However, our inapproximability proof depends on a subtlety of the problem definition: The clusters have to be disjoint. This is a natural assumption in clustering, and in clustering without constraints, clusters can be assumed to be disjoint (adding a point to multiple clusters will in general only increase the objective). But here, if we allow for overlapping clusters, then satisfying connectivity can become easier because we can add critical vertices like articulation points to multiple clusters. This motivates the definition of connected -median with non-disjoint clusters.
Definition 2 (Disjoint vs. non-disjoint clusters).
In the connected -median problem with disjoint clusters, we require the clusters to be pairwise disjoint. In the connected -median problem with non-disjoint clusters, the clusters are allowed to overlap and we only require .
One may note that if a vertex appears in multiple clusters it will also contribute to the objective function multiple times. Thus also in the non-disjoint variant, we are incentivized to avoid assigning vertices unnecessarily often.
The non-disjoint version has also been studied previously. For example, Drexler et al. [6] study it for -center and give a -approximation for this case. From the application side, it depends on the interpretation whether disjoint or non-disjoint clusters are preferred. In districting, units should certainly not be in multiple clusters. But for the application of community detection in social networks the modeling is natural since individuals can belong to different groups. We thus study the following question.
Can the connected -median problem with non-disjoint clusters be approximated for general connectivity graphs?
The proof by Gupta et al. [12] gives a lower bound of for the disjoint case. For the sake of completeness, we provide in the full version of this paper an adapted version that also works if the clusters may overlap [7]. Our main result is a -approximation for the connected -median problem with non-disjoint clusters.
Before we summarize our results, we need one more definition. For a clustering problem with constraints, the corresponding assignment version of the problem asks for assigning points to given centers while respecting the constraints and minimizing the cost. In our case, we get the following problem.
Definition 3 (Assignment version).
In the assignment version of the connected -median problem, we assume that centers, denoted as , are given and the goal is to find a feasible assignment of the points in to the centers such that the -median costs are minimized. This version can be defined both for the disjoint and the non-disjoint variant of the connected -median problem.
Without a constraint, the assignment version of the -median problem can be solved optimally by assigning every point to its closest center. For clustering with constraints, assignment problems can be difficult: For example, the assignment problem for fair -center is NP-hard [1], and the connected -center with disjoint clusters is also NP-hard [6] (both problems are even hard to approximate better than ). We will establish an even higher lower bound for the assignment problem in the connected -median setting.
1.1 Our results
We prove new approximation and hardness results for the connected -median problem, both for the disjoint and the non-disjoint variant. Table 1 provides a brief overview of them. First we establish a strong hardness of approximation result for the connected -median problem with disjoint clusters, which even holds in the special case that .
Theorem 4.
For any , there is no polynomial-time -approximation algorithm for the connected -median problem with disjoint clusters even if , unless P = NP. For the assignment version, this lower bound also holds.
For completeness we point out that one can almost match this lower bound using the connected -center algorithm by Drexler et al. [6]:
Theorem 5.
For the disjoint connected -median problem, there is a polynomial-time algorithm with approximation factor .
Another important special case that has also been studied for the connected -center problem is the case that the connectivity graph is a tree. For this special case, we obtain a polynomial-time algorithm based on dynamic programming.
Theorem 6.
When the connectivity graph is a tree, then the connected -median problem with disjoint clusters can be solved optimally in time . This is true even if the distances are not a metric or the centers are given.
Motivated by applications like community detection, in which the clusters do not necessarily have to be disjoint, we also study the connected -median problem with non-disjoint clusters. This problem is -hard to approximate even if .
Theorem 7.
There is a constant such that for all sufficiently large , the non-disjoint connected -median problem cannot be approximated within a factor of unless P=NP, even when . The same is true for the assignment variant.
Our main result are approximation algorithms for the clustering and the assignment problem whose approximation factors match this lower bound in terms of .
Theorem 8.
For the assignment version of the non-disjoint connected -median problem, there is a polynomial-time algorithm with approximation factor . This is true even if the distances are not a metric.
Theorem 9.
For the non-disjoint connected -median problem, there is a polynomial-time algorithm with approximation factor .
1.2 Outline
The remainder of this paper focuses on the non-disjoint variant. For the disjoint results we refer to the full version [7]. In Section 2.1 we present our algorithm for the assignment version and in Section 2.2 we give an overview on how the centers can be found. The full description and analysis of the latter algorithm as well as the hardness proof for this setting can again be found in the full version of this work.
2 Non-disjoint Connected -Median Problem
2.1 Assignment Version
The high-level idea to solve the assignment version of the connected -median problem is to first define an LP formulation for it and compute an optimum fractional solution for the LP relaxation in polynomial time. Using an observation that the connected clusters are similar to so called node weighted Steiner trees we can use this LP solution to obtain instances of the node weighted Steiner tree problem such that every node needs to be contained in at least one Steiner tree and there exist a fractional solution for each of these instances such that the total cost of these solutions is bounded by times the optimum LP solution. Using a primal-dual algorithm by Klein and Ravi [15] we are able to find integral Steiner trees that cost at most times as much as the respective fractional solutions and which directly form connected clusters assigning each node to at least one center. In total, this gives us an approximation factor of .
Now we will define the LP formulation. For that, we use the following definition of cuts:
Definition 10 (Vertex Cuts).
For two arbitrary nodes , a -cut is a subset such that all paths from to in contain at least one node in . The set of all -cuts is denoted by .
Using this, we can reformulate the requirement that a node must be connected to its assigned center by ensuring that for any -cut , at least one node in is also assigned to . This gives us the following LP-formulation of the non-disjoint connected -median problem:
| s.t. | ||||||
| (1) | ||||||
where for all , the variable indicates whether is assigned to () or not (). While the first constraint ensures, that each point must belong to at least one cluster, the second constraint ensures that the clusters are connected, i.e., if is connected to center , then in each -cut, there must be at least one point assigned to . To relax this problem we drop the integrality constraint and only require that for all , .
It is worth noting that the linear program may have exponential size, as there can be exponentially many -cuts for a given pair . However, since the separation problem can be solved in polynomial time and there also exists an alternative flow-based formulation of the LP with polynomial size [7], it remains possible to find the optimum fractional LP-solution in polynomial time.
Let be such an optimum fractional solution. By Markov’s inequality it is easy to verify that for any there exists at least one such that . By multiplying all values with , we get a new LP solution with for all where each node is assigned to at least one center in its entirety. But even if for a it holds that there may still exist -cuts not containing any nodes fully assigned to . To deal with this problem we need some results shown for node weighted Steiner trees.
Definition 11 (Node Weighted Steiner Tree Problem).
In an instance of the node weighted Steiner tree problem we are given a graph , a set of terminal nodes and a weight function . The goal is to find a subset such that , the nodes of form a connected subgraph of , and the sum is minimized.
Similar as for the connected -median problem there also exists an LP relaxation for the node weighted Steiner tree problem:
| s.t. | ||||||
| (2) | ||||||
One might note that the assignment version of the connected -median problem is closely related to the node weighted Steiner tree problem as one could reinterpret the problem as finding node weighted Steiner trees such that each node is contained in at least one Steiner tree. The distances of the nodes to the respective centers can in this context be interpreted as different node weight functions for the different trees. Using the solution we will now define for any center the set . Then the solution can be subdivided into solutions for the Steiner tree LP using the respective sets as terminals.
Lemma 12.
Proof.
This lemma is proved by contradiction. Assume that is a solution for LP (2.1) that violates some constraint of LP (2.1). Then there exist two terminals and an -cut such that
Now we distinguish two cases. In the first case let be one of the nodes , w.l.o.g. . Then we can use the definition of LP (2.1) and to obtain
which contradicts the assumption.
In the second case both and . Then by the previous argument can neither separate nor from because then its weight would be at least . Thus there exists a path from to and from to not containing any nodes in . But then there also exists a path from to not using any nodes in and would not be a -cut.
This lemma is crucial because for the node weighted Steiner tree problem there exists an -approximation algorithm by Klein and Ravi [15] for which Guha et al. [11] later proved that it is implicitly a primal-dual algorithm and that the cost of the solution is at most times worse than any fractional solution of LP (2.1). Alternatively Könemann et al provided a more detailed primal-dual algorithm for a generalized version of the node weighted Steiner tree problem ensuring the same guarantees [16]. Using these algorithms and Lemma 12 we are able to subdivide into Steiner tree LP solutions that can each be transformed into a feasible cluster.
Theorem 8. [Restated, see original statement.]
For the assignment version of the non-disjoint connected -median problem, there is a polynomial-time algorithm with approximation factor . This is true even if the distances are not a metric.
Proof.
In the first step of the algorithm we will first calculate an optimum solution for the relaxed version of LP (2.1) which as argued above can be done in polynomial time. Since every assignment solution for the connected -median problem is also an LP solution, the costs of are upper bounded by the optimum value OPT. After multiplying the values by , the cost of solution is then again bounded by .
Consider as defined above, by Markov’s inequality for every node there exists a center such that which means that . Thus we have . By Lemma 12 the fractional solution can be split up into solutions of the Steiner tree LP (2.1) with the respective terminal sets such that the total sum of the objective value is exactly the cost of .
By applying the algorithm by Klein and Ravi [15] with and for every separately, one obtains a Steiner tree with whose cost is upper bounded by times the cost of the respective LP solution. Thus one obtains in polynomial time Steiner trees each connecting the respective terminal set and total cost bounded by times the objective value of which results in an upper bound of . Since every node is contained in at least one of these Steiner trees, this directly yields the desired solution for the assignment version of the non-disjoint connected -median problem.
This proof works even if the distances are not a metric because it does not use any of their properties.
One may note that this approach works with any approximation algorithm for the node weighted Steiner tree problem whose cost is bounded by the optimum LP solution. For some restricted graph classes, including planar graphs, Demaine et al. [5] provided a primal dual algorithm calculating a constant approximation. Thus the approach can also be used to get an -approximation (and if the centers are not given) for these kind of connectivity graphs.
2.2 Finding Centers
In this section we give an overview how suitable centers for the non-disjoint connected -median problem can be found. For a more detailed description of the procedure and its analysis we refer to the full version of this paper [7]. First we will again provide a suitable ILP formulation:
| s.t. | ||||||
| (3) | ||||||
where denotes the set of vertex cuts, separating and , defined as in the previous section.
The main difference to the assignment variant is that we do now allow to assign nodes to any other nodes and not only to some predefined centers. However, by definition of , it holds that for any . Thus will automatically be limited by . This naturally leads to the property that nodes can only be assigned to if . Thus limiting by directly ensures that any solution of the ILP uses at most centers.
If we relax the integrality constraint and only require that for all also LP (2.2) can be solved in polynomial time despite its exponential size. The drawback of this is that for arbitrarily many nodes it can hold that if the respective values are sufficiently small. This means that other nodes can at least partially be assigned to them and we will call the value the opening of .
The main focus of this section is to move these openings to a limited set of centers that will be determined by our algorithm such that reassigning the nodes accordingly is not too expensive. To do this, we follow a similar approach as the LP rounding algorithm for -median by Charikar et al. [3]. In the first step, we will find a solution in which every node is opened either by at least or not opened at all (limiting the number of centers to ). In the latter steps these openings will then be made integral by first finding possible replacements for some of the centers, which possibly allows us to close the respective centers, and then choosing a subset of the centers of size such that for every center itself or its replacement is contained in this subset.
We will relax the connectivity constraint during the algorithm. We say for an that an assignment is an -connected solution if , and for all and all cuts separating and it holds that . To simplify notation, we will denote the weight of the minimum cut between two nodes and (with respect to the values ) by . Then the last requirement can be reformulated as . It is easy to verify that an assignment corresponds to a fractional solution for LP (2.2) if and only if it is -connected.
Now we give an overview over the different steps of the algorithm. Our main focus will lie on the first step, which ensures that all centers will be half opened afterwards. This is due to the fact that it introduces the largest amount of novel ideas and necessary modifications compared to the existing algorithm by Charikar et al.:
Step 1.
To obtain half-opened centers, let an optimal (fractional) LP solution be given. For each , let its mass be defined as , its cost (or price) as and its (average) radius as . We say that an assignment of a node to another node is good if . Since for all nodes , we may observe that because of Markov’s inequality at least of gets assigned via good assignments, i.e., .
We will simultaneously maintain two assignments and such that for all initially and and that at the end of the algorithm . The final values of will be the assignment using half opened centers. During the algorithm, the combination of and will always be a -connected solution, which means that the following inequalities stay satisfied throughout the entire process:
| (4) | |||||
| (5) | |||||
| (6) | |||||
| (7) | |||||
The algorithm will now maintain an initially empty center set and repeat in an alternating order the following two steps: First it decides for an additional node whether it gets added to the center set or not (in the latter case it will be added to a so called environment of an already existing center). Afterwards it shifts some openings in (the that are greater than ) to already chosen centers in .
To get an intuition regarding the shifts, it can be beneficial to sometimes think about the connectivity constraints not from a cut-perspective but to rather interpret the assignments as flows. Using the max-flow min-cut theorem, it is easy to see that if we interpret the values as node capacities then there exists a flow from a node to a node of value exactly if . Thus our connectivity constraint implies that there always exists a flow from to of value . By basically reverting this flow for a center and a node we are able to shift an opening of value from to . One important question is now how the nodes that were previously assigned to get assigned. If was equal to , the entire opening of can be shifted and we can simply reassign all nodes to by setting and for any . However, if was smaller than only a fraction of the opening of gets shifted and we basically have to split up the previous assignments to between and . As Figure 1 shows this can lead to situations in which the total assignment to and after this shift actually needs to be larger than the assignment before this shift. Since it is actually rather involved to determine the new values in this situation, a formal description will only be provided in the full version of this work. To get an intuition regarding the algorithm it is for now sufficient to only consider the first case.
Since either way also the assignments of nodes assigned to have to be shifted in this situation, we have to make sure that the distances of the respective shifts are not too large which the algorithm will ensure by only allowing shifts with a rather small distance between and in the beginning and increasing this distance over time. More details will follow later.
While the shifts depend on the chosen centers , the choice whether a node will be added to in turn depends on the shifts that have already been performed before gets considered by the algorithm. The algorithm terminates once it has decided for every node whether it gets added to and all openings in have been shifted.
To determine which nodes should be added to , we iterate over all nodes ordered by their radii in increasing order and check whether we can open them by at least . To be more precise, a node will be chosen as a center if the sum of the remaining good assignments is at least . The construction of the algorithm will ensure that it will shift at least all remaining openings belonging to good assignments of to itself which means that will be at least half opened. When is added to the center set we also create its environment , which initially only contains itself.
In the case that does not get chosen as a center, we know that there were at least of good assignments of that have already been shifted to other centers in . Since every center in gets at least half opened and the entire opening is limited by , we know that and thus there exists at least one center to which of the good assignments of have been shifted. One critical property of the algorithm will be that before gets considered, the distance between the source and target of any shift will be at most . Thus for any good assignment to a node whose opening has been shifted to a center we have that . As a result we may conclude that there exists a center such that while and we add to the environment of the closest center fulfilling these requirements.
Adding to this environment allows us to shift some openings of a node with over the node to even if there does not exist a direct flow from to (i.e., is not assigned to ). The intuition behind this is that we first revert the flow from to and thus are already shifting the opening to . Now by combining and Property (7) we know that already before this shift the minimum cut between and has value at least . Thus if we are moving the opening (and the assignments to it) to instead of itself we know that the solution still stays -connected. Furthermore since and are not too far apart, we know that the distances of these shifts does not increase too much compared to a direct shift to . This will help us ensuring that if the openings of some nodes, to which got assigned, get shifted to some other centers then the distance added by this shift will not be too large.
Every time after a new node gets added to either or to an environment of a center we will go over all possible shifts ordered by their distances in increasing order, and perform all shifts with distance at most , where denotes the radius of the next node that will be considered by the algorithm. Note that any shift with radius can only result from the addition of to or because any shift not involving would already have been applied in the last iteration (as is the previous value of ). As a result all those shifts will be performed before any shift not involving will be executed. This directly guarantees that if is added to then all openings belonging to good assignments will be shifted to , which ensures that is half opened.
An important property of the shifts is that if we shift some opening of a node over a node then afterwards which ensures that for all we will only shift some opening of over at most once, limiting the number of shifts by . Additionally after we have added to or a set there always exists a possible shift while for a . Thus, it is possible to execute the described algorithm for a polynomial time until for every , and then return . A pseudocode summarizing the structure of the described procedure can be found in Algorithm 1. The cost of the resulting -connected solution is bounded by times the cost of the LP solution .
Step 2.
Now we would like to reduce the number of centers to at most . However, if we want to reduce the opening of a center to , we will need to find a suitable replacement, i.e., another center such that reassigning all nodes assigned to to neither costs too much nor violates our connectivity constraints (which is further relaxed to -connectivity). To do this we will need two properties of Algorithm 1:
-
For any node we know that if a shift from another node to a center caused to be (partially) assigned to then the radius of can be bounded by the radius of and the distance from to . To be more precise . Intuitively, if this was not the case, then the algorithm would have shifted some opening of either to itself (if gets chosen as a center) or over to another center with before was even added to the center set which would have prevented from being assigned to . The main consequence of this property is that if we can find another center that is only a constant times away from then reassigning all nodes that are currently assigned to , to instead costs not too much.
-
Additionally for any center it holds that if got assigned to another center because some opening got shifted from a node to then it holds that is bounded by because otherwise a shift from to would have happened before the shift to . Since the average length of the original assignments of was , one can use this to identify a center that is not too far apart from .
Using these two properties, we are able to split up into two sets and such that for every center we have a successor such that the total cost that occurs if we replace any center in by its successor would not be too large and . Later we will then open all nodes in as well as at most half the nodes in to obtain a integral center set such that for all nodes in either the node itself or its successor is contained in .
To obtain these sets, we consider an arbitrary center and define . Then at least a total value of of the openings corresponding to the initial assignments of (the values for any ) were shifted to other centers. If has value at least , we are able to use Markov’s inequality together with the second property to identify another center such that lies within and is already sufficiently connected to (i.e., ). We thus can set and add to .
However, if is rather small then it can be that all assignments of to other centers only resulted from shifts of nodes to that are really far apart from which means that can be even further away. Additionally the assignments might also be quite small which means that we would need to increase some existing assignments to to ensure -connectivity if we replace by . However, if there are multiple centers where the respective value is small then we know that since that if we add one of these centers to we can add multiple others to . Since we do not need a replacement for the centers in , we can use a careful potential argument to redistribute parts of the replacement cost of the centers added to to the centers in to bound the additional cost among all nodes.
Step 3.
To decide which centers in can be closed we have a look at the directed Graph , where contains for any center in an edge to its successor if the latter is again contained in . If this graph is bipartite we can simply take the smaller half of this partition and add this to the center set . Then for every edge one of its two endpoints is contained in which ensures that for every center either itself or its successor is contained in . However, the graph might not directly be bipartite because it can contain cycles of uneven length. But we can ensure by being a little bit more careful in step 2 that any of these cycles contains at most one center with . Using this, we can remove the respective cycles and thus obtain a bipartite graph. For all centers in not added to , we reassign all nodes assigned to them to the respective successor . Since we bounded the cost of replacing all centers in and are only replacing a subset of them, the total cost of this is again bounded. The entire cost still stays in times the cost of the fractional LP solution .
Step 4.
After step 3, we have an -connected solution only using integral centers. However the assignments might still be fractional. By multiplying the assignments by the solution becomes -connected and similarly as for the assignment version in Section 2.1 we obtain that for every node there exists at least one center such that . Again applying the primal dual algorithm for node weighted Steiner trees, we obtain an entirely integral solution:
Theorem 9. [Restated, see original statement.]
For the non-disjoint connected -median problem, there is a polynomial-time algorithm with approximation factor .
References
- [1] Ioana Oriana Bercea, Martin Groß, Samir Khuller, Aounon Kumar, Clemens Rösner, Daniel R. Schmidt, and Melanie Schmidt. On the cost of essentially fair clusterings. In Dimitris Achlioptas and László A. Végh, editors, APPROX/RANDOM 2019, volume 145 of LIPIcs, pages 18:1–18:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.APPROX-RANDOM.2019.18.
- [2] Jarosław Byrka, Thomas Pensyl, Bartosz Rybicki, Aravind Srinivasan, and Khoa Trinh. An improved approximation for k-median and positive correlation in budgeted optimization. ACM Transactions on Algorithms (TALG), 13(2):1–31, 2017. doi:10.1145/2981561.
- [3] Moses Charikar, Sudipto Guha, Éva Tardos, and David B Shmoys. A constant-factor approximation algorithm for the k-median problem. In Proceedings of the thirty-first annual ACM symposium on Theory of computing, pages 1–10, 1999.
- [4] Flavio Chierichetti, Ravi Kumar, Silvio Lattanzi, and Sergei Vassilvitskii. Fair clustering through fairlets. Advances in neural information processing systems, 30, 2017.
- [5] Erik D Demaine, MohammadTaghi Hajiaghayi, and Philip N Klein. Node-weighted steiner tree and group steiner tree in planar graphs. In International Colloquium on Automata, Languages, and Programming, pages 328–340. Springer, 2009. doi:10.1007/978-3-642-02927-1_28.
- [6] Lukas Drexler, Jan Eube, Kelin Luo, Dorian Reineccius, Heiko Röglin, Melanie Schmidt, and Julian Wargalla. Connected k-center and k-diameter clustering. Algorithmica, September 2024. doi:10.1007/s00453-024-01266-9.
- [7] Jan Eube, Kelin Luo, Dorian Reineccius, Heiko Röglin, and Melanie Schmidt. Connected k-median with disjoint and non-disjoint clusters, 2025. arXiv:2507.02774.
- [8] Rong Ge, Martin Ester, Byron J Gao, Zengjian Hu, Binay Bhattacharya, and Boaz Ben-Moshe. Joint cluster analysis of attribute data and relationship data: The connected k-center problem, algorithms and applications. ACM Transactions on Knowledge Discovery from Data (TKDD), 2(2):1–35, 2008. doi:10.1145/1376815.1376816.
- [9] Teofilo F. Gonzalez. Clustering to minimize the maximum intercluster distance. Theor. Comput. Sci., 38:293–306, 1985. doi:10.1016/0304-3975(85)90224-5.
- [10] Sudipto Guha and Samir Khuller. Greedy strikes back: Improved facility location algorithms. In Howard J. Karloff, editor, Proceedings of the Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, 25-27 January 1998, San Francisco, California, USA, pages 649–657. ACM/SIAM, 1998. URL: http://dl.acm.org/citation.cfm?id=314613.315037.
- [11] Sudipto Guha, Anna Moss, Joseph (Seffi) Naor, and Baruch Schieber. Efficient recovery from power outage (extended abstract). In Proceedings of the Thirty-First Annual ACM Symposium on Theory of Computing, STOC ’99, pages 574–582, New York, NY, USA, 1999. Association for Computing Machinery. doi:10.1145/301250.301406.
- [12] Neelima Gupta, Aditya Pancholi, and Yogish Sabharwal. Clustering with internal connectedness. In WALCOM: Algorithms and Computation: 5th International Workshop, WALCOM 2011, New Delhi, India, February 18-20, 2011. Proceedings 5, pages 158–169. Springer, 2011. doi:10.1007/978-3-642-19094-0_17.
- [13] Dorit S. Hochbaum and David B. Shmoys. A best possible heuristic for the k-center problem. Math. Oper. Res., 10(2):180–184, 1985. doi:10.1287/moor.10.2.180.
- [14] Wen-Lian Hsu and George L. Nemhauser. Easy and hard bottleneck location problems. Discret. Appl. Math., 1(3):209–215, 1979. doi:10.1016/0166-218X(79)90044-1.
- [15] P. Klein and R. Ravi. A nearly best-possible approximation algorithm for node-weighted steiner trees. Journal of Algorithms, 19(1):104–115, 1995. doi:10.1006/jagm.1995.1029.
- [16] Jochen Könemann, Sina Sadeghian, and Laura Sanita. An lmp o (log n)-approximation algorithm for node weighted prize collecting steiner tree. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, pages 568–577. IEEE, 2013.
- [17] Shi Li. Approximating capacitated k-median with (1+) k open facilities. In Proceedings of the twenty-seventh annual ACM-SIAM symposium on Discrete algorithms, pages 786–796. SIAM, 2016.
- [18] Shi Li and Xiangyu Guo. Distributed -clustering for data with heavy noise. Advances in Neural Information Processing Systems, 31, 2018.
- [19] Zhung-Xun Liao and Wen-Chih Peng. Clustering spatial data with a geographic constraint: exploring local search. Knowl. Inf. Syst., 31(1):153–170, 2012. doi:10.1007/s10115-011-0402-8.
- [20] Melanie Schmidt, Chris Schwiegelshohn, and Christian Sohler. Fair coresets and streaming algorithms for fair k-means. In Approximation and Online Algorithms: 17th International Workshop, WAOA 2019, Munich, Germany, September 12–13, 2019, Revised Selected Papers 17, pages 232–251. Springer, 2020. doi:10.1007/978-3-030-39479-0_16.
- [21] Ali Vakilian and Mustafa Yalciner. Improved approximation algorithms for individually fair clustering. In International Conference on Artificial Intelligence and Statistics, pages 8758–8779. PMLR, 2022.
- [22] Hamidreza Validi, Austin Buchanan, and Eugene Lykhovyd. Imposing contiguity constraints in political districting models. Oper. Res., 70(2):867–892, 2022. doi:10.1287/opre.2021.2141.
