Incremental \((k, z)\)-Clustering on Graphs


Abstract

Given a weighted undirected graph, a number of clusters \(k\), and an exponent \(z\), the goal in the \((k, z)\)-clustering problem on graphs is to select \(k\) vertices as centers that minimize the sum of the distances raised to the power \(z\) of each vertex to its closest center. This problem includes the well-known \(k\)-median (\(z = 1)\) and \(k\)-means (\(z = 2\)) clustering problems. In the dynamic setting, the graph is subject to adversarial edge updates, and the goal is to maintain explicitly an exact \((k, z)\)-clustering solution in the induced shortest-path metric.

Prior works by Bhattacharya, Costa, Garg, Lattanzi, and Parotsidis [FOCS 2024] and by Bhattacharya, Costa, and Farokhnejad [STOC 2025] consider the dynamic \((k, z)\)-clustering problem for point sets in metric spaces. These algorithms support adversarial point insertions and deletions under a model with access to pairwise distances. This model differs significantly from the dynamic graph setting, where no oracle access is given to pairwise distances and a single edge update can affect many distances—making these approaches inefficient when applied to graphs. While efficient dynamic \(k\)-center approximation algorithms on graphs exist [Cruciani, Forster, Goranci, Nazari, and Skarlatos, SODA 2024], to the best of our knowledge, no prior work provides similar results for the dynamic \((k,z)\)-clustering problem.

As the main result of this paper, we develop a randomized incremental \((k, z)\)-clustering algorithm that maintains with high probability a constant-factor approximation in a graph undergoing edge insertions with a total update time of \(\tilde{O}(k m^{1+o(1)}+ k^{1+\frac{1}{\lambda}} m)\), where \(\lambda \geq 1\) is an arbitrary fixed constant. Our incremental algorithm also achieves an amortized update time of \(\tilde{O}(k n^{o(1)}+ k^{1+\frac{1}{\lambda}})\) and consists of two stages. In the first stage, we maintain a constant-factor bicriteria approximate solution of size \(\tilde{O}(k)\) with a total update time of \(m^{1+o(1)}\) (independent of the parameter \(k\)) over all adversarial edge insertions. This first stage is an intricate adaptation of the bicriteria approximation algorithm by Mettu and Plaxton [Machine Learning 2004] to incremental graphs. One of our key technical results is that the radii in their algorithm can be assumed to be non-decreasing while the approximation ratio remains constant—a property that may be of independent interest.

In the second stage, we maintain a constant-factor approximate \((k,z)\)-clustering solution on a dynamic weighted instance induced by the bicriteria approximate solution. For this subproblem, we employ a dynamic spanner algorithm together with a static \((k,z)\)-clustering algorithm.

1 Introduction↩︎

Clustering is a fundamental and well-studied problem in computer science with numerous applications across various domains [1][5]. Conceptually, clustering involves partitioning data points into groups such that points within the same group are more similar to each other than to those in different groups, according to some measure of similarity. Clustering algorithms optimize a given objective function, and for \(k\)-clustering problems the goal is to output a set of \(k\) representative points that minimize a \(k\)-clustering objective.

While the graph clustering toolkit for network analysis tasks (e.g., community detection) encompasses a wide range of clustering objectives suited to different scientific communities [6][9], researchers have in particular performed experimental studies with \(k\)-clustering objectives on graphs [10], [11]. It has been observed in these experiments that (a) high computational cost and (b) the sensitivity of distances to single edge updates pose a challenge when employing \(k\)-clustering in graphs [11] (see also [9]), which motivates further algorithm design in this direction.

Among the most widely studied \(k\)-clustering objectives are \(k\)-median and \(k\)-means. The \(k\)-median objective is the sum of distances from each point to its closest center, while the \(k\)-means objective is the sum of squared distances from each point to its closest center. A generalization of both is the \((k, z)\)-clustering objective, which is the sum of distances raised to the power \(z\) from each point to its closest center. Hence given a metric space \((\mathcal{X}, \operatorname{dist})\), a set of points \(P \subseteq \mathcal{X}\), and a positive integer \(k \leq |P|\), the goal in the \((k, z)\)-clustering problem is to output a subset \(S \subseteq P\) of at most \(k\) points, referred to as centers, such that the value \(\sum_{p \in P} \operatorname{dist}(p, S)^z\) is minimized. Observe that the \(k\)-median clustering problem corresponds to \(z=1\), and the \(k\)-means clustering problem corresponds to \(z=2\).

The \(k\)-median clustering problem is known to be NP-hard in arbitrary metric spaces [12]. The first approximation algorithms leveraged tree embeddings and polynomial-time algorithms for the tree setting [13], achieving an approximation ratio of \(O(\log n \log\log n)\) [14], [15]; later refined to \(O(\log k \log\log k)\) [16]. The first constant-factor approximation was established in [17] using LP rounding and was later improved to \(3 + \epsilon\) through local search [18][20]. Subsequently, approximation ratios below \(3\) were achieved [20][22], with the best-known approximation ratio currently standing at \(2+\epsilon\) [23]. Meanwhile, the best known hardness result rules out an approximation factor less than \(1+2/e \approx 1.74\) [24]. Many of the aforementioned algorithmic approaches carry over to \(k\)-means and \((k, z)\)-clustering with worse approximation factors. For the \(k\)-means clustering problem, the best known approximation ratio is \(5+\epsilon\) [25] and the best known hardness result rules out an approximation factor less than \(1+8/e \approx 3.94\) [24], [26].

1.0.0.1 Efficient \(k\)-clustering algorithms.

Fast algorithms have been proposed for the \(k\)-median clustering problem in arbitrary metric spaces with oracle access to the distances between points. Jain and Vazirani [27] developed a deterministic \(6\)-approximation algorithm that runs in \(\tilde{O}(n^2)\) time. Subsequently, Mettu and Plaxton presented another approach for obtaining a constant-factor approximation in \(\tilde{O}(n^2)\) time [28]. Later, they presented a randomized \(O(1)\)-approximation algorithm with a more efficient running time of \(\tilde{O}(nk)\) [29]. As noted by Huang and Vishnoi [30], the algorithm in [29] can be easily generalized to the \((k, z)\)-clustering problem.

1.0.0.2 Graph setting.

In the graph setting, the \((k, z)\)-clustering problem is defined as before, where the metric space is induced by the shortest-path distances in a weighted undirected graph with \(n\) vertices, \(m\) edges, and maximum edge weight \(W\). Here, no oracle access is available, and distance computations must be performed explicitly by the algorithm if needed. As a consequence, although algorithms designed for point sets can be applied in the graph setting, this approach leads to inefficient algorithms. Thorup [31] addressed this issue for the \(k\)-median clustering problem by developing a randomized \((12+o(1))\)-approximation algorithm that runs in \(\tilde{O}(m)\) time.4 As noted in [32], it seems plausible that the approach of Thorup [31] generalizes to \((k, z)\)-clustering using recent insights on the primal-dual method used as a subroutine. Very recently, alternative near-linear and almost-linear time constant-factor approximation algorithms based on a greedy approach [32] and local search [33] have been developed. It is worth noting that the fastest constant-factor approximation algorithms for Euclidean \((k, z)\)-clustering can be obtained by running the state-of-the-art graph clustering algorithms on a sparse metric spanner [34]. The graph setting has also received notable attention for the \(k\)-center clustering problem [31], [35][38].

1.0.0.3 Dynamic \(k\)-clustering algorithms.

In recent years, the rapid growth and continuous change of data have led to strong interest in developing dynamic \(k\)-clustering algorithms [39][46]. The related work most similar to ours is by Cruciani, Forster, Goranci, Nazari, and Skarlatos [43], who study the \(k\)-center clustering problem on dynamic graphs under adversarial edge updates; they achieve for example an amortized update time of \(k n^{o(1)}\) in the incremental setting. Since the shortest-path metric of a graph induces a metric space, it may seem natural to apply algorithms designed for dynamic point sets in metric spaces [39], [40], [42]. However, as noted in [43], this approach leads to inefficient algorithms as discussed in the next paragraph.

1.0.0.4 Comparison of dynamic graphs and dynamic point sets.

Let us briefly highlight the key differences and challenges between the model with dynamic graphs, which we also consider in this paper, and the model with dynamic point sets in metric spaces [39], [40], [42]. In the model with dynamic point sets, the adversarial updates are point insertions or point deletions. On the other hand, in our model with dynamic graphs, the adversarial updates are edge insertions or edge deletions. This distinction introduces two main challenges, as explained in [43]: (i) there is no oracle access to all-pairs shortest-path distances, and (ii) a single edge update can affect multiple distances simultaneously, whereas a point update does not affect distances between previously inserted points. As a result, directly applying black-box algorithms designed for dynamic point sets to dynamic graphs is very inefficient.

To the best of our knowledge, no algorithms have been developed so far for the \(k\)-median, \(k\)-means, or their generalization \((k, z)\)-clustering on graphs undergoing edge updates. For this reason, a natural question arises about the efficiency of dynamic algorithms for the \((k, z)\)-clustering problem on dynamic graphs:

Are there efficient constant-factor approximation algorithms for the \((k, z)\)-clustering problem on graphs undergoing edge updates?

1.1 Our Contributions↩︎

In this paper, we answer this question in the affirmative for the incremental setting, in which the weighted undirected graph undergoes adversarial edge insertions. We believe that the incremental setting is particularly interesting and well-motivated from a practical point of view, as there exist inherently incremental graphs in practice. For example, real-world graphs such as co-authorship networks are incremental, since the fact that two scientists have co-authored a research paper (almost) never changes over time.

Throughout the paper, we assume an oblivious adversary for our randomized results. An oblivious adversary fixes the entire sequence of updates before the algorithm begins. Namely, the adversary cannot adapt the edge updates based on the (randomized) outputs of the algorithm during the execution. Our central result is a highly efficient incremental algorithm—independent of the parameter \(k\)—that maintains a constant-factor bicriteria approximate solution of size \(\tilde{O}(k)\) (see 3), which is optimal up to polylogarithmic factors for the \((k,z)\)-clustering problem.

theoremincralg There is a randomized incremental algorithm for the \((k, z)\)-clustering problem that, given a weighted undirected graph \(G = (V, E, w)\) with maximum edge weight \(W\) subject to edge insertions, an integer \(k \geq 1\), and constants \(z \geq 1, \epsilon \in (0, 1)\), maintains with high probability:

  • a \((O(1), O(\log^3 n \, \log_{1+\epsilon}nW))\)-bicriteria approximate solution and

  • a \((O(1), O(\log^3 n \, \log_{1+\epsilon}nW))\)-bicriteria approximate assignment,

and with high probability has an amortized update time of \(\tilde{O} (n^{o(1)})\).

For clarity of presentation, in [thm:incr95alg] we hide the dependence on \(z\) in the approximation ratio—which is \(O((1+\epsilon)^{2z})\)—and the dependence on \(\epsilon\) and \(W\) in the update time. By combining [thm:incr95alg] with our incremental reduction algorithm (in [thm:bicr95to95kzclustering]), we obtain our main result.

theoremmainthmkzclust There is a randomized incremental algorithm for the \((k,z)\)-clustering problem that, given a weighted undirected graph \(G=(V,E,w)\) subject to edge insertions, an integer \(k \geq 1\), and constants \(z \geq 1, \lambda \geq 1\), maintains with high probability an \(O(1)\)-approximate \((k,z)\)-clustering solution with a total update time of \(\tilde{O}(k m^{1+o(1)}+ k^{1+\frac{1}{\lambda}} m)\) and an amortized update time of \(\tilde{O}(k n^{o(1)}+ k^{1+\frac{1}{\lambda}})\).

For clarity of presentation, in [thm:mainthm95kzcluster] (our incremental algorithm) we hide the dependence on \(W\) inside the notation \(\tilde{O}(\cdot)\), which we use to suppress polylogarithmic factors in \(nW\). The hidden dependence on \(\lambda\) in the \(O(1)\)-approximation ratio is \(O(\lambda^{6z})\).

1.1.0.1 Comparison between \((k, z)\)-clustering and \(k\)-center.

Let us make a few remarks about our results in comparison with the results in [43], which studies the \(k\)-center objective. In the work by Cruciani, Forster, Goranci, Nazari, and Skarlatos [43], the most challenging setting was the incremental one; the decremental setting naturally follows from the connection between the maximal independent set problem and the \(k\)-center clustering problem. Moreover, the fully dynamic setting follows from a reduction to fully dynamic approximate SSSP that “simulates” a run of a static algorithm after each adversarial edge update. The latter approach would also work for fully dynamic \((k, z)\)-clustering, but because of the larger constants in the approximation ratio would not be competitive with the naive approach of recomputing from scratch on a dynamic spanner after each adversarial edge update.

In the incremental setting, the approach of [43] is also to first maintain a bicriteria approximate solution and then construct a \(k\)-center solution on top of it. Our update time guarantee in [thm:incr95alg] matches theirs (for bicriteria approximation), and the total update times match the static runtime up to subpolynomial factors. Their second step, which converts the bicriteria approximate solution into a \(k\)-center solution, exploits a fast dynamic maximal independent set algorithm [47], [48] as a black box. In contrast, for the \((k, z)\)-clustering problem we need to take additional steps using a dynamic spanner algorithm.

1.2 Structure of the Paper↩︎

We provide a technical overview in 2, followed by basic preliminaries in 3. In 4, we present a static version of the bicriteria approximation which helps introduce the ideas behind the incremental version in Section 5. In particular, it shows that the order of the radii can be made non-decreasing without affecting the approximation ratio by more than a constant factor. In 6, we combine our incremental bicriteria approximation algorithm with our incremental reduction algorithm to address the \((k, z)\)-clustering problem on incremental graphs.

2 Technical Overview↩︎

In the following, we give a brief overview of our main technical contributions for the incremental setting, where the input graph \(G = (V, E, w)\) undergoes edge insertions sent by the adversary. The goal is to develop an efficient incremental constant-factor approximation algorithm for the \((k, z)\)-clustering problem on graphs. Our incremental \((k, z)\)-clustering algorithm consists of two subroutines. The first subroutine described in 5, is an incremental \((O(1), O(\log^3 n \, \log_{1+\epsilon}nW))\)-bicriteria approximation algorithm for the \((k, z)\)-clustering problem on graphs. The second subroutine described in 6, efficiently converts the previous bicriteria approximate solution into a constant-factor approximate \((k, z)\)-clustering solution after every adversarial edge insertion.

2.1 Basis of Our Incremental Bicriteria Approximation Algorithm↩︎

The basis of our incremental \((O(1), O(\log^3 n \log_{1+\epsilon} nW))\)-bicriteria approximation algorithm for the \((k, z)\)-clustering problem is the static \((O(1), O(\log^2 n))\)-bicriteria approximation algorithm by Mettu and Plaxton [29], henceforth referred to as the MP-bi algorithm. A high-level overview of the static MP-bi algorithm is presented in the next paragraph.

2.1.0.1 MP-bi algorithm.

Let \(U_0 = V\) be the whole vertex set. The MP-bi algorithm performs at most \(t \mathrel{\vcenter{:}}= O(\log \frac{n}{k})\) iterations, where at the \(i\)-th iteration:

  1. A candidate set \(S_i\) is constructed by sampling a small subset of \(U_i\), where \(|S_i| = \tilde{O}(k)\).

  2. The smallest radius \(\nu_i\) is computed such that the ball \(B_i\) of radius \(\nu_i\) around \(S_i\) contains a constant fraction \(\beta\) of vertices from \(U_i\) (i.e., \(|B_i \cap U_i| \geq \beta |U_i|\)).

  3. The ball \(B_i\) is removed from \(U_i\), and the MP-bi algorithm recurses on the remaining vertices \(U_{i+1} \coloneq U_i \setminus B_i\).

In the incremental setting, the adversary inserts new edges into the graph; our aim is to design an incremental version of the MP-bi algorithm under adversarial edge insertions. We refer to the \(i\)-th iteration of the MP-bi algorithm as the \(i\)-th level. Thus, our goal is to incrementally maintain the data structures of the MP-bi algorithm at each level \(i\).

2.1.1 Challenges in the Incremental Setting↩︎

The central step of the MP-bi algorithm is its second step, where the smallest radius \(\nu_i\) is computed. Under edge insertions the distances are non-increasing, and so for a fixed radius \(\nu_i\), the ball \(B_i\) can only “receive” new vertices. In this case, whenever a ball \(B_i\) contains more than a \(\beta\) fraction of vertices from \(U_i\), the radius \(\nu_i\) should be decreased accordingly. The core issue however, is that the subsequent set \(U_{i+1}\) of remaining vertices can change in a fully dynamic manner, as follows:

  • Vertices and edges can be removed from the set \(U_{i+1}\) by entering the ball at a previous level. This occurs when a newly inserted adversarial edge decreases the distance between the candidate set \(S_j\) and a vertex in \(U_{i+1}\) to at most \(\nu_j\), for some previous level \(j < i + 1\).

  • Vertices and edges can be added to the set \(U_{i+1}\) by leaving the ball at a previous level. This occurs when the radius \(\nu_j\) is decreased accordingly because many vertices enter the ball \(B_j\) due to a newly inserted adversarial edge, for some previous level \(j < i+1\).

As a consequence, the current candidate set \(S_{i+1}\) which was sampled from the old set \(U_{i+1}^\text{(old)}\), may no longer be a good representative in the new set \(U_{i+1}\). For this reason, a new candidate set \(S_{i+1}\) should be sampled from the modified set \(U_{i+1}\), and the new radius \(\nu_{i+1}\) should be computed. In other words, the first two steps of the MP-bi algorithm should be repeated at level \(i+1\). The second step of the MP-bi algorithm in the incremental setting can be implemented straightforwardly by maintaining the ball \(B_j\) and the radius \(\nu_j\) at each level \(j\), as follows:

  • either by using a fully dynamic SSSP (single-source shortest paths) algorithm with a super-source attached to the candidate set \(S_j\),

  • or by restarting an incremental SSSP algorithm with a super-source attached to the candidate set \(S_j\), whenever the set \(U_j\) is modified.

The first option of employing a fully dynamic SSSP algorithm has a prohibitive update time. The second option of employing an incremental SSSP algorithm depends on the total number of times any set \(U_j\) is modified, which is naively proportional to the number of distinct sequences of the radii \(\nu_j\). Therefore, we can infer that the total update time of the second option depends on the number of distinct sequences of the radii \(\nu_j\).

2.1.1.1 Number of distinct sequences of the radii.

Even when the radii are powers of \((1+\epsilon)\) and the number of levels \(t\) is \(O(\log n)\), the number of distinct sequences of the radii \(\nu_j\) is naively at least: \[\Omega\left( \min\left( \left(\log_{1+\epsilon} nW\right)^{\log n},\, m \right) \right),\] where \(W\) is the maximum weight of an edge, and thus \(nW\) is the maximum possible distance between two vertices in the graph. The first term is because the new radius \(\nu_j\) may differ arbitrarily from the old radius \(\nu^\text{(old)}_j\) at level \(j\), after repeating the second step of the MP-bi algorithm. The second term is because the sequence of the radii could change after each adversarial edge insertion.

For the second straightforward option, an incremental SSSP algorithm is restarted at most \(t = O(\log n)\) times (for the \(t\) sets \(U_j\)) per distinct sequence of the radii. As a result, the total update time required for the second straightforward option is at least: \[\Omega\left( \min\left( \left(\log_{1+\epsilon} nW\right)^{\log n},\, m \right) \right) \cdot \log n \cdot \text{ the running time of an SSSP algorithm.}\] In other words, the total update time required for the second straightforward option is at least \(\Omega(m \cdot (\log_{1+\epsilon} nW)^{\log n})\), which is excessively high.

2.2 Incremental Bicriteria Approximation Algorithm↩︎

In principle our approach follows the second option, which is to restart an incremental SSSP algorithm as many times as the number of distinct sequences of the radii \(\nu_i\). However, to overcome the issue of exponentially many distinct sequences of \(\nu_i\) while ensuring constant-factor approximation, we introduce a refined and elegant solution for managing the radii \(\nu_i\). Our solution is a variant of the MP-bi algorithm and relies on two properties that are enforced on the radii.

The first property which is referred to as the non-increasing property, is that the value of each radius is non-increasing over time (i.e., the value of a specific \(\nu_i\) either decreases or remains the same). By the non-increasing property, along with the facts that each radius is a power of \((1+\epsilon)\) and that \(t = O(\log n)\), we argue that there are at most \(O\left(\log_{1+\epsilon} nW \cdot \log n\right)\) distinct sequences of radii. In turn, the update time becomes: \[O\left(\log_{1+\epsilon} nW \cdot \log n\right) \cdot \log n \cdot \text{ the update time of an incremental SSSP algorithm.}\]

Nonetheless, since the non-increasing property is enforced, there is no guarantee on the approximation ratio. In particular, simultaneously enforcing the non-increasing property and maintaining \(t = O(\log n)\) levels may lead to decisions that do not guarantee a constant-factor approximation. To that end, in order to maintain a constant-factor approximation, we establish the following crucial structural property of the MP-bi algorithm:

The order of the values of the radii \(\nu_i\) can be enforced to be non-decreasing (i.e., \(\nu_0 \leq \nu_1 \leq \cdots \leq \nu_t\)) without affecting the approximation ratio by more than a constant factor.

We refer to this second property as the monotonicity property of the radii. Using the monotonicity property, along with the fact that the distances are non-increasing in the incremental setting (under adversarial edge insertions), we show that the approximation ratio is constant. As a warm-up, we introduce the monotonicity property also in the static setting. Our static MP-bi variant enforces the monotonicity property from level \(0\) up to level \(t\), as follows:

  1. If \(\nu_i \geq \nu_{i-1}\), then our MP-bi variant retains the radius \(\nu_i\).

  2. If \(\nu_i < \nu_{i-1}\), then our MP-bi variant replaces the value of the radius \(\nu_i\) with the (updated) value of the radius \(\nu_{i-1}\) from the previous level.

Notably, we prove that this modification preserves the constant-factor approximation of the MP-bi algorithm. Therefore, the core idea of our approach is to enforce the non-increasing property to achieve efficient update time, while relying on the monotonicity property to guarantee a constant-factor approximation.

2.2.1 Combining Non-Increasing and Monotonicity Properties in the Incremental Setting↩︎

In the incremental setting, we demonstrate how both the non-increasing and monotonicity properties can be enforced simultaneously, and how the monotonicity property can be leveraged to argue about the approximation ratio. Let \(\nu_i^\text{(old)}\) be the old radius at level \(i\), and \(\nu_i\) be the new radius at level \(i\) maintained by the incremental algorithm after an adversarial edge insertion.

Consider the set \(U_i\) at level \(i\), and note that after an adversarial edge insertion some vertices may move closer to the corresponding candidate set \(S_i\). In other words, the ball \(B_i\) may receive new vertices, causing \(|B_i \cap U_i|\) to exceed \(\beta |U_i|\) and the radius \(\nu_i\) to be decreased accordingly (i.e., \(\nu_i < \nu_i^\text{(old)}\)). Consider a vertex \(v \in U_i\) that is within a distance of \(\nu^\text{(old)}_i\) from the candidate set \(S_i\). Since under edge insertions the distances are non-increasing, the distance between \(v\) and \(S_i\) remains at most \(\nu_i^\text{(old)}\). However, it is possible that the distance between \(v\) and \(S_i\) is greater than the new radius \(\nu_i\), which implies that the vertex \(v\) does not belong to the ball \(B_i\) anymore. In this case, we add such a vertex \(v\) in a set \(Z\), which we call the leaking set. Specifically, the leaking set \(Z\) contains all vertices that have exited a ball from a previous level and have leaked to a subsequent level.

Since the set \(U_{i+1}\) may be modified, we repeat the first two steps of the MP-bi algorithm at level \(i + 1\): we resample a fresh candidate set \(\tilde{S}_{i+1}\), add it to the old candidate set \(S_{i+1}\), and compute a suggested radius \(\tilde{\nu}_{i+1}\) based on the second step of the MP-bi algorithm. The difference between our incremental algorithm and the straightforward option lies in the fact that the new radius \(\nu_{i+1}\) is updated according to our MP-bi variant, while enforcing both the non-increasing and monotonicity properties:

  1. If \(\tilde{\nu}_{i+1} \geq \nu_{i+1}^\text{(old)}\), then our incremental algorithm ignores the suggested radius \(\tilde{\nu}_{i+1}\) and retains the old radius \(\nu_{i+1}^\text{(old)}\) (i.e., \(\nu_{i+1} = \nu_{i+1}^\text{(old)})\).

  2. Else if \(\tilde{\nu}_{i+1} < \nu_i\), then our incremental algorithm sets the new radius \(\nu_{i+1}\) to the current radius \(\nu_i\) of the previous level.

  3. Otherwise, our incremental algorithm sets the new radius \(\nu_{i+1}\) to the suggested radius \(\tilde{\nu}_{i+1}\).

The first condition enforces the non-increasing property, while the first and second conditions enforce the monotonicity property. As a consequence of the non-increasing property, the number of distinct sequences of the radii \(\nu_j\) is reduced to \(O(\log n \cdot \log_{1+\epsilon} nW)\). Although we prove that the monotonicity property preserves the constant-factor approximation of the MP-bi algorithm in both the static and incremental settings, in the incremental setting we must also handle the leaking set, which poses an additional challenge. Recall that the leaking set contains vertices that have exited a ball at a previous level and have leaked into a subsequent level.

2.2.1.1 Role of the leaking set.

Since the non-increasing property is enforced for efficiency reasons, in order to identify a \(\beta\) fraction of vertices from \(U_{i+1}\) (as dictated by the second step of the MP-bi algorithm), we may need to use some vertices from the leaking set \(Z\). In the analysis, we prove that a suitable subset of the leaking set \(Z\) exists. Finding a ball \(B_{i+1}\) containing a constant fraction \(\beta\) of vertices from \(U_{i+1}\) (second step of the MP-bi algorithm), and removing \(B_{i+1}\) from \(U_{i+1}\) (third step of the MP-bi algorithm) is important for maintaining at most \(t = O(\log n)\) levels.

To appropriately provide an upper bound on the assigned cost of leaked vertices, we leverage the monotonicity property, as described in the next paragraph. The monotonicity property acts as a glue, ensuring both the non-increasing property (i.e., efficiency) and the constant-factor approximation are maintained.

