Abstract 1 Introduction 2 Hardness of Approximation 3 Constant-factor approximations for 𝑻=𝟐 scenarios 4 FPT(𝒌,𝑻) constant factor approximation 5 FPT Approximations in Well-structured Metrics References Appendix A Useful facts

Clustering in Varying Metrics

Deeparnab Chakrabarty Department of Computer Science, Dartmouth College, Hanover, NH, USA Jonathan Conroy ORCID Department of Computer Science, Dartmouth College, Hanover, NH, USA Ankita Sarkar ORCID Department of Computer Science, Dartmouth College, Hanover, NH, USA
Abstract

We introduce the aggregated clustering problem, where one is given T instances of a center-based clustering task over the same n points, but under different metrics. The goal is to open k centers to minimize an aggregate of the clustering costs – e.g., the average or maximum – where the cost is measured via k-center/median/means objectives. More generally, we minimize a norm Ψ over the T cost values. We show that for T3, the problem is inapproximable to any finite factor in polynomial time. For T=2, we give constant-factor approximations. We also show W[2]-hardness when parameterized by k, but obtain f(k,T)poly(n)-time 3-approximations when parameterized by both k and T.

When the metrics have structure, we obtain efficient parameterized approximation schemes (EPAS). If all T metrics have bounded ε-scatter dimension, we achieve a (1+ε)-approximation in f(k,T,ε)poly(n) time. If the metrics are induced by edge weights on a common graph G of bounded treewidth 𝗍𝗐, and Ψ is the sum function, we get an EPAS in f(T,ε,𝗍𝗐)poly(n,k) time. Conversely, unless (randomized) ETH is false, any finite factor approximation is impossible if parametrized by only T, even when the treewidth is 𝗍𝗐=Ω(polylogn).

Keywords and phrases:
Clustering, approximation algorithms, LP rounding, parameterized and exact algorithms, dynamic programming, fixed parameter tractability, hardness of approximation
Funding:
Deeparnab Chakrabarty: Work partially funded by NSF grants CCF-2041920 and CCF-2402571.
Jonathan Conroy: Work partially funded by the U.S. National Science Foundation CAREER Award under the Grant No. CCF-2443017.
Ankita Sarkar: Work partially funded by NSF grants CCF-2041920 and CCF-2402571.
Copyright and License:
[Uncaptioned image] © Deeparnab Chakrabarty, Jonathan Conroy, and Ankita Sarkar; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Facility location and clustering
; Theory of computation Fixed parameter tractability
Related Version:
Full Version: https://arxiv.org/abs/2510.07860 [16]
Editors:
C. Aiswarya, Ruta Mehta, and Subhajit Roy

1 Introduction

Clustering problems such as the k-supplier or the k-median problem are classic discrete optimization problems which have formed the bedrock of many problems in operations research. In its simplest form, the objective is to “open” k locations in a metric space such that some function (eg, max or sum) of the distances of clients to the nearest open facility is minimized. Such problems have been extensively studied over the past 50 years [39, 53, 24, 41, 23, 7, 25, 14, 49, 57, 19, 43, 18, 50, 52, 20, 26, 33, 4, 17], and we have a very good understanding on the approximability of many of these problems.

In this paper, we consider clustering problems when the distance function underlying the metric space can change over time. To give a toy example, imagine that the clients are households in a New England town, and the distances are travel times over the road network in the town. On one hand, travel times may be quite different in January and June given the weather differences over the months. On the other hand, one can’t hope to open different locations in different seasons. Our decision ought to take into account the different costs over time, for example by selecting a set of facilities that minimizes the average cost over the year. Although this sounds a natural question, to our knowledge what happens to the complexity of clustering with changing metrics hasn’t been studied so far.111One may be tempted to simply perform clustering on a single metric space defined by average distances over all months. However, this does not work: the cost of a client at each timestep is computed by take a minimum over a set of facilities, and this minimum is not preserved when we take an average. Formally, we study the following problem.

Definition 1 (Aggregate Clustering Problems).

We are given V=FC, a finite set of n points where C is the set of clients and F is a set of facilities222F and C need not be disjoint, and one can imagine the case of F=C as a special but instructive case.. We are given T distance functions dt(,) over V×V which are symmetric and satisfy triangle-inequality. We are given a parameter k. Finally, we are given an aggregator function Ψ:0T0. The goal is to “open” a subset SF of k facilities that minimize a certain objective function (depending on the problem variant). The objective functions are:

  • Ψ(cost(dt;S):t[T]), where cost(dt;S):=maxjCdt(j,S), in the Ψ-aggregate k-supplier problem.333We use the notation dt(j,S) to mean miniSdt(j,i).

  • Ψ(cost1(dt;S):t[T]), where cost1(dt;S):=jCdt(j,S), in the Ψ-aggregate k-median problem.

  • Ψ(costz(dt;S):t[T]), where costz(dt;S):=(jCdt(j,S)z)1/z, in the Ψ-aggregate (k,z)-clustering problem.

When it is clear from context, we denote the objective function as aggcost().

The above problem also can be thought of as a stochastic/robust version of clustering under uncertainty where the uncertainty is over the distances. Note that when Ψ is the sum-function, we wish to find a solution which minimizes the average k-supplier/k-median cost of the returned solution S, where the average is over the T “scenarios” (we are assuming the full-information setting); when Ψ is the max-function, we get the robust optimization setting. In the literature [5, 52, 26], stochastic/robust clustering has been studied when the metric is fixed but the uncertainty is over the client sets. We can consider a generalized version of aggregate clustering, which models client demands changing over time.

Definition 2 (Generalized Aggregate Clustering).

Apart from the t distances, we have t weight functions wt:C. In the objective functions, we modify costs by multiplying dt(j,S)’s with wt(j). More precisely, costz(dt,S)=(jCwt(j)dt(j,S)z)1/z and cost(dt;S)=maxjCwt(j)dt(j,S). In particular, if wt:C{0,1}, then this models having different client sets at different times.

All our upper bounds apply for generalized aggregate clustering, and all our lower bounds hold even for the vanilla version of aggregate clustering. In fact, in Observation 27 we present a weak equivalence between the two problems, by showing that any algorithm for vanilla aggregate clustering can solve generalized aggregate clustering with {0,1} weights, i.e. aggregate clustering where the client set is allowed to change over time.

1.1 Our Findings

General Metrics.

In its full generality, unfortunately, the aggregrate clustering problem becomes very hard when the number of scenarios T becomes 3 or larger. In Theorem 3 we show that it is NP-hard to distinguish between zero and non-zero solutions when T3. To complement this result, we show (in Theorems 7 and 16) that when T=2, both the (generalized) Ψ-aggregate k-median and k-supplier problems have polynomial time O(1)-approximations when Ψ is any norm. In fact, for k-supplier, we match the optimal 3-approximation that is known at T=1 [39, 53]. Both the above results, at a very high level, follow from the fact that bipartite matching (or rather, partition matroid intersection) is tractable, while 3D-matching is NP-hard.

Given the above hardness for T3, we attempt to bypass it in two ways: (i) investigating fixed-parameter tractable approximation algorithms, and (ii) imposing additional structure over the metrics in various scenarios.

Constant-factor FPT approximation algorithms.

The hardness for T=3 clearly shows one can’t expect f(T)poly(n,k)-time approximation algorithms. Moreover, we show (in Theorem 5) that it is also hard to obtain f(k)poly(n,T)-time approximation algorithms: we encode the k-hitting set problem as an instance of aggregate clustering, and our lower bound follows from the W[2] hardness of k-hitting set [32, Theorem 13.12]. On the other hand, if we allow k and T to be both fixed parameters, then (in Theorem 19) we obtain an f(k,T)poly(n)-time (3+ε)-approximation. The high level idea for this is as follows: Suppose we have T partitions of a universe U, and we must decide if there is a k-sized subset that is a simultaneous hitting set for all T partitions. In (k+1)kTpoly(n)-time, we can guess for each t[T] and i[k] the part in the tth partition that the ith hitting element hits. Such an idea is the core of many FPT approximation algorithms for clustering [1, 12, 38].

Approximation schemes in structured metrics.

To impose structure on the metric, we note that any finite metric dt is a shortest path metric on an undirected base graph G=(V,E) with weights wt(e) on the edges. Note that our restriction of having the same graph G across scenarios is without loss of generality if we allow a complete graph. Furthermore, in many applications, such as the road-network application mentioned in the early paragraphs of the introduction, this indeed is the case where the “weights” change over the seasons but the underlying network remains the same. Can one obtain better algorithmic results exploiting the structure of the underlying undirected base graph G?

Unfortunately, our hardness results apply even for very simple base graphs G. In particular, our reduction from hitting set (Theorem 5, which rules out any finite factor approximation algorithms in f(k)poly(n,T) time) can be carried out even when G is a star. Moreover, our reduction from 3D matching (Theorem 3, which rules out any f(T)poly(n,k)-time finite factor approximations) can be carried out even when G is a grid graph (see Theorem 4).

