Single-linkage clustering is a popular form of hierarchical agglomerative clustering (HAC) where the distance between two clusters is defined as the minimum distance between any pair of points across the two clusters. In single-linkage HAC, the output is typically the single-linkage dendrogram (SLD), which is the binary tree representing the hierarchy of clusters formed by iteratively contracting the two closest clusters. In the dynamic setting, prior work has only studied maintaining a minimum spanning forest over the data since single-linkage HAC reduces to computing the SLD on the minimum spanning forest of the data. In this paper, we study the problem of maintaining the SLD in the fully-dynamic setting. We assume the input is a dynamic forest $F$ (representing the minimum spanning forest of the data) which receives a sequence of edge insertions and edge deletions. To our knowledge, no prior work has provided algorithms to update an SLD asymptotically faster than recomputing it from scratch. All of our update algorithms are asymptotically faster than the best known static SLD computation algorithm, which takes $O(n \log h)$ time where $h$ is the height of the dendrogram ($h \leq n-1$). Furthermore, our algorithms are much faster in many cases, such as when $h$ is low. Our first set of results are an insertion algorithm in $O(h)$ time and a deletion algorithm in $O(h \log (1+n/h))$ time. Next, we describe parallel and batch-parallel versions of these algorithms which are work-efficient or nearly work-efficient and have poly-logarithmic depth. Finally, we show how to perform insertions near-optimally in $O(c \log(1+n/c))$ time, where $c$ is the number of structural changes in the dendrogram caused by the update, and give a work-efficient parallel version of this algorithm that has polylogarithmic depth.
翻译:单链接聚类是层次凝聚聚类(HAC)的一种常用形式,其中两个簇之间的距离定义为两个簇中任意点对之间的最小距离。在单链接HAC中,输出通常是单链接树状图(SLD),即表示通过迭代合并两个最接近簇所形成的聚类层次结构的二叉树。在动态场景中,先前的研究仅关注于在数据上维护最小生成森林,因为单链接HAC可简化为在数据的最小生成森林上计算SLD。本文研究了在完全动态场景下维护SLD的问题。我们假设输入是一个动态森林$F$(代表数据的最小生成森林),它接收一系列边插入和边删除操作。据我们所知,尚无先前工作提供比从头重新计算渐近更快的SLD更新算法。我们所有的更新算法均渐近快于目前已知最快的静态SLD计算算法(该算法时间复杂度为$O(n \log h)$,其中$h$为树状图高度,满足$h \leq n-1$)。此外,我们的算法在许多情况下(例如当$h$较小时)速度更快。我们的第一组结果包括:时间复杂度为$O(h)$的插入算法和时间复杂度为$O(h \log (1+n/h))$的删除算法。接着,我们描述了这些算法的并行和批量并行版本,这些版本具有工作高效性或接近工作高效性,且具有多对数级深度。最后,我们展示了如何在$O(c \log(1+n/c))$时间内近乎最优地执行插入操作(其中$c$为更新引起的树状图结构变更次数),并给出了该算法的工作高效并行版本,该版本具有多对数级深度。