2.2.1.2 Assigned cost of the leaking set.

Roughly speaking, subsets of the leaking set \(Z\) are distributed among the sets \(U_i\) for which the corresponding suggested radius \(\tilde{\nu}_i\) is greater than the current radius \(\nu_i^\text{(old)}= \nu_i\). For a fixed vertex \(v \in U_i\) that belongs to the leaking set \(Z\), there is a crucial structural observation to be made: The vertex \(v\) must have entered the set \(U_i\) from a previous level \(j \leq i\). Thus, the vertex \(v\) is within a distance of at most \(\nu_j^\text{(old)}\) from the candidate set \(S_j\). Observe also that the vertex \(v\) may be far from the candidate set \(S_i\). Since under edge insertions the distance between \(v\) and \(S_j\) remains at most \(\nu_j^\text{(old)}\) and \(\nu_j^\text{(old)}\leq \nu^\text{(old)}_i = \nu_i\) by the monotonicity property, we can charge for the vertex \(v\) a cost of \(\nu_i\).

Therefore using the monotonicity property, we can argue that each relevant vertex of any set \(U_i\) can be charged a cost of \(\nu_i\). This in turn helps us to upper bound the approximation ratio of our incremental algorithm, while ensuring that the value of the last level \(t\) remains \(O(\log n)\) throughout the algorithm.

2.3 Maintaining \((k, z)\)-Clustering on Bicriteria Approximate Solution↩︎

So far, we have described how our incremental algorithm maintains a constant-factor bicriteria approximate solution \(S \subseteq V\) of size \(\tilde{O}(k)\). The bicriteria approximate solution \(S\) induces a dynamic \((1 + \epsilon)\)-metric space \((P, \operatorname{d})\)5 by maintaining incremental \((1+\epsilon)\)-approximate SSSP algorithms for each vertex in \(S\) (i.e., for each node in \(P = S\)). We “dynamize” a known argument to show that the optimal \((k, z)\)-clustering solution on the \((1 + \epsilon)\)-metric space \((P, \operatorname{d})\), with appropriate weights on the nodes in \(P\), is an \(O(1)\)-approximation to the optimal \((k, z)\)-clustering solution on the graph \(G\) (see 27).

Over the course of the adversarial edge insertions to the incremental graph \(G\), both the set \(P\) and the weights of nodes in \(P\) change at most \(\tilde{O}(1)\) times. The set \(P\) can change because the bicriteria approximate solution \(S\) may receive at most \(\tilde{O}(k)\) new vertices due to an adversarial edge insertion into \(G\). We emphasize that, for the efficiency of all the subroutines of our incremental \((k, z)\)-clustering algorithm, it is important that the total number of vertices that ever belong to \(S\) (and in turn in \(P\)) is at most \(\tilde{O}(k)\). Additionally, the distance between any pair of nodes in \(P\) may decrease at most \(\tilde{O}(1)\) times, resulting in a total of \(\tilde{O}(k^2)\) distance decreases.

The straightforward approach for maintaining an approximate \((k, z)\)-clustering on \((P, \operatorname{d})\) would be to recompute it from scratch in time \(\tilde{O}(|P| k) = \tilde{O}(k^2)\) after every change to the set \(P\) or to the distance function \(\operatorname{d}\). This straightforward approach would result in a total update time of \(\tilde{O} (k m^{1+o(1)} + k^4)\) for our overall incremental \((k, z)\)-clustering algorithm, which implies an amortized update time of \(k n^{o(1)}\) for any \(k \leq m^{1/3 + o(1)}\). To obtain an update time close to \(k\) for the full parameter range, we instead employ an approach involving a dynamic spanner algorithm. At a high level, since we achieve vertex sparsification via the bicriteria approximate solution \(S\), we exploit it further by performing edge sparsification on top of the vertex-sparsified graph \(H = (P, P \times P)\) whose edges are weighted by approximate distances in \(G\).

2.3.0.1 Our approach.

In more detail, we view \((P, \operatorname{d})\) as a complete graph \(H\) with \(\tilde{O}(k^2)\) edges, where the weight of an edge \((x, y)\) in \(H\) corresponds to the approximate distance between \(x\) and \(y\) in \(G\). We further bin the edges of \(H\) into weight classes and maintain a fully dynamic \(O(\lambda)\)-spanner of size \(\tilde{O} (k^{1+1/\lambda})\) on the edges of each weight class [49]. The union \(\tilde{H}\) of these spanners is a \(O (\lambda)\)-spanner for \(H\) of size \(\tilde{O} (k^{1+1/\lambda})\); that is, \(\tilde{H}\) is a subgraph of \(H\) (in terms of edges) in which the distance between every pair of vertices in \(H\) is preserved up to a multiplicative factor of \(O(\lambda)\). This dynamic spanner algorithm [49] can deal with adversarial edge updates in polylogarithmic time per update.

Since the changes to the vertex set of \(H\) (and of \(\tilde{H}\)) occur only in \(\tilde{O}(1)\) many batches, we can restrict the dynamic spanner algorithm to adversarial edge insertions by simply restarting it after every batch of vertex insertions. Since distances in \(G\) are non-increasing, each edge appears at most once in each weight class in between restarts and thus the total update time for maintaining the spanner \(\tilde{H}\) is \(\tilde{O} (k^2)\). As the final step of handling each of the \(m\) adversarial edge insertions to \(G\), we compute a \((k, z)\)-clustering solution on \(\tilde{H}\) in time \(\tilde{O} (k^{1+1/\lambda})\) from scratch using one of the state-of-the-art static \((k, z)\)-clustering algorithms [31][33]. Overall, all these steps result in an incremental constant-factor approximation \((k, z)\)-clustering algorithm with a total update time of \(\tilde{O}(k m^{1+o(1)}+ k^{1+\frac{1}{\lambda}} m)\) and an amortized update time of \(\tilde{O}(k n^{o(1)}+ k^{1+\frac{1}{\lambda}})\), where \(\lambda \geq 1\) is an arbitrary fixed constant.

3 Preliminaries↩︎

Consider a weighted undirected graph \(G = (V, E, w)\) with nonnegative weights. We denote by \(n \mathrel{\vcenter{:}}= |V|\) the number of vertices, by \(m \mathrel{\vcenter{:}}= |E|\) the number of edges, and by \(W\) the maximum weight of an edge.6 For a vertex \(v \in V\) and a subset of vertices \(S \subseteq V\), let \(\operatorname{dist}(v, S) \mathrel{\vcenter{:}}= \min_{s \in S} \operatorname{dist}(v, s)\) be the distance between the vertex \(v\) and the set \(S\). We write \(\operatorname{dist}_H(\cdot, \cdot)\) to explicitly denote the corresponding distance in a graph \(H\); when the subscript is omitted, it refers to \(\operatorname{dist}_G(\cdot, \cdot)\).

Definition 1 (\((k,z)\)-clustering problem on graphs). Given a weighted undirected graph \(G = (V, E, w)\), an integer \(k \geq 1\), and a constant \(z \ge 1\), the goal in the \((k,z)\)-clustering problem is to output a subset of vertices \(S \subseteq V\) with size at most \(k\) (i.e., \(|S| \leq k\)) such that the value of \(\operatorname{cost}^z(S) \mathrel{\vcenter{:}}= \sum_{v \in V} \operatorname{dist}(v, S)^z\) is minimized.

The \((k,z)\)-clustering problem includes the problems of \(k\)-median (\(z=1\)) and \(k\)-means (\(z=2\)). A \((k, z)\)-clustering instance is the triple consisting of the given input object, the integer parameter \(k\), and the constant \(z\). Any subset of vertices \(S \subseteq V\) with size at most \(k\) is referred to as a (feasible) solution, and its cost is referred to as its \((k,z)\)-clustering cost. Hence, the goal of the \((k,z)\)-clustering problem can be rephrased as finding a solution \(S\) with minimum \((k,z)\)-clustering cost \(\text{OPT}\mathrel{\vcenter{:}}= \min_{S \subseteq V: |S| \leq k} \text{cost}^z(S)\). The value \(\text{OPT}\) is called optimal \((k,z)\)-clustering cost, and a solution that minimizes the cost is called an optimal \((k,z)\)-clustering solution.

Definition 2 (\(\rho\)-approximate \((k,z)\)-clustering problem). Given a \((k,z)\)-clustering instance, the goal of the \(\rho\)-approximate \((k,z)\)-clustering problem is to output a subset of vertices \(S \subseteq V\) such that \(|S|\leq k\) and \(\operatorname{cost}^z(S)\leq \rho \cdot \text{OPT}\).

Definition 3 (\((\alpha, \beta)\)-bicriteria approximation). Given a \((k,z)\)-clustering instance, an \((\alpha, \beta)\)-bicriteria approximate solution is a subset of vertices \(S \subseteq V\) such that: \[\operatorname{cost}^z(S) \mathrel{\vcenter{:}}= \sum_{v \in V} \operatorname{dist}(v, S)^z \leq \alpha \cdot \text{OPT}\;\text{ and } \; |S| \leq \beta \cdot k.\]

Definition 4 (\((\alpha, \beta)\)-bicriteria approximate assignment). Given a weighted undirected graph \(G = (V, E, w)\) and an integer \(k \geq 1\), an \((\alpha, \beta)\)-bicriteria approximate assignment is a function \(\sigma: V \to V\) such that: \[\operatorname{cost}^z(\sigma) \mathrel{\vcenter{:}}= \sum_{v \in V} \operatorname{dist}(v, \sigma(v))^z \leq \alpha \cdot \text{OPT}\;\text{ and } \; |\sigma(V)| \leq \beta \cdot k.\] Conversely, the preimage of every vertex \(u \in V\) is \(\sigma^{-1}(u) \mathrel{\vcenter{:}}= \left\{ v \in V \mid \sigma(v) = u \right\}\).

Our incremental reduction algorithm in 6 deals with weighted \((k, z)\)-clustering instances on a subgraph \(H\), where \(H\) contains both edge and vertex weights.

definitionweightedkzclustering Given a weighted undirected graph \(\hat{G} = (\hat{V}, \hat{E}, \hat{w})\) with vertex weights \(\operatorname{wt}(\cdot)\), the corresponding weighted \((k,z)\)-clustering instance is denoted by \(\mathcal{K} \mathrel{\vcenter{:}}= (\hat{G}, k, z, \operatorname{wt})\). The cost of a subset of vertices \(C \subseteq \hat{V}\) is defined as \(\operatorname{cost}^z_{\operatorname{wt}}(C)\mathrel{\vcenter{:}}= \sum_{v \in \hat{V}} \operatorname{wt}(v) \cdot \operatorname{dist}_{\hat{G}}(v, C)^z\). The optimal \((k,z)\)-clustering cost of \(\mathcal{K}\) is denoted by \(\text{OPT}_\mathcal{K}\).

Our incremental algorithms utilize the following incremental \((1+\epsilon)\)-approximate single-source shortest paths (SSSP) algorithm. We note that similar results have been known implicitly for undirected graphs; these were randomized and assumed an oblivious adversary [50][52].

Lemma 1 (incremental \((1+\epsilon)\)-approximate SSSP [53]). Let \(m \geq 1\) and \(\epsilon \geq \exp (- (\log m )^{0.99})\). Let \(G = (V, E, w)\) be an incremental graph undergoing \(m\) edge insertions with integral edge weights in the range \([1, W]\) with a source \(s \in V\). There is a deterministic data structure that explicitly maintains distance estimates \(\delta_s: V \rightarrow \mathbb{R}_{\geq 0}\) such that: \[\operatorname{dist}(s,v) \,\le\, \delta_s(v) \,\le\, (1+\epsilon) \operatorname{dist}(s,v),\] and the ability to report the corresponding approximate shortest paths \(\pi_{s, v}\) from \(s\) to \(v\) in time \(O (|\pi_{s, v}|)\). The total update time of the data structure is \(m^{1+o(1)} \log W\). Moreover, the algorithm detects and reports the distance estimate changes explicitly.

For a fixed a subset of vertices \(S \subseteq V\) and a positive real number \(r\), the set \(\operatorname{Ball}(S, r) \mathrel{\vcenter{:}}= \{v \in V \mid \operatorname{dist}(v, S) < r\}\) denotes the open ball of radius \(r\) around \(S\), and the set \(\operatorname{Ball}[S, r] \mathrel{\vcenter{:}}= \{v \in V \mid \operatorname{dist}(v, S) \leq r\}\) denotes the closed ball of radius \(r\) around \(S\). Throughout our algorithms, we use incremental \((1+\epsilon)\)-approximate SSSP algorithms \(\mathcal{A}\) (1) with a super-source being a fixed set \(S\), providing distance estimates \(\delta_S(\cdot)\). Hence, we extend the definition of balls as follows:

  • \(\operatorname{Ball}(S, r, \delta_S) \mathrel{\vcenter{:}}= \{v \in V \mid \delta_S(v) < r\}\) to denote the open ball of radius \(r\) around \(S\) using the distance estimates \(\delta_S(\cdot)\).

  • \(\operatorname{Ball}[S, r, \delta_S] \mathrel{\vcenter{:}}= \{v \in V \mid \delta_S(v) \leq r\}\) to denote the closed ball of radius \(r\) around \(S\) using the distance estimates \(\delta_S(\cdot)\).

A dynamic algorithm has amortized update time \(u(n, m)\) if its total time spent for processing any sequence of \(\ell\) adversarial updates is bounded by \(\ell \cdot u(n, m)\). Throughout this paper, whenever we write that an event holds with high probability, we mean that it holds with probability at least \(1 - O(1/n^c)\) for some positive constant \(c\). We also make use of the following concentration bounds in our proofs.

Lemma 2 ([54]). Let \(X_1,X_2,\cdots,X_i\) be \(i\) independent random variables with \(0\leq X_j \leq 1\), and let \(X=\sum_{j=1}^i X_j\). Then for any \(\delta \geq 0\) it holds that: \[\mathop{\mathrm{\textrm{Pr}}}\left ( X \geq (1+\delta) \cdot \mathbb{E}[{X}] \right ) \,\leq\, \exp\left(-\frac{\delta^2}{2 + \delta} \mathbb{E}[{X}]\right).\] Furthermore, for any \(\delta \in [0, 1]\) it holds that: \[\mathop{\mathrm{\textrm{Pr}}}\left ( X \leq (1-\delta) \cdot \mathbb{E}[{X}] \right ) \,\leq\, \exp\left(-\frac{\delta^2}{2} \mathbb{E}[{X}]\right).\]

4 Static Bicriteria Approximation \((k,z)\)-Clustering Algorithm↩︎

We denote by MP-bi the \((O(1), O(\log^2 n))\)-bicriteria approximation algorithm of Mettu and Plaxton [29]. In this section, we present a variant of the MP-bi algorithm that runs in time \(O(m \log^2 n)\); the pseudocode of our variant is provided in Algorithm 1.

4.0.0.1 State of our MP-bi variant.

Our variant utilizes the same data structures as the MP-bi algorithm. Specifically, Algorithm 1 consists of multiple levels starting from \(0\). The last level of the algorithm is denoted by \(t\), and by construction the value of \(t\) is upper bounded by \(O(\log n)\). At each level \(i \in [0, t]\), the algorithm constructs an execution set \(U_i\), a candidate set \(S_i\), defines a radius \(\nu_i\), and constructs a ball \(B_i\). The bicriteria approximate solution \(S\) is then the union of all candidate sets, that is, \(S \mathrel{\vcenter{:}}= \bigcup_{i=0}^t S_i\). The algorithm also constructs an assignment \(\sigma: V \to S\), that maps each vertex to a candidate center in \(S\) at a determined distance. The parameters used in the algorithm satisfy the following conditions: \(\alpha \ge 1\) is a sufficiently large constant, and \(\beta, \epsilon \in (0,1)\) are small constants.

4.0.0.2 High-level overview of our MP-bi variant.

Roughly speaking, our variant of the MP-bi algorithm proceeds in iterations. In the \(i\)-th iteration, it samples a set of candidate centers \(S_i\) and computes the smallest radius \(\tilde{\nu}_i\), which is a power of \((1+\epsilon)\), such that the ball of radius \(\tilde{\nu}_i\) around \(S_i\) covers a constant fraction \(\beta\) of the execution set \(U_i\). The actual radius is then set to \(\nu_i \mathrel{\vcenter{:}}= \max(\tilde{\nu}_i, \nu_{i-1})\) in order to enforce the monotonicity property on the radii. This is a key property mainly needed for the incremental setting, which we discuss in detail in 5 (see [property95rad953] in 5). The \(i\)-th ball \(B_i\) is the subset of the ball of radius \(\nu_i\) around \(S_i\) that is contained within \(U_i\) (see Line [line:construct95Bi] in 1). The vertices in \(B_i\) are assigned to candidate centers in \(S_i\) via the assignment \(\sigma\). The \((i+1)\)-th execution set \(U_{i+1}\) is then defined as \(U_i\) without \(B_i\), and the next iteration proceeds.

The intuition is that the algorithm hits large clusters with high probability by sampling a subset of size \(|S_i| = \Theta(k \log n)\) per level. Subsequent iterations are then responsible for hitting the smaller clusters. Since the size of \(U_i\) decreases by at least a constant factor \((1-\beta)\), there are at most \(O(\log n)\) iterations (levels). Thus with high probability, the size of the bicriteria approximate solution \(S = \bigcup_{i=0}^t S_i\) is upper bounded by \(\tilde{O}(k)\).

Figure 1: Variant of MP-bi on Graphs

4.0.0.3 Implementation of Line [line:dijkstra].

The radius \(\tilde{\nu}_i\) is computed using a single-source shortest paths algorithm by connecting each vertex \(v \in S_i\) to a super-source via zero-weight edges. Hence, the step in Line [line:dijkstra] of 1 takes \(O(m \log n)\) time. Observe that the exploration of \(\operatorname{Ball}[S_i, \nu_i]\) is not restricted to \(U_i\), because it may traverse edges outside \(U_i\) to reach some vertices within \(U_i\).

The order of the values of the radii \(\nu_i\) is non-decreasing, namely it holds that: \[\nu_0 \;\leq\; \nu_1 \;\leq\; \cdots \;\leq \nu_t.\]

Proof. The \(i\)-th radius \(\nu_i\) is assigned the value of \(\max(\tilde{\nu}_i, \nu_{i-1})\) in Line [line:max95nu], which implies that \(\nu_i \geq \nu_{i-1}\). Therefore, the claim follows by an induction argument on the radii. ◻

4.0.0.4 Differences between 1 and MP-bi algorithm.

The main difference between our MP-bi variant and the standard MP-bi algorithm lies in Line [line:max95nu], where Algorithm 1 enforces a non-decreasing order of the radii. We leverage this monotonicity property on the radii later in the dynamic setting. We also note that Algorithm 1 has been adjusted in order to work with graphs and discrete distances of powers of \((1+\epsilon)\), while the original MP-bi algorithm works with point sets and non-discrete distances. The discrete distances on the radii that are powers of \((1+\epsilon)\) are needed to achieve efficiency in the dynamic setting. Since our static 1 differs from the original MP-bi algorithm, we present its analysis in 4.1.

4.1 Analysis of the MP-bi Variant↩︎

Mettu and Plaxton prove in [29] that the MP-bi algorithm produces with high probability a constant-factor approximate solution of size at most \(O(k \log^2 n)\). Our aim is to show that our MP-bi variant provides the same guarantees, as demonstrated in Theorem [thm:variant95approx].

theoremvariantapprox The set \(S\) output by 1 is a \((O(1), O(\log^2 n))\)-bicriteria approximate solution with high probability.

Our goal in this section is to prove [thm:variant95approx], and its analysis is divided into four subsections, as outlined below. First, in 4.1.1 we provide an upper bound on \(|S|\). Next, in 4.1.2 we provide an upper bound on \(\operatorname{cost}^z(S)\). Then, in 4.1.3 we provide a lower bound on the optimal cost in terms of \(\operatorname{cost}^z(S)\). Finally, in 4.1.4 we conclude the proof of [thm:variant95approx]. We remark that the essential ideas in the analysis are similar to those in [29].

4.1.1 Size of the Bicriteria Approximate Solution↩︎

Lemma 3. For a fixed level \(i: 0 \leq i < t\), it holds that \(|U_{i+1}| \leq (1-\beta) |U_i|\).

Proof. Based on Line [line:dijkstra] of 1, the value of \(\tilde{\nu}_i\) is the smallest power of \((1+\epsilon)\) such that the corresponding closed ball contains at least \(\beta |U_i|\) vertices from the \(i\)-th execution set \(U_i\). By Line [line:max95nu] we have \(\nu_i\geq \tilde{\nu}_i\), and thus \(|B_i|\geq \beta |U_i|\). By the definition of \(U_{i+1}\) in Line [line:new95exec95set], it follows that \(|U_{i+1}| = |U_i|-|B_i|\leq (1-\beta)|U_i|\), as needed. ◻

Corollary 1. The value of the last level \(t\) is at most \(O(\log n)\).

Proof. Based on 3, we can infer that \(|U_{t-1}| \leq (1-\beta)^{t-1} |U_0|\). Recall that \(|U_0| = n\), \(|U_{t-1}| \geq 1\), and \(0 < (1-\beta) < 1\). Hence, it follows that \(t\leq \frac{\log n}{\log (\frac{1}{1-\beta})} + 1\). Therefore as \(\beta\) is a fixed constant, we conclude that the value of \(t\) is at most \(O(\frac{\log n}{\beta}) = O(\log n)\).7 ◻

Lemma 4. With high probability, it holds that \(|S| = O(k\log^2 n)\).

Proof. The bicriteria approximate solution \(S\) is equal to \(\bigcup_{i=0}^t S_i\) (see Line [line:final95S] in 1). Observe that \(|S_t| = O(k\log n)\). Next, we prove that with high probability it holds that \(|S_i|=O(k\log n)\) for all levels \(i \in [0, t-1]\). Combining this with 1 implies that \(|S| = O(k \log^2 n)\).

For a fixed level \(i \in [0, t-1]\), the \(i\)-th candidate set \(S_i\) is constructed by sampling each vertex of the \(i\)-th execution set \(U_i\) independently with probability at most \(\frac{\alpha k\log n}{|U_i|}\) (see Line [line:sample95Si] in 1). This means that \(|S_i|\) is a sum of independent \(0\text{-}1\) indicator random variables \(\left\{ X_{v} \right\}_{v\in U_i}\). Thus, we have \(\mathbb{E}[|S_i|]=\mathbb{E}[\sum_{v\in U_i} X_v] = \alpha k\log n\). The conditions of 2 are satisfied, and by setting \(\delta = 10\) we get that: \[\begin{align} \mathop{\mathrm{\textrm{Pr}}}\left(|S_i|\geq 11 \alpha k\log n\right) \;\leq\; \exp \left(-8\alpha k\log n\right) \;\leq\; \frac{1}{n^{8\alphak}} \;\leq\; \frac{1}{n^{8\alpha}}, \end{align}\] where the last inequality follows from the fact that \(k \geq 1\). By applying a union bound over the \(t = O(\log n)\) candidate sets \(S_i\) and choosing \(\alpha\) appropriately, we deduce that with high probability for all levels \(i \in [0, t-1]\) it holds that \(|S_i|\leq 11\alpha k\log n\). Consequently, since \(\alpha\) is a sufficiently large constant, with high probability the size of the bicriteria approximate solution \(S\) is \(O(k \log^2 n)\). ◻

4.1.2 Upper Bound on the Cost of the Bicriteria Approximate Solution↩︎

Lemma 5. Each vertex \(v \in V\) belongs to exactly one ball \(B_i\), where \(0 \leq i \leq t\).

Proof. For a fixed vertex \(v \in V\), let \(i\) be the first level such that the vertex \(v\) enters the \(i\)-th ball \(B_i\). Due to Lines [line:construct95Bi], [line:new95exec95set], and [line:last95level] in 1, such a level \(i\) exists. By construction in Line [line:new95exec95set], the vertex \(v\) is not part of any \(U_j\) with \(j > i\). Moreover according to Line [line:construct95Bi], the vertex \(v\) does not belong to any \(B_j\) with \(j > i\). Therefore, the vertex \(v\) belongs only to the \(i\)-th ball \(B_i\), where \(0 \leq i \leq t\). ◻

Lemma 6. It holds that \(\operatorname{cost}^z(S) \leq \sum_{i=0}^{t-1} |B_i| (\nu_i)^z\).

Proof. The cost of the bicriteria approximate solution \(S\) is evaluated as follows: \[\begin{align} \operatorname{cost}^z(S) &\;=\; \sum_{v \in V} \operatorname{dist}(v, S)^z \;=\; \sum_{i=0}^t \sum_{v \in B_i} \operatorname{dist}(v, S)^z &(\text{Since }\textstyle \bigsqcup_{i=0}^t B_i=V \text{ by~\ref{lem:v95to95one95ball}}) \\ &\;=\; \sum_{i=0}^{t-1} \sum_{v \in B_i} \operatorname{dist}(v, S)^z+\sum_{v \in B_t} \operatorname{dist}(v, S)^z \;=\; \sum_{i=0}^{t-1} \sum_{v \in B_i} \operatorname{dist}(v, S)^z & \text{(From Lines~\ref{line:last95level} and~\ref{line:final95S} in~\ref{alg:static})} \\ &\;\leq\; \sum_{i=0}^{t-1} \sum_{v \in B_i} \operatorname{dist}(v, S_i)^z \;\leq\; \sum_{i=0}^{t-1} \sum_{v \in B_i} (\nu_i)^z &\text{(From Line~\ref{line:construct95Bi} in~\ref{alg:static})} \\ &\;\leq\; \sum_{i=0}^{t-1} |B_i| (\nu_i)^z. \end{align}\] ◻

4.1.3 Lower Bound on the Optimal Solution↩︎

We continue with the lower bound on the optimal \((k, z)\)-clustering cost, adapting the analysis in [29]. We fix a positive real number \(\gamma\) such that \(\beta < \gamma < 1\), and we define \(\nu^*_i\) and \(\mu^*_i\) for a fixed level \(i \in [0, t]\), as described in Definition 5 and Definition 6 respectively.