Nevertheless, we bypass this hardness by designing 1+ε approximation algorithms in time f(ε,k,T)poly(n) (ie, EPASes in parameters k and T) for a broad class of structured input metrics, which includes (for example) the case when G is a planar graph. More precisely, we design approximation algorithms whenever input metric dt has bounded scatter dimension. This concept was recently introduced by Abbasi et al. [1], along with an algorithm demonstrating that metrics of bounded scatter dimension admit f(ε,k)poly(n) time 1+ε-approximation algorithms for many clustering problems. We generalize their ideas to obtain an EPAS for the (generalized) aggregate (k,z)-clustering problem. Bounded scatter dimension captures a rich class of metrics, including doubling metrics, shortest-path metrics on planar or minor-free graphs [13], and metrics of bounded highway dimension444We are not aware of a published proof that highway dimension has bounded scatter dimension, but the claim can be found at timestamp 0:52 in the recorded FOCS 2023 talk on [1] (see link https://focs.computer.org/2023/schedule/) and also in [12]. – this last class, which was introduced to model transportation networks [3, 2], may be of particular interest in light of our road-network application from earlier. We emphasize that our lower bounds on the star and grid apply to metrics of bounded scatter dimension, so our FPT(k,T) approximation is essentially the best one could hope to achieve (up to the 1+ε approximation) in this setting.

Additionally, we consider the case when G is a tree, or more generally a bounded-treewidth graph. As bounded-treewidth graphs have bounded scatter dimension, our f(ε,k,T)poly(n)-time algorithm from above applies. However, we can do even better – we obtain a (1+ε)-approximation for the sum-aggregate (k,z)-clustering problem in time f(T,ε)poly(n,k), by generalizing a folklore dynamic programming algorithm for k-median on bounded-treewidth graphs [6, 42, 29]. Parameterizing by T is necessary, because of our hardness result on the star. On the other hand, we can avoid parameterizing by k because our hardness for the T=3 case only applies G is a grid graph, which has high treewidth – recall that graphs of bounded treewidth are precisely those graphs which exclude a grid as a minor [54, 28]. In fact, we show in Theorem 4 that our T=3 hardness rules out f(T)poly(n)-time algorithms for any graph G that has sufficiently large treewidth (specifically, Ω(log295n)), whereas our upper bound in Theorem 24 achieves f(T)poly(n) runtime so long as G has treewidth o(logn/loglogn) (see Remark 25). Thus, our upper and lower bounds show that the treewidth of the base graph G almost entirely captures the tractability of FPT(T) algorithms for the sum-aggregate555We expect that a DP could be designed for other Ψ-aggregator norms, but in this extended abstract we only consider Ψ= sum. clustering problem (up to some 1+ε approximation factor, and up to some poly(logn) gap in the treewidth between our upper and lower bounds).

Open Directions

We end this section mentioning some open directions for future study. If one observes the metrics we use to prove our hardness results, we notice that they “change a lot” as one moves from dt to dt+1. Can one obtain positive algorithmic results if this change is bounded? Concretely, assume dt is the shortest path metric on Gt=(V,Et) and dt+1 is the same on Gt+1=(V,Et+1). What if we forced |EtΔEt+1|O(1)? Again taking the road-network example, these could lead to certain road-closures or road-building, but in a single period perhaps not too many edges are added or deleted. We do not know any lower bound for this version, nor do we know how to design algorithms. Structurally, this seems to require an understanding of how shortest paths change with insertion/deletion of edges which may be of independent interest.

Another interesting, but slightly less concrete, direction is to explore online algorithms where an algorithm is allowed to change the centers but the distance metric is revealed only after the algorithms decision is made. Can one design “low-regret” algorithms as in [59]? The sum-aggregate objective is in fact the benchmark with which regret is measured, and our results show that approximating this benchmark for general metrics is hard. With this in view, what would be a good definition of regret?

Coming back to aggregate clustering, a concrete open problem is the following. The aforementioned hardness when G is a star actually has FC, but the case of V=C=F is also interesting. Are there f(T)poly(n,k) approximation or even exact algorithms for Ψ-aggregated k-supplier/median problem when G is a tree? We believe this is an interesting generalization of k-median problem on trees and worthy of exploration.

1.2 Related Works

As noted earlier, approximation algorithms for clustering problems have a rich history and we don’t attempt to summarize this. Rather we mention the works most related to the “changing metric” viewpoint.

Deng, Li, and Rabani [33] consider the k-clustering problems in a dynamic setting in which both clients and facilities may change over time (though the metric remains the same). The algorithm is allowed to change the open facilities over time, and the objective is to minimize the clustering costs and the distances that open facilities move over time. Their main results, at a high level, are in lockstep with our first set of results for aggregate clustering (on the tractability of T=2 vs T3 scenarios); though our findings and theirs do not imply one another. Their setting has an ambient metric space (X,d) and, over T timesteps, there are client and facility sets Ct,FtX for each timestep t. The goal is to pick k-sized solutions StFt at each time step minimizing a certain objective function.

As mentioned earlier, our problem is related to stachastic/robust clustering problems which consider scenarios where client sets change but the algorithm needs to open the same set of k centers to serve these. This question was studied by Anthony, Goyal, Gupta, and Nagarajan [5] who obtain a O(logT+logn)-approximation for the robust k-median problem discussed earlier. They also show that stochastic k-center (i.e. stochastic k-supplier with F=C) is as hard to approximate as the densest-k-subgraph problem. Makarychev and Vakilian [52] obtain an (eO(z)logTloglogT)-approximation to robust (k,z)-clustering. Along with Chlamtáč, the same authors [26] subsequently generalize this approximation algorithm to clustering with cascaded norm objectives, i.e. objectives of the form (t=1T(jCtd(j,S)z)q/z)1/q. When zq, they obtain a near-optimal O(kOz,q(1))-approximation. When zq<, they obtain an Oz,q(1)-approximation.

Another related line of work is dynamic algorithms for clustering where clients come and go, and the algorithm needs to update the solution fast and maintain O(1)-approximations. There has been a lot of work [47, 22, 31, 36, 8, 10, 46, 37, 11, 9] recently on these probelms. We point the readers to [11] (and references within) for dynamic k-center, and [9] (and references within) for dynamic k-median. It is curious to see if techniques from these can address the questions mentioned in the open-directions paragraph earlier.

2 Hardness of Approximation

Theorem 3 (Hardness of approximation when T3).

For any homogeneous aggregator Ψ and any z{}, there is no f(T)poly(n,k)-time finite-factor approximation for Ψ-aggregate (k,z)-clustering on finite metrics on n-vertices unless P=NP. The result holds even for T=3.

Proof.

We show that it is NP-hard to decide whether the optimum value is finite or infinite for any Ψ-aggregate (k,z)-clustering problem. We reduce from the (perfect) 3D Matching problem where, recall, we are given a 3-partite hypergraph H=(V1V2V3,E) where |V1|=|V2|=|V3| any every hyperedge eE intersects every Vt exactly once. The goal is to decide whether or not there exists a matching (pairwise disjoint subset) ME of hyperedges which spans all vertices. Equivalently, |Me|=1 for all eE. Given such a 3D Matching instance (V1V2V3,E), we construct an aggregate clustering instance on T=3 metrics, where the underlying graph is a complete graph G with vertex set E. The client set C=F=E and k|V1|=|V2|=|V3|. For each metric t{1,2,3} and each two distinct clients e,e, we set the distance dt(e,e)0 if eeVt, i.e. if they agree on their vertex in Vt. Otherwise set dt(e,e). It is easy to see that each dt is in fact a metric since if e1,e2 share the same Vt endpoint as do e2,e3, then they must be the same endpoint and thus e1,e3 share that as well. It remains to show that the clustering instance admits 0-cost solutions iff the original instance admits a perfect 3D matching.

  • Suppose this clustering instance admits a 0-cost solution. Call this solution S. Fix a t{1,2,3} and vVt. Let E(v) be the set of hyperedges that contain v. We know by construction that, eE(v),dt(e,S)=0, i.e. eS such that e,e agree on their vertex in Vt. But then this vertex must be v itself. Thus eE(v)S, so |E(v)S|1.

    Since |Vt|=|S|, this means that for each vVt, |E(v)S|=1. So S is a perfect 3D matching.

  • Suppose M is a perfect 3D matching in the original instance. Fix t{1,2,3} and eC such that eVt={v}. We know that ME(v), so fix eME(v). Then eeVt={v}, i.e. dt(e,e)=0, and so dt(e,M)=0. So for each t{1,2,3} and each eC, we have dt(e,M)=0. Thus aggcost(M)=0.

Using techniques from graph drawing literature, one can show that our reduction Theorem 3 holds even when the base graph is a grid graph. Furthermore, we can rule out poly(n)-time algorithms for aggregate clustering whenever the base graph G contains even a relatively small (Ω~(log3n)×Ω~(log3n)) grid minor, and consequently has relatively small treewidth; this follows from the fact that, under the randomized exponential time hypothesis, it is hard to obtain a 2o(n)-time algorithm for 3D matching [45, 44]. We defer the details to the full version [16].

Theorem 4.

Let G be any n-vertex graph with treewidth 𝗍𝗐=Ω(log295n). (For example, one may simply take G to be a n×n grid graph.) For any homogenous aggregator Ψ and any z{}, there is no f(T)poly(n,k)-time finite-factor approximation for Ψ-aggregate (k,z)-clustering problem when the base graph inducing the metrics is G, unless the randomized exponential time hypothesis is false. This results holds even for T=3.

Next, we give a different reduction to rule out that FPT algorithms parameterized by k, even when the base graph is a star.

Theorem 5 (Hardness of approximation on stars in FPT time.).

For any homogenous aggregator Ψ and any z{}, there is no f(k)poly(n,T)-time finite-factor approximation algorithms for the Ψ-aggregate (k,z)-clustering problem even when the base graph G inducing the metrics is a star, unless W[2] = FPT.

Proof.

We reduce from k-hitting set, which is W[2] hard when parameterized by k [32]. Suppose we are given an instance of k-hitting set defined by a universe U={v1,,vn} of n points, a set 𝒳={X1,,Xm} of m subsets of U, and an integer k; our task is to determine whether there are k points in U that hit all sets of 𝒳. We construct an instance of aggregate clustering as follows. Let G be a star graph with a root vertex r connected to n leaves v1,,vn. Let the facility set be F{v1,,vn}, and let the client set (in every metric) be C={r}. We define Tm distances functions, one for each set Xt𝒳, as follows: in the t-th metric, we set the weight of edge (r,vi) to be 0 if viXt and otherwise.

It remains to show that the Ψ-aggregate (k,z)-clustering problem has finite cost iff there is a hitting set of size k.

  • First we show that, if there is a hitting set S of size k, then the aggcost(S)=0. Indeed, for every t[T], there exists some viS with viXt and so dt(r,S)dt(r,vi)=0. In particular, the (k,z)-clustering cost paid by the client set C={r} in each metric is 0, and so the Ψ-aggregate cost is also 0 because Ψ is a norm.

  • Similarly, if there is a set S of k facilities such that aggcost(S)<, then we claim S is a hitting set. Indeed, consider some Xt𝒳. Since S has finite cost, we know that dt(r,S)< and in particular there exists some viS with dt(r,vi)=0. By construction, vi hits Xt.

 Remark 6.

The above reduction additionally shows that designing bicriteria approximation algorithms for aggregate clustering remains hard, due to the hardness of approximation of hitting set [34] – there exists some β=O(logn) such that it is NP-hard to distinguish between the case that there is a hitting set of size k and the case that there is no hitting set of size βk.

3 Constant-factor approximations for 𝑻=𝟐 scenarios

In this section we extend the vanilla O(1)-approximations for k-supplier and k-median for the case of T=2 scenarios; this contrasts with the inapproximability for T3 (Theorem 3). For simplicity, we restrict our exposition when the aggregator function Ψ is just the sum, but we later point out in Remark 17 why it holds for any homogeneous aggregator such as a norm. In Remark 18 we explain how our algorithms generalize for (k,z)-clustering.

At a high level, both the extensions from vanilla work because (a very simple) matroid intersection is polynomial time tractable, while even 3D-matching is NP-hard; the latter was the root of the hardness for T3 aggregate clustering. We begin with the k-supplier problem which explains the previous line, and then show how ideas from the “matroid-median” problems solves the aggregate k-median problem for T=2.

3.1 𝟑-approximation for Aggregate 𝒌-Supplier

Let 𝙾𝙿𝚃 be the optimal set of k-suppliers which minimizes cost(d1;𝙾𝙿𝚃)+cost(d2;𝙾𝙿𝚃), where recall cost(dt;𝙾𝙿𝚃)=maxjCdt(j,𝙾𝙿𝚃). Let us denote cost(dt;𝙾𝙿𝚃) as 𝚘𝚙𝚝t for t{1,2}. Note that this can be guessed in poly(n)-time (one could make this poly-logarithmic in n using “binary search” techniques) and so we assume we know 𝚘𝚙𝚝1 and 𝚘𝚙𝚝2. We now describe an algorithm, very similar to the one in [39], which returns a subset 𝙰𝙻𝙶 of facilities with cost(dt;𝙰𝙻𝙶)3𝚘𝚙𝚝t for t{1,2}. This implies a 3-approximation for the aggregate k-supplier problem for the T=2 case for any homogeneous aggregator Ψ.

For t{1,2}, define Bt(a,r)={bFC:dt(a,b)r}. We run the Hochbaum-Shmoys [39] filtering algorithm on each metric dt with parameter 𝚘𝚙𝚝t. To briefly describe this: (i) initially all clients are “uncovered”, (ii) pick an arbitrary uncovered client jC and add it to a set Rt of representatives, define Bt(j,2𝚘𝚙𝚝t)C to be j’s “children”, and mark j and all its children as “covered”, and (iii) continue the above till all clients covered. The main observations, which are easy to check using triangle inequality and the fact that 𝚘𝚙𝚝t’s were correct guesses, are the following for t{1,2}:

  • The collection of balls {Bt(j,𝚘𝚙𝚝t)F}jRt are pairwise disjoint.

  • For any jRt, Bt(j,𝚘𝚙𝚝t)𝙾𝙿𝚃. The above two imply |Rt|k.

  • For every vC, dt(v,Rt)2𝚘𝚙𝚝t.

We now construct a solution 𝙰𝙻𝙶 of size k such that for any t{1,2} and any jRt, we have 𝙰𝙻𝙶Bt(j,𝚘𝚙𝚝t); that is, 𝙰𝙻𝙶 hits every ball in the above two collections. This can be solved using matroid intersection since there are only two collections of disjoint balls. Once we have such an 𝙰𝙻𝙶, it is easy to see using triangle inequality that, for any t{1,2}, dt(v,𝙰𝙻𝙶)dt(v,j)+dt(j,𝙰𝙻𝙶)3𝚘𝚙𝚝t where j was v’s representative in Rt.

To give more details on how to find 𝙰𝙻𝙶, for t{1,2} define the partition 𝒫t of F formed by {Bt(j,𝚘𝚙𝚝t)F}jRtZt, where Zt are all the facilities of F not in any ball. We define the “budget” of each part to be |{Bt(j,𝚘𝚙𝚝t)F}|1 – this is the number of facilities 𝙰𝙻𝙶 can “leave out” – and set the budget of Zt to be |Zt|. We say SF is independent in partition matroid t if it picks at most budget from each part; we seek the set SF of the largest cardinality which is independent in both partition matroids. We return 𝙰𝙻𝙶:=FS. By design, 𝙰𝙻𝙶 hits every Bt(j,𝚘𝚙𝚝t) for t{1,2} and jRt. Since F𝙾𝙿𝚃 is a candidate S which is in the intersection of the two partition matroids, we get |𝙰𝙻𝙶|=|F||S||F||F𝙾𝙿𝚃|=|𝙾𝙿𝚃|k.

In sum, we can find a solution 𝙰𝙻𝙶 such that cost(dt;𝙰𝙻𝙶)3𝚘𝚙𝚝t for t{1,2}, and thus Ψ(cost(d1;𝙰𝙻𝙶),cost(d2;𝙰𝙻𝙶))3Ψ(𝚘𝚙𝚝1,𝚘𝚙𝚝2). This completes the proof of the following theorem.

Theorem 7.

When T=2, there is a poly(n)-time 3-approximation algorithm for Ψ-aggregate k-supplier on n vertices for any homogeneous aggregator Ψ .

3.2 𝑶(𝟏)-approximation for Aggregate 𝒌-Median

To obtain an constant approximation for the k-median problem one has to work a bit harder, but the underlying idea behind tractability is still the tractability of matroid intersection. More precisely, it is the integrality of a polytope defined by two laminar set systems. At a high level, such an issue arises when one studies the matroid median problem where there is only one metric but one has the extra constraint that the set of facilities opened must be an independent set of a certain matroid. One solves this problem by rounding a solution to an LP-relaxation where matroid intersection (or rather the integrality fact mentioned above) forms a core component with the given matroid being one matroid, and the other formed via “filtering” technique a la [55, 23]. In our case the situation is similar at such a high-level – the two “matroids” are formed by the filtering ideas for the T=2 scenarios – but the details do need working out, and we show this below. We use the framework set by Swamy [57] for the matroid-median problem, but other frameworks (such as the iterated rounding framework of [43]) could possibly lead to better approximation factors; in this work, we didn’t optimize the latter.

Linear Programming Relaxation

We begin by writing a linear programming relaxation for our problem. Recall that, in the standard linear programs for k-median, matroid median, etc. [23, 48, 57, 33], variables of the form x(i,v) denote whether or not the client v uses the facility i, so that v’s share of the cost is iFd(v,i)x(i,v). In an integral solution SF, each v has a unique ivS such that x(iv,v)=1, and d(iv,v)=d(v,S).

In our problem, we need two sets of such x-variables, because given an integral solution SF, a client v can use different facilities under different metrics; that is, there can be distinct i1,i2S s.t. d1(v,S)=d1(v,i1) and d2(v,S)=d2(v,i2). So for each t{1,2}, we define variables {xt(i,v)}vC,iF denoting whether or not the client v uses the facility i under the metric dt. We also have variables {y(i)}iF which, like in the standard k-median LP [23, 25], denote whether or not the facility i is picked into our solution. This allows us to write linear constraints similar to the standard LP for k-median. We use 𝗅𝗉 to refer to the fractional optimum of the linear program relaxation.

minimize: vCiFd1(i,v)x1(i,v)+vCiFd2(i,v)x2(i,v) (LP)
iFy(i)k (LP1)
xt(i,v)y(i) t{1,2},vC,iF (LP2)
iFxt(i,v)=1 t{1,2},vC (LP3)
0xt(i,v),y(i)1 t{1,2},vC,iF

Given a solution (x1,x2,y) of LP, we first make the following assumption which follows from facility splitting arguments due to Chudak and Shmoys [27] (see also [58])

Assumption 8.

t{1,2},vC,iF, xt(i,v){0,y(i)}.

We now perform a filtering step inherent to almost all LP-rounding algorithms for k-median. For our problem, as in the k-supplier problem from previous section, we get two sets of “representatives” instead of one that k-median rounding algorithms get.

Filtering.

For t{1,2} and any client vC, define Ct(v):=iFdt(i,v)xt(i,v), i.e. the cost paid by v under metric dt. Our filtering algorithm begins with all clients in an uncovered set U. We pick jU with the smallest Ct(j), and call it a representative under dt, adding it to the set 𝖱𝖾𝗉𝗌t. Every uncovered client v that is within distance 4Ct(v) of j becomes a child of j under dt, forming the set 𝖼𝗁𝗂𝗅𝖽t(j). All of 𝖼𝗁𝗂𝗅𝖽t(j) is then considered covered. We repeat this until all clients are covered. So we get 𝖱𝖾𝗉𝗌tC that is well-separated, i.e. any two distinct j,j𝖱𝖾𝗉𝗌t have dt(j,j)>4max{Ct(j),Ct(j)}. 𝖱𝖾𝗉𝗌t also induces a partition {𝖼𝗁𝗂𝗅𝖽t(j)}j𝖱𝖾𝗉𝗌t of C. The following lemma is standard (see the full version [16] for a proof), and thereafter, we focus on 𝖱𝖾𝗉𝗌1 and 𝖱𝖾𝗉𝗌2, and seek a constant-factor approximation on those clients only.

Lemma 9.

Consider SF and α1, such that t{1,2},
j𝖱𝖾𝗉𝗌t|𝖼𝗁𝗂𝗅𝖽t(j)|dt(j,S)αvCCt(v). Then aggcost(S)(4+α)𝚘𝚙𝚝.

The rounding algorithms for many k-median algorithms first round to a half-integral solution and then to integral. We follow the same route, and in particular, follow Swamy’s framework [57]. We begin with the following definitions for each t{1,2},j𝖱𝖾𝗉𝗌t; as in the previous section, we use Bt(a,r)={bFC:dt(a,b)r}. An illustrative figure for these appears in Swamy’s work [57, Figure 1].

  • Fjt:={iF:dt(i,j)=minj𝖱𝖾𝗉𝗌tdt(i,j)} (breaking ties arbitrarily)

  • Bjt:=Bt(j,2Ct(j))F. Notice that, by construction of 𝖱𝖾𝗉𝗌t, BjtFjt (also follows from Fact 10).

  • γj(t):=miniFjtdt(i,j), and Gjt:={iFjt:dt(i,j)γj(t)}.

We obtain the following a la [57] (see the full version [16] for a proof).

Fact 10.

For every t{1,2},j𝖱𝖾𝗉𝗌t, we have

  • y(Bjt):=iBjty(i)12

  • BjtGjt

  • Suppose γj(t)=dt(iγ,j), s.t. iγFt. Then iBt,dt(i,j)3γj(t).

Also note that by design the Fjt’s (and therefore the Gjt’s) are pairwise disjoint for a fixed t when we consider j𝖱𝖾𝗉𝗌t. These play the role of the “partitions” as in the k-supplier problem, and our tractability follows because we have only two t’s. Instead of finding the “largest cardinality independent set”, as we did for the k-supplier problem, we instead find a point maximizing a suitable linear function. Towards this, we describe a “linear function” that acts as a proxy for Ct(j)’s.

For fractional facility masses z[0,1]F, t{1,2}, and j𝖱𝖾𝗉𝗌t, let z(Gjt):=iGjtz(i). Then we have

Tt(z,j):=iGjtdt(i,j)z(i)+3γj(t)max{0,1z(Gjt)},and
Tt(z):=j𝖱𝖾𝗉𝗌t|𝖼𝗁𝗂𝗅𝖽t(j)|Tt(z,j).

The above definition is quite similar to Swamy’s definition which may be taken as the T=1 case, with one difference that we have the “max with 0”. When T=1, one can assert z(Gj)1 but with different t’s, it may be that z(Gj2)>1 because in metric 1 we need to open (fractionally) a lot of facilities. Nevertheless, even with the “max” function the following two lemmas similar to those in [57] hold. Their proofs are in the full version [16].

Lemma 11.

Consider z[0,1]F s.t. t{1,2},j𝖱𝖾𝗉𝗌t, z(Bjt)12. Then j’s assignment cost under dt is at most Tt(z,j). That is, for every t{1,2},j𝖱𝖾𝗉𝗌t, we can assign variables {0xt(i,j)z(i)}iF so that iFdt(i,j)xt(i,j)Tt(z,j).

Lemma 12.

For each t{1,2}, and each j𝖱𝖾𝗉𝗌t, Tt(y,j)3Ct(j).

Rounding to Half-integral Solution.

We are now ready to describe the algorithm which is encapsulated in the following lemma.

Lemma 13.

There is a polynomial time algorithm that yields a half-integral solution (x^1,x^2,y^) of LP s.t. t{1,2}, j𝖱𝖾𝗉𝗌t|𝖼𝗁𝗂𝗅𝖽t(j)|iFdt(i,j)x^t(i,j)6vCCt(v).

Our goal now becomes to find a half-integral y^{0,12,1}F so that, for each t{1,2}, Tt(y^)6vCCt(v). If we are able to do so, then by Lemma 11 we would be done. To find such a half-intergral solution, we define the following polytope and linearization of Tt’s. The polytope 𝒫 has variables (z,λ1,λ2)0F𝖱𝖾𝗉𝗌1𝖱𝖾𝗉𝗌2. The auxiliary λt variables serve to linearize the max terms in the Tt(z)’s, as the constraints in 𝒫 ensure that λt(j)max{0,1z(Gjt)}.

𝒫:={(z,λ1,λ2)0F𝖱𝖾𝗉𝗌1𝖱𝖾𝗉𝗌2: z(F)k;t{1,2},j𝖱𝖾𝗉𝗌t,
z(Bjt)12,z(Gjt)+λt(j)1}

The following follows from the presence of only “two partitions” plus noting the λ’s don’t bother much since they are identity.

Claim 14.

𝒫 has half-integral extreme points.

Proof.

Consider the constraint matrix M of 𝒫. Since the constant terms in the constraints are half-integral, it suffices [40] to show that M is totally unimodular (TU). Indeed, M looks [AI] where we have the A-matrix corresponding to the z-variables, and the I corresponding to the λt-variables. The dimension of I is |𝖱𝖾𝗉𝗌1|+|𝖱𝖾𝗉𝗌2|. The matrix A is the incidence matrix of two laminar systems – in fact, it is two partitions coarsened by the universe. Such a system is TU [57]. A TU matrix padded with columns with at most one 1 in them remains TU. Over 𝒫, we can then consider the minimization of the following linearization of the Tt(z)’s: t{1,2},j𝖱𝖾𝗉𝗌t: Wt(z,λt,j):=iGjtdt(i,j)z(i)+3γj(t)λt(j), and

Wt(z,λt):=j𝖱𝖾𝗉𝗌t|𝖼𝗁𝗂𝗅𝖽t(j)|Wt(z,λt,j).

The following claim encapsulates that we can find an extreme point of (any polytope) 𝒫 which is a 2-approximation to both Wt’s simultaneously in a sense made clear below. This allows us to get the desired y^ (as we explain better in the proof of Lemma 13).

Claim 15.

Consider a polytope 𝒫0m, linear functions W1,W2:0m0, and a point p𝒫. There is a polynomial time algorithm which returns an extreme point p^ of 𝒫 such that Wt(p^)2Wt(p) for t{1,2}.

Proof.

By Carathéodory’s theorem [15, 56], we can write p as a linear combination of at most (m+1) extreme points of 𝒫. More precisely, we can find, in polynomial time, a subset of extreme points such that ||m+1 and p=qμqq for some μq’s which form a probability distribution Dp. We claim that one of the q is the desired point, and we can find which one by enumeration. To see why, observe that for t{1,2}, 𝔼p^Dp[Wt(p^)]=Wt(p), and so by Markov, Prp^Dp[Wt(p^)>2Wt(p)]<12. So, by union bound Prp^Dp[t{1,2}:Wt(p^)>2Wt(p)]<1 implying Prp^Dp[Wt(p^)2Wt(p),t{1,2}]>0 which proves the above claim.

Proof of Lemma 13.

Given our initial solution (x1,x2,y) of LP, set variables λt(j):=max{0,1y(Gjt)} for each t{1,2}, j𝖱𝖾𝗉𝗌t. By Fact 10, this gives us (y,λ1,λ2)𝒫. So by Claim 14 and Claim 15, we can obtain a half-integral (y^,λ^1,λ^2)𝒫 such that W1(y^,λ^1)2W1(y,λ1), and W2(y^,λ^2)2W2(y,λ2). So by Lemma 11, for each t{1,2} we can construct x^t’s such that,

j𝖱𝖾𝗉𝗌t|𝖼𝗁𝗂𝗅𝖽t(j)|iFdt(i,j)x^t(i,j) Tt(y^)Wt(y^,λ^t)2Wt(y,λt)

where the penultimate step follows from the constraints in 𝒫. By our construction of the starting λt’s, i.e. the constraints enforcing λt(j)max{0,1z(Gjt)}, Wt(y,λt)=Tt(y). So we have, by Lemma 12, that the above can be upper bounded by 6j𝖱𝖾𝗉𝗌t|𝖼𝗁𝗂𝗅𝖽t(j)|Ct(j)6vCCt(v).

Rounding to Integral solution.

We round (x^1,x^2,y^) to an integral solution, losing a constant factor, and this is very similar to the ideas in [23, 57]; here also we follow the latter’s framework. We sketch the main ideas here and defer the details to the full version [16].

The first step is another filtering step. For t{1,2} and j𝖱𝖾𝗉𝗌t, define Sjt:={iF:x^t(i,j)>0} and let C^t(j):=iFx^t(i,j)dt(i,j); note that j𝖱𝖾𝗉𝗌t|𝖼𝗁𝗂𝗅𝖽t(j)|C^t(j)6vCCt(v). Now we define a subset of “super-representatives”: we pick 𝖱𝖾𝗉𝗌t with smallest C^t() and add it to 𝖲𝗎𝗉𝖾𝗋t removing every j with SjtSt from consideration. In the end, we have Sjt’s pairwise disjoint for 𝖲𝗎𝗉𝖾𝗋t’s and each j𝖱𝖾𝗉𝗌t shares a facility with a super-representative in 𝖲𝗎𝗉𝖾𝗋t.

Next, as in the rounding to the half-integral case, we define a particular linear function which works as a proxy for C^t(j). To define this proxy, for every j𝖱𝖾𝗉𝗌t call the two facilities in Sjt primary and secondary in ascending order of distance (duplicating facilities if needed). For t{1,2} and j𝖱𝖾𝗉𝗌t, let 𝖲𝗎𝗉𝖾𝗋t be the super-representative which j shares a facility with, and define

At(z,j):={iStdt(i,j)z(i)if 𝗉𝗋𝗂𝗆t(j)StiStdt(i,j)z(i)+(dt(𝗉𝗋𝗂𝗆t(j),j)dt(𝗌𝖾𝖼t(j),j))z(𝗉𝗋𝗂𝗆t(j))otherwise

It’s instructive to think of all z(i)’s as 1/2; in that case At(z,j) is either the average of j’s distance to ’s facilities when j’s closest facility is shared with , or it is the average of j’s distance to it closest facility and distance to the other facility that goes to whom j doesn’t share. The importance of the above function is captured in a couple of observations: (A) for any t and any j𝖱𝖾𝗉𝗌t, we can upper bound At(y^,j)2C^t(j), that is, At(y^,j) isn’t too bad a proxy, and perhaps more usefully (B) given any z such that z(St)=1 for all super representatives, we can find an assignment of any j𝖱𝖾𝗉𝗌t to facilities with connection cost At(z,j). These two facts, and the fact that we can minimize linear functions over the intersection of two partition matroids (defined by the St’s for t{1,2} and 𝖲𝗎𝗉𝖾𝗋t), gives us an O(1)-approximation. This is because the relevant polytope has integral extreme points (see the full version [16] for a proof). Observation (A) holds because we can charge j’s journey to ’s “other facility” to ’s connection cost which is smaller than j’s cost by design; this uses half-intergrality. The details are in the full version [16]. Observation (B) is immediate if 𝗉𝗋𝗂𝗆t(j)St or if z(𝗉𝗋𝗂𝗆t(j))=0; otherwise, if z(𝗉𝗋𝗂𝗆t(j))=1 then j will travel to its closest facility while At(z,j) will be average of two number which are larger than the minimum. The statement is in fact true for fractional z’s as well and the proof is in the full version [16].

All in all, we get the following theorem; the factor 28 could definitely be improved, but perhaps no better than 8 using these methods.

Theorem 16.

When T=2, there is a polynomial time 28-approximation algorithm for sum-aggregate k-median.

 Remark 17 (Generalizing to arbitrary norm aggregators).

In the above proof, we note that the solution S we return has the property that cost(dt;S)28jCCt(j), for t{1,2}. This allows us to generalize the above theorem for any aggregator Ψ which is a norm. Instead of a linear program, we would have a convex program. More precisely, we have variables C1,C2 where Ct:=jCCt(j) and the objective would minimize Ψ(C1,C2). By the property of our rounding and the homogeneity of Ψ, we would get that Ψ(cost(d1;S),cost(d2;S))28Ψ(C1,C2)28𝚘𝚙𝚝.

 Remark 18 (Generalizing (k,z)-clustering).

The above theorem focused on the k-median problem. However, the same methodology also gives an O(1)-approximation for the Ψ-aggregated (k,z)-clustering problem due to the fact that we only use triangle inequalities over “bounded number of hops”. This is a folklore observation (see, for instance, Footnote 1 in [21]). To obtain this, first we replace dt(i,j) with dt(i,j)z in the linear/convex program. Next, we use the “relaxed triangle inequality”, which follows from Lemma A.1 in [51], that says if we have r+1 points a1,,ar+1, then d(a1,ar+1)zrz1i=1rd(ai,ai+1)z. In our proof above, we never invoke the triangle inequality on more than 4 points, and thus, everything goes through with a “hit” of 3z1. Note, though, that the definition of the proxy function Tt(z,j) would have 3 replaced by 3z. In the end, we would get a O(1)z approximation to the sum of the zth powers, and since we take the zth root, this gives a O(1)-approximation.

4 FPT(𝒌,𝑻) constant factor approximation

Theorem 19.

For any homogenous aggregator Ψ, any z{}, and any constant error parameter ε>0, there is an algorithm that computes a (3+ε)-approximate solution to Ψ-aggregate (k,z)-clustering in time O(ε1k)O(kT)2O(k2T2)poly(n).

Proof.

We adapt an existing FPT 3-approximation [30, Section 2.1] for standard (k,z)-clustering (i.e. T=1). Fix an error parameter ε>0. In our aggregate cluster instance, let C denote the client set and let F denote the facilities. For each scenario t[T] (defined by a metric dt and a client weights wt), we first compute a coreset CtC of size O(ε2klogn) [35]; that is, obtain a new client set Ct and new weights wt on Ct with the property that for any subset of facilities SF,

uCtwt(u)dt(u,S)(1±ε)vCwt(v)dt(v,S).

Henceforth we work with the coresets Ct rather than the entire client set C in each metric.

Let 𝙾𝙿𝚃F be the optimal solution to the aggregate clustering instance, with (unknown) centers o1,,ok. For an i[k] and t[T], let Ci,t be the cluster served by oi under dt. Define the client i,t to be the closest client (in the coreset Ct) to oi, that is dt(oi,Ci,t)=dt(oi,i,t), and define ri,tdt(oi,i,t).

For each scenario t[T] and index i[k], we can guess (by enumeration) the client i,t in time (O(ε2klogn)k). We can’t guess ri,t exactly, but we can guess it up to the closest power of (1+ε): we assume WLOG (up to a 1+ε loss in the approximation factor) that the aspect ratio of dt is poly(n), and so bucketing pairwise distances of dt by powers of (1+ε) reduces the number of possible distances to O(log1+εn)=O(ε1logn). Overall, in time ((O(ε2klogn)k)O(ε1logn)k)T, we can guess each i,t and ri,t. By Fact 26, this overhead is O(ε1k)O(kT)2O(k2T2)poly(n) =Oε,k,T(1)poly(n).

Suppose our guesses are correct. For each i[k], consider the set Fi containing the facilities that are within distance rt,t of i,t in every metric dt, i.e. Fi:=t=1TBt(i,t,ri,t)F. If our guesses are correct, then Fi is non-empty since oi lies in this intersection. Let our solution 𝙰𝙻𝙶 consist of an arbitrary fiFi for each i[k]. For a client v in the cluster Ci,t, we have dt(oi,i,t)dt(v,oi) by definition of i,t; and also dt(i,t,fi)(1+O(ε))ri,t=(1+O(ε))dt(i,t,oi). Using these, we get

dt(v,𝙰𝙻𝙶) dt(v,fi)dt(v,oi)+dt(oi,i,t)+dt(i,t,fi)
dt(v,oi)+(2+O(ε))dt(oi,i,t)(3+O(ε))dt(v,oi)

for every vC and t[T]. Since the (k,z)-clustering cost and the aggregator Ψ are both homogeneous functions, this yields a (3+O(ε))-approximation. Rescaling ε by a constant yields the desired result.

In the special case of k-supplier, we have a simpler (3+ε)-algorithm that doesn’t utilize coresets, and runs in O(εO(T2))O(k)O(kT)poly(n) time. We present it in the full version [16].

5 FPT Approximations in Well-structured Metrics

5.1 Metrics with Bounded Scatter Dimension

In this section, we study aggregate clustering in the case where all the T metrics have bounded ε-scatter dimension. This notion of metric dimension was originally introduced by [1] to obtain Ok,ε(1)poly(n)-time (1+ε)-approximation algorithms (ie, efficient parameterized approximation schemes, or EPASes for short) for a large class of center-based k-clustering problems, for example the T=1 case of (k,z)-clustering.

Definition 20 (ε-scattering, ε-scatter dimension [1, Definition IV.1]).

An ε-scattering in a metric space M=(CF,d) is a sequence (x1,p1),(x2,p2),,(xl,pl) s.t.

  • i[l], xiF and piC;

  • [covering] 1j<il, d(xi,pj)1; and

  • [ε-refutation] i[l], d(xi,pi)>1+ε.

The ε-scatter dimension of a family of metric spaces is the maximum length of any ε-scatter of an M.

A key component of the (T=1) EPASes of [1] is an EPAS for the special case of unweighted k-supplier. We recall their algorithm, following their presentation. At a high level, they maintain a k-sized solution XF, and while this solution is not a (1+ε)-approximation, clients with high cost are identified to guide a recomputation of X; the bounded ε-scatter dimension is used to show a bound on the number of recomputations needed. In more detail, X is initialized arbitrarily as X={x1,,xk}. Empty buckets B1,,Bk are also initialized, corresponding to clusters that would eventually be served by x1,,xk respectively. We assume we know the cost 𝚘𝚙𝚝 of the optimal solution666We can approximate it by bucketing by powers of 1+ε and guessing over the O(ε1logn) options.. While there exists a client violating the desired (1+ε)-approximation of 𝚘𝚙𝚝 – i.e. while vC:d(v,X)>(1+ε)𝚘𝚙𝚝 – the algorithm guesses the index i[k] of the optimal cluster that serves v in 𝙾𝙿𝚃. The client v is then placed in the bucket Bi, and xi is recomputed so that uBi,d(u,xi)𝚘𝚙𝚝. If such an xi cannot be obtained, then the algorithm asserts failure and restarts from the initialization; but with positive probability 1/k we don’t fail (because with probability 1/k we guess i correctly). Now here is the key insight, that each bucket Bi can’t grow too large. Indeed, consider the sequence of requests (vi(1),,vk()) added to Bi over time, and consider the sequence of candidate locations for xi over time, (xi(1),,xi()). These two sequences form an ε-scatter (after we normalize distances so 𝚘𝚙𝚝=1). In particular, if the ε-scatter dimension of d is upper-bounded by some λ(ε), then every bucket Bi only grows to size λ(ε) until we either assert success or failure. As there there are k buckets overall, each iteration of the algorithm requires at most kλ(ε) random choices each of which is correct with probability 1/k; so with constant probability, we successfully find a solution after Oε,k(1) re-initializations.

For our aggregate clustering problem, we generalize the above. Rather than guessing a single partition of the clients into clusters served by x1,,xk, we need to guess T different partitions, one for each metric: we now have buckets Bi,t for each i[k],t[T], and we separately guess 𝚘𝚙𝚝t=cost(dt;𝙾𝙿𝚃) for each t. These metric-wise buckets allows us to mostly decouple the different metrics: when we find a violation in metric dt, i.e. get cost(dt;X)>(1+Θ(ε))𝚘𝚙𝚝t, we select a random index i[k] and add to bucket Bi,t, just as is done for the T=1 case. Only when recomputing xi do we take the other metrics into account; we choose xi to obey the constraints of all the buckets Bi,t across all t[T], that is t[T]uBi,t,dt(u,xi)𝚘𝚙𝚝t. Observe that each bucket Bi,t still has bounded size, as it provides witness of an ε-scatter in metric dt. To be precise, if one considers the sequence of requests (vi(1),,vi()) in Bi,t and the sequence of candidate positions for xi at the moment immediately before request vij was added777We remark that, unlike the T=1 case, the center xi could take on more than candidate positions, because the the position of xi could be changed due to a request in any bucket Bi,t for t[T]; nevertheless, even if xi is changed due to a different bucket Bi,t we still guarantee that xi covers requests in Bi,t, and so one can construct an ε-scatter., (xi(1),,xi()), then these sequences form an ε-scatter for dt. In particular, each iteration of the algorithm makes kTλ(ε) random choices, and so it succeeds with constant probability after Oε,k,T(1) rounds.

Theorem 21.

When all T metrics have ε-scatter dimension at most λ(ε), for any homogeneous aggregator Ψ there is an algorithm for Ψ-aggregate (unweighted) k-supplier runs in time Oε,k,T(1)poly(n), and produces a (1+ε)-approximation with constant probability.

When T=1, the k-supplier EPAS generalizes [1] to weighted k-center (by initializing with the help of a O(1)-approximation), then to weighted k-median (by a random sampling argument), and then to more general k-clustering problems. We adapt some of these ideas to the aggregate setting, and prove the following theorem in the full version [16].

Theorem 22.

When all T metrics have ε-scatter dimensions upper-bounded by some λ(ε), for any homogeneous aggregator Ψ there is an algorithm for Ψ-aggregate k-median that runs in time Oε,k,T(1)poly(n), and produces (1+ε)-approximations with constant probability.

 Remark 23 (Barrier at algorithmic scatter dimension).

The authors of [1] also consider a weaker notion of algorithmic ε-scatter dimension (where, roughly speaking, the length of ε-scatters are only bounded if the sequence of centers xi is chosen according to a certain algorithm), and their EPASes extend to metrics of bounded algorithmic scatter dimension. For example in the case of k-supplier, when recomputing the center ci for some bucket Bi, they just use the algorithm for computing the center rather than choosing xi to be an arbitrary point that covers Bi. We are aware of two follow-up works [38, 12] that build on the framework of [1], both of which apply also for algorithmic scatter dimension. In contrast, our aggregate algorithm does not extend to the more general setting; this is because we recompute xi in a way that covers all the buckets Bi,t across t[T] (and such an xi is guaranteed to exist, if we guessed the buckets correctly), whereas an algorithmic version would require that xi was chosen to simultaneously satisfy the algorithms of all T metrics (and such an xi does not necessarily exist).

5.2 Bounded-treewidth Graphs

Theorem 24.

When the base graph G has treewidth 𝗍𝗐 and the aggregator Ψ= sum, then:

  • there is an exact algorithm for sum-aggregate (k,z)-clustering that runs in time nO(T𝗍𝗐).

  • for any ε>0, there is a (1+ε)-approximation algorithm for sum-aggregate (k,z)-clustering that runs in time (lognε)O(T𝗍𝗐)poly(n)=Oε,T,𝗍𝗐(1)poly(n).

In this section we focus on the k-median case; the ideas extend naturally to (k,z)-clustering and k-supplier. We prove Theorem 24 by adapting a folklore dynamic program for solving k-median on bounded-treewidth graphs. (Recall that a tree decomposition of a graph G is a tree 𝒯 of bags, where each bag is a subset of vertices V(G), that satisfies two properties: (1) for every edge (u,v) in G, there is a bag containing both u and v, and (2) for every vertex v in V(G), the bags containing v induce a connected subtree of 𝒯. The width of the tree decomposition is 1 less than the maximum bag size, and the treewidth of a graph is the minimum width of any tree decoposition. A tree has treewidth 1.) To the best of our knowledge, the DP for k-median has not been written down explicitly in the setting of bounded treewidth graphs, but the technique is standard. Our presentation is based on a DP that appeared [6, 42, 29] as part of a PTAS for k-median in Euclidean metrics. In this section we explain the main idea of the algorithm and defer the formal details to the full version [16].

We begin by reviewing the folklore DP. Every bag B of the tree decomposition 𝒯 acts as a small separator between an “inside” piece (induced by the vertices in the subtree of 𝒯 rooted at B) and an “outside” piece (induced by all vertices outside the subtree rooted at B). For each separator, the DP guesses the interface of the optimal solution 𝙾𝙿𝚃 between the two pieces. In the case of k-median, the interface of bag B={v1,,v𝗍𝗐} consists of the distance of every vi to the closest open center in the inside (resp. outside) piece, as well as the number of centers opened in the inside (resp. outside) piece in the optimal solution. Note that there are nO(𝗍𝗐) possible interfaces for any bag, as there are O(n2) possible distances for each vi; by rounding distances to the nearest power of (1+εlogn), we could reduce the number of interfaces to (lognε)O(𝗍𝗐). The DP table contains a cell for every bag B and every possible interface of B, where the value of the cell represents the cost paid by vertices in the inside piece under the best solution that respects the interface. The value of a DP cell at bag B can be computed from the DP cells of the children of B, by taking a minimum over all combinations of children interfaces which are consistent with the interface of B (checking the consistency of interfaces can be done in a straightforward manner in polynomial time [6, 29]). The overall runtime is nO(𝗍𝗐), or (lognε)O(𝗍𝗐)poly(n) if we tolerate 1+ε approximation.

To adapt the DP to the aggregate setting, we simply change the notion of interface: rather than guessing just one interface, we guess a different interface for each of the T metrics d1,,dT. The cells of our DP table now consist of a bag B={v1,,v𝗍𝗐} and a set of T tuples; the t-th tuple consists of the distance with respect to dt of every vi to the closest (with respect to dt) open center in 𝙾𝙿𝚃 in each piece, as well as the cost paid by each piece in the dt metric under 𝙾𝙿𝚃. (Note: the reason that we need to guess a different interface for each metric is that, even though the optimal set of centers 𝙾𝙿𝚃 for the aggregate problem stays consistent throughout the T metrics, a vertex v could be served by a different center of 𝙾𝙿𝚃 in each different metric dt.) There are nO(T𝗍𝗐) possible interfaces. The DP can be computed in a bottom-up fashion, as in the non-aggregate setting, for a total runtime of nO(T𝗍𝗐). If one allows 1+ε approximation, the runtime improves to (lognε)O(T𝗍𝗐)poly(n), which is at most εO(T2𝗍𝗐2)poly(n)=Oε,T,𝗍𝗐(1)poly(n) (see Fact 26).

 Remark 25.

Observe that if 𝗍𝗐=o(lognloglogn), then Theorem 24 provides a (1+ε)-approximation algorithm in 2o(logn)Tlog(1/ε)poly(n)=Oε,T(1)poly(n) time (by Fact 26).

References

  • [1] Fateme Abbasi, Sandip Banerjee, Jarosław Byrka, Parinya Chalermsook, Ameet Gadekar, Kamyar Khodamoradi, Dániel Marx, Roohani Sharma, and Joachim Spoerhase. Parameterized approximation schemes for clustering with general norm objectives. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 1377–1399. IEEE, 2023. doi:10.1109/FOCS57990.2023.00085.
  • [2] Ittai Abraham, Daniel Delling, Amos Fiat, Andrew V Goldberg, and Renato F Werneck. Highway dimension and provably efficient shortest path algorithms. Journal of the ACM (JACM), 63(5):1–26, 2016. doi:10.1145/2985473.
  • [3] Ittai Abraham, Amos Fiat, Andrew V Goldberg, and Renato F Werneck. Highway dimension, shortest paths, and provably efficient algorithms. In Proceedings of the twenty-first annual ACM-SIAM symposium on Discrete Algorithms, pages 782–793. SIAM, 2010.
  • [4] Akanksha Agrawal, Tanmay Inamdar, Saket Saurabh, and Jie Xue. Clustering what matters: Optimal approximation for clustering with outliers. J. Artif. Int. Res., 78, 2024.
  • [5] Barbara Anthony, Vineet Goyal, Anupam Gupta, and Viswanath Nagarajan. A plant location guide for the unsure: Approximation algorithms for min-max location problems. Mathematics of Operations Research, 35(1):79–101, 2010. Preliminary version appeared in SODA 2008. doi:10.1287/MOOR.1090.0428.
  • [6] Sanjeev Arora, Prabhakar Raghavan, and Satish Rao. Approximation schemes for euclidean k-medians and related problems. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pages 106–113, 1998. doi:10.1145/276698.276718.
  • [7] Vijay Arya, Naveen Garg, Rohit Khandekar, Adam Meyerson, Kamesh Munagala, and Vinayaka Pandit. Local search heuristics for k-median and facility location problems. SIAM Journal on Computing (SICOMP), 33(3):544–562, 2004. doi:10.1137/S0097539702416402.
  • [8] MohammadHossein Bateni, Hossein Esfandiari, Hendrik Fichtenberger, Monika Henzinger, Rajesh Jayaram, Vahab Mirrokni, and Andreas Wiese. Optimal fully dynamic k-center clustering for adaptive and oblivious adversaries. In the Symposium on Discrete Algorithms (SODA), pages 2677–2727, 2023. doi:10.1137/1.9781611977554.CH101.
  • [9] Sayan Bhattacharya, Martín Costa, and Ermiya Farokhnejad. Fully dynamic k-median with near-optimal update time and recourse. In the Symposium on Theory of Computing (STOC), pages 1166–1177, 2025. doi:10.1145/3717823.3718176.
  • [10] Sayan Bhattacharya, Martín Costa, Silvio Lattanzi, and Nikos Parotsidis. Fully dynamic k-clustering in O~(k update time. Adv. in Neural Infomation Processing Systems (NeurIPS), 36:18633–18658, 2023.
  • [11] Sayan Bhattacharya, Martín Costa, Silvio Lattanzi, and Nikos Parotsidis. Fully dynamic k-center clustering made simple. In the International Conference on Machine Learning (ICML), 2025.
  • [12] Sujoy Bhore, Ameet Gadekar, and Tanmay Inamdar. Coreset strikes back: Improved parameterized approximation schemes for (constrained) k-median/means. arXiv preprint arXiv:2504.06980, 2025. doi:10.48550/arXiv.2504.06980.
  • [13] Romain Bourneuf and Marcin Pilipczuk. Bounding ε-scatter dimension via metric sparsity. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3155–3171. SIAM, 2025. doi:10.1137/1.9781611978322.101.
  • [14] Jarosław Byrka, Thomas Pensyl, Bartosz Rybicki, Aravind Srinivasan, and Khoa Trinh. An improved approximation for k-median, and positive correlation in budgeted optimization. In the Symposium on Discrete Algorithms (SODA), pages 737–756, 2014.
  • [15] Constantin Carathéodory. Über den variabilitätsbereich der fourier’schen konstanten von positiven harmonischen funktionen. Rendiconti Del Circolo Matematico di Palermo (1884-1940), 32(1):193–217, 1911.
  • [16] Deeparnab Chakrabarty, Jonathan Conroy, and Ankita Sarkar. Clustering in varying metrics, 2025. arXiv:2510.07860.
  • [17] Deeparnab Chakrabarty, Luc Cote, and Ankita Sarkar. Fault-tolerant k-supplier with outliers. In the Symposium on Theoretical Aspects of Computer Science (STACS). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.STACS.2024.23.
  • [18] Deeparnab Chakrabarty, Prachi Goyal, and Ravishankar Krishnaswamy. The Non-Uniform k-Center Problem. the ACM Transactions on Algorithms (TALG), 2020. Preliminary version in ICALP 2016. doi:10.1145/3392720.
  • [19] Deeparnab Chakrabarty and Maryam Negahbani. Generalized Center Problems with Outliers. the ACM Transactions on Algorithms (TALG), 2019. Prelim. version in ICALP 2018. doi:10.1145/3338513.
  • [20] Deeparnab Chakrabarty, Maryam Negahbani, and Ankita Sarkar. Approximation algorithms for continuous clustering and facility location problems. In European Symposium on Algorithms, 2022.
  • [21] Deeparnab Chakrabarty and Chaitanya Swamy. Approximation algorithms for minimum norm and ordered optimization problems. In the Symposium on Theory of Computing (STOC), pages 126–137, 2019. doi:10.1145/3313276.3316322.
  • [22] TH Hubert Chan, Arnaud Guerqin, and Mauro Sozio. Fully dynamic k-center clustering. In the International World Wide Web Conference, pages 579–587, 2018.
  • [23] Moses Charikar, Sudipto Guha, Éva Tardos, and David B Shmoys. A constant-factor approximation algorithm for the k-median problem. Journal of Computer and System Sciences, 65(1):129–149, 2002. Preliminary version appeared in STOC 1999. doi:10.1006/JCSS.2002.1882.
  • [24] Moses Charikar, Samir Khuller, David M Mount, and Giri Narasimhan. Algorithms for facility location problems with outliers. In the Symposium on Discrete Algorithms (SODA), volume 1, pages 642–651. Citeseer, 2001. URL: http://dl.acm.org/citation.cfm?id=365411.365555.
  • [25] Moses Charikar and Shi Li. A dependent lp-rounding approach for the k-median problem. In International Colloquium on Automata, Languages, and Programming, pages 194–205. Springer, 2012. doi:10.1007/978-3-642-31594-7_17.
  • [26] Eden Chlamtáč, Yury Makarychev, and Ali Vakilian. Approximating fair clustering with cascaded norm objectives. In the Symposium on Discrete Algorithms (SODA), 2022.
  • [27] Fabián A Chudak and David B Shmoys. Improved approximation algorithms for the uncapacitated facility location problem. Journal of the ACM (JACM), 33(1):1–25, 2003. doi:10.1137/S0097539703405754.
  • [28] Julia Chuzhoy and Zihan Tan. Towards tight (er) bounds for the excluded grid theorem. Journal of Combinatorial Theory, Series B, 146:219–265, 2021. doi:10.1016/J.JCTB.2020.09.010.
  • [29] Vincent Cohen-Addad, Andreas Emil Feldmann, and David Saulpic. Near-linear time approximation schemes for clustering in doubling metrics. Journal of the ACM (JACM), 68(6):1–34, 2021. doi:10.1145/3477541.
  • [30] Vincent Cohen-Addad, Anupam Gupta, Amit Kumar, Euiwoong Lee, and Jason Li. Tight fpt approximations for k-median and k-means. In 46th International Colloquium on Automata, Languages, and Programming (ICALP 2019), volume 132, pages 42–1. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.ICALP.2019.42.
  • [31] Vincent Cohen-Addad, Niklas Oskar D Hjuler, Nikos Parotsidis, David Saulpic, and Chris Schwiegelshohn. Fully dynamic consistent facility location. Adv. in Neural Infomation Processing Systems (NeurIPS), 32, 2019.
  • [32] Marek Cygan, Fedor V Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
  • [33] Shichuan Deng, Jian Li, and Yuval Rabani. Approximation algorithms for clustering with dynamic points. Journal of Computer and System Sciences, 130:43–70, 2022. doi:10.1016/J.JCSS.2022.07.001.
  • [34] Uriel Feige. A threshold of ln n for approximating set cover. Journal of the ACM (JACM), 45(4):634–652, 1998. doi:10.1145/285055.285059.
  • [35] Dan Feldman and Michael Langberg. A unified framework for approximating and clustering data. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pages 569–578, 2011. doi:10.1145/1993636.1993712.
  • [36] Hendrik Fichtenberger, Silvio Lattanzi, Ashkan Norouzi-Fard, and Ola Svensson. Consistent k-clustering for general metrics. In the Symposium on Discrete Algorithms (SODA), pages 2660–2678, 2021. doi:10.1137/1.9781611976465.158.
  • [37] Sebastian Forster and Antonis Skarlatos. Dynamic consistent k-center clustering with optimal recourse. In the Symposium on Discrete Algorithms (SODA), pages 212–254, 2025. doi:10.1137/1.9781611978322.7.
  • [38] Ameet Gadekar and Tanmay Inamdar. Dimension-Free Parameterized Approximation Schemes for Hybrid Clustering. In Olaf Beyersdorff, Michał Pilipczuk, Elaine Pimentel, and Nguyên Kim Thang, editors, 42nd International Symposium on Theoretical Aspects of Computer Science (STACS 2025), volume 327 of Leibniz International Proceedings in Informatics (LIPIcs), pages 35:1–35:20, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.STACS.2025.35.
  • [39] Dorit S Hochbaum and David B Shmoys. A unified approach to approximation algorithms for bottleneck problems. Journal of the ACM (JACM), 33(3):533–550, 1986. doi:10.1145/5925.5933.
  • [40] AJ Hoffman and JB Kruskal. Integral boundary points of convex polyhedra, in “linear inequalities and related systems”(hw kuhn and aw tucker, eds.). Annals of Mathematical Studies, 38, 1956.
  • [41] Kamal Jain and Vijay V. Vazirani. Approximation algorithms for metric facility location and k-median problems using the primal-dual schema and Lagrangean relaxation. Journal of the ACM (JACM), 48(2):274–296, 2001. doi:10.1145/375827.375845.
  • [42] Stavros G Kolliopoulos and Satish Rao. A nearly linear-time approximation scheme for the euclidean k-median problem. SIAM Journal on Computing, 37(3):757–782, 2007. doi:10.1137/S0097539702404055.
  • [43] Ravishankar Krishnaswamy, Shi Li, and Sai Sandeep. Constant approximation for k-median and k-means with outliers via iterative rounding. In the Symposium on Theory of Computing (STOC), pages 646–659, 2018. doi:10.1145/3188745.3188882.
  • [44] Shrinu Kushagra. Three-dimensional matching is np-hard. arXiv preprint arXiv:2003.00336, 2020. arXiv:2003.00336.
  • [45] Shrinu Kushagra, Shai Ben-David, and Ihab Ilyas. Semi-supervised clustering for de-duplication. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 1659–1667. PMLR, 2019. URL: http://proceedings.mlr.press/v89/kushagra19a.html.
  • [46] Jakub Łącki, Bernhard Haeupler, Christoph Grunau, Rajesh Jayaram, and Václav Rozhoň. Fully dynamic consistent k-center clustering. In the Symposium on Discrete Algorithms (SODA), pages 3463–3484, 2024.
  • [47] Silvio Lattanzi and Sergei Vassilvitskii. Consistent k-clustering. In the International Conference on Machine Learning (ICML), pages 1975–1984, 2017. URL: http://proceedings.mlr.press/v70/lattanzi17a.html.
  • [48] Shi Li. A 1.488 approximation algorithm for the uncapacitated facility location problem. Information and Computation, 222:45–58, 2013. doi:10.1016/J.IC.2012.01.007.
  • [49] Shi Li and Ola Svensson. Approximating k-median via pseudo-approximation. SIAM Journal on Computing (SICOMP), 45(2):530–547, 2016. doi:10.1137/130938645.
  • [50] Sepideh Mahabadi and Ali Vakilian. (Individual) Fairness for k-Clustering. In the International Conference on Machine Learning (ICML), pages 7925–7935, 2020. URL: https://dl.acm.org/doi/abs/10.5555/3524938.3525549.
  • [51] Konstantin Makarychev, Yury Makarychev, and Ilya Razenshteyn. Performance of johnson-lindenstrauss transform for k-means and k-medians clustering. In the Symposium on Theory of Computing (STOC), pages 1027–1038, 2019. doi:10.1145/3313276.3316350.
  • [52] Yury Makarychev and Ali Vakilian. Approximation algorithms for socially fair clustering. In the Conference on Learning Theory (COLT), 2021.
  • [53] Ján Plesník. A heuristic for the p-center problems in graphs. Discrete Applied Mathematics, 17(3):263–268, 1987. doi:10.1016/0166-218X(87)90029-1.
  • [54] Neil Robertson and Paul D Seymour. Graph minors. v. excluding a planar graph. Journal of Combinatorial Theory, Series B, 41(1):92–114, 1986. doi:10.1016/0095-8956(86)90030-4.
  • [55] David B Shmoys, Éva Tardos, and Karen Aardal. Approximation algorithms for facility location problems. In the Symposium on Theory of Computing (STOC), pages 265–274, 1997.
  • [56] Ernst Steinitz. Bedingt konvergente reihen und konvexe systeme. Journal für die reine und angewandte Mathematik, 1913.
  • [57] Chaitanya Swamy. Improved approximation algorithms for matroid and knapsack median problems and applications. the ACM Transactions on Algorithms (TALG), 12(4):1–22, 2016. doi:10.1145/2963170.
  • [58] Li Yan and Marek Chrobak. Lp-rounding algorithms for the fault-tolerant facility placement problem. Journal of Discrete Algorithms, 33:93–114, 2015. doi:10.1016/J.JDA.2015.03.004.
  • [59] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In the International Conference on Machine Learning (ICML), pages 928–936, 2003. URL: http://www.aaai.org/Library/ICML/2003/icml03-120.php.

Appendix A Useful facts

Fact 26.

For any f(n)=no(1) and any variable τ1, the function (f(n))τ is bounded above by Oτ(1)+n. For example, when f(n)=logn, we have (logn)τ2τ2+n.

Proof.

Let g(n)=logf(n), and note g(n)=o(logn). If τ satisfies kτlogn, then clearly f(n)τn. On the other hand, if τ>lognk, then the fact that g(n)=o(logn) implies that τ grows as a function of n, and so f(n)τ=Oτ(1).

We now give an example that provides explicit bounds for the case f(n)=logn. If τloglogn, then (logn)τ2(loglogn)2n. Otherwise, if τ>loglogn, then (logn)τ=2τloglogn2τ2.

Observation 27.

Fix an aggregator function Ψ. Suppose that one can find an α-approximation to the Ψ-aggregate k-supplier (or k-median, or (k,z)-clustering) problem on T metrics and n vertices in time f(n,T,k,α). Then one can find an α-approximation to generalized aggregate clustering, with the restriction that weights come from {0,1}, in time f(2n+1,T,k+1,α)+poly(n,T).

Proof.

Suppose we are given an instance η of {0,1}-weighted generalized aggregate k-clustering, defined by metrics d1,,dT, client set C, and facility set F. We construct an instance η of vanilla aggregate (k+1)-clustering as follows. Create a new vertex r, and let the new facility set F be FF{r}. The client set C is set to be C. We assume WLOG that C and F are disjoint: if some vertex v is both a client and facility, we duplicate v, and make one copy a client and one a facility. After this duplication, we have |FC|2|FC|+1=2n+1.

For every t[T], we construct a new distance metric dt as follows. We define the active vertices to be the set of clients with weight 1 in the t-th instance, together with the set of facilities excluding r (that is, F{r}=F). The inactive vertices are those clients with weight 0 in the t-th instance, and the facility r. For any two vertices v1,v2CF, we define

d^t(v1,v2){dt(v1,v2)if v1 and v2 are both activeif one of {v1,v2} is active and the other is inactive0if v1 and v2 are both inactive

One can compute a solution to the instance η from a solution to η. Indeed, suppose SF is a set of k+1 facilities with aggregate cost κ in η. It is straightforward to see that, if κ is finite, then facility r is included in S, and the set SS{r} has aggregate cost κ for the instance η. Moreover, if SF is any set of k facilities with aggregate cost κ in η, then the set of facilities SS{r} has aggregate cost κ in η. This proves the claim: in polynomial time one can construct η, and in time f(2n+1,T,k+1,α) one can compute an approximate solution S and return S{r}.