6.0DSMay 5
Fast and Simple Sorting Using Partial InformationBernhard Haeupler, Richard Hladík, John Iacono et al.
We consider the problem of sorting $n$ items, given the outcomes of $m$ pre-existing comparisons. We present a simple and natural deterministic algorithm that runs in $O(m + \log T)$ time and does $O(\log T)$ comparisons, where $T$ is the number of total orders consistent with the pre-existing comparisons. Our running time and comparison bounds are best possible up to constant factors, thus resolving a problem that has been studied intensely since 1976 (Fredman, Theoretical Computer Science). The best previous algorithm with a bound of $O(\log T)$ on the number of comparisons has a time bound of $O(n^{2.5})$ and is more complicated. Our algorithm combines three classic algorithms: topological sort, heapsort with the right kind of heap, and efficient search in a sorted list. It outputs the items in sorted order one by one. It can be modified to stop early, thereby solving the important and more general top-$k$ sorting problem: Given $k$ and the outcomes of some pre-existing comparisons, output the smallest $k$ items in sorted order. The modified algorithm solves the top-$k$ sorting problem in minimum time and comparisons, to within constant factors.
7.6DSApr 23
Stronger Directed Low-Diameter Decompositions with Sub-Logarithmic Diameter and SeparationBernhard Haeupler, Richard Hladík, Shengzhe Wang et al.
This paper significantly strengthens directed low-diameter decompositions in several ways. We define and give the first results for separated low-diameter decompositions in directed graphs, tighten and generalize probabilistic guarantees, and prove new independence results between (far away) edges. Our results are the first to give meaningful guarantees for decompositions with small diameters $D = Ω(\log\log n)$ in contrast to the state of the art that only applies to super-logarithmic diameters $D = ω(\log n)$. These results transfer several important and widely used aspects of undirected low-diameter decompositions to the directed setting. All our results are algorithmic -- small modifications to two existing directed low-diameter decompositions [BFHL25; Li25] can be used to sample decompositions with our new guarantees in near-linear time $\tilde{O}(m)$.
1.5DMApr 22
Constant Rate Isometric Embeddings of Hamming Metric into Edit MetricSudatta Bhattacharya, Sanjana Dey, Elazar Goldenberg et al.
A function $φ:\{0,1\}^n \to \{0,1\}^N$ is called an isometric embedding of the $n$-dimensional Hamming metric space to the $N$-dimensional edit metric space if, for all $x,y\in\{0,1\}^n$, the Hamming distance between $x$ and $y$ is equal to the edit distance between $φ(x)$ and $φ(y)$. The rate of such an embedding is defined as the ratio $n/N$. It is well known in the literature how to construct isometric embeddings with rate $Ω(1/\log n)$. However, achieving even near-isometric embeddings with positive constant rate has remained elusive until now. In this paper, we present an isometric embedding with rate $1/8$ by discovering connections to synchronization strings, which were studied in the context of insertion-deletion codes (Haeupler-Shahrasbi [JACM'21]). At a technical level, we introduce a framework for obtaining high-rate isometric embeddings using a novel object called misaligners. As an immediate consequence of our constant-rate isometric embedding, we improve known conditional lower bounds for various optimization problems in the edit metric, now with optimal dependence on the dimension. We complement our results by showing that no isometric embedding $φ:\{0,1\}^n \to \{0,1\}^N$ can have rate greater than $15/32$ for all positive integers $n$. En route to proving this upper bound, we uncover fundamental structural properties necessary for every Hamming-to-edit isometric embedding. We also prove similar upper and lower bounds for embeddings over larger alphabets. Finally, we consider embeddings $φ:Σ_{\mathrm{in}}^n \to Σ_{\mathrm{out}}^N$ between different input and output alphabets, where the rate is given by $\frac{n\log|Σ_{\mathrm{in}}|}{N\log|Σ_{\mathrm{out}}|}$. In this setting, we show that the rate can be made arbitrarily close to $1$.
1.2DSDec 22, 2025
Clustering with Label ConsistencyDiptarka Chakraborty, Hendrik Fichtenberger, Bernhard Haeupler et al.
Designing efficient, effective, and consistent metric clustering algorithms is a significant challenge attracting growing attention. Traditional approaches focus on the stability of cluster centers; unfortunately, this neglects the real-world need for stable point labels, i.e., stable assignments of points to named sets (clusters). In this paper, we address this gap by initiating the study of label-consistent metric clustering. We first introduce a new notion of consistency, measuring the label distance between two consecutive solutions. Then, armed with this new definition, we design new consistent approximation algorithms for the classical $k$-center and $k$-median problems.