Definition 5. For a fixed level \(i: 0 \leq i \leq t\), consider the \(i\)-th execution set \(U_i\) and the \(i\)-th candidate set \(S_i\) constructed in Algorithm 1. For this specific level \(i\), we define \(\nu_i^*\) as follows: \[\nu_i^* \mathrel{\vcenter{:}}= \min\{r \in \mathbb{R} \mid \lvert \operatorname{Ball}[S_i, r]\cap U_i\rvert \geq \beta |U_i|\}.\]

Observe that for a fixed level \(i: 0 \leq i < t\), we can think of \(\tilde{\nu}_{i}\) computed in Line [line:dijkstra] of 1 as being obtained by rounding \(\nu_{i}^*\) to the next power of \((1+\epsilon)\).

For a fixed level \(i: 0 \leq i < t\), it holds that \(\nu_i^* \leq \tilde{\nu}_i \leq (1+\epsilon) \nu_i^*\).

Definition 6 ([29]). For a fixed level \(i: 0 \leq i \leq t\), consider the \(i\)-th execution set \(U_i\) constructed in Algorithm 1. For this specific level \(i\), we define \(\mu_i^*\) to be the minimum nonnegative real number such that there exists a subset of vertices \(X_i \subseteq V\) with size at most \(k\) (i.e., \(|X_i| \leq k\)) for which the following properties hold:

  1. \(\lvert \operatorname{Ball}[X_i, \mu_i^*]\cap U_i\rvert \,\geq\, \gamma |U_i|\).

  2. \(\lvert U_i\setminus \operatorname{Ball}(X_i, \mu_i^*)\rvert \,\geq\, (1-\gamma) |U_i|\).

We point out that in the above definition, the vertices of \(U_i\) that are exactly at distance \(\mu_{i}^*\) from \(X_i\) belong to both \(\operatorname{Ball}[X_i, \mu_i^*]\cap U_i\) and \(U_i\setminus \operatorname{Ball}(X_i, \mu_i^*)\). The main probabilistic claim in [29] is Lemma 3.3, restated below as [lem:nu602mu]. We observe that in our context, analogous guarantees apply with a similar proof provided in 7 for completeness.

lemmarelationnumu With high probability, it holds that \(\nu_i^* \leq 2 \mu^*_i\) for all levels \(i \in [0, t]\).

Corollary 2. With high probability, it holds that \(\tilde{\nu}_{i} \le 2 (1+\epsilon) \mu_i^*\) for every level \(i \in [0, t)\).

Proof. The claim follows from [obs:relation95nu95tilde95nu95star] and [lem:nu602mu]. ◻

Even though 2 provides an upper bound for \(\tilde{\nu}_{i}\), recall that Algorithm 1 uses the radius \(\nu_i\) computed in Line [line:max95nu], which is at least \(\tilde{\nu}_{i}\). In particular, we upper bound the cost of the bicriteria approximate solution \(S\) with respect to \(\nu_i\) in Lemma 6. Hence, in the next lemma we provide an upper bound on the value of \(\nu_i\) with respect to the value of a \(\mu^*_j\) which later is associated with the optimal \((k, z)\)-clustering cost.

Lemma 7. For a fixed level \(i: 0 \leq i < t\), the value of the \(i\)-th radius \(\nu_i\) can be upper bounded as follows: \[\nu_i \le 2 (1+\epsilon) \mu_j^*, \;\text{where }j = \max \{\ell \le i \mid \tilde{\nu}_\ell \ge \nu_{\ell-1}\}.\]

Proof. By construction in Line [line:max95nu], we have \(\nu_i = \max(\tilde{\nu}_{i}, \nu_{i-1})\). Hence, if \(\tilde{\nu}_{i} \ge \nu_{i-1}\) then \(\nu_i = \tilde{\nu}_{i}\), and otherwise if \(\tilde{\nu}_{i} < \nu_{i-1}\) then \(\nu_i = \nu_{i-1}\). By applying such reasoning and by the definition of \(j = \max \{\ell \le i \mid \tilde{\nu}_\ell \ge \nu_{\ell-1}\}\), we can infer that \(\nu_i = \tilde{\nu}_j\). Therefore by 2, it follows that \(\nu_i = \tilde{\nu}_j \leq 2 (1+\epsilon) \mu_j^*\). ◻

In the analysis in [29], Mettu and Plaxton define a parameter \(r \mathrel{\vcenter{:}}= \ceil{\log_{(1-\beta)}((1-\gamma)/3)}\) and the sets \(F_i\) and \(F_i^r\), for every level \(i \in [0, t]\). Afterwards, the authors utilize these sets in the proofs of their Lemmas \(3.6, 3.7, 3.8, 3.9\), and \(3.10\), in order to conclude their Lemma \(3.11\). We remark that for our analysis we can use the same definitions for the aforementioned sets, and in turn the corresponding lemmas hold here as well. Specifically, we use a version of their Lemma \(3.11\) whose proof ends on the penultimate line and the \((k, z)\)-clustering cost is used, restated as Lemma [lem:lower95bound95opt].8 For completeness, we provide a more detailed discussion of these in 7.

lemmalowerboundOPT For any subset of vertices \(X \subseteq V\) with size at most \(k\) (i.e., \(|X| \leq k\)), it holds that: \[\operatorname{cost}^z(X) \geq \frac{1-\gamma}{2r} \sum_{i=0}^t |U_i| (\mu^*_i)^z,\] where \(r = \ceil{\log_{(1-\beta)}((1-\gamma)/3)}\).

4.1.4 Finishing the Proof of [thm:variant95approx]↩︎

For a fixed level \(i: 0 \leq i < t\), it holds that \(\sum_{i \leq j < t} |U_j \setminus U_{j+1}| \leq |U_i|\).

Proof. For every level \(j\), it holds that \(U_{j+1} \subseteq U_j\) due to Line [line:new95exec95set] in 1. Moreover, notice that the subsets \(\{U_j \setminus U_{j+1} \}_{i \leq j < t}\) are pairwise disjoint and are all contained in the \(i\)-th execution set \(U_i\). Therefore, the sum of their sizes is at most the size of \(U_i\), as needed. ◻

By combining the previous observations and lemmas, we can now finish the proof of [thm:variant95approx] which we restate for convenience.

Proof. From 4, we have \(|S|=O(k\log^2n)\) with high probability. Hence, it remains to upper bound the approximation ratio, which we establish in the rest of the proof. Based on 6, it holds that \(\operatorname{cost}^z(S) \leq \sum_{i=0}^{t-1} |B_i| (\nu_i)^z\). By Lines [line:construct95Bi] and [line:new95exec95set] in 1, we have \(B_i \subseteq U_i\), \(U_{i+1} \subseteq U_i\), and \(|B_i| = |U_i| - |U_{i+1}| = |U_i \setminus U_{i+1}|\), and thus it follows that \(\operatorname{cost}^z(S) \leq \sum_{i=0}^{t-1} |U_i \setminus U_{i+1}| \, (\nu_i)^z\). Based on 7, each radius \(\nu_i\) is bounded by some \(\mu^*_j\), where \(i \in [0, t)\) and \(j \in [0, i]\). For a fixed level \(j: 0 \leq j \leq t\), let \(A_j\) be the set of all indices \(i: j \leq i < t\) that use \(\mu^*_j\) in their bound in 7. Then the value of \(\operatorname{cost}^z(S)\) can be upper bounded as follows: \[\begin{align} \operatorname{cost}^z(S) &\;\leq\; \sum_{i=0}^{t-1} |U_i \setminus U_{i+1}| (\nu_i)^z \;=\; \sum_{j=0}^t \sum_{i \in A_j} |U_i \setminus U_{i+1}| (\nu_i)^z \\ &\;\leq\; \sum_{j=0}^t \sum_{i \in A_j} |U_i \setminus U_{i+1}| (2(1+\epsilon)\mu^*_j)^z \\ &\;=\; (2(1+\epsilon))^z \sum_{j=0}^t (\mu^*_j)^z \sum_{i \in A_j} |U_i \setminus U_{i+1}|. \end{align}\] Based on [obs:bound95sum95Uj95Ui], it holds that \(\sum_{i \in A_j} |U_i \setminus U_{i+1}| \leq |U_j|\), and recall that if \(i \in A_j\) then \(j \leq i < t\). Thus, we can conclude that: \[\operatorname{cost}^z(S) \;\leq\; (2(1+\epsilon))^z \sum_{j=0}^t (\mu^*_j)^z |U_j|.\] Based on [lem:lower95bound95opt], we have: \[\sum_{j=0}^t (\mu^*_j)^z |U_j| \;\leq\; \frac{2r}{1-\gamma} \text{OPT},\] which implies that: \[\operatorname{cost}^z(S) \; \leq \; \frac{2r (2(1+\epsilon))^z}{1-\gamma} \text{OPT}.\] Therefore as \(z,\epsilon,r,\gamma=~O(1)\), it follows that the approximation ratio of 1 is upper bounded by \(O(1)\), as required. ◻

5 Incremental Bicriteria Approximation for \((k, z)\)-Clustering on Graphs↩︎

In this section, we develop an incremental bicriteria approximation algorithm for the \((k, z)\)-clustering problem on graphs undergoing adversarial edge insertions. Our incremental bicriteria approximation algorithm, with high probability, achieves an amortized update time of \(n^{o(1)}\) and maintains a constant-factor bicriteria approximate solution of size at most \(O(k \, \log^3 n \, \log_{1+\epsilon}nW)\). A pseudocode of our incremental bicriteria approximation algorithm is provided in 4, and the result is demonstrated in the following theorem.

Our incremental bicriteria approximation algorithm is an incremental version of the static Algorithm 1, which itself is a variant of the MP-bi algorithm. Throughout the description and analysis of the incremental bicriteria approximation algorithm in 5, we fix a sufficiently large constant \(\alpha \geq 1\) and a small constant \(\beta \in (0, 1)\). In the next two paragraphs, we first describe the information maintained by our incremental bicriteria approximation algorithm, and then outline the properties satisfied by the radii \(\nu_i\).

5.0.0.1 State of the incremental bicriteria approximation algorithm.

Our incremental bicriteria approximation 4 is structured into multiple levels starting from \(0\). The last level of the algorithm is denoted by \(t\), and the value of \(t\) is upper bounded by \(O(\log n)\) throughout the algorithm (see 3). At each level \(i \in [0, t]\), the bicriteria approximation algorithm maintains an execution set \(U_i\), a candidate set \(S_i\), a radius \(\nu_i\), an incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_i\) with a super-source attached to \(S_i\), an approximate ball \(B_i\), and a leaking set \(Z_i\).

The incremental algorithm then maintains the bicriteria approximate solution \(S \coloneq \bigcup_{i=0}^t S_i\), and an assignment \(\sigma: V \to S\) that maps each vertex to a candidate center in \(S\) at a specified distance. The algorithm also uses the temporary leaking set \(Z\), an auxiliary set that essentially stores the pending leaked vertices to be assigned to some leaking sets \(Z_i\) (see Lines [algline:leaking95Z][algline:count95new95for95Zi][algline:leaking95Zi], and [algline:rem95Zi95from95Z] in 4).

5.0.0.2 Properties of the radii.

For efficiency reasons, the values of the radii \(\nu_i\) (where \(0 \leq i \leq t\)) satisfy three properties over the course of the algorithm. (1) The first property is that the value of each radius \(\nu_i\) is a power of \((1+\epsilon)\). Hence, the number of possible values of a radius \(\nu_i\) is reduced to \(\log_{1+\epsilon}nW\),9 at the cost of an extra factor of \((1+\epsilon)\) in the approximation ratio. (2) The second property is that the value of each radius \(\nu_i\) is non-increasing over time, which means that after an adversarial edge insertion, the value of a specific \(\nu_i\) either decreases or remains the same. As a result, the number of distinct sequences of \(\nu_i\) is reduced from \((\log_{1+\epsilon}nW)^t\) to \(\log_{1+\epsilon}nW \cdot t\). We note that the value of the last level \(t\) may increase due to adversarial edge insertions, resulting in more radii \(\nu_i\). However, the incremental algorithm ensures that \(t = O(\log n)\) throughout its execution.

Furthermore, in order to upper bound the cost of the bicriteria approximate solution, the values of the radii \(\nu_i\) (where \(0 \leq i \leq t\)) satisfy also a third property over the course of the algorithm. (3) The third property is that the order of the values of \(\nu_i\) is non-decreasing (i.e., \(\nu_0 \leq \nu_1 \leq \cdots \leq \nu_t)\). Let us provide a high-level justification for the third property: Consider a vertex \(v \in U_i\) that is within a distance of \(\nu_i\) from the candidate set \(S_i\). Assume that after an adversarial edge insertion, the vertex \(v\) moves to the next execution set \(U_{i+1}\) and is not within a distance of \(\nu_{i+1}\) from the next candidate set \(S_{i+1}\). Since under edge insertions the distance between \(v\) and \(S_i\) remains at most \(\nu_i\) and \(\nu_i \leq \nu_{i+1}\) by the third property, the vertex \(v\) can be charged a cost of \(\nu_{i+1}\). Therefore using the third property, we can argue that a (leaked) vertex of any execution set \(U_j\) can be charged a cost of \(\nu_j\) (see also [obs:incr95nu95monoton] 17), which in turn helps us to upper bound the approximation ratio of our incremental algorithm. To sum up, our incremental bicriteria approximation algorithm ensures that the following three properties are satisfied throughout its execution:

  1. : The value of each radius \(\nu_i\) is a power of \((1+\epsilon)\).

  2. : The value of each radius \(\nu_i\) is non-increasing over time.

  3. : The order of the values of the radii \(\nu_i\) is non-decreasing (i.e., \(\nu_0 \leq \nu_1 \leq \cdots \leq \nu_t\)).

5.1 Incremental Bicriteria Approximation Algorithm on Graphs↩︎

First we describe the preprocessing phase, and afterwards we describe how to handle adversarial edge insertions. A pseudocode of our incremental bicriteria approximation algorithm is provided in 2 4.

Definition 7 (Retain). Given a set \(A\) and a nonnegative integer \(\lambda\), the set \(\operatorname{Retain}(A, \lambda)\) denotes an arbitrary subset of \(A\) with size \(\min(\lambda, |A|)\).

5.1.1 Preprocessing Phase↩︎

The initialization of our incremental bicriteria approximation algorithm mimics the structure of our MP-bi variant 1. During the preprocessing phase, dynamic data structures are also employed, as described in 2.

Figure 2: Initialization of Incremental Bicriteria Approximation Algorithm

Since we have to deal with adversarial edge insertions, an incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_i\) (from 1) with a super-source attached to \(S_i\) is initialized for every level \(i \in [0, t)\).10 In Line [line:algassignment] of 2, we denote by \(\delta_u(v)\) the distance estimate from a candidate center \(u \in S_i\) to a vertex \(v \in V\). We remark that even though we cannot access all \(\delta_u(v)\) directly, we can efficiently compute the closest candidate center \(u \in S_i\) to a vertex \(v \in V\) with respect to \(\delta_{S_i}(\cdot)\). This follows from the fact that the incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_i\) has access to the first edge of the corresponding approximate shortest path in \(\tilde{O}(1)\) time; such an incremental SSSP \(\mathcal{A}_i\) can be either the deterministic algorithm from 1 or a randomized algorithm against an oblivious adversary (implicitly given in  [50][52]). Thus, the assignment in Line [line:algassignment] can be computed properly and efficiently.

The main reason we introduce \(\operatorname{Retain}(\cdot, \cdot)\) (see 7) in 2 and 4 is because we need the following lemma and 13. In turn, these are required for the correctness analysis of the lower bound in [lem:lower95bound95opt], as discussed in 5.2.3.

Lemma 8. Immediately after the preprocessing phase, it holds that \(|U_{i+1}| = |U_i| - \ceil{\beta |U_i|}\) for every level \(i \in [0, t)\).

Proof. For a fixed level \(i \in [0, t)\), the \(i\)-th radius \(\nu_i\) is assigned the value of \(\max(\tilde{\nu}_i, \nu_{i-1})\) in Line [algline:incr95max95nu] of 2, which implies that \(\nu_i \geq \tilde{\nu}_i\). By construction in Line [algline:incr95dijkstra] of 2, there are at least \(\beta |U_i|\) vertices in the \(i\)-th execution set \(U_i\) whose distance estimates \(\delta_{S_i}(\cdot)\) are at most \(\tilde{\nu}_i\). Hence, it holds that \(\lvert \operatorname{Ball}[S_i, \nu_i, \delta_{S_i}] \cap U_i\rvert \geq \beta |U_i|\), and because \(\lvert \operatorname{Ball}[S_i, \nu_i, \delta_{S_i}] \cap U_i\rvert\) is an integer we deduce that \(\lvert \operatorname{Ball}[S_i, \nu_i, \delta_{S_i}] \cap U_i\rvert \geq \ceil{\beta |U_i|}\). Thus by Line [algline:incr95construct95Bi] of 2 and 7, it follows that \(|B_i| = \lvert\operatorname{Retain}\bigl(\operatorname{Ball}[S_i, \nu_i, \delta_{S_i}] \cap U_i,\, \ceil{\beta |U_i|}\bigr)\rvert = \ceil{\beta |U_i|}\).

Observe that the \((i+1)\)-th execution set \(U_{i+1}\) is set to \(U_i \setminus B_i\) in Line [algline:exec95assign95without95ball95prepro] of 2 and that the \(i\)-th approximate ball \(B_i\) is a subset of the \(i\)-th execution set \(U_i\) (due to Line [algline:incr95construct95Bi] of 2). Therefore, we conclude that \(|U_{i+1}| \,=\, |U_i| - |B_i| \,=\, |U_i| - \ceil{\beta |U_i|}\), as desired. ◻

5.1.2 Adversarial Edge Insertions↩︎

Before describing how our incremental bicriteria approximation algorithm for the \((k, z)\)-clustering problem on graphs handles adversarial edge insertions, we define the \(i\)-th valid radius in order to guarantee that [property95rad953] is satisfied. Recall that \(\operatorname{Ball}[{S_i}, r, \delta_{S_i}] \mathrel{\vcenter{:}}= \{v \in V \mid \delta_{S_i}(v) \leq r\}\) denotes the closed ball of radius \(r\) around \({S_i}\) using the distance estimates \(\delta_{S_i}(\cdot)\).

Definition 8 (\(i\)-th valid radius). For a fixed level \(i \in [0, t]\), consider the \(i\)-th execution set \(U_i\), the \(i\)-th candidate set \(S_i\), the distance estimates \(\delta_{S_i}(\cdot)\), and the \((i-1)\)-th radius \(\nu_{i-1}\).11 Let \(\tilde{\nu}_i\) be the smallest power of \((1+\epsilon)\) such that \(\lvert\operatorname{Ball}[S_i, \tilde{\nu}_i, \delta_{S_i}] \cap U_i\rvert \geq \beta |U_i|\). Then \(\hat{\nu}_i \mathrel{\vcenter{:}}= \max(\tilde{\nu}_i, \nu_{i-1})\) denotes the \(i\)-th valid radius.

When an edge \((u^+, v^+)\) is inserted into the graph \(G = (V, E, w)\) from the adversary, the incremental bicriteria approximation algorithm proceeds as follows. Initially, this adversarial edge insertion \((u^+, v^+)\) is forwarded to all the incremental \((1+\epsilon)\)-approximate SSSP algorithms \(\mathcal{A}_i\), where \(0 \leq i < t\). The algorithm then finds the smallest level \(\ell \in [0, t]\) for which the (updated) \(\ell\)-th valid radius \(\hat{\nu}_\ell\) is less than the \(\ell\)-th radius \(\nu_\ell\) (i.e., \(\hat{\nu}_\ell < \nu_\ell\)).12 This step is implemented through the function First-Level-Decrease\(()\) (see Lines [algline:func95first95lvl95decr] and [algline:first95level95decr] in 4).

Next, the function Update-DS-Rad-Decr(\(\ell\)) is called within the function First-Level-Decrease\(()\), which updates the data structures at level \(\ell\). In the function Update-DS-Rad-Decr(\(\ell\)), the incremental algorithm updates the \(\ell\)-th radius \(\nu_\ell\) to \(\hat{\nu}_\ell\) and the \(\ell\)-th approximate ball \(B_\ell\) to an arbitrary subset of \(\operatorname{Ball}[S_\ell, \hat{\nu}_\ell, \delta_{S_\ell}] \cap U_\ell\) with size \(\ceil{\beta |U_\ell|}\) (in Lines [algline:set95nu] and [algline:incr95construct95Bi95update] of 4).13 For each vertex \(v \in B_\ell\), the algorithm updates its assignment \(\sigma(v)\) to its nearest candidate center in \(S_\ell\) with respect to \(\delta_{S_\ell}(\cdot)\) (in Line [algline:v95to95sigma] of 4). The incremental algorithm then assigns the temporary leaking set \(Z\) as the union of the \(\ell\)-th leaking set \(Z_\ell\) and the vertices that were in the old \(\ell\)-th approximate ball but are not in the updated \(\ell\)-th approximate ball \(B_\ell\) (in Line [algline:leaking95Z] of 4). Eventually, the algorithm empties the \(\ell\)-th leaking set \(Z_\ell\) (in Line [algline:leaking95Zi95empty] of 4).

Once the function First-Level-Decrease\(()\) has finished, the algorithm updates the \((\ell+1)\)-th execution set \(U_{\ell+1}\) to \(U_\ell \setminus B_\ell\). In turn, the incremental algorithm must verify whether the value of the \((\ell+1)\)-th radius \(\nu_{\ell+1}\) should also decrease. Note that as the \((\ell+1)\)-th execution set \(U_{\ell+1}\) may change, the current \((\ell+1)\)-th candidate set \(S_{\ell+1}\) which was sampled from the old \((\ell+1)\)-th execution set, may no longer be a good representative in the new \((\ell+1)\)-th execution set \(U_{\ell+1}\). To that end, the algorithm proceeds with the Resampling Phase in the updated \((\ell+1)\)-th execution set \(U_{\ell+1}\), as follows. Since \(\ell\) denotes the smallest level at which the corresponding \(\ell\)-th radius \(\nu_\ell\) is decreased, let \(i \mathrel{\vcenter{:}}= \ell + 1\) represent the subsequent levels starting at level \(\ell + 1\).

5.1.2.1 Resampling Phase.

First, a supporting candidate set \(\tilde{S}_i\) is constructed by sampling each vertex of the new \(i\)-th execution set \(U_i\) independently with probability \(\min\Big(\frac{\alpha k \log n}{|U_i|}, 1\Big)\). Second, the incremental algorithm adds the \(i\)-th supporting candidate set \(\tilde{S}_i\) to the \(i\)-th candidate set \(S_i\), and restarts the \(i\)-th incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_i\) with a super-source attached to the updated \(i\)-th candidate set \(S_i\).14 Next, the algorithm computes the \(i\)-th valid radius \(\hat{\nu}_i\), using the updated \(i\)-th candidate set \(S_i\) and the updated distance estimates \(\delta_{S_i}(\cdot)\) (see Lines [algline:check95if95nu95decreases952] and [algline:set95hat95nu952] in 4). The incremental algorithm then proceeds based on whether the (updated) \(i\)-th valid radius \(\hat{\nu}_i\) is less than the \(i\)-th radius \(\nu_i\), as follows:

  • If \(\hat{\nu}_i < \nu_i\), then the algorithm updates the data structures as described previously with further modifications (see the function Update-DS-Rad-Decr(\(i\)) in Lines [algline:func95update95ds95rad95decr] and [algline:update95ds95rad95decr952] of 4). In particular, the incremental algorithm updates the \(i\)-th radius \(\nu_i\) to \(\hat{\nu}_i\) and the \(i\)-th approximate ball \(B_i\) to an arbitrary subset of \(\operatorname{Ball}[S_i, \hat{\nu}_i, \delta_{S_i}] \cap U_i\) with size \(\ceil{\beta |U_i|}\) (in Lines [algline:set95nu] and [algline:incr95construct95Bi95update] of 4).15 For each vertex \(v \in B_i\), the algorithm updates its assignment \(\sigma(v)\) to its nearest candidate center in \(S_i\) with respect to \(\delta_{S_i}(\cdot)\). Subsequently, the incremental algorithm adds to the temporary leaking set \(Z\) both the \(i\)-th leaking set \(Z_i\) and the vertices that were in the old \(i\)-th approximate ball but are not in the updated \(i\)-th approximate ball \(B_i\) (see Figure 3). The algorithm then empties the \(i\)-th leaking set \(Z_i\) and updates the \((i+1)\)-th execution set \(U_{i+1}\) to \(U_i \setminus B_i\).

  • Otherwise if \(\hat{\nu}_i \geq \nu_i\), then the algorithm removes from the \(i\)-th approximate ball \(B_i\) all vertices that no longer belong to the \(i\)-th execution set \(U_i\).16 Observe also that for a level \(j: 0 \leq j < i\), some vertices that belonged to the old \(j\)-th approximate ball before the adversarial edge insertion, may no longer belong to the new \(j\)-th approximate ball \(B_j\) after the adversarial edge insertion. Note that some of these vertices have been added to the temporary leaking set \(Z\). Subsequently, the incremental algorithm adds to the \(i\)-th leaking set \(Z_i\) an arbitrary subset of the temporary leaking set \(Z\), ensuring that \(Z_i \subseteq U_i\) and \(|Z_i| = \ceil{\beta |U_i|} - |B_i|\) (see Lines [algline:Bi95subset95Ui][algline:count95new95for95Zi], and [algline:leaking95Zi] in 4).17 The algorithm then removes from the temporary leaking set \(Z\) the subset of \(Z\) that entered the \(i\)-th leaking set \(Z_i\) (see Line [algline:rem95Zi95from95Z] in 4) and updates the \((i+1)\)-th execution set \(U_{i+1}\) to \(U_i \setminus (B_i \cup Z_i)\).

Afterwards, the incremental algorithm increases \(i\) by one (i.e., moves to the next level), and continues with the Resampling Phase in the updated \(i\)-th execution set \(U_i\) (for the updated level \(i\)) as described earlier. The Resampling Phase terminates when the size of the current \(i\)-th execution set \(U_i\) is at most \(\alpha k \log n\). Then, the algorithm updates the value of the last level \(t\) to the final value of \(i\) (see Line [algline:t95last95level] in 4). Finally, as a concluding step for the adversarial edge insertion \((u^+, v^+)\) into the graph \(G\), the incremental bicriteria approximation algorithm trivially updates the data structures at level \(t\) (in Line [algline:last95level95assign] of 4) and assigns the maintained bicriteria approximate solution \(S\) as \(\bigcup_{i=0}^t S_i\) (in Line [algline:assign95solution] of 4).

a

b

Figure 3: The blue thick regions depict the \(i\)-th approximate ball \(B_i\) for a level \(i \in[0, t]\), and the larger blue vertices represent the \(i\)-th candidate set \(S_i\). The black lines indicate distances. In the right figure, the brown lines and dots depict new shorter distances of vertices that enter \(B_i\) due to the adversarial edge insertion.
Left figure: The \(i\)-th approximate ball before the adversarial edge insertion.
Right figure: After the adversarial edge insertion, some vertices enter the \(i\)-th approximate ball \(B_i\) (brown vertices). Since the \(i\)-th radius \(\nu_i\) is decreased (the dashed blue region indicates the old radius), some vertices enter the temporary leaking set \(Z\)..

Figure 4: Incremental Bicriteria Approximation Algorithm

5.1.2.2 On the computation of \(\tilde{\nu}_i\).

We emphasize that the value \(\tilde{\nu}_i\) in Lines [algline:check95if95nu95decreases951] and [algline:check95if95nu95decreases952] of 4 can be computed during the update procedure of the \(i\)-th incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_i\). This is achieved by extending \(\mathcal{A}_i\) to track the necessary quantities within its update procedure, without incurring additional asymptotic cost. The reason this is possible is that, based on 1, \(\mathcal{A}_i\) detects and reports a change whenever the distance estimate \(\delta_{S_i}(v)\) is updated for a vertex \(v \in V\). As a result, the cost of maintaining \(\tilde{\nu}_i\) is included in the update time of \(\mathcal{A}_i\).18

5.2 Analysis of the Incremental Bicriteria Approximation Algorithm↩︎

When an edge is inserted into the graph \(G = (V, E, w)\) from the adversary, multiple pairwise distances between vertices may change significantly, requiring the incremental algorithm to update the maintained data structures. To distinguish between the states of the input graph \(G\) and our incremental algorithm before and after an adversarial edge insertion, we use \(\text{(old)}\) as a superscript for the state before the edge insertion, and we omit the \(\text{(old)}\) superscript for the state after the edge insertion.19

Our goal in this section is to prove Theorem [thm:incr95alg], by analyzing the incremental bicriteria approximation 4. The analysis is divided into four subsections, as outlined below. First, in 5.2.1 we analyze the amortized update time of our incremental bicriteria approximation algorithm. Next, in 5.2.2 we derive an upper bound on the cost of the maintained bicriteria approximate solution \(S\). Then, in 5.2.3 we establish results concerning a lower bound on the optimal \((k, z)\)-clustering cost which is associated with the upper bound. Finally, in 5.2.4 we provide an upper bound on the size of the bicriteria approximate solution and we conclude the proof of Theorem [thm:incr95alg].

5.2.1 Analysis of the Update Time↩︎

Lemma 9. After an adversarial edge insertion, it holds that \(B_i \subseteq U_i\) and \(Z_i \subseteq U_i\) for every level \(i \in [0, t]\). In other words, both the \(i\)-th approximate ball and the \(i\)-th leaking set are subsets of the \(i\)-th execution set.

Proof. Let \(\ell\) be the smallest level for which the corresponding \(\ell\)-th radius \(\nu_\ell\) is decreased, as returned in Line [algline:first95level95decr].20 For every level \(i: 0 \leq i \leq \ell-1\), the corresponding approximate balls, leaking sets, and execution sets are not modified, and thus the statement holds using an induction argument on the number of edge insertions. For the last level \(t\), the statement holds trivially due to Line [algline:last95level95assign]. Regarding a fixed level \(i: \ell \leq i < t\), consider the two cases depending on whether the value of the \(i\)-th radius \(\nu_i\) is decreased:

  • Assume that after the adversarial edge insertion, the value of the \(i\)-th radius decreases (i.e., \(\nu_i = \hat{\nu}_i < \nu_i^\text{(old)}\)). In this case, observe that for \(i = \ell\) the function Update-DS-Rad-Decr(\(i\)) is executed in Line [algline:update95ds95rad95decr951], and for \(i \neq \ell\) it is executed in Line [algline:update95ds95rad95decr952]. In both situations, the \(i\)-th approximate ball \(B_i\) is updated only in Line [algline:incr95construct95Bi95update] to contain vertices solely from the \(i\)-th execution set \(U_i\). Also, the \(i\)-th leaking set \(Z_i\) becomes empty in Line [algline:leaking95Zi95empty].

  • Assume that after the adversarial edge insertion, the value of the \(i\)-th radius does not decrease (i.e., \(\hat{\nu}_i \geq \nu_i^\text{(old)}= \nu_i\)). In this case, the \(i\)-th approximate ball \(B_i\) is updated only in Line [algline:Bi95subset95Ui], and the \(i\)-th leaking set \(Z_i\) is updated only in Lines [algline:Bi95subset95Ui] and [algline:leaking95Zi], ensuring that both \(B_i\) and \(Z_i\) remain subsets of the \(i\)-th execution set \(U_i\).

The \((i+1)\)-th execution set \(U_{i+1}\) is updated only in Lines [algline:next95exec95set951] and [algline:next95exec95set952], and since \(i < t\), either Lines [algline:incr95construct95Bi95update] and [algline:leaking95Zi95empty] or Lines [algline:Bi95subset95Ui] and [algline:leaking95Zi] are executed to assign \(B_{i+1}\) and \(Z_{i+1}\) respectively (or Line [algline:last95level95assign] if \(i + 1\) equals \(t\)). Therefore by applying this argument for all levels \(i\), we can conclude that both the \(i\)-th approximate ball and the \(i\)-th leaking set are always subsets of the \(i\)-th execution set. ◻

Lemma 10. After an adversarial edge insertion, consider a fixed level \(i: 0 \leq i < t\) and an arbitrary vertex \(v \in U_i \setminus U_{i+1}\). Then the vertex \(v\) belongs either to the \(i\)-th approximate ball \(B_i\) or to the \(i\)-th leaking set \(Z_i\). Moreover, if the vertex \(v\) belongs to the \(i\)-th leaking set \(Z_i\), then before the edge insertion it belonged to a set \(U_j^\text{(old)}\setminus U_{j+1}^\text{(old)}\) with \(j \leq i\).

Proof. The \((i+1)\)-th execution set \(U_{i+1}\) is updated only in Lines [algline:next95exec95set951] and [algline:next95exec95set952], where it is set to \(U_i \setminus (B_i \cup Z_i)\).21 Hence, any vertex \(v \in U_i \setminus U_{i+1}\) must belong to \(B_i \cup Z_i\), as required. For the second part of the statement, consider an arbitrary vertex \(v \in Z_i\). If the vertex \(v\) was part of the old \(i\)-th leaking set \(Z_i^\text{(old)}\) before the adversarial edge insertion, then by 9 it holds that \(v \in U_i^\text{(old)}\). Thus, based on the way \(U_{i+1}^\text{(old)}\) was updated in Line [algline:next95exec95set952] it follows that \(v \in U_i^\text{(old)}\setminus U_{i+1}^\text{(old)}\), as needed.

For this reason, assume that the vertex \(v\) was not in the old \(i\)-th leaking set \(Z^\text{(old)}_i\) but enters the new \(i\)-th leaking set \(Z_i\) after the adversarial edge insertion. The vertex \(v\) can enter the \(i\)-th leaking set \(Z_i\) only in Line [algline:leaking95Zi], which means that the vertex \(v\) must have entered the temporary leaking set \(Z\). Observe that the temporary leaking set \(Z\) incorporates additional vertices only in Line [algline:leaking95Z] within Update-DS-Rad-Decr(\(\cdot\)). Since the levels are scanned in an increasing way (see Lines [algline:level95incr951] and [algline:level95incr]), the vertex \(v\) should belong before the adversarial edge insertion to a set \(B^\text{(old)}_j \cup Z^\text{(old)}_j\) with \(j \leq i\) (according to Line [algline:leaking95Z]). By 9 it holds that \(v \in U^\text{(old)}_j\), and by construction the \((j+1)\)-th execution set \(U^\text{(old)}_{j+1}\) was updated only in Lines [algline:next95exec95set951] and [algline:next95exec95set952] where it was set to \(U^\text{(old)}_j \setminus (B^\text{(old)}_j \cup Z^\text{(old)}_j)\). Therefore, it follows that \(v \in U_j^\text{(old)}\setminus U_{j+1}^\text{(old)}\) concluding the claim. ◻

Lemma 11. After an adversarial edge insertion, it holds that \(B_i \cap Z_i = \emptyset\) for every level \(i \in [0, t]\). In other words, the \(i\)-th approximate ball and the \(i\)-th leaking set are disjoint.

Proof. Consider a fixed level \(i \in [0, t)\), since at the last level \(t\) the claim holds trivially due to Line [algline:last95level95assign]. If the value of the \(i\)-th radius \(\nu_i\) decreases (i.e., \(\nu_i = \hat{\nu}_i < \nu_i^\text{(old)}\)) then the claim holds trivially, because the \(i\)-th leaking set \(Z_i\) becomes empty in Line [algline:leaking95Zi95empty] within Update-DS-Rad-Decr(\(i\)). Otherwise, assume that the value of the \(i\)-th radius does not decrease (i.e., \(\hat{\nu}_i \geq \nu_i^\text{(old)}= \nu_i\)). In this case, the \(i\)-th approximate ball \(B_i\) is updated to \(B_i^\text{(old)}\cap U_i\) in Line [algline:Bi95subset95Ui], and the updated \(i\)-th leaking set \(Z_i\) receives new vertices only through the temporary leaking set \(Z\) in Line [algline:leaking95Zi] (see also Line [algline:count95new95for95Zi]).

As described in the proof of 10, the temporary leaking set \(Z\) incorporates additional vertices only in Line [algline:leaking95Z] within Update-DS-Rad-Decr(\(\cdot\)), and the levels are scanned in an increasing way (see Lines [algline:level95incr951] and [algline:level95incr]). In addition, since the function Update-DS-Rad-Decr(\(j\)) is invoked only when the \(j\)-th radius \(\nu_j\) decreases, and the \(i\)-th radius \(\nu_i\) does not decrease, the temporary leaking set \(Z\) incorporates additional vertices only at levels \(j < i\). Notice that \((B_j^\text{(old)}\cup Z_j^\text{(old)}) \cap B_i^\text{(old)}= \emptyset\) for any levels \(j < i\), by construction in Lines [algline:next95exec95set951] and [algline:next95exec95set952] and 9. In turn, this implies that \(B_i^\text{(old)}\cap Z = \emptyset\), and so the \(i\)-th leaking set \(Z_i\) receives new vertices that do not belong to \(B_i^\text{(old)}\). Using an induction argument on the number of adversarial edge insertions, we can infer that \(B_i^\text{(old)}\cap Z_i^\text{(old)}= \emptyset\), and thus \(B_i^\text{(old)}\cap Z_i = \emptyset\). Therefore as \(B_i \subseteq B_i^\text{(old)}\), it follows that \(B_i \cap Z_i = \emptyset\), as required. ◻

Lemma 12. After an adversarial edge insertion, consider a level \(i: 0 \leq i < t\) for which the algorithm decreases the \(i\)-th radius (i.e., \(\nu_i < \nu_i^\text{(old)}\)). Then it holds that \(|B_i| = \ceil{\beta |U_i|}\) and \(|U_{i+1}| = |U_i| - |B_i|\).

Proof. Let \(\ell\) be the smallest level for which the corresponding \(\ell\)-th radius \(\nu_\ell\) is decreased, as returned in Line [algline:first95level95decr] of 4. Note that for \(i = \ell\) the function Update-DS-Rad-Decr(\(i\)) is executed in Line [algline:update95ds95rad95decr951], and for \(i \neq \ell\) it is executed in Line [algline:update95ds95rad95decr952]. In both cases, the \(i\)-th radius \(\nu_i\) is updated to the \(i\)-th valid radius \(\hat{\nu}_i\) in Line [algline:set95nu], which in turn is determined in Line [algline:set95hat95nu951] or in Line [algline:set95hat95nu952]. Notice that the value of the \(i\)-th valid radius \(\hat{\nu}_i\) is at least the value of \(\tilde{\nu}_i\) determined in Line [algline:check95if95nu95decreases951] or in Line [algline:check95if95nu95decreases952] respectively. By construction in both Lines [algline:check95if95nu95decreases951] and [algline:check95if95nu95decreases952], there are at least \(\beta |U_i|\) vertices in the \(i\)-th execution set \(U_i\) whose distance estimates \(\delta_{S_i}(\cdot)\) are at most \(\tilde{\nu}_i\). As a result, since \(\nu_i = \hat{\nu}_i \geq \tilde{\nu}_i\) it holds that \(\lvert \operatorname{Ball}[S_i, \hat{\nu}_i, \delta_{S_i}] \cap U_i\rvert \geq \beta |U_i|\), and because \(\lvert \operatorname{Ball}[S_i, \hat{\nu}_i, \delta_{S_i}] \cap U_i\rvert\) is an integer we deduce that \(\lvert \operatorname{Ball}[S_i, \hat{\nu}_i, \delta_{S_i}] \cap U_i\rvert \geq \ceil{\beta |U_i|}\). Hence based on Line [algline:incr95construct95Bi95update] and 7, it follows that \(|B_i| = \lvert\operatorname{Retain}\bigl(\operatorname{Ball}[S_i, \nu_i, \delta_{S_i}] \cap U_i,\, \ceil{\beta |U_i|}\bigr)\rvert = \ceil{\beta |U_i|}\).

Regarding the second part of the statement, observe that the execution set \(U_{i+1}\) is updated only in Lines [algline:next95exec95set951] and [algline:next95exec95set952], where it is set to \(U_i \setminus (B_i \cup Z_i)\). As the \(i\)-th radius is decreased, the \(i\)-th leaking set \(Z_i\) becomes empty due to Line [algline:leaking95Zi95empty]. Moreover by 9, the \(i\)-th approximate ball \(B_i\) is a subset of the \(i\)-th execution set \(U_i\), and thus we can conclude that \(|U_{i+1}|\) is equal to \(|U_i| - |B_i|\), as desired. ◻

Lemma 13. After an adversarial edge insertion, it holds that \(|U_i| = |U_i^\text{(old)}|\) and \(|U_i| = |U_{i-1}| - \ceil{\beta |U_{i-1}|}\) for every level \(i \in [0, t]\).22

Proof. The proof consists of two inductions; the outer induction is on the number of adversarial edge insertions, and the nested induction is on the number of levels. The base case of the outer induction holds due to the preprocessing phase (and 19), as established in 8. The base case of the nested induction is for \(i = 0\), and the first part of the statement \(|U_0| = |U_0^\text{(old)}| = n\) holds by the construction of 4 (with the second part of the statement from 19).

Regarding the induction step of this double induction, we prove the statement for the \((i+1)\)-th level after the adversarial edge insertion (where \(i \in [0, t)\)), assuming that: (1) the statement is true for all levels before the edge insertion (outer induction hypothesis), and (2) the statement is true for the \(i\)-th level after the edge insertion (nested induction hypothesis). To analyze the \((i+1)\)-th level after the adversarial edge insertion, we consider two cases based on whether the value of the \(i\)-th radius \(\nu_i\) is decreased:

  • Assume that after the edge insertion, the value of the \(i\)-th radius decreases (i.e., \(\nu_i < \nu_i^\text{(old)}\)). In this case, the algorithm ensures that \(|B_i| = \ceil{\beta |U_i|}\) and \(|U_{i+1}| = |U_i| - |B_i|\), as stated in 12. This implies that \(|U_{i+1}| = |U_i| - \ceil{\beta |U_i|}\), as needed for the second part of the statement. Using the nested induction hypothesis for the first part of the statement, we deduce that \(|U_{i+1}| =|U^\text{(old)}_i| - \ceil{\beta |U^\text{(old)}_i|}\). Using the outer induction hypothesis for the second part of the statement, we conclude that \(|U_{i+1}| \,=\,|U^\text{(old)}_i| - \ceil{\beta |U^\text{(old)}_i|} \,=\, |U^\text{(old)}_{i+1}|\), as required for the first part of the statement.

  • Assume that after the edge insertion, the value of the \(i\)-th radius \(\nu_i\) does not decrease (i.e., \(\nu_i \geq \nu_i^\text{(old)}\)). In this case, the \(i\)-th approximate ball \(B_i\) is updated to \(B_i^\text{(old)}\cap U_i\) in Line [algline:Bi95subset95Ui], and the \(i\)-th leaking set \(Z_i\) is updated to \((Z_i^\text{(old)}\cup Z') \cap U_i\) where \(Z' \mathrel{\vcenter{:}}= \operatorname{Retain}\bigl(Z \cap U_i,\, \ceil{\beta |U_i|} - |B_i| - |Z_i^\text{(old)}\cap U_i|\bigr)\) according to Lines [algline:Bi95subset95Ui][algline:count95new95for95Zi], and [algline:leaking95Zi]. Our aim is to show that \(|Z'| \,=\, \ceil{\beta |U_i|} - |B_i| - |Z_i^\text{(old)}\cap U_i|\) in the next paragraph, where we use the following auxiliary claim.23

    Every vertex \(v \in U_i \setminus U^\text{(old)}_i\) belongs to the temporary leaking set \(Z\) at the moment the \(i\)-th execution set \(U_i\) is updated in Lines [algline:next95exec95set951] and [algline:next95exec95set952] of 4, and \(v\) still belongs to \(Z\) at the moment \(Z \cap U_i\) is used within \(\operatorname{Retain}\bigl(Z \cap U_i,\, \ceil{\beta |U_i|} - |B_i| - |Z_i^\text{(old)}\cap U_i|\bigr)\) in Line [algline:count95new95for95Zi] of 4.

    Proof. Consider a vertex \(v \in V\) such that \(v \in U_i\) and \(v \notin U^\text{(old)}_i\). Since the vertex \(v\) was not part of the old \(i\)-th execution set \(U^\text{(old)}_i\), there must exist a level \(j\) such that \(v \in U^\text{(old)}_j \setminus U^\text{(old)}_{j+1}\) and \(j < i\), as dictated by the construction of the execution sets. Based on 10, the vertex \(v\) belonged to the set \(B^\text{(old)}_j \cup Z^\text{(old)}_j\). Since the vertex \(v\) enters the updated \(i\)-th execution set \(U_i\) after the adversarial edge insertion, based on Lines [algline:next95exec95set951] and [algline:next95exec95set952] it must have left the union of the \(j\)-th approximate ball and the \(j\)-th leaking set. In other words it holds that \(v \notin B_j \cup Z_j\) and \(v \in U_i\), which occurs (based on the construction of the execution sets) only when the \(j\)-th radius decreases and the function Update-DS-Rad-Decr(\(j\)) is invoked. In turn due to Line [algline:leaking95Z], the vertex \(v\) must have entered the temporary leaking set \(Z\) at level \(j < i\). Since the vertex \(v\) belongs to the updated \(i\)-th execution set \(U_i\), the construction of 4 in Lines [algline:rem95Zi95from95Z][algline:next95exec95set952], and [algline:Z95intersect95subseq95Ui] (i.e., each subsequent execution set is a subset of the previous one and previous leaking sets are disjoint from subsequent execution sets) ensures that \(v\) remains in \(Z\) when \(Z \cap U_i\) is utilized in Line [algline:count95new95for95Zi]. ◻

    Equality for \(|Z'|\).

    Since \(|U_i| = |U_i^\text{(old)}|\) by the nested induction hypothesis for the first part of the statement, the number of vertices that leave the union of the \(i\)-th approximate ball and the \(i\)-th leaking set must be at most the number of new vertices that enter the \(i\)-th execution set \(U_i\) (using 9). Based on [clm:new95vert95in95Z], any new vertex entering the updated \(i\)-th execution set \(U_i\) belongs to the temporary leaking set \(Z\) at the moment \(U_i\) is updated and \(Z \cap U_i\) is used. Therefore, by [clm:new95vert95in95Z] 9 it holds that \(\lvert(B_i^\text{(old)}\setminus B_i) \cup (Z_i^\text{(old)}\setminus Z_i)\rvert \,\leq\, |Z \cap U_i|\). Specifically, using 11 it follows that \(\lvert B_i^\text{(old)}\setminus B_i\rvert + \lvert Z_i^\text{(old)}\setminus Z_i\rvert \,\leq\, |Z|\), where \(Z \subseteq U_i\) due to Line [algline:Z95intersect95subseq95Ui].

    By the outer induction hypothesis for the second part of the statement, we have \(|U_{i+1}^\text{(old)}| = |U_i^\text{(old)}| - \ceil{\beta |U_i^\text{(old)}|}\). Hence, by 10 9 and as \(U_{i+1}^\text{(old)}\subseteq U_i^\text{(old)}\) by construction in Lines [algline:next95exec95set951] and [algline:next95exec95set952], we can infer that \(|B_i^\text{(old)}\cup Z_i^\text{(old)}| = \ceil{\beta |U_i^\text{(old)}|}\). Specifically, by 11 we deduce that \(|B_i^\text{(old)}| + |Z_i^\text{(old)}| = \ceil{\beta |U_i^\text{(old)}|}\). Notice that \(|B_i^\text{(old)}| = |B_i^\text{(old)}\setminus B_i| + |B_i|\) and \(|Z_i^\text{(old)}| = |Z_i^\text{(old)}\setminus Z_i| + |Z_i^\text{(old)}\cap U_i|\) by the construction of 4 in Lines [algline:Bi95subset95Ui] and [algline:leaking95Zi], and combining this with the two expressions: \[\begin{align} \lvert B_i^\text{(old)}\setminus B_i\rvert \,+\, \lvert Z_i^\text{(old)}\setminus Z_i\rvert \;&\leq\; |Z|\;\; \text{and} \\ |B_i^\text{(old)}| \,+\, |Z_i^\text{(old)}| \;&=\; \ceil{\beta |U_i^\text{(old)}|}, \end{align}\] implies that: \[\begin{align} |Z| &\;\geq\; \lvert B_i^\text{(old)}\setminus B_i\rvert \,+\, \lvert Z_i^\text{(old)}\setminus Z_i\rvert \\ &\;=\; \lvert B_i^\text{(old)}\rvert \,-\, |B_i| \,+\, |Z_i^\text{(old)}| \,-\, |Z_i^\text{(old)}\cap U_i| \\ &\;=\; \ceil{\beta |U_i^\text{(old)}|} \,-\, |B_i| \,-\, |Z_i^\text{(old)}\cap U_i|. \end{align}\] Using the nested induction hypothesis for the first part of the statement, we obtain \(|Z| \,\geq\, \ceil{\beta |U_i|} \,-\, |B_i| \,-\, |Z_i^\text{(old)}\cap U_i|\). Thus, since \(Z' = \operatorname{Retain}\bigl(Z \cap U_i,\, \ceil{\beta |U_i|} - |B_i| - |Z_i^\text{(old)}\cap U_i|\bigr)\) and \(Z \subseteq U_i\), according to 7 we get that \(|Z'| = \ceil{\beta |U_i|} - |B_i| - |Z_i^\text{(old)}\cap U_i|\), as needed for the equality for \(|Z'|\).

    With the desired equality for \(|Z'|\) established, observe that the \(i\)-th leaking set \(Z_i\) is updated to \((Z_i^\text{(old)}\cup Z') \cap U_i\) in Line [algline:leaking95Zi]. Since the \(i\)-th radius \(\nu_i\) does not decrease, the temporary leaking set \(Z\) has incorporated additional vertices only at levels \(j < i\) (see Line [algline:leaking95Z]). Notice that \((B_j^\text{(old)}\cup Z_j^\text{(old)}) \cap Z_i^\text{(old)}= \emptyset\) for any levels \(j < i\), by construction in Lines [algline:next95exec95set951] and [algline:next95exec95set952] and 9. Hence as \(Z' \subseteq Z\) by Line [algline:count95new95for95Zi], the set \(Z'\) is disjoint from the set \(Z_i^\text{(old)}\cap U_i\), and thus it holds that \(|Z_i| = |Z_i^\text{(old)}\cap U_i| + |Z'|\). In turn, it follows that \(|Z_i| = \ceil{\beta |U_i|} - |B_i|\).

    The \((i+1)\)-th execution set \(U_{i+1}\) is set to \(U_i \setminus (B_i \cup Z_i)\) in Line [algline:next95exec95set952], and since \(B_i \cup Z_i \subseteq U_i\) by 9 and \(B_i \cap Z_i = \emptyset\) by 11 it holds that \(|U_{i+1}| = |U_i| - |B_i \cup Z_i| = |U_i| - (|B_i| + |Z_i|)\). Therefore, using the induction hypotheses it follows that \(|U_{i+1}| = |U_i| - \ceil{\beta |U_i|} = |U^\text{(old)}_i| - \ceil{\beta |U^\text{(old)}_i|} = |U^\text{(old)}_{i+1}|\), as required for both parts of the statement.

 ◻

The next corollary establishes that the incremental bicriteria approximation 4 maintains \(O(\log n)\) levels throughout its execution.

Corollary 3. After an adversarial edge insertion, the value of the last level \(t\) is at most \(O(\log n)\).

Proof. Based on 13, after an adversarial edge insertion we have \(|U_i| \,=\, |U_{i-1}| - \ceil{\beta |U_{i-1}|} \,\leq\, |U_{i-1}| - \beta |U_{i-1}| \,=\, (1 - \beta)|U_{i-1}|\) for every level \(i \in [1, t]\). In turn, we always have \(|U_{t-1}| \leq (1-\beta)^{t-1} |U_0|\). Recall that \(|U_0| = n\), \(|U_{t-1}| \geq 1\), and \(0 < (1-\beta) < 1\). Hence, it follows that \((1-\beta)^{t-1} \cdot n \geq 1 \; \iff \; t~\leq~\log_{(1-\beta)} \frac{1}{n} + 1 \; \iff \; t \leq \frac{-\log n}{\log (1-\beta)} + 1\). Therefore as \(\beta\) is a fixed constant, the value of \(t\) is always at most \(O(\frac{\log n}{\beta}) \,=\, O(\log n)\).24 ◻

After an adversarial edge insertion, the value of the \(i\)-th radius \(\nu_i\) either decreases or remains the same. In other words, it holds that \(\nu_i \leq \nu^\text{(old)}_i\) for every level \(i \in [0, t]\) (i.e., [property95rad952] is satisfied). Moreover, the value of each \(i\)-th radius \(\nu_i\) is a power of \((1+\epsilon)\) (i.e., [property95rad951] is satisfied).

Proof. At the last level \(t\), we have \(\nu_t = \nu_{t-1}\) due to Line [algline:last95level95assign]. For a fixed level \(i: 0 \leq i < t\), observe that the \(i\)-th radius \(\nu_i\) is updated only in Line [algline:set95nu] inside the the function Update-DS-Rad-Decr(\(i\)), where it is assigned the value of the \(i\)-th valid radius \(\hat{\nu}_i\). This update occurs only if \(\hat{\nu}_i < \nu^\text{(old)}_i\), and thus [property95rad952] is satisfied over the course of the algorithm.

Moreover, the value of the \(i\)-th valid radius \(\hat{\nu}_i\) is determined in Line [algline:set95hat95nu951] or in Line [algline:set95hat95nu952]. In turn, the value of \(\hat{\nu}_i\) depends on the value of \(\nu_{i-1}\) and on the value of \(\tilde{\nu}_i\) determined in Line [algline:check95if95nu95decreases951] or in Line [algline:check95if95nu95decreases952] respectively. By construction, the value of \(\tilde{\nu}_i\) is a power of \((1+\epsilon)\). Therefore, using an induction argument for \(\nu_{i-1}\), we can deduce that [property95rad951] is always satisfied as well. ◻

Lemma 14. The amortized update time of the incremental Algorithm 4 is \(n^{o(1)}\).

Proof. Based on 1, the total update time of a single incremental \((1+\epsilon)\)-approximate SSSP algorithm is \(m^{1+o(1)}\). To compute the total update time due to all incremental \((1+\epsilon)\)-approximate SSSP algorithms, we provide an upper bound on the number of times our incremental Algorithm 4 initializes a new incremental \((1+\epsilon)\)-approximate SSSP algorithm.

After an adversarial edge insertion, Algorithm 4 initializes a new incremental \((1+\epsilon)\)-approximate SSSP algorithm only in Line [algline:sssp95update] during the Resampling Phase. There are two crucial observations to be made: First, this event occurs only if the function First-Level-Decrease\(()\) returns a level \(i\) smaller than \(t\) (i.e., \(i < t\)) in Line [algline:first95level95decr]. Second, the value of the \(i\)-th radius \(\nu_i\) is decreased inside the function Update-DS-Rad-Decr(\(i\)) in Line [algline:update95ds95rad95decr951]. Thus, whenever Algorithm 4 initializes the first new incremental \((1+\epsilon)\)-approximate SSSP algorithm during the Resampling Phase, there is a level \(i\) such that the \(i\)-th radius \(\nu_i\) is decreased. Note that per Resampling Phase, there can be at most \(t\) initializations of new incremental \((1+\epsilon)\)-approximate SSSP algorithms.

Based on [obs:nu95only95decr95power9540143eps41] (i.e., [property95rad951] and [property95rad952]), the total number of times a radius of a fixed level can be decreased is upper bounded by \(O(\log_{(1+\epsilon)} nW)\). Therefore, [obs:nu95only95decr95power9540143eps41] 3 imply that the total number of times any radius can be decreased is upper bounded by \(O(\log_{(1+\epsilon)} nW \cdot \log n)\). In turn, the incremental Algorithm 4 enters the Resampling Phase at most \(O(\log_{(1+\epsilon)} nW \cdot \log n)\) times, and each time at most \(t = O(\log n)\) new incremental \((1+\epsilon)\)-approximate SSSP algorithms are initialized. Consequently, the total update time for all incremental \((1+\epsilon)\)-approximate SSSP algorithms is: \[O\big(m^{1+o(1)} \cdot \log_{(1+\epsilon)} nW \cdot \log^2 n\big) \;=\; m^{1+o(1)}.\]

Furthermore, the total time needed for the rest of the operations can be upper bounded by \(O(m^{1+o(1)} \cdot \log_{(1+\epsilon)} nW \cdot \log^2 n) = m^{1+o(1)}\). The reason is that Algorithm 4 enters the Resampling Phase at most \(O(\log_{(1+\epsilon)} nW \cdot \log n)\) times, and within the Resampling Phase each operation can be performed in \(m^{1+o(1)}\) time.25 As discussed at the end of 5.1.2, the computational costs of Lines [algline:check95if95nu95decreases951] and [algline:check95if95nu95decreases952] (the computation of \(\tilde{\nu}_i\)) are included in the update time of the \(i\)-th incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_i\), and so the total computational time outside the Resampling Phase is dominated by \(m^{1+o(1)}\) as well. Finally, since in the incremental setting we are allowed to amortize over all the edge insertions, the corresponding amortized update time is equal to \(\frac{2 \cdot m^{1+o(1)}}{m} = n^{o(1)}\), as \(m \leq n^2\). ◻

5.2.2 Analysis of the Upper Bound↩︎

Lemma 15. After an adversarial edge insertion, each vertex \(v \in V \setminus U_t\) belongs to exactly one set \(U_i \setminus U_{i+1}\), where \(0 \leq i < t\).

Proof. Consider a fixed vertex \(v \in V \setminus U_t\), and note that \(v \in U_0\). Observe that by construction in Lines [algline:next95exec95set951] and [algline:next95exec95set952], each subsequent execution set is a subset of the previous one. Hence, once the vertex \(v\) is no longer part of an execution set, then \(v\) is not part of any later execution set as well. Let \(\ell\) be the largest level such that \(v \in U_\ell\), and as \(v \notin U_t\) we have \(0 \leq \ell < t\). Thus, it follows that the vertex \(v \in V \setminus U_t\) belongs only to the set \(U_\ell \setminus U_{\ell+1}\), where \(0 \leq \ell < t\). ◻

Lemma 16. After an adversarial edge insertion, consider a level \(i \in [0, t]\) for which the \(i\)-th leaking set \(Z_i\) is non-empty. Then the algorithm does not decrease the \(i\)-th radius \(\nu_i\). In other words, if \(Z_i \neq \emptyset\) then \(\nu_i^\text{(old)}\leq \nu_i\).

Proof. The last level \(t\) is not relevant, since \(Z_t = \emptyset\) by Line [algline:last95level95assign]. For some level \(i \in [0, t)\) suppose to the contrary that after the adversarial edge insertion, the new \(i\)-th leaking set \(Z_i\) is non-empty but the incremental 4 decreases the \(i\)-th radius \(\nu_i\). Observe that the \(i\)-th radius \(\nu_i\) is updated only in Line [algline:set95nu] within Update-DS-Rad-Decr(\(i\)). But in this case, the \(i\)-th leaking set \(Z_i\) becomes empty due to Line [algline:leaking95Zi95empty] in Update-DS-Rad-Decr(\(i\)), which leads to a contradiction. Therefore, if \(Z_i \neq \emptyset\) then the \(i\)-th radius is not decreased after the adversarial edge insertion. ◻

After an adversarial edge insertion, no vertices are removed from the bicriteria approximate solution \(S\). Hence, it holds that \(S^\text{(old)}\subseteq S\).

Proof. The bicriteria approximate solution \(S\) is assigned as the union of all candidate sets in Line [algline:assign95solution]. Notice that only new vertices can be added to the candidate sets due to Line [algline:extend95candidate95set], and no vertices are removed from them, as required. ◻

After an adversarial edge insertion, the order of the values of the radii \(\nu_i\) is non-decreasing. In other words, it holds that \(\nu_0 \;\leq\; \nu_1 \;\leq\; \cdots \;\leq \nu_t\) (i.e., [property95rad953] is satisfied).

Proof. Observe that at the last level \(t\), we trivially have \(\nu_t = \nu_{t-1}\) by Line [algline:last95level95assign]. At the beginning, the preprocessing phase ensures that [property95rad953] is satisfied. After an adversarial edge insertion, for a fixed level \(i: 0 \leq i < t\) the \(i\)-th radius \(\nu_i\) is updated only in Line [algline:set95nu] within Update-DS-Rad-Decr(\(i\)), where it is assigned the value of the \(i\)-th valid radius \(\hat{\nu}_i\). In turn, the value of the \(i\)-th valid radius \(\hat{\nu}_i\) is updated to \(\max(\tilde{\nu}_i, \nu_{i-1})\) in Lines [algline:set95hat95nu951] and [algline:set95hat95nu952]. Therefore, together with [property95rad952] (see [obs:nu95only95decr95power9540143eps41]), it follows by an induction argument on the radii that [property95rad953] is satisfied over the course of the algorithm. ◻

Lemma 17. After an adversarial edge insertion, consider a fixed level \(i: 0 \leq i < t\) and an arbitrary vertex \(v \in U_i \setminus U_{i+1}\). Then it holds that \(\operatorname{dist}(v, S) \leq \operatorname{dist}(v, \sigma(v)) \leq \nu_i\).

Proof. The proof is by induction on the number of adversarial edge insertions, where the base case holds due to the preprocessing phase. Regarding the induction step note that based on 10, the vertex \(v\) belongs either to the \(i\)-th approximate ball \(B_i\) or to the \(i\)-th leaking set \(Z_i\). We consider both cases based on whether \(v \in B_i\) or \(v \in Z_i\). In the case where \(v \in B_i\), we further distinguish based on whether the value of the \(i\)-th radius \(\nu_i\) is decreased.

  • Assume that \(v \in B_i\) and that the algorithm decreases the \(i\)-th radius \(\nu_i\) (see Lines [algline:nu95decreases95first] and [algline:nu95decreases]). Let \(\ell\) be the smallest level for which the corresponding \(\ell\)-th radius \(\nu_\ell\) is decreased, as returned in Line [algline:first95level95decr]. Observe that for \(i = \ell\) the function Update-DS-Rad-Decr(\(i\)) is executed in Line [algline:update95ds95rad95decr951], and for \(i \neq \ell\) it is executed in Line [algline:update95ds95rad95decr952]. In both cases, by the construction in Line [algline:incr95construct95Bi95update] where \(B_i = \operatorname{Retain}\bigl(\operatorname{Ball}[S_i, \nu_i, \delta_{S_i}] \cap U_i,\, \ceil{\beta |U_i|}\bigr)\) and by Line [algline:v95to95sigma], together with the fact that the incremental \((1+\epsilon)\)-approximate SSSP algorithm of 1 does not underestimate distances, it holds that \(\operatorname{dist}(v, S_i) \leq \operatorname{dist}(v, \sigma(v)) \leq \delta_{S_i}(v) \leq \nu_i\). As the \(i\)-th candidate set \(S_i\) is a subset of the bicriteria approximate solution \(S\), it follows that \(\operatorname{dist}(v, S) \leq \operatorname{dist}(v, S_i) \leq \nu_i\), as needed.

    Otherwise assume that \(v \in B_i\) and that the algorithm does not decrease the \(i\)-th radius \(\nu_i\) (i.e., \(\nu_i^\text{(old)}\leq \nu_i\)). By construction in Line [algline:Bi95subset95Ui] it holds that \(B_i \subseteq B_i^\text{(old)}\). Hence we have \(v \in B_i^\text{(old)}\), and specifically that \(v \in U_i^\text{(old)}\setminus U_{i+1}^\text{(old)}\) by 9 [algline:next95exec95set951] [algline:next95exec95set952].26 Since \(S^\text{(old)}\subseteq S\) by [obs:S95extends95only], we get that \(\operatorname{dist}(v, S) \leq \operatorname{dist}(v, S^\text{(old)})\). Moreover, the assignment \(\sigma(v)\) is not modified in this case, implying that \(\operatorname{dist}(v, \sigma(v)) = \operatorname{dist}(v, \sigma^\text{(old)}(v))\). Under edge insertions the distances are non-increasing, and thus it holds that \(\operatorname{dist}(v, S^\text{(old)}) \leq \operatorname{dist}^\text{(old)}(v, S^\text{(old)})\) and that \(\operatorname{dist}(v, \sigma^\text{(old)}(v)) \leq \operatorname{dist}^\text{(old)}(v, \sigma^\text{(old)}(v))\). Together with the induction hypothesis, it follows that: \[\begin{align} &\operatorname{dist}(v, S) \leq \operatorname{dist}(v, S^\text{(old)}) \leq \operatorname{dist}^\text{(old)}(v, S^\text{(old)}) \leq \nu_i^\text{(old)}\leq \nu_i \;\text{ and } \\ &\operatorname{dist}(v, \sigma(v)) = \operatorname{dist}(v, \sigma^\text{(old)}(v)) \leq \operatorname{dist}^\text{(old)}(v, \sigma^\text{(old)}(v)) \leq \nu_i^\text{(old)}\leq \nu_i. \end{align}\]

  • Assume that \(v \in Z_i\) after the adversarial edge insertion. Based on 10, the vertex \(v\) belonged to a set \(U_j^\text{(old)}\setminus U_{j+1}^\text{(old)}\) with \(j \leq i\), before the adversarial edge insertion. Notice that the assignment \(\sigma(v)\) is not modified in this case as well. Since under edge insertions the distances are non-increasing and \(S^\text{(old)}\subseteq S\) by [obs:S95extends95only], using the induction hypothesis we can deduce that: \[\begin{align} &\operatorname{dist}(v, S) \leq \operatorname{dist}^\text{(old)}(v, S) \leq \operatorname{dist}^\text{(old)}(v, S^\text{(old)}) \leq \nu_j^\text{(old)}\; \text{ and } \\ &\operatorname{dist}(v, \sigma(v)) \leq \operatorname{dist}^\text{(old)}(v, \sigma(v)) = \operatorname{dist}^\text{(old)}(v, \sigma^\text{(old)}(v)) \leq \nu_j^\text{(old)}. \end{align}\] Since we have \(j \leq i\), using [property95rad953] (see [obs:incr95nu95monoton]) we can infer that \(\operatorname{dist}(v, S) \leq \nu_i^\text{(old)}\) and that \(\operatorname{dist}(v, \sigma(v)) \leq \nu_i^\text{(old)}\). Note that as the vertex \(v\) belongs to the \(i\)-th leaking set \(Z_i\), the set \(Z_i\) is non-empty. Therefore by 16 it holds that \(\nu_i^\text{(old)}\leq \nu_i\), and in turn that \(\operatorname{dist}(v, S) \leq \nu_i\) and that \(\operatorname{dist}(v, \sigma(v)) \leq \nu_i\).

Finally, recall that the image of the assignment \(\sigma\) is the bicriteria approximate solution \(S\). As a consequence, it follows that \(\operatorname{dist}(v, S) \leq \operatorname{dist}(v, \sigma(v))\) for every vertex \(v \in V\), concluding the claim. ◻

The next lemma provides an upper bound on the \((k, z)\)-clustering cost of both the bicriteria approximate solution \(S\) and the bicriteria approximate assignment \(\sigma\).

Lemma 18. After an adversarial edge insertion, both values \(\operatorname{cost}^z(S)\) and \(\operatorname{cost}^z(\sigma)\) are at most: \[\sum_{i=0}^{t-1} |U_i \setminus U_{i+1}| \cdot (\nu_i)^z.\]

Proof. The \((k, z)\)-clustering cost of both the bicriteria approximate solution \(S\) and the bicriteria approximate assignment \(\sigma\) is upper bounded as follows: \[\begin{align} \operatorname{cost}^z(S) &= \sum_{v \in V} \operatorname{dist}(v, S)^z \;=\; \sum_{i=0}^{t-1} \sum_{v \in U_i \setminus U_{i+1}} \operatorname{dist}(v, S)^z \\ &\le \sum_{i=0}^{t-1} \sum_{v \in U_i \setminus U_{i+1}} (\nu_i)^z \;\leq\; \sum_{i=0}^{t-1} |U_i \setminus U_{i+1}| (\nu_i)^z. \\ \operatorname{cost}^z(\sigma) &= \sum_{v \in V} \operatorname{dist}(v, \sigma(v))^z \;=\; \sum_{i=0}^{t-1} \sum_{v \in U_i \setminus U_{i+1}} \operatorname{dist}(v, \sigma(v))^z \\ &\le \sum_{i=0}^{t-1} \sum_{v \in U_i \setminus U_{i+1}} (\nu_i)^z \;\leq\; \sum_{i=0}^{t-1} |U_i \setminus U_{i+1}| (\nu_i)^z. \end{align}\] The second equality in both expressions derives from 15 and the fact that if a vertex \(v\) belongs to \(U_t\) then the algorithm adds \(v\) to \(S\) and sets \(\sigma(v)\) to \(v\) (see Lines [algline:last95level95assign] and [algline:assign95solution] in 4). Moreover, the first inequality in both expressions follows from Lemma 17, and this completes the proof. ◻

5.2.3 Results Regarding the Lower Bound↩︎

We continue with the lower bound on the optimal \((k, z)\)-clustering cost under adversarial edge insertions, adjusting the analysis in 4.1.3 (which in turn adapts the analysis in [29]). Similarly to the analysis in 4.1, we fix a positive real number \(\gamma\) such that \(\beta < \gamma < 1\). We also define \(\nu^*_i\) and \(\mu^*_i\) for a fixed level \(i \in [0, t]\), as described in Definition 9 and Definition 10 respectively.27

Definition 9. After an adversarial edge insertion, for a fixed level \(i \in [0, t]\) consider the \(i\)-th execution set \(U_i\) and the \(i\)-th candidate set \(S_i\) maintained in the incremental Algorithm 4. For this specific level \(i\), we define \(\nu_i^*\) as follows: \[\nu_i^*\mathrel{\vcenter{:}}= \min\{r \in \mathbb{R} \mid \lvert\operatorname{Ball}[S_i, r]\cap U_i\rvert \geq \beta |U_i|\}.\]

Lemma 19. After an adversarial edge insertion, for a fixed level \(i: 0 \leq i < t\) it holds that \(\nu_i^* \leq \tilde{\nu}_i \leq (1+\epsilon)^2 \, \nu_i^*\).

Proof. The value of \(\tilde{\nu}_i\) is computed either in Line [algline:check95if95nu95decreases951] or in Line [algline:check95if95nu95decreases952], using the (updated) \(i\)-th execution set \(U_i\) and the (updated) \(i\)-th candidate set \(S_i\), in the following way: \[\tilde{\nu}_i \,=\, \min_{j \in \mathbb{Z}^{\geq 0}} \{(1+\epsilon)^j \mid \lvert \operatorname{Ball}[S_i, (1+\epsilon)^j, \delta_{S_i}]\cap U_i\rvert \geq \beta |U_i|\}.\] Furthermore, in both lines the (updated) distance estimates \(\delta_{S_i}(\cdot)\) are used for the computation of the corresponding closed balls. Based on 1, we have \(\delta_{S_i}(v) \leq (1+\epsilon) \operatorname{dist}(v, S_i)\) for every vertex \(v \in V\), and the \(i\)-th incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_i\) of 1 does not underestimate distances. Therefore as the value of \(\tilde{\nu}_i\) is also a power of \((1+\epsilon)\), it follows that \(\nu_i^* \leq \tilde{\nu}_i \leq (1+\epsilon)^2 \, \nu_i^*\), as required. ◻

Definition 10. After an adversarial edge insertion, for a fixed level \(i \in [0, t]\) consider the \(i\)-th execution set \(U_i\) maintained in the incremental Algorithm 4. For this specific level \(i\), we define \(\mu_i^*\) to be the minimum nonnegative real number such that there exists a subset of vertices \(X_i \subseteq V\) with size at most \(k\) (i.e., \(|X_i| \leq k\)) for which the following properties hold:

  1. \(\lvert \operatorname{Ball}[X_i, \mu_i^*]\cap U_i\rvert \geq \gamma |U_i|\).

  2. \(\lvert U_i\setminus \operatorname{Ball}(X_i, \mu_i^*)\rvert \geq (1-\gamma) |U_i|\).

Recall that in the definition above, the vertices of \(U_i\) that are exactly at distance \(\mu_{i}^*\) from \(X_i\) belong to both \(\operatorname{Ball}[X_i, \mu_i^*]\cap U_i\) and \(U_i\setminus \operatorname{Ball}(X_i, \mu_i^*)\). At this point in the analysis, we would like to use [lem:nu602mu] to establish a relationship between \(\nu_i^*\) and \(\mu_i^*\). However, [lem:nu602mu] is applicable only to the static setting, whereas in the incremental setting the execution sets and candidate sets are subject to changes. To that end, we first provide an extension of [lem:nu602mu] demonstrated as [lem:nu602mu951], and then we establish an ‘incremental’ relationship between \(\nu_i^*\) and \(\mu_i^*\) in 20 utilizing the fact that the adversary is oblivious. The proof of [lem:nu602mu951] is very similar to that of [lem:nu602mu], and both proofs are deferred to 7.

lemmanulesstwomuone After an adversarial edge insertion, for a fixed level \(i \in [0, t]\) consider the \(i\)-th execution set \(U_i\) and a subset of vertices \(Y \subseteq U_i\) obtained by sampling each vertex of \(U_i\) independently with probability \(\min\Big(\frac{\alpha k \log n}{|U_i|}, 1\Big)\). Let \(\nu_i^*(Y)\mathrel{\vcenter{:}}= \min\{r \in \mathbb{R} \mid \lvert\operatorname{Ball}[Y, r]\cap U_i\rvert \geq \beta |U_i|\}\) be an extension of 9. Then it holds with high probability that \(\nu_i^*(Y) \leq 2 \mu_i^*\).

Lemma 20. After an adversarial edge insertion, with high probability it holds that \(\nu_i^* \leq 2 \mu_i^*\) for all levels \(i \in [0, t]\).

Proof. The key observation is that by the construction of the incremental bicriteria approximation 4, whenever the \(i\)-th execution set \(U_i\) is modified, a supporting candidate set \(\tilde{S}_i\) is constructed in Line [algline:construct95support95candidate95set] and is added to the \(i\)-th candidate set \(S_i\) in Line [algline:extend95candidate95set] (within the Resampling Phase). Hence, the \(i\)-th most recent supporting candidate set \(\tilde{S}_i\) is obtained at the last modification of the \(i\)-th execution set \(U_i\) in a manner similar to the set \(Y\) in [lem:nu602mu951]. Furthermore, since the edge insertions are sent by an oblivious adversary, the choice of the random set \(\tilde{S}_i\) is independent of the at most \(O(n^2)\) versions of the graph in the incremental setting.

Thus by applying a union bound and using the obliviousness of the adversary, [lem:nu602mu951] holds for the \(i\)-th most recent supporting candidate set \(\tilde{S}_i\) and the current \(i\)-th execution set \(U_i\) still with high probability. Therefore it holds with high probability that \(\nu_i^*(\tilde{S}_i) \leq 2 \mu_i^*\), where \(i \in [0, t]\) is a fixed level and \(\nu_i^*(\cdot)\) is the extension of 9 defined in [lem:nu602mu951]. Since we have \(\tilde{S}_i \subseteq S_i\) and \(\nu_i^* = \nu_i^*(S_i)\), we infer that \(\nu_i^* = \nu_i^*(S_i) \leq \nu_i^*(\tilde{S}_i) \leq 2 \mu_i^*\) with high probability. By applying a union bound over the \(t = O(\log n)\) levels (see 3), the high probability claim follows for all levels \(i \in [0, t]\). ◻

Corollary 4. After an adversarial edge insertion, with high probability it holds that \(\tilde{\nu}_{i} \le 2(1+\epsilon)^2 \mu_i^*\) for every level \(i \in [0, t)\).

Proof. The claim follows from 19 and 20. ◻

Even though 4 provides an upper bound for \(\tilde{\nu}_{i}\), recall that the incremental Algorithm 4 uses the radius \(\nu_i\) computed in Line [algline:set95nu], which is at least \(\tilde{\nu}_{i}\). In particular, we upper bound the cost of the bicriteria approximate solution \(S\) with respect to \(\nu_i\) in Lemma 18. Hence, in the next lemma we provide an upper bound on the value of the \(i\)-th radius \(\nu_i\) in terms of the value of some \(\mu^*_j\) with \(j\leq i\), which later is associated with the optimal \((k, z)\)-clustering cost.

Lemma 21. After an adversarial edge insertion, for a fixed level \(i: 0 \leq i < t\) the value of the \(i\)-th radius can be upper bounded as follows: \[\nu_i \le 2 (1+\epsilon)^2 \mu_j^*, \;\text{where }j = \max \{\ell \in [0, i] \mid \tilde{\nu}_\ell \ge \nu_{\ell-1}\}.\footnote{Such a level j exists since \tilde{\nu}_0 \geq \nu_{-1} = 0.}\]

Proof. The \(i\)-th radius \(\nu_i\) is updated only in Line [algline:set95nu] within Update-DS-Rad-Decr(\(i\)), where it is assigned the value of the \(i\)-th valid radius \(\hat{\nu}_i\). This event occurs only if \(\hat{\nu}_i < \nu_i^\text{(old)}\) as indicated by Lines [algline:while95find95small95nu] and [algline:nu95decreases], and thus we have \(\nu_i \leq \hat{\nu}_i\). In turn, the \(i\)-th valid radius \(\hat{\nu}_i\) is updated to \(\max(\tilde{\nu}_i, \nu_{i-1})\) in Lines [algline:set95hat95nu951] and [algline:set95hat95nu952]. Based on these observations, the proof of the statement proceeds by induction on the number of levels after the adversarial edge insertion. For the base case where \(i = 0\), since \(\nu_{-1} = 0\) we have \(\nu_0 \leq \hat{\nu}_0 = \tilde{\nu}_0\), which is at most \(2(1+\epsilon)^2\mu_0^*\) based on 4. Regarding the induction step, we analyze separately the two possible cases:

  • Assume that \(\tilde{\nu}_i \ge \nu_{i-1}\), which implies that \(\hat{\nu}_i = \tilde{\nu}_{i}\). Using that \(\nu_i \leq \hat{\nu}_i\) and 4, it follows that \(\nu_i \leq \tilde{\nu}_i \leq 2 (1+\epsilon)^2 \mu_i^*\), as needed.

  • Assume that \(\tilde{\nu}_i < \nu_{i-1}\), which implies that \(\hat{\nu}_i = \nu_{i-1}\). Using that \(\nu_i \leq \hat{\nu}_i\) and [property95rad953] (see [obs:incr95nu95monoton]), it follows that \(\nu_i = \nu_{i-1}\). By the induction hypothesis, we have \(\nu_{i-1} \le 2 (1+\epsilon)^2 \mu_{j'}^*\) where \(j'= \max \{\ell \in [0, i - 1] \mid \tilde{\nu}_\ell \ge \nu_{\ell-1}\}\). By our assumption that \(\tilde{\nu}_i < \nu_{i-1}\), we can infer that \(j'\) is also equal to \(\max \{\ell \in [0, i] \mid \tilde{\nu}_\ell \ge \nu_{\ell-1}\}\). Therefore, we conclude that \(\nu_i = \nu_{i-1} \leq 2 (1+\epsilon)^2 \mu_j^*\) where \(j = \max \{\ell \in [0, i] \mid \tilde{\nu}_\ell \ge \nu_{\ell-1}\}\), as required.

 ◻

Notably, we can lower bound the optimal \((k, z)\)-clustering cost with respect to the \(\mu_i^*\) values by reusing Lemma [lem:lower95bound95opt], which we restate for convenience. The reason Lemma [lem:lower95bound95opt] continues to hold after every adversarial edge insertion in the incremental setting is as follows. After every adversarial edge insertion, the proof of Lemma [lem:lower95bound95opt] (given in 7) can be repeated with two modifications: in [clm:rel95Y95Fi] we replace 6 by its incremental equivalent 10, and in [clm:Fi95shrink] we replace 3 by its incremental counterpart 13. The reader may also find it helpful to refer to the discussion in 4.1.3 just before Lemma [lem:lower95bound95opt]. Recall that \(\gamma \in (\beta, 1)\) is the parameter used in 10.

5.2.4 Size of the Bicriteria Approximate Solution and Proof of Theorem [thm:incr95alg]↩︎

Lemma 22. After an adversarial edge insertion, the size of the bicriteria approximate solution \(S\) is with high probability at most \(O(k \log^3 n \, \log_{1+\epsilon}nW)\).

Proof. After an adversarial edge insertion, the bicriteria approximate solution \(S\) equals \(\bigcup_{i=0}^{t} S_i\) according to Line [algline:assign95solution]. Since we always have \(t = O(\log n)\) by 3, in order to conclude the proof, we upper bound the size of each \(i\)-th candidate set \(S_i\) by \(O(k \log^2 n \, \log_{1+\epsilon}nW)\). Notice that the size of the last \(t\)-th candidate set \(S_t\) is at most \(O(k \log n)\) by construction in Lines [algline:beg95resample] and [algline:last95level95assign]. For a fixed level \(i \in [0, t-1]\), the \(i\)-th candidate set \(S_i\) is updated in Line [algline:extend95candidate95set], where it is merged with the corresponding \(i\)-th supporting candidate set \(\tilde{S}_i\). The \(i\)-th supporting candidate set \(\tilde{S}_i\) is constructed in Line [algline:construct95support95candidate95set], by including each vertex of the \(i\)-th execution set \(U_i\) independently with probability \(\min\big(\frac{\alpha k\log n}{|U_i|}, 1\big)\), where \(\alpha\) is a sufficiently large constant. Hence by a straightforward application of Chernoff bound (see 2), we can infer that whenever a supporting candidate set \(\tilde{S}_i\) is obtained, it holds that \(|\tilde{S}_i| = O(\alpha k \log n) = O(k \log n)\) with probability at least \(1 - \frac{1}{n^{8\alpha}}\) (see also 4).

Regarding the size of the \(i\)-th candidate set \(S_i\), there are two crucial observations to be made: First, the \(i\)-th candidate set \(S_i\) receives new vertices only if the function First-Level-Decrease\(()\) returns a level \(j\) smaller than \(t\) (i.e., \(j < t\)) in Line [algline:first95level95decr]. Second, the value of the \(j\)-th radius \(\nu_j\) is decreased inside the function Update-DS-Rad-Decr(\(j\)) in Line [algline:update95ds95rad95decr951]. Thus, whenever the \(i\)-th candidate set \(S_i\) is merged with a new \(i\)-th supporting candidate set \(\tilde{S}_i\) during the Resampling Phase, there is a level \(j\) such that the \(j\)-th radius \(\nu_j\) is decreased.

Based on [obs:nu95only95decr95power9540143eps41] ([property95rad951] and [property95rad952]), the total number of times a radius of a fixed level can be decreased is upper bounded by \(O(\log_{1+\epsilon} nW)\). Therefore, [obs:nu95only95decr95power9540143eps41] 3 imply that the total number of times any radius can be decreased is upper bounded by \(O(\log_{1+\epsilon} nW \cdot \log n)\). In turn, the number of times an \(i\)-th supporting candidate set is constructed and the \(i\)-th candidate set receives new vertices is upper bounded by \(O(\log_{1+\epsilon} nW \cdot \log n)\). By applying a union bound over the possible supporting candidate sets, we can deduce that with high probability the \(i\)-th candidate set receives at most \(O(k \log n)\) new vertices up to \(O(\log_{1+\epsilon} nW \cdot \log n)\) times. As a result, the size of the \(i\)-th candidate set \(S_i\) is always upper bounded by \(O(k \log^2 n \cdot \log_{1+\epsilon} nW)\) with high probability.

By applying a union bound over the \(t = O(\log n)\) candidate sets \(S_i\), we conclude that with high probability for all levels \(i \in [0, t]\) it holds that \(|S_i| = O(k \log^2 n \cdot \log_{1+\epsilon} nW)\) after an adversarial edge insertion. As a consequence, with high probability it holds that \(|S| = O(k \log^3 n \cdot \log_{1+\epsilon} nW)\) after an adversarial edge insertion, as required. ◻

After an adversarial edge insertion, for a fixed level \(i: 0 \leq i < t\) it holds that \(\sum_{i \leq j < t} |U_j \setminus U_{j+1}| \leq |U_i|\).

Proof. For every level \(j\), we have \(U_{j+1} \subseteq U_j\) due to Lines [algline:next95exec95set951] and [algline:next95exec95set952]. Moreover, notice that the subsets \(\{U_j \setminus U_{j+1} \}_{i \leq j < t}\) are pairwise disjoint and subsets of the \(i\)-th execution set \(U_i\). Therefore, the sum of their sizes is at most the size of \(U_i\), as needed. ◻

By combining the previous observations and lemmas, we can now finish the proof of [thm:incr95alg] which we restate for convenience.

Proof. Consider the incremental bicriteria approximation 4 and its analysis. The claim regarding the amortized update time follows from Lemma 14, and the claim regarding the size of the bicriteria approximate solution follows from Lemma 22. Since the bicriteria approximate assignment \(\sigma\) maps each vertex to a candidate center in \(S\), the size of the bicriteria approximate assignment follows from 22 as well. Hence, it remains to upper bound the approximation ratio, which we establish in the rest of the proof.

Based on 21, each radius \(\nu_i\) is bounded by some \(\mu^*_j\), where \(i \in [0, t)\) and \(j \in [0, i]\). For a fixed level \(j \in [0, t]\), let \(A_j\) be the set of all indices \(i \in [j, t)\) that use \(\mu^*_j\) in their bound in 21. Notice that each level \(i \in [0, t)\) belongs to exactly one such set \(A_j\) with \(j \in [0, i]\). Then by 18, the value of \(\operatorname{cost}^z(S)\) and \(\operatorname{cost}^z(\sigma)\) can be upper bounded as follows:28 \[\begin{align} \operatorname{cost}^z(S), \operatorname{cost}^z(\sigma) &\;\leq\; \sum_{i=0}^{t-1} |U_i \setminus U_{i+1}| (\nu_i)^z \;=\; \sum_{j=0}^t \sum_{i \in A_j} |U_i \setminus U_{i+1}| (\nu_i)^z \\ &\;\leq\; \sum_{j=0}^t \sum_{i \in A_j} |U_i \setminus U_{i+1}| \, (2(1+\epsilon)^2\mu^*_j)^z \\ &\;=\; (2(1+\epsilon)^2)^z \sum_{j=0}^t (\mu^*_j)^z \sum_{i \in A_j} |U_i \setminus U_{i+1}|. \end{align}\] Based on [obs:bound95for95size95U], it holds that \(\sum_{i \in A_j} |U_i \setminus U_{i+1}| \leq |U_j|\), and recall that if \(i \in A_j\) then \(j \leq i < t\). Thus, we can conclude that: \[\operatorname{cost}^z(S), \operatorname{cost}^z(\sigma) \;\leq\; (2(1+\epsilon)^2)^z \cdot \sum_{j=0}^t (\mu^*_j)^z \cdot |U_j|.\] Based on [lem:lower95bound95opt], we have: \[\sum_{j=0}^t (\mu^*_j)^z \cdot |U_j| \;\leq\; \frac{2r}{1-\gamma} \cdot \text{OPT},\] where \(r = \ceil{\log_{(1-\beta)}((1-\gamma)/3)}\). In turn, this implies that: \[\operatorname{cost}^z(S), \operatorname{cost}^z(\sigma) \; \leq \; \frac{2r (2(1+\epsilon)^2)^z}{1-\gamma} \cdot \text{OPT}.\] Therefore, the approximation ratio of the incremental 4 is upper bounded by \(\frac{2r (2(1+\epsilon)^2)^z}{1-\gamma}~=~O(1)\), and the claim follows. ◻

6 From Bicriteria Approximation to \((k, z)\)-Clustering on Incremental Graphs↩︎

Thus far, our incremental bicriteria approximation 4 of [thm:incr95alg] efficiently maintains an \((O(1), O(\log^3 n \, \log_{1+\epsilon}nW))\)-bicriteria approximate solution to the \((k,z)\)-clustering problem on a graph undergoing edge insertions. Recall that by 3, this means that 4 maintains a subset of vertices \(S \subseteq V\) such that \(\operatorname{cost}^z(S) \leq O(\text{OPT})\) and \(|S| \leq O(k \log^3 n \, \log_{1+\epsilon}nW)\). Our goal though is to compute a constant-factor approximate solution \(C\) for the \((k, z)\)-clustering problem (see 1), and thus the output \(C\) must consist of at most \(k\) vertices. In other words, we want to maintain a subset of vertices \(C \subseteq V\) such that \(\operatorname{cost}^z(C)\leq O(\text{OPT})\) and \(|C| \leq k\).

In this section, we describe an efficient incremental reduction algorithm that reduces the size of an \((O(1), O(\log^3 n \, \log_{1+\epsilon}nW))\)-bicriteria approximate solution \(S\) by converting it into a constant-factor approximate \((k, z)\)-clustering solution \(C\) in a graph that undergoes edge insertions. To achieve this, we maintain a \((k, z)\)-clustering solution \(C\) over the bicriteria approximate solution \(S\), using weights on \(S\) determined by the corresponding bicriteria approximate assignment \(\sigma\).

We remark that our [thm:bicr95to95kzclustering] (the incremental reduction algorithm) is an adaptation of a theorem in [29], [55] (its variant appears as 27) in the incremental graph setting. The following definitions are used to analyze the total update time in [thm:bicr95to95kzclustering]. Notice that in 12, the value of \(\sigma_\text{inc}(V)\) is equal to the total number of batches of new vertices entering the image of \(\sigma\). Hence, whenever \(|\sigma_\text{max}(V)|\) increases in a single update due to multiple new vertices, \(\sigma_\text{inc}(V)\) increases by one.

Definition 11. Given a dynamic \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\), the dynamic set \(\sigma_\text{max}(V) \mathrel{\vcenter{:}}= \{s \in V \mid s \in \sigma(V) \text{ at some moment}\}\) contains all vertices that have ever belonged to the image of \(\sigma\).

Definition 12. Given a dynamic \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\), the value \(\sigma_\text{inc}(V)\) denotes the total number of times that \(|\sigma_\text{max}(V)|\) increases. Formally, \(\sigma_\text{inc}(V) \coloneq |\{\tau \in \mathbb{N} \mid |\sigma_\text{max}(V)| \text{ increases at the } \tau\text{-th update}\}|\).

theorembicrtokzclustering There is a (randomized) dynamic algorithm for the \((k,z)\)-clustering problem that given:

  • a weighted undirected graph \(G = (V, E, w)\) subject to edge insertions,

  • an integer \(k \geq 1\), constants \(z \geq 1, \epsilon \in (0, \frac{1}{2})\), and

  • a dynamic \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\), for any \(\alpha \geq 1, \beta \geq 1\),

maintains an \(O(\alpha)\)-approximate \((k,z)\)-clustering solution with a total update time of: \[|\sigma_\text{max}(V)| \cdot m^{1+o(1)} \;+\; \tilde{O}\big(|\sigma_\text{max}(V)|^2 \cdot \sigma_\text{inc}(V) \,+\, m \cdot |\sigma_\text{max}(V)|^{1+\epsilon}\big).\]

A pseudocode of our incremental reduction algorithm is provided in 5. Our incremental reduction algorithm for the \((k,z)\)-clustering problem (in [thm:bicr95to95kzclustering]) uses the fully dynamic spanner algorithm of Baswana, Khurana, and Sarkar [49]. Their initial result is for unweighted graphs, but as the authors mention in their Remark 1.2 in [49], it can be extended to weighted graphs.

Lemma 23 (Theorem 4.12/Theorem 5.7 in [49]). There is a randomized fully dynamic algorithm that, given a weighted undirected graph \(G = (V, E, w)\) subject to edge updates and a constant \(\lambda \geq 1\), maintains an \(O(2\lambda-1)\)-spanner of expected size \(\tilde{O}(n^{1+\frac{1}{\lambda}})\) and has an expected amortized update time of \(\tilde{O}(1)\). The preprocessing time of the algorithm is \(\tilde{O}(m)\).29

Note that an incremental spanner (i.e., non-increasing distances) would be sufficient; however, the fully dynamic spanner algorithm of 23 is already suitable in our context. The expected guarantees can be turned into high probability guarantees by running \(\Theta(\log n)\) copies of the algorithm in parallel; see [56] for more details. The incremental reduction algorithm also utilizes the static \((k, z)\)-clustering algorithm of Dupre la Tour and Saulpic [32].

Lemma 24 ([32]). There is randomized algorithm for the \((k, z)\)-clustering problem that, given a weighted undirected graph \(G = (V, E, w)\), an integer \(k \geq 1\), and constants \(z \geq 1, \lambda \geq 5\), computes with high probability an \(O(\lambda^6)\)-approximate \((k, z)\)-clustering solution in \(\tilde{O}(m^{1+\frac{1}{\lambda}})\) time.

At a high level, we maintain the \((k, z)\)-clustering solution \(C\) over the bicriteria approximate solution \(S\), using weights on \(S\) derived from the bicriteria approximate assignment \(\sigma\). Hence, the input graph instance contains both edge and vertex weights, and the static \((k, z)\)-clustering algorithm should be able to work with vertex weights in our context. The algorithm by Dupre la Tour and Saulpic [32] is a simplification of the algorithm by Mettu and Plaxton [28].30 Even though the authors in [32] present a version without vertex weights, the authors in [28] present a version with weights on points. Thus, it is not surprising that the static \((k, z)\)-clustering algorithm of 24 can be generalized to handle vertex weights. For completeness, we provide a more detailed discussion of this in 8.

Based on the discussion in 8, we can safely assume for the rest of the paper that the static \((k, z)\)-clustering algorithm of 24 works on weighted \((k, z)\)-clustering instances, as defined in [def:wgt95k95median]. The randomization in [thm:bicr95to95kzclustering] arises from the randomization in 23 24; replacing the randomized subroutines with deterministic counterparts would yield a deterministic version of [thm:bicr95to95kzclustering].

6.0.0.1 Adversarial updates.

Our aim is to combine the incremental bicriteria approximation 4 with the incremental reduction 5. Hence, the output \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\) of 4 becomes the input \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\) of 5. The assignment \(\sigma\) in 4 can be modified due to an adversarial edge insertion into the graph \(G\), making it a dynamic assignment in [thm:bicr95to95kzclustering].

Since our incremental reduction algorithm is given as input a dynamic bicriteria approximate assignment, one type of adversarial update consists of modifications to the assignment \(\sigma\). The other type of adversarial update involves edge insertions into the input graph \(G\), where each adversarial edge insertion can trigger a batch of distance decreases between vertices in \(G\).

Note that an efficient combination of 4 and 5, requires that both (1) the total number of vertices that have ever belonged to the image of the dynamic assignment \(\sigma\) (i.e., \(|\sigma_\text{max}(V)|\)) and (2) the total number of batches of new vertices entering \(\sigma_\text{max}(V)\) (i.e., \(\sigma_\text{inc}(V)\)) remain bounded. For efficiency reasons, we employ the approximate distance estimates from incremental \((1+\epsilon)\)-approximate SSSP algorithms and perform lazy updates by maintaining distances as powers of \((1+\epsilon)\).

6.0.0.2 State of the reduction algorithm.

Our incremental reduction 5 maintains a dynamic \((\alpha, \beta)\)-bicriteria approximate solution \(S \mathrel{\vcenter{:}}= \sigma(V)\), which is the image of the dynamic \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\) from the input.31 For every vertex \(s \in S\), the reduction algorithm maintains an incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_s\) providing distance estimates \(\delta_s(\cdot)\). In turn, the reduction algorithm maintains a complete subgraph \(H \mathrel{\vcenter{:}}= (S, S \times S, w_H)\) with edge and vertex weights, specified as follows:

  • Each vertex \(s \in S\) belongs to the vertex set of \(H\), and the vertex weight \(\operatorname{wt}(s)\) is equal to \(|\sigma^{-1}(s)|\). In other words, the vertex weight of \(s\) in \(H\) is the number of vertices mapped to \(s\) under the assignment \(\sigma(\cdot)\).

  • For every pair of vertices \(x, y \in S\), the edge \((x, y)\) belongs to the edge set of \(H\) with an edge weight \(w_H(x, y)\) equal to \(\min(\delta_x(y), \delta_y(x))\), rounded up to the nearest power of \((1 + \epsilon)\).

The incremental reduction algorithm then applies the dynamic spanner algorithm \(\mathcal{SP}\) of 23 on the subgraph \(H\) to obtain an edge-sparsified graph \(\tilde{H}\). Finally, the reduction algorithm runs the static \((k, z)\)-clustering algorithm \(\mathcal{CL}\) of 24 on the weighted \((k, z)\)-clustering instance \((\tilde{H}, k, z, \operatorname{wt})\), producing a \((k, z)\)-clustering solution \(C\).

6.1 Adversarial Edge Insertions and Assignment Modifications↩︎

In the next two paragraphs, we first describe how our incremental reduction algorithm processes an adversarial edge insertion into the graph \(G\), and then how it processes a batch of modifications to the \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\). We remark that in fact, each adversarial edge insertion into the graph \(G\) can trigger a batch of distance decreases between vertices in \(G\) alongside a batch of modifications to \(\sigma\).

6.1.0.1 Edge insertion into \(G\).

When an edge \((u, v)\) is inserted into the graph \(G = (V, E, w)\) from the adversary, the incremental reduction algorithm proceeds as follows. Initially, this edge insertion \((u, v)\) is forwarded to all the incremental \((1+\epsilon)\)-approximate SSSP algorithms \(\mathcal{A}_s\), where \(s \in S\). Based on 1, the incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_s\) reports a change whenever the distance estimate \(\delta_s(x)\) is updated for a vertex \(x \in V\). After the adversarial insertion of the edge \((u, v)\) into the graph \(G\), let \(\Delta_S\) be the set containing all the pairs of vertices \((x, y) \in S \times S\) such that the value of the distance estimate \(\delta_x(y)\) becomes less than \(\frac{w_H(x, y)}{1+\epsilon}\).

Next, for every pair of vertices \((x, y) \in \Delta_S\), the incremental reduction algorithm updates the edge weights \(w_H(x, y)\) and \(w_H(y, x)\) to \(\min(\delta_{x}(y),\delta_{y}(x))\), rounding them up to the nearest power of \((1+\epsilon)\). Let \(B \mathrel{\vcenter{:}}= \big\{\big(x, y, w_H(x, y)\big) \mid (x, y) \in \Delta_S \text{ or } (y, x) \in \Delta_S\big\}\) be the batch of distance decreases. The reduction algorithm then forwards the batch \(B\) of distance decreases to the dynamic spanner algorithm \(\mathcal{SP}\) from 23,32 which runs on \(H\) and maintains the edge-sparsified graph \(\tilde{H}\).

6.1.0.2 Modifications to the assignment \(\sigma\).

Let \(R_S\) be the set containing all vertices \(s \in V\) for which the preimage \(\sigma^{-1}(s)\) is modified. For every vertex \(s \in R_S\) that already belongs to the dynamic \((\alpha, \beta)\)-bicriteria approximate solution \(S\), the reduction algorithm updates only its vertex weight \(\operatorname{wt}(s)\) to \(|\sigma^{-1}(s)|\).

For every vertex \(s \in R_S\) that does not belong to the dynamic \((\alpha, \beta)\)-bicriteria approximate solution \(S\), the incremental reduction algorithm proceeds as follows:

  1. First, the reduction algorithm adds \(s\) to \(S\) and to the vertex set of \(H\), and sets its vertex weight \(\operatorname{wt}(s)\) to \(|\sigma^{-1}(s)|\).

  2. Second, the reduction algorithm initializes an incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_s\) providing distance estimates \(\delta_s(\cdot)\). Then for every vertex \(x \in S\), the edge weights \(w_H(s, x)\) and \(w_H(x, s)\) are set to \(\min(\delta_s(x), \delta_x(s))\), rounded up to the nearest power of \((1+\epsilon)\).

Next, if at least one new vertex is added to \(S\) (i.e., \(|\sigma_\text{max}(V)|\) of 11 increases) then the reduction algorithm restarts the dynamic spanner algorithm \(\mathcal{SP}\) on the subgraph \(H\), producing a new edge-sparsified graph \(\tilde{H}\). Otherwise all vertices in \(R_S\) already belong to \(S\), and the dynamic spanner algorithm \(\mathcal{SP}\) maintains the same edge-sparsified graph \(\tilde{H}\).

At the end of each adversarial update, the incremental reduction algorithm runs the static \((k, z)\)-clustering algorithm \(\mathcal{CL}\) of 24 on the updated weighted \((k, z)\)-clustering instance \((\tilde{H}, k, z, \operatorname{wt})\), producing the maintained \((k, z)\)-clustering solution \(C\).

Figure 5: Incremental Reduction Algorithm

6.1.0.3 Implementation of Line [algline:Delta95S].

We emphasize that the set \(\Delta_S\) in Line [algline:Delta95S] of 5 can be computed during the update procedure of the incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_x\). This is achieved by extending \(\mathcal{A}_x\) to track the necessary quantities within its update procedure, without incurring additional asymptotic cost.

6.2 Analysis of the Incremental Reduction Algorithm↩︎

Our goal in this section is to prove Theorem [thm:bicr95to95kzclustering], by analyzing the incremental reduction 5. We remind the reader that the reduction algorithm maintains weighted \((k, z)\)-clustering instances \(\mathcal{K} \mathrel{\vcenter{:}}= (H, k, z, \operatorname{wt})\) and \(\mathcal{\tilde{K}} \mathrel{\vcenter{:}}= (\tilde{H}, k, z, \operatorname{wt})\) (edge-sparsified) induced by the dynamic bicriteria approximate solution \(S = \sigma(V)\) in the incremental graph \(G\). To distinguish the cost of a \((k, z)\)-clustering solution \(C\) in \(\mathcal{K}\) from its cost in \(G\), we use the notation \(\operatorname{cost}^z_{\operatorname{wt}}(C, \mathcal{K})\) and \(\operatorname{cost}^z(C, G)\) respectively.

6.2.1 Approximation Ratio↩︎

Let \(\rho_1 = O(1)\) denote the constant in the approximation ratio of the dynamic spanner algorithm \(\mathcal{SP}\) from 23, and \(\rho_2 = O(1)\) denote the constant in the approximation ratio of the static \((k, z)\)-clustering algorithm \(\mathcal{CL}\) from 24.

Lemma 25. For every pair of vertices \(x, y \in S\), it always holds that: \[\operatorname{dist}_G(x, y) \,\leq\, \operatorname{dist}_{\tilde{H}}(x, y) \,\leq\, (1+\epsilon)^2 \rho_1 \cdot \operatorname{dist}_G(x, y).\]

Proof. For any two vertices \(x, y \in S\), the edge weight \(w_H(x, y)\) in the subgraph \(H\) is set and maintained as \(\min(\delta_x(y), \delta_y(x))\), rounded up to the nearest power of \((1+\epsilon)\). In turn, this implies that \(w_H(x, y) \leq (1+\epsilon) \min(\delta_x(y), \delta_y(x))\). Based on 1, the edge weight \(w_H(x, y)\) is upper bounded by \((1+\epsilon)^2 \operatorname{dist}_G(x, y)\). Since \(\operatorname{dist}_H(x, y) \leq w_H(x, y)\), by 23 it follows that \(\operatorname{dist}_{\tilde{H}}(x, y) \leq \rho_1 \cdot \operatorname{dist}_H(x, y) \leq \rho_1 (1+\epsilon)^2 \cdot \operatorname{dist}_G(x, y)\), as needed. Furthermore, the incremental \((1+\epsilon)\)-approximate SSSP algorithm of 1 and the dynamic spanner algorithm of 23 do not underestimate distances. Since the edge weights in \(H\) are also rounded up, it follows that \(\operatorname{dist}_G(x, y) \leq \operatorname{dist}_{\tilde{H}}(x, y) \leq (1+\epsilon)^2 \rho_1 \cdot \operatorname{dist}_G(x, y)\), as required. ◻

Lemma 26. For every vertex \(s \in S\), its vertex weight \(\operatorname{wt}(s)\) in \(H\) and \(\tilde{H}\) is always equal to \(|\sigma^{-1}(s)|\).

Proof. Whenever the preimage \(\sigma^{-1}(s)\) of a vertex \(s \in V\) is modified, the incremental reduction algorithm adds the vertex \(s\) to the set \(R_S\) in Line [algline:addto95Rs] of 5. In turn, its vertex weight \(\operatorname{wt}(s)\) is updated to \(|\sigma^{-1}(s)|\) in Line [algline:update95wt] of 5. ◻

The following lemma is a variant of a theorem from [29], [55] usually stated for point sets in metric spaces; the same statement holds naturally for graphs, and we extend it to apply to our edge-sparsified graph \(\tilde{H}\). Essentially, we use it to argue that it suffices to solve the weighted \((k, z)\)-clustering instance induced by the dynamic bicriteria approximate assignment \(\sigma\). The proof of 27 follows from 28 29.

Lemma 27 (see also [29], [55], [57]). Any \(\rho\)-approximate solution to the weighted \((k, z)\)-clustering instance \(\tilde{\mathcal{K}} = (\tilde{H}, k, z, \operatorname{wt})\) is also an \(O(\alpha \rho)\)-approximate solution to the \((k, z)\)-clustering instance \((G, k, z)\).

Proof. By 28 and 29, we have: \[\begin{align} \operatorname{cost}^z(C, G) &\;\leq\; 2^{z-1} \cdot \big(\alpha \text{OPT}+ \rho \text{OPT}_{\tilde{\mathcal{K}}}\big),\;\text{and} \\ \text{OPT}_{\tilde{\mathcal{K}}} &\;\leq\; \big(4 (1+\epsilon)^2 \rho_1\big)^z \cdot \big(\alpha \text{OPT}+ \text{OPT}\big). \end{align}\] By combining these two, we deduce that: \[\begin{align} \operatorname{cost}^z(C, G) &\;\leq\; 2^{z-1} \cdot \Big(\alpha \text{OPT}+ \rho \, \big(4 (1+\epsilon)^2 \rho_1\big)^z \cdot \big(\alpha \text{OPT}+ \text{OPT}\big)\Big) \\ &\;\leq\; 2^z \cdot \Big(\alpha \cdot \big(\rho \, \big(4 (1+\epsilon)^2 \rho_1\big)^z + 1\big)\Big) \cdot \text{OPT}\; \leq \; \alpha \rho \, \big(16 (1+\epsilon)^2 \rho_1\big)^z \cdot \text{OPT}. \end{align}\] Therefore as \(\rho_1, z = O(1)\) and \(\epsilon \in (0, \frac{1}{2})\), the \((k, z)\)-clustering cost of \(C\) in \((G, k, z)\) is upper bounded by \(O(\alpha \rho \cdot \text{OPT})\), as required. ◻

Corollary 5. After an adversarial update, the cost of the \((k, z)\)-clustering solution \(C\) is at most \(O(\alpha \cdot \text{OPT})\).

Proof. The incremental reduction algorithm applies the dynamic spanner algorithm \(\mathcal{SP}\) of 23 on the subgraph \(H\) to obtain the subgraph \(\tilde{H}\). The maintained \((k, z)\)-clustering solution \(C\) is the output of the static \((k, z)\)-clustering algorithm \(\mathcal{CL}\) of 24 on the weighted \((k, z)\)-clustering instance \(\tilde{\mathcal{K}} = (\tilde{H}, k, z, \operatorname{wt})\).33 Based on 24, we have \(\operatorname{cost}^z_{\operatorname{wt}}(C, \tilde{\mathcal{K}}) \leq \rho_2 \cdot \text{OPT}_{\tilde{\mathcal{K}}}\), where \(\rho_2 = O(1)\). Thus by 27, it follows that \(\operatorname{cost}^z(C, G) \leq O(\alpha \rho_2 \cdot \text{OPT}) = O(\alpha \cdot \text{OPT})\), as needed. ◻

Lemma 28. Consider a \(\rho\)-approximate solution \(C\) to the weighted \((k, z)\)-clustering instance \(\tilde{\mathcal{K}} = (\tilde{H}, k, z, \operatorname{wt})\). Then it holds that: \[\operatorname{cost}^z(C, G) \;\leq\; 2^{z-1} \cdot \big(\alpha \text{OPT}+ \rho \text{OPT}_{\tilde{\mathcal{K}}}\big).\]

Proof. Let \(C\) be a \(\rho\)-approximate solution to the weighted \((k, z)\)-clustering instance \(\tilde{\mathcal{K}} = (\tilde{H}, k, z, \operatorname{wt})\). Since the vertex set of \(\tilde{H}\) is the bicriteria approximate solution \(S = \sigma(V)\), by [def:wgt95k95median] we have: \[\operatorname{cost}_{\operatorname{wt}}^z(C, \tilde{\mathcal{K}}) \;=\; \sum_{s \in S} \operatorname{wt}(s) \cdot \operatorname{dist}_{\tilde{H}}(s, C)^z \;\leq\; \rho \cdot \text{OPT}_{\tilde{\mathcal{K}}}.\] The \((k, z)\)-clustering cost of \(C\) in the \((k, z)\)-clustering instance \((G, k, z)\) (i.e., in the graph \(G\)) is evaluated as follows: \[\begin{align} \operatorname{cost}^z(C, G) &\;=\; \sum_{v \in V} \operatorname{dist}_G(v, C)^z \;\leq\; \sum_{v\in V} \big(\operatorname{dist}_G(v, \sigma(v)) +\operatorname{dist}_G(\sigma(v),C)\big)^z \;\;\;\; \text{(triangle inequality)} \\ &\;\leq\; 2^{z-1} \cdot \sum_{v\in V} \big(\operatorname{dist}_G(v, \sigma(v))^z +\operatorname{dist}_G(\sigma(v),C)^z\big) \\ &\;=\; 2^{z-1} \cdot \Big(\operatorname{cost}^z(\sigma) + \sum_{s \in \sigma(V)} |\sigma^{-1}(s)| \cdot \operatorname{dist}_G(s,C)^z\Big) \;\;\;\; (\text{see~\ref{def:assignment}}) \\ &\;=\; 2^{z-1} \cdot \Big(\operatorname{cost}^z(\sigma) + \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_G(s,C)^z\Big) \;\;\;\; (\text{based on~\ref{lem:wt95of95H}}) \\ &\;\leq\; 2^{z-1} \cdot \Big(\operatorname{cost}^z(\sigma) + \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_{\tilde{H}}(s,C)^z\Big) \;\;\;\; (\text{based on~\ref{lem:comp95dist95Htild95G}})\\ &\;=\; 2^{z-1} \cdot \big(\operatorname{cost}^z(\sigma) + \operatorname{cost}_{\operatorname{wt}}^z(C, \tilde{\mathcal{K}})\big) \;\leq\; 2^{z-1} \cdot \big(\alpha \text{OPT}+ \rho \text{OPT}_{\tilde{\mathcal{K}}}\big) \;\;\;(\text{\sigma is (\alpha, \beta)-bicriteria approximate}). \end{align}\] ◻

Lemma 29. For the optimal \((k, z)\)-clustering cost of \(\tilde{\mathcal{K}} = (\tilde{H}, k, z, \operatorname{wt})\), it holds that: \[\text{OPT}_{\tilde{\mathcal{K}}} \;\leq\; \big(4 (1+\epsilon)^2 \rho_1\big)^z \cdot \big(\alpha \text{OPT}+ \text{OPT}\big).\]

Proof. Let \(C^*\) be an optimal \((k, z)\)-clustering solution to \((G, k, z)\), let \(\sigma^*: C^* \to \sigma(V)\) be the assignment that maps each center in \(C^*\) to its closest vertex in \(\sigma(V) = S\) with respect to \(\operatorname{dist}_G(\cdot, \cdot)\), and let \(\pi: \sigma(V) \to C^*\) be the assignment that maps each vertex in \(\sigma(V)\) to its closest center in \(C^*\) with respect to \(\operatorname{dist}_G(\cdot, \cdot)\). Consider the subset of vertices \(Y \mathrel{\vcenter{:}}= \sigma^*(C^*) \subseteq \sigma(V)\). Then using 25, we obtain that: \[\begin{align} \operatorname{cost}_{\operatorname{wt}}^z(Y, \tilde{\mathcal{K}}) &\;=\; \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_{\tilde{H}}(s, Y)^z \;\leq\; \big((1+\epsilon)^2 \rho_1\big)^z \cdot \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_G(s, Y)^z \\ &\;\leq\; \big((1+\epsilon)^2 \rho_1\big)^z \cdot \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \big(\operatorname{dist}_G(s, \pi(s)) + \operatorname{dist}_G(\pi(s), Y)\big)^z \\ &\;\leq\; 2^{z-1} \big((1+\epsilon)^2 \rho_1\big)^z \cdot \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \big(\operatorname{dist}_G(s, \pi(s))^z + \operatorname{dist}_G(\pi(s), \sigma^*(\pi(s)))^z\big). \end{align}\] By the construction of \(\sigma^*\), we have \(\operatorname{dist}_G(\pi(s), \sigma^*(\pi(s))) \leq \operatorname{dist}_G(\pi(s), s)\), and thus it follows that: \[\operatorname{cost}_{\operatorname{wt}}^z(Y, \tilde{\mathcal{K}}) \leq \big(2 (1+\epsilon)^2 \rho_1\big)^z \cdot \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_G(s, \pi(s))^z.\] Since \(\text{OPT}_{\tilde{\mathcal{K}}} \leq \operatorname{cost}_{\operatorname{wt}}^z(Y, \tilde{\mathcal{K}})\), it holds that \(\text{OPT}_{\tilde{\mathcal{K}}} \leq \big(2 (1+\epsilon)^2 \rho_1\big)^z \cdot \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_G(s, \pi(s))^z\). An upper bound on \(\sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_G(s, \pi(s))^z\) is given by: \[\begin{align} \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_G(s, \pi(s))^z &\;=\; \sum_{s \in \sigma(V)} \operatorname{wt}(s) \cdot \operatorname{dist}_G(s, C^*)^z \\ &\;\leq\; \sum_{s \in \sigma(V)} \sum_{v \in \sigma^{-1}(s)} \big(\operatorname{dist}_G(\sigma(v), v) + \operatorname{dist}_G(v, C^*)\big)^z \;\;\; \text{(based on~\ref{lem:wt95of95H})} \\ &\;\leq\; 2^{z-1} \cdot \sum_{v \in V} \big(\operatorname{dist}_G(\sigma(v), v)^z + \operatorname{dist}_G(v, C^*)^z\big) \\ &\;\leq\; 2^{z-1} \cdot \big(\alpha \text{OPT}+ \text{OPT}\big). \end{align}\] Therefore, we conclude that \(\text{OPT}_{\tilde{\mathcal{K}}} \leq \big(2 (1+\epsilon)^2 \rho_1\big)^z \cdot 2^{z-1} \cdot \big(\alpha \text{OPT}+ \text{OPT}\big) \leq \big(4 (1+\epsilon)^2 \rho_1\big)^z \cdot \big(\alpha \text{OPT}+ \text{OPT}\big)\). ◻

6.2.2 Total Update Time and Proof Completion of [thm:bicr95to95kzclustering]↩︎

Lemma 30. The total update time of the incremental reduction 5 is: \[|\sigma_\text{max}(V)| \cdot m^{1+o(1)} \;+\; \tilde{O}\big(|\sigma_\text{max}(V)|^2 \cdot \sigma_\text{inc}(V) \,+\, m \cdot |\sigma_\text{max}(V)|^{1+\epsilon}\big).\]

Proof. Regarding the update time of 5, we need to provide an upper bound on the total time due to all the incremental \((1+\epsilon)\)-approximate SSSP algorithms. In addition, we need to provide an upper bound on the total time due to the dynamic spanner algorithm \(\mathcal{SP}\) and the static \((k, z)\)-clustering algorithm \(\mathcal{CL}\).

Based on 1, the total update time of a single incremental \((1+\epsilon)\)-approximate SSSP algorithm is \(m^{1+o(1)}\). Notice that the reduction Algorithm 5 initializes a new incremental \((1+\epsilon)\)-approximate SSSP algorithm only when a new vertex is added to the \((\alpha, \beta)\)-bicriteria approximate solution \(S\). Hence, the total update time due to all incremental \((1+\epsilon)\)-approximate SSSP algorithms is upper bounded by \(|\sigma_\text{max}(V)| \cdot m^{1+o(1)}\). Regarding the total update time due to the dynamic spanner algorithm \(\mathcal{SP}\), we consider separately the two types of adversarial updates:

  • Consider an adversarial edge insertion into the graph \(G\). For every pair of vertices \(x, y \in S\) such that the distance estimate \(\delta_x(y)\) decreases by a factor of at least \((1+\epsilon)\), the reduction Algorithm 5 adds the pair \((x, y)\) to the set \(\Delta_S\). In turn, a batch \(B\) of distance decreases (see Line [algline:def95of95batch] in 5) is passed to the dynamic spanner algorithm \(\mathcal{SP}\). Hence, the total number of distance decreases passed to \(\mathcal{SP}\) is \(\tilde{O}(|\sigma_\text{max}(V)|^2)\). Thus based on 23, the total update time of \(\mathcal{SP}\) under adversarial edge insertions is \(\tilde{O}(|\sigma_\text{max}(V)|^2) \cdot \tilde{O}(1) = \tilde{O}(|\sigma_\text{max}(V)|^2)\).

  • Consider a batch of modifications to the \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\). The dynamic spanner algorithm \(\mathcal{SP}\) is restarted whenever a batch of new vertices enters the bicriteria approximate solution \(S\) (see Lines [algline:if95sigma95max95inc] and [algline:rest95spanner] of 5), which occurs \(\sigma_\text{inc}(V)\) times over all assignment modifications (see 12). Since the subgraph \(H\) consists of \(|S|^2\) edges, by 23 the total time incurred by \(\mathcal{SP}\) under assignment modifications is at most \(\tilde{O}(|S|^2 \cdot \sigma_\text{inc}(V))\).

Therefore, the total update time due to the dynamic spanner algorithm is \(\tilde{O}(|S|^2 \cdot \sigma_\text{inc}(V))\); we have \(S = \sigma_{\text{max}}(V)\), since no vertices are ever removed from the bicriteria approximate solution \(S\). After every adversarial update, the static \((k, z)\)-clustering algorithm \(\mathcal{CL}\) runs from scratch on the edge-sparsified graph \(\tilde{H}\). Since the subgraph \(H\) consists of \(|S|\) vertices, the edge-sparsified subgraph \(\tilde{H}\) contains at most \(\tilde{O}(|S|^{1+\frac{1}{\lambda}})\) edges according to 23, where \(\lambda = \frac{3}{\epsilon}\). Consequently, using 24 with \(\lambda = \frac{3}{\epsilon}\), the running time of \(\mathcal{CL}\) per adversarial update is \(\tilde{O}(|S|^{1+\epsilon})\). The \(\tilde{O}(|\sigma_\text{max}(V)|^{1+\epsilon})\) time of \(\mathcal{CL}\) per adversarial update must be multiplied by the number of adversarial updates, which we can safely assume is the number of adversarial edge insertions \(m\), since any modification to \(\sigma\) is triggered by an adversarial edge insertion. By combining all these arguments, the claim on the total update time of the incremental reduction 5 follows. ◻

Proof of [thm:bicr95to95kzclustering]. Consider the incremental reduction 5 and its analysis. The result then follows by 5 30. ◻

6.3 Putting Everything Together↩︎

In this section, we combine the tools we developed in order to obtain our result for the \((k,z)\)-clustering problem on incremental graphs. The next lemma shows that the dynamic spanner algorithm \(\mathcal{SP}\) is restarted only \(\tilde{O}(1)\) times in total.

Lemma 31. Consider the \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\) which is the output of 4 and the input of 5. Then it holds that \(\sigma_\text{inc}(V) = O(\log n \, \log_{1+\epsilon} nW)\).

Proof. The dynamic assignment \(\sigma\) in the incremental bicriteria approximation 4 is modified in Lines [algline:v95to95sigma] and [algline:last95level95assign], and this occurs only when First-Level-Decrease() in Line [algline:first95level95decr] returns a level \(i < t\). In such cases, there exists a level \(i\) for which the corresponding \(i\)-th radius \(\nu_i\) is decreased. As argued in the proofs of 22 14 (see also [obs:nu95only95decr95power9540143eps41] 3), this can happen at most \(O(\log n \cdot \log_{1+\epsilon} nW)\) times overall.

The \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\), which is the output of 4, is the input \((\alpha, \beta)\)-bicriteria approximate assignment \(\sigma\) in 5. Since \(\sigma\) is modified at most \(O(\log n \cdot \log_{1+\epsilon} nW)\) times, it follows by 12 that \(\sigma_\text{inc}(V) = O(\log n \, \log_{1+\epsilon} nW)\), as needed. ◻

Proof. We choose \(\epsilon\) to be \(\frac{0.5}{\lambda}\). Based on [thm:incr95alg], the total update time required to maintain a \((O(1), O(\log^3 n \log_{1+\epsilon} n W))\)-bicriteria approximate assignment \(\sigma\) under adversarial edge insertions is \(m^{1+o(1)}\). Based on [obs:S95extends95only] and the fact that the incremental reduction 5 does not remove vertices from the bicriteria approximate solution \(S\), it follows that \(|\sigma_\text{max}(V)| = |S| = O(k \log^3 n \, \log_{1+\epsilon}nW)\). Also by 31, we have \(\sigma_\text{inc}(V) = O(\log n \, \log_{1+\epsilon} nW)\).

Therefore based on [thm:bicr95to95kzclustering], the total update time to maintain the \(O(1)\)-approximate \((k,z)\)-clustering solution is \(\tilde{O}(k m^{1+o(1)} + k^2 + k^{1+\epsilon} m) = \tilde{O}(k m^{1+o(1)} + k^2 + k^{1+\frac{1}{2\lambda}} m)\). Notice that we can safely assume that \(m \geq k\), since otherwise we can run a static \((k, z)\)-clustering algorithm [32], [33] from scratch after each adversarial edge insertion (see 24). As a result, the stated bounds on the total and amortized update times follow. ◻

6.3.0.1 Disconnected graphs.

Although our arguments are simpler when the input graph \(G\) is connected, the same guarantees hold for disconnected graphs as well. In particular, the input graph \(G\) may be initially empty (i.e., without any edges). In this paragraph, we explain in more detail how our incremental algorithm handles disconnected graphs.

First, observe that in our incremental bicriteria approximation 4 the \(i\)-th valid radius \(\hat{\nu}_i\) depends on the value of \(\tilde{\nu}_i\) determined at Line [algline:check95if95nu95decreases951] or Line [algline:check95if95nu95decreases952] in 4 (see also 8), where \(i \in [0, t)\) is a fixed level. When the graph \(G\) is disconnected, it is possible that \(\tilde{\nu}_i\) is undefined, since there may be no such ball of size at least \(\beta |U_i|\) (even if \(\tilde{\nu} = \infty\)). In this case, based on 4 and 10, the corresponding \(\mu_i^*\) is also \(\infty\).34 Since [lem:lower95bound95opt] allows us to lower bound the optimal \((k, z)\)-clustering cost using the \(\mu_i^*\) values after each adversarial edge insertion in the incremental setting, we conclude that the optimal \((k, z)\)-clustering cost is infinite. Therefore, whenever the value of some \(\tilde{\nu}_i\) is \(\infty\), the incremental algorithm can safely report that \(\text{OPT}= \infty\).

Another subtle situation concerns the \(i\)-th supporting candidate set \(\tilde{S}_i\), the \(i\)-th candidate set \(S_i\), and the restart of the \(i\)-th incremental \((1+\epsilon)\)-approximate SSSP algorithm \(\mathcal{A}_i\) at Line [algline:sssp95update] in 4, where \(i \in [0, t)\) is a fixed level. As explained in 22, each isolated vertex must be a center, as otherwise the cost of the solution would be infinite. Consequently, each vertex can be given the opportunity to be sampled once it has an incident edge. To avoid restarting \(\mathcal{A}_i\) every time a new vertex is sampled in this “lazy” way, we simply extend the super-source attached to \(S_i\) by adding the corresponding new zero-weight edges. In other words, we simply add a zero-weight edge from the super-source to each newly sampled candidate center.35

Finally, the static \((k, z)\)-clustering algorithm in [32] can be adapted to work with disconnected graphs. Another way to transform any static \((k, z)\)-clustering algorithm for connected graphs to handle disconnected graphs is as follows. There must be at most \(k\) connected components, since otherwise the cost of the solution is infinite. Hence, we can connect the \(O(k)\) components with sufficiently large-weight edges (e.g., weight equal to \(n \cdot (nW) + 1\)).36 Specifically, we order the connected components and add an edge of sufficiently large weight between the \(i\)-th and the \((i+1)\)-th connected component. Then the new instance is a connected graph whose set of (\(O(1)\)-approximate) solutions remains unchanged. As a result, our incremental algorithm can handle disconnected graphs as well.

Acknowledgments↩︎

We would like to thank Aditi Dudeja for taking the time to meet and engage in thoughtful conversations in Salzburg.

Appendix↩︎

7 Missing Proofs↩︎

In this section, we prove the lemmas whose proofs were omitted from the main body of the paper.

Proof sketch. For a fixed level \(i \in [0, t]\), let \(X_i\) and \(\mu_i^*\) be as in 6, and let \(B^* \mathrel{\vcenter{:}}= \operatorname{Ball}[X_i,\mu_i^*]\cap U_i\). We partition the set \(B^*\) by assigning each vertex in \(B^*\) to its closest point in \(X_i\). Let \(B_x\) denote the set of vertices in \(B^*\) that are assigned to \(x\in X_i\). We say that the \(i\)-th candidate set \(S_i\) covers \(B_x\) iff \(B_x\cap S_i\neq\emptyset\), where \(x \in X_i\). Similarly, we say that \(y\in B^*\) is covered by \(S_i\) iff \(y\in B_x\) and \(B_x \cap S_i \neq \emptyset\), where \(x \in X_i\). A fixed set \(B_x\) is covered by \(S_i\) iff a vertex in \(B_x\) is sampled in Line [line:sample95Si] of 1. Let \(B_\text{cov}\subseteq B^*\) denote the set of vertices covered by \(S_i\). By construction, the following statements hold:

  1. By the definition of \(\mu^*_{i}\), we have \(|B^*| \geq \gamma |U_i|\).

  2. By the triangle inequality, any point \(y \in B_\text{cov}\) is within distance \(2 \mu_i^*\) from the \(i\)-th candidate set \(S_i\).

  3. The factor \(\beta\) appearing in the definition of \(\nu_i^*\) (5) is less than the factor \(\gamma\) appearing in the definition of \(\mu_i^*\) (6).

Since \(\mathbb{E}[|S_i|] = \alpha k \log n\), by applying a Chernoff bound (2), we can infer that \(|S_i| \geq \frac{\alpha}{2} k \log n\) with high probability. Based on the proof of Lemma 3.3 in [29], it follows that \(|B_\text{cov}|\geq (1-\epsilon') |B^*|\) with high probability, for a suitably large choice of the constant \(\alpha\) (see Line [line:sample95Si] of 1) and any positive real \(\epsilon'\). Therefore, it holds that \(\lvert\operatorname{Ball}[S_i, 2 \mu_i^*] \cap U_i\rvert\) is at least \(|B_\text{cov}| \geq (1-\epsilon')\gamma |U_i| \geq \beta |U_i|\), which in turn implies that \(\nu_i^* \leq 2 \mu_i^*\), and the claim follows. ◻

Proof. By an application of Chernoff bound (2), it holds that \(|Y| \geq \frac{\alpha}{2} k\log n\) with high probability. The proof is similar to that of [lem:nu602mu], with \(S_i\) replaced by \(Y\)6 replaced by 10, and \(\nu_i^*\) replaced by \(\nu_i^*(Y)\). ◻

7.1 Proof of [lem:lower95bound95opt]↩︎

We first prove a series of claims, and then use them to establish [lem:lower95bound95opt]. The analysis follows a similar structure to that presented in [29].

Consider an arbitrary fixed subset of vertices \(X \subseteq V\) of size at most \(k\). For each level \(i \in [0, t]\), we define \(F_i \mathrel{\vcenter{:}}= \{v \in U_i \mid \operatorname{dist}(v, X) \geq \mu^*_i\}\), \(F_i^\lambda \mathrel{\vcenter{:}}= F_i \setminus \bigcup_{j>0} F_{i+j\lambda}\), and \(M_{i,\lambda} \mathrel{\vcenter{:}}= \{j\in [0, t]\mid j \equiv i\mod \lambda\}\). Recall that \(t\) denotes the last level of the algorithm.

Let \(l, \lambda, i, j\) be integers such that \(l \in [0, t]\), \(\lambda > 0\), \(i \in M_{l, \lambda}, j \in M_{l, \lambda}\), and \(i \neq j\). Then it holds that \(F_i^\lambda \cap F_j^\lambda = \emptyset\).

Proof. Assume without loss of generality that \(i<j\). By the definition of \(F_i^\lambda\), we have \(F_i^\lambda \subseteq F_i \setminus F_j\) as \(j=i + s \lambda\) for some \(s>0\). Since \(F_{j}^\lambda \subseteq F_j\), it follows that \(F_{i}^\lambda\cap F_{j}^\lambda=\emptyset\), as needed. ◻

We extend the definition of \(\operatorname{cost}^z(\cdot)\) to pairs of vertex sets by defining \(\operatorname{cost}^z(X, Y) \mathrel{\vcenter{:}}= \sum_{v \in Y} \operatorname{dist}(v, X)^z\), so that it gives the cost of \(X\) evaluated on \(Y\).

For a fixed level \(i \in [0, t]\), let \(Y \subseteq F_i\) be a subset of \(F_i\). Then it holds that \(|F_i| \geq (1-\gamma) |U_i|\) and \(\operatorname{cost}^z(X,Y) \geq |Y| (\mu^*_{i})^z\).

Proof. The first part of the claim follows from the definition of \(\mu^*_i\) (see 6).37 Since \(Y \subseteq F_i\), the second part follows from the fact that: \[\begin{align} \operatorname{cost}^z(X,Y) \,=\, \sum_{v \in Y} \operatorname{dist}(v, X)^z \,\geq\, \sum_{v \in Y} (\mu^*_{i})^z \,=\, |Y| (\mu^*_{i})^z. \end{align}\] ◻

Corollary 6. For all integers \(l \in [0, t]\) and \(\lambda > 0\), it holds that: \[\begin{align} \operatorname{cost}^z\Big(X, \bigcup_{i\in M_{l,\lambda}}F^\lambda_i\Big) = \sum_{i\in M_{l,\lambda}} \operatorname{cost}^{z}(X,F^\lambda_{i})\geq \sum_{i\in M_{l,\lambda}}|F_{i}^\lambda|(\mu^*_{i})^z. \end{align}\]

Recall that \(r\mathrel{\vcenter{:}}= \ceil{\log_{(1-\beta)}((1-\gamma)/3)}\) and \(0 < \beta < \gamma < 1\) are small constants. We show that for any level \(i\), the set \(F_{i+r}\) has size at most one third of \(F_i\), and thus \(F_i^r\) has size at least half of \(F_i\).

For every level \(i\in [0, t]\), it holds that \(|F_{i+r}|\leq \frac{1}{3}|F_{i}|\).

Proof. By definition we have \(F_{i+r} \subseteq U_{i+r}\). Based on 3 [clm:rel95Y95Fi], it holds that \(|F_{i+r}|\leq |U_{i+r}|\leq (1-\beta)^r|U_i|\leq \frac{(1-\beta)^r}{1-\gamma}|F_{i}|\). The claim then follows by substituting the value of \(r\). ◻

Corollary 7. For every level \(i\in [0, t]\), it holds that \(|F_i^r|\geq \frac{|F_i|}{2}\).

Proof. The size of \(F_i^r\) is evaluated as follows: \[\begin{align} |F_i^r| \;&=\; \Big|F_i \setminus \bigcup_{j>0} F_{i+jr}\Big| \;\geq \; |F_i| - \Big|\bigcup_{j>0} F_{i+jr}\Big| \\ \;&\geq\; |F_i| - \sum_{j > 0} \frac{|F_i|}{3^j} \;\geq\; \frac{|F_i|}{2}. \end{align}\] ◻

Proof of [lem:lower95bound95opt]. Let \(l = \arg\max_{0\leq j< r} \sum_{i\in M_{j,r}}|F_{i}^r| (\mu_i^*)^z\). The \((k, z)\)-clustering cost of \(X\) is then evaluated as follows: \[\begin{align} \operatorname{cost}^z(X) &\;\geq\; \operatorname{cost}^z\Big(X, \bigcup_{i \in M_{l, r}} F_i^r \Big)\\ &\;\geq\; \sum_{i\in M_{l,r}}|F^{r}_i| (\mu_i^*)^z\\ &\;\geq\; \frac{1}{r}\sum_{i\in [0, t]}|F_i^r| (\mu_i^*)^z\\ &\;\geq\; \frac{1}{2r}\sum_{i\in [0, t]}|F_i| (\mu_i^*)^z\\ &\;\geq\; \frac{1-\gamma}{2r}\sum_{i\in [0, t]} |U_i| (\mu_i^*)^z. \qedhere \end{align}\] ◻

8 Extending 24 to vertex weights↩︎

The static \((k, z)\)-clustering algorithm of Dupre la Tour and Saulpic [32] defines a function \(\text{Value}(\operatorname{Ball}[x, r]) \mathrel{\vcenter{:}}= \lvert\operatorname{Ball}[x, r]\rvert \cdot r^z\), for a vertex \(x \in V\), a positive real number \(r\), and a constant \(z \geq 1\). In fact, the authors show that an approximation of \(\lvert\operatorname{Ball}[x, r]\rvert \cdot r^z\) suffices. In particular, \(\text{Value}(\operatorname{Ball}[x, r])\) should satisfy the following inequalities (where \(\lambda \geq 5\) is a constant): \[\lvert\operatorname{Ball}[x, r]\rvert \cdot \frac{r^z}{3} \;\leq\; \text{Value}(\operatorname{Ball}[x, r]) \;\leq\; \lvert\operatorname{Ball}[x, \lambda r]\rvert \cdot 3 r^z.\] To generalize the arguments to work with vertex weights \(\operatorname{wt}(\cdot)\), the function \(\text{Value}(\cdot)\) should be generalized to \(\text{Value}_{\operatorname{wt}}(\operatorname{Ball}[x, r]) \mathrel{\vcenter{:}}= \operatorname{wt}(\operatorname{Ball}[x, r]) \cdot r^z\), where \(\operatorname{wt}(\operatorname{Ball}[x, r]) \mathrel{\vcenter{:}}= \sum_{v \in \operatorname{Ball}[x, r]} \operatorname{wt}(v)\). Similarly, it suffices that \(\text{Value}_{\operatorname{wt}}(\operatorname{Ball}[x, r])\) satisfy the following inequalities (where \(\lambda \geq 5\) is a constant): \[\operatorname{wt}(\operatorname{Ball}[x, r]) \cdot \frac{r^z}{3} \;\leq\; \text{Value}_{\operatorname{wt}}(\operatorname{Ball}[x, r]) \;\leq\; \operatorname{wt}(\operatorname{Ball}[x, \lambda r]) \cdot 3 r^z.\] Equipped with this definition of \(\text{Value}_{\operatorname{wt}}(\operatorname{Ball}[x, r])\), the same arguments presented in Appendix A of [32] can be repeated for the weighted \((k, z)\)-clustering problem.

Furthermore, the static \((k, z)\)-clustering algorithm of Dupre la Tour and Saulpic [32] employs the near-linear time algorithm of Cohen [58] in order to efficiently compute the values \(\text{Value}_{\operatorname{wt}}(\operatorname{Ball}[x, r])\). Since the algorithm in [58] works with vertex weights, 24 can be extended to handle vertex weights as well.

References↩︎

[1]
A. K. Jain, M. N. Murty, and P. J. Flynn, “Data clustering: A review,” ACM Comput. Surv., vol. 31, no. 3, pp. 264–323, 1999, doi: 10.1145/331499.331504.
[2]
P. Hansen and B. Jaumard, “Cluster analysis and mathematical programming,” Math. Program., vol. 79, pp. 191–215, 1997, doi: 10.1007/BF02614317.
[3]
J. Shi and J. Malik, “Normalized cuts and image segmentation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 22, no. 8, pp. 888–905, 2000, doi: 10.1109/34.868688.
[4]
A. K. Jain, Award winning papers from the 19th International Conference on Pattern Recognition (ICPR)“Data clustering: 50 years beyond k-means,” Pattern Recognition Letters, vol. 31, no. 8, pp. 651–666, 2010, doi: https://doi.org/10.1016/j.patrec.2009.09.011.
[5]
A. Coates and A. Y. Ng, Learning feature representations with k-means,” in Neural networks: Tricks of the trade, 2nd ed., Springer, 2012, pp. 561–580.
[6]
M. E. J. Newman, “Detecting community structure in networks,” The European Physical Journal B, vol. 38, 2004, doi: 10.1140/epjb/e2004-00124-y.
[7]
S. E. Schaeffer, “Graph clustering,” Comput. Sci. Rev., vol. 1, no. 1, pp. 27–64, 2007, doi: 10.1016/J.COSREV.2007.05.001.
[8]
S. Fortunato, “Community detection in graphs,” Physics Reports, vol. 486, no. 3, pp. 75–174, 2010, doi: 10.1016/j.physrep.2009.11.002.
[9]
C. C. Aggarwal and H. Wang, A survey of clustering algorithms for graph data,” in Managing and mining graph data, C. C. Aggarwal and H. Wang, Eds. Boston, MA: Springer US, 2010, pp. 275–301.
[10]
A. Schenker, M. Last, H. Bunke, and A. Kandel, “Comparison of algorithms for web document clustering using graph representations of data,” in Structural, syntactic, and statistical pattern recognition, joint IAPR international workshops, SSPR 2004 and SPR 2004, lisbon, portugal, august 18-20, 2004 proceedings, 2004, vol. 3138, pp. 190–197, doi: 10.1007/978-3-540-27868-9\_19.
[11]
M. J. Rattigan, M. E. Maier, and D. D. Jensen, “Graph clustering with network structure indices,” in Machine learning, proceedings of the twenty-fourth international conference (ICML 2007), corvallis, oregon, USA, june 20-24, 2007, 2007, vol. 227, pp. 783–790, doi: 10.1145/1273496.1273595.
[12]
O. Kariv and S. L. Hakimi, “An algorithmic approach to network location problems. I: The p-centers,” SIAM journal on applied mathematics, vol. 37, no. 3, pp. 513–538, 1979.
[13]
A. Tamir, “An \(O(pn^2)\) algorithm for the \(p\)-median and related problems on tree graphs,” Operations research letters, vol. 19, no. 2, pp. 59–64, 1996.
[14]
Y. Bartal, “Probabilistic approximation of metric spaces and its algorithmic applications,” in Proceedings of 37th conference on foundations of computer science, 1996, pp. 184–193.
[15]
Y. Bartal, “On approximating arbitrary metrices by tree metrics,” in Proceedings of the thirtieth annual ACM symposium on theory of computing, 1998, pp. 161–168.
[16]
M. Charikar, C. Chekuri, A. Goel, and S. Guha, “Rounding via trees: Deterministic approximation algorithms for group steiner trees and \(k\)-median,” in Proceedings of the thirtieth annual ACM symposium on theory of computing, 1998, pp. 114–123.
[17]
M. Charikar, S. Guha, É. Tardos, and D. 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, 1999, pp. 1–10.
[18]
V. Arya, N. Garg, R. Khandekar, A. Meyerson, K. Munagala, and V. Pandit, “Local search heuristics for \(k\)-median and facility location problems,” SIAM Journal on Computing, vol. 33, no. 3, pp. 544–562, 2004, doi: 10.1137/S0097539702416402.
[19]
A. Gupta and K. Tangwongsan, “Simpler analyses of local search algorithms for facility location,” arXiv preprint arXiv:0809.2554, 2008.
[20]
V. Cohen-Addad, A. Gupta, L. Hu, H. Oh, and D. Saulpic, “An improved local search algorithm for \(k\)-median,” in Proceedings of the 2022 annual ACM-SIAM symposium on discrete algorithms (SODA), 2022, pp. 1556–1612.
[21]
S. Li and O. Svensson, “Approximating k-median via pseudo-approximation,” in Symposium on theory of computing conference, STOC’13, palo alto, CA, USA, june 1-4, 2013, 2013, pp. 901–910, doi: 10.1145/2488608.2488723.
[22]
J. Byrka, T. Pensyl, B. Rybicki, A. Srinivasan, and K. Trinh, “An improved approximation for \(k\)-median and positive correlation in budgeted optimization,” ACM Trans. Algorithms, vol. 13, no. 2, Mar. 2017, doi: 10.1145/2981561.
[23]
V. Cohen-Addad, F. Grandoni, E. Lee, C. Schwiegelshohn, and O. Svensson, “A \((2+\varepsilon)\)-approximation algorithm for metric \(k\)-median,” in Proceedings of the symposium on theory of computing, STOC 2025, 2025.
[24]
K. Jain, M. Mahdian, and A. Saberi, “A new greedy approach for facility location problems,” in Proceedings of the thiry-fourth annual ACM symposium on theory of computing, 2002, pp. 731–740, doi: 10.1145/509907.510012.
[25]
J. Byrka, Y. Guo, Y. Hu, S. Li, C. Wan, and Z. Wang, \(k\)-clustering via iterative randomized rounding.” 2026, [Online]. Available: https://arxiv.org/abs/2604.06046.
[26]
S. Ahmadian, A. Norouzi-Fard, O. Svensson, and J. Ward, “Better guarantees for \(k\)-means and euclidean \(k\)-median by primal-dual algorithms,” SIAM Journal on Computing, vol. 49, no. 4, pp. FOCS17-97-FOCS17-156, 2020, doi: 10.1137/18M1171321.
[27]
K. Jain and V. V. Vazirani, “Approximation algorithms for metric facility location and k-median problems using the primal-dual schema and lagrangian relaxation,” J. ACM, vol. 48, no. 2, pp. 274–296, 2001, doi: 10.1145/375827.375845.
[28]
R. R. Mettu and C. G. Plaxton, “The online median problem,” SIAM J. Comput., vol. 32, no. 3, pp. 816–832, 2003, doi: 10.1137/S0097539701383443.
[29]
R. R. Mettu and C. G. Plaxton, “Optimal time bounds for approximate clustering,” Machine Learning, vol. 56, pp. 35–60, 2004.
[30]
L. Huang and N. K. Vishnoi, “Coresets for clustering in euclidean spaces: Importance sampling is nearly optimal,” in Proceedings of the 52nd annual ACM SIGACT symposium on theory of computing, STOC 2020, chicago, IL, USA, june 22-26, 2020, 2020, pp. 1416–1429, doi: 10.1145/3357713.3384296.
[31]
M. Thorup, “Quick \(k\)-median, \(k\)-center, and facility location for sparse graphs,” SIAM Journal on Computing, vol. 34, no. 2, pp. 405–432, 2005.
[32]
M. D. la Tour and D. Saulpic, To appear in ICALP 2026“Faster and simpler greedy algorithm for \(k\)-median and \(k\)-means.” 2025, [Online]. Available: https://arxiv.org/abs/2407.11217.
[33]
S. H.-C. Jiang, Y. Jin, J. Lou, and P. Lu, “Local search for clustering in almost-linear time,” CoRR, vol. abs/2504.03513, 2025, doi: 10.48550/ARXIV.2504.03513.
[34]
S. Har-Peled, P. Indyk, and A. Sidiropoulos, “Euclidean spanners in high dimensions,” in Proceedings of the twenty-fourth annual ACM-SIAM symposium on discrete algorithms, SODA 2013, new orleans, louisiana, USA, january 6-8, 2013, 2013, pp. 804–809, doi: 10.1137/1.9781611973105.57.
[35]
D. Eppstein, S. Har-Peled, and A. Sidiropoulos, “Approximate greedy clustering and distance selection for graph metrics,” J. Comput. Geom., vol. 11, no. 1, pp. 629–652, 2020, doi: 10.20382/JOCG.V11I1A25.
[36]
A. Abboud, V. Cohen-Addad, E. Lee, and P. Manurangsi, “On the fine-grained complexity of approximating k-center in sparse graphs,” in 2023 symposium on simplicity in algorithms, SOSA 2023, florence, italy, january 23-25, 2023, 2023, pp. 145–155, doi: 10.1137/1.9781611977585.CH14.
[37]
L. Biabani and A. Paz, “K-center clustering in distributed models,” in International colloquium on structural information and communication complexity, 2024, pp. 83–100.
[38]
C. Jin, Y. Kirkpatrick, V. V. Williams, and N. Wein, “Beyond 2-approximation for k-center in graphs,” in Proceedings of the 2025 annual ACM-SIAM symposium on discrete algorithms (SODA), 2025, pp. 175–211.
[39]
M. Bateni et al., “Optimal fully dynamic k-center clustering for adaptive and oblivious adversaries,” in Proceedings of the 2023 ACM-SIAM symposium on discrete algorithms, SODA 2023, florence, italy, january 22-25, 2023, 2023, pp. 2677–2727, doi: 10.1137/1.9781611977554.CH101.
[40]
S. Bhattacharya, M. Costa, N. Garg, S. Lattanzi, and N. Parotsidis, Fully Dynamic \(k\)- with Fast Update Time and Small Recourse,” in 2024 IEEE 65th annual symposium on foundations of computer science (FOCS), Oct. 2024, pp. 216–227, doi: 10.1109/FOCS61266.2024.00023.
[41]
M. D. la Tour, M. Henzinger, and D. Saulpic, “Fully dynamic k-means coreset in near-optimal update time,” in 32nd annual european symposium on algorithms, ESA 2024, september 2-4, 2024, royal holloway, london, united kingdom, 2024.
[42]
S. Bhattacharya, M. Costa, and E. Farokhnejad, “Fully dynamic \(k\)-median with near-optimal update time and recourse,” in Proceedings of the symposium on theory of computing, STOC 2025, 2024.
[43]
E. Cruciani, S. Forster, G. Goranci, Y. Nazari, and A. Skarlatos, “Dynamic algorithms for k-center on graphs,” in Proceedings of the 2024 annual ACM-SIAM symposium on discrete algorithms (SODA), 2024, pp. 3441–3462.
[44]
V. Cohen-Addad, N. Hjuler, N. Parotsidis, D. Saulpic, and C. Schwiegelshohn, “Fully dynamic consistent facility location,” in Advances in neural information processing systems 32: Annual conference on neural information processing systems 2019, NeurIPS 2019, december 8-14, 2019, vancouver, BC, canada, 2019, pp. 3250–3260, [Online]. Available: https://proceedings.neurips.cc/paper/2019/hash/fface8385abbf94b4593a0ed53a0c70f-Abstract.html.
[45]
H. Fichtenberger, S. Lattanzi, A. Norouzi-Fard, and O. Svensson, “Consistent k-clustering for general metrics,” in Proceedings of the 2021 ACM-SIAM symposium on discrete algorithms, SODA 2021, virtual conference, january 10 - 13, 2021, 2021, pp. 2660–2678, doi: 10.1137/1.9781611976465.158.
[46]
S. Forster and A. Skarlatos, “Dynamic consistent k-center clustering with optimal recourse,” in Proceedings of the 2025 annual ACM-SIAM symposium on discrete algorithms, SODA 2025, new orleans, LA, USA, january 12-15, 2025, 2025, pp. 212–254, doi: 10.1137/1.9781611978322.7.
[47]
S. Chechik and T. Zhang, “Fully dynamic maximal independent set in expected poly-log update time,” in 60th IEEE annual symposium on foundations of computer science, FOCS 2019, baltimore, maryland, USA, november 9-12, 2019, 2019, pp. 370–381, doi: 10.1109/FOCS.2019.00031.
[48]
S. Behnezhad, M. Derakhshan, M. Hajiaghayi, C. Stein, and M. Sudan, “Fully dynamic maximal independent set with polylogarithmic update time,” in 60th IEEE annual symposium on foundations of computer science, FOCS 2019, baltimore, maryland, USA, november 9-12, 2019, 2019, pp. 382–405, doi: 10.1109/FOCS.2019.00032.
[49]
S. Baswana, S. Khurana, and S. Sarkar, “Fully dynamic randomized algorithms for graph spanners,” ACM Trans. Algorithms, vol. 8, no. 4, pp. 35:1–35:51, 2012, doi: 10.1145/2344422.2344425.
[50]
M. Henzinger, S. Krinninger, and D. Nanongkai, Announced at FOCS 2014“Decremental single-source shortest paths on undirected graphs in near-linear total update time,” Journal of the ACM, vol. 65, no. 6, pp. 36:1–36:40, 2018, doi: 10.1145/3218657.
[51]
B. Ancona, M. Henzinger, L. Roditty, V. Vassilevska Williams, and N. Wein, “Algorithms and hardness for diameter in dynamic graphs,” in 46th international colloquium on automata, languages, and programming, ICALP 2019, july 9-12, 2019, patras, greece, 2019, vol. 132, pp. 13:1–13:14, doi: 10.4230/LIPICS.ICALP.2019.13.
[52]
J. Łącki and Y. Nazari, Near-Optimal Decremental Hopsets with Applications,” in 49th international colloquium on automata, languages, and programming (ICALP 2022), 2022.
[53]
Y. P. Liu, To appear in STOC 2026“Incremental shortest paths in almost linear time via a modified interior point method,” CoRR, vol. abs/2506.19207, 2025, doi: 10.48550/ARXIV.2506.19207.
[54]
D. P. Dubhashi and A. Panconesi, Concentration of measure for the analysis of randomized algorithms. Cambridge University Press, 2009.
[55]
S. Guha, N. Mishra, R. Motwani, and L. O’Callaghan, “Clustering data streams,” in Proceedings 41st annual symposium on foundations of computer science, 2000, pp. 359–366.
[56]
M. Henzinger, S. Krinninger, and D. Nanongkai, “A subquadratic-time algorithm for decremental single-source shortest paths,” in Proceedings of the twenty-fifth annual ACM-SIAM symposium on discrete algorithms, SODA 2014, portland, oregon, USA, january 5-7, 2014, 2014, pp. 1053–1072, doi: 10.1137/1.9781611973402.79.
[57]
S. Bhattacharya, M. Costa, S. Lattanzi, and N. Parotsidis, “Fully dynamic \(k\)-clustering in \(\tilde {O}(k)\) update time,” in Proceedings of NeurIPS, 2023.
[58]
E. Cohen, “Size-estimation framework with applications to transitive closure and reachability,” J. Comput. Syst. Sci., vol. 55, no. 3, pp. 441–453, 1997, doi: 10.1006/JCSS.1997.1534.

  1. European University of Rome, Italy. This research was partially conducted when the author was a postdoc at the University of Salzburg.↩︎

  2. Department of Computer Science, University of Salzburg, Salzburg, Austria. This work is supported by the Austrian Science Fund (FWF): P 32863-N. This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 947702).↩︎

  3. Department of Computer Science, University of Warwick, Coventry, England. This research was partially conducted when the author was a PhD student at the University of Salzburg. Antonis Skarlatos is funded by the European Union (ERC grant, DYNALP, 101170133). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.↩︎

  4. The notation \(\tilde{O}(\cdot)\) hides polylogarithmic factors in \(nW\).↩︎

  5. Recall that in a \(\rho\)-metric space, the triangle inequality may be violated by a factor of \(\rho\).↩︎

  6. We assume that the weights are at least \(1\) and are upper bounded by a polynomial in \(n\). This can be achieved by rescaling all the weights.↩︎

  7. Note that we can assume \(n > 1\), as otherwise the \((k,z)\)-clustering instance can be trivially solved.↩︎

  8. In the proof of Lemma \(3.11\) in [29], there is a small typo in the definition of \(\ell\). Specifically, the parameter \(\mu_i\) is missing from the inner sum \(\sum_{i \in G_{j, r}}\).↩︎

  9. Recall that \(W\) is the maximum weight of an edge, and thus \(nW\) is the maximum possible distance between two vertices in \(G\).↩︎

  10. Namely, we introduce a fake root \(s\) and add an edge \((s, v)\) of zero weight, for every candidate center \(v \in S_i\). Then, the incremental \((1+\epsilon)\)-approximate SSSP algorithm is executed with source \(s\).↩︎

  11. For the definition of the \(0\)-th valid radius, we set \(\nu_{-1} = 0\).↩︎

  12. If no such level \(\ell\) exists, then the incremental bicriteria approximation algorithm does nothing.↩︎

  13. In the analysis (see 12) we show that \(\lvert\operatorname{Ball}[S_\ell, \hat{\nu}_\ell, \delta_{S_\ell}] \cap U_\ell\rvert \geq \ceil{\beta |U_\ell|}\), and thus there exists such a subset of size \(\ceil{\beta |U_\ell|}\).↩︎

  14. When we say in Line [algline:sssp95update] of 4\(\mathcal{A}_i\) provides distance estimates \(\delta_u(\cdot)\) for all \(u \in S_i\)”, we mean the nearest candidate center \(u \in S_i\) to a vertex \(v \in V\) with respect to \(\delta_{S_i}(v)\).↩︎

  15. In the analysis (see 12) we show that \(\lvert\operatorname{Ball}[S_i, \hat{\nu}_i, \delta_{S_i}] \cap U_i\rvert \geq \ceil{\beta |U_i|}\), and thus there exists such a subset of size \(\ceil{\beta |U_i|}\).↩︎

  16. A vertex that belonged to the old \(i\)-th execution set is removed from the current \(i\)-th execution set \(U_i\) when it enters a previous \(j\)-th approximate ball \(B_j\) at some level \(j < i\).↩︎

  17. In the analysis (see 13 [clm:new95vert95in95Z]) we show that such a subset of the temporary leaking set \(Z\) exists.↩︎

  18. Observe that in Line [algline:check95if95nu95decreases951] of 4, the value \(\tilde{\nu}_t\) at the last level \(t\) is trivially zero.↩︎

  19. Whenever we say “after an (adversarial) edge insertion”, we mean after the algorithm has completed all updates to its data structures.↩︎

  20. Note that for the corner case where \(\ell\) equals \(t\), nothing changes.↩︎

  21. Notice that in Line [algline:next95exec95set951], we have \(Z_i = \emptyset\).↩︎

  22. For \(i=0\), we choose \(|U_{-1}|\) so that \(|U_0| = |U_{-1}| - \ceil{\beta |U_{-1}|}\).↩︎

  23. Here, \(Z\) refers to the current temporary leaking set at level \(i\), rather than the updated set obtained after Line [algline:rem95Zi95from95Z] in 4. More precisely, it refers to \(Z^\text{(old)}\), but we write \(Z\) for ease of reading.↩︎

  24. Note that we can assume \(n > 1\), as otherwise the \((k, z)\)-clustering instance can be trivially solved.↩︎

  25. Notice that each isolated vertex must be a center, as otherwise the cost of the solution would be infinite. Thus, whenever a vertex is sampled to enter a supporting candidate set, or whenever a vertex leaves or enters an approximate ball or a leaking set, we charge the vertex to one of its incident edges.↩︎

  26. This \(i\)-th level existed before the adversarial edge insertion, because the radius of a new level must decrease the first time it appears (see also the comment at Line [algline:comment95nu95largest] in 4).↩︎

  27. Note that these definitions are similar to Definition 5 and Definition 6.↩︎

  28. Note that 21 inherits the high probability bound from 4.↩︎

  29. For unweighted graphs, the stretch of the spanner is \(2\lambda-1\); the \(O(2\lambda-1)\) arises for weighted graphs.↩︎

  30. The two algorithms by Mettu and Plaxton in [28] and [29] (which includes the MP-bi algorithm) are different.↩︎

  31. Since the algorithm never removes vertices from \(S\), we actually have \(S = \sigma_\text{max}(V)\).↩︎

  32. The dynamic spanner algorithm \(\mathcal{SP}\) processes each distance decrease in the batch \(B\) separately.↩︎

  33. Recall that based on the discussion in 8, we can safely assume that the static \((k, z)\)-clustering algorithm of 24 works on weighted \((k, z)\)-clustering instances.↩︎

  34. Using the convention that the minimum of an empty set is \(\infty\).↩︎

  35. During the first stage in which we use our incremental bicriteria approximation 4, the maintained solution is of size \(\tilde{O}(k)\). Thus whenever \(m < k\), an alternative approach is to extend the solution by adding the endpoints of each inserted edge; once \(m \geq k\), the algorithm begins.↩︎

  36. During the second stage in which we use our incremental reduction 5, the amortized update time is \(\tilde{O}(k^{1+\epsilon})\) for some \(\epsilon \in (0, 1)\).↩︎

  37. We emphasize that in 6, the corresponding set \(X_i\) must be a subset of \(V\) and not just of \(U_i\).↩︎