BHBernhard Haeupler
Bernhard Haeupler
*This is an algorithmically generated author record based on publicly available information.
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Research Subjects
Bernhard Haeupler has a total of 9 co-authors. Here are the top co-authors by number of shared publications:
Thatchaphol Saranurak
INSAIT Sofia University "St. Kliment Ohridski" ETH Zurich
2 shared publications- Yonggang Jiang
MPI-INF Saarland University
2 shared publications - Jakub Tětek
BARC ETH Zurich Univ. of Copenhagen
1 shared publication - John Iacono
Université Libre de Bruxelles, Brussels, Belgium
1 shared publication - Richard Hladík
ETH Zurich, Zurich, Switzerland
1 shared publication - Robert E. Tarjan
Princeton University, New Jersey, USA
1 shared publication
Latest Publications
- Open Access
- 5 May 2026
- Published by Springer Nature in Algorithmica
- Vol. 88 (3) , 41
Fast and Simple Sorting Using Partial Information
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 $$\textrm{O}(m+\log T)$$ time and does $$\textrm{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 $$\textrm{O}(\log T)$$ on the number of comparisons has a time bound of $$\textrm{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.- 5 May 2026
- Published by Springer Nature in Algorithmica
- Vol. 88 (3) , 41
Open AccessFast and Simple Sorting Using Partial Information
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 $$\textrm{O}(m+\log T)$$ time and does $$\textrm{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 $$\textrm{O}(\log T)$$ on the number of comparisons has a time bound of $$\textrm{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. - Open Access
Deterministic Negative-Weight Shortest Paths in Nearly Linear Time via Path Covers
We present the first deterministic nearly-linear time algorithm for single-source shortest paths with negative edge weights on directed graphs: given a directed graph $G$ with $n$ vertices, $m$ edges whose weights are integer in $\{-W,\dots,W\}$, our algorithm either computes all distances from a source $s$ or reports a negative cycle in time $\tilde{O}(m)\cdot \log(nW)$ time. All known near-linear time algorithms for this problem have been inherently randomized, as they crucially rely on low-diameter decompositions. To overcome this barrier, we introduce a new structural primitive for directed graphs called the path cover. This plays a role analogous to neighborhood covers in undirected graphs, which have long been central to derandomizing algorithms that use low-diameter decomposition in the undirected setting. We believe that path covers will serve as a fundamental tool for the design of future deterministic algorithms on directed graphs.Open AccessDeterministic Negative-Weight Shortest Paths in Nearly Linear Time via Path Covers
We present the first deterministic nearly-linear time algorithm for single-source shortest paths with negative edge weights on directed graphs: given a directed graph $G$ with $n$ vertices, $m$ edges whose weights are integer in $\{-W,\dots,W\}$, our algorithm either computes all distances from a source $s$ or reports a negative cycle in time $\tilde{O}(m)\cdot \log(nW)$ time. All known near-linear time algorithms for this problem have been inherently randomized, as they crucially rely on low-diameter decompositions. To overcome this barrier, we introduce a new structural primitive for directed graphs called the path cover. This plays a role analogous to neighborhood covers in undirected graphs, which have long been central to derandomizing algorithms that use low-diameter decomposition in the undirected setting. We believe that path covers will serve as a fundamental tool for the design of future deterministic algorithms on directed graphs. - Open Access
Parallel $(1+ε)$-Approximate Multi-Commodity Mincost Flow in Almost Optimal Depth and Work
We present a parallel algorithm for computing $(1+ε)$-approximate mincost flow on an undirected graph with $m$ edges, where capacities and costs are assigned to both edges and vertices. Our algorithm achieves $\hat{O}(m)$ work and $\hat{O}(1)$ depth when $ε> 1/\mathrm{polylog}(m)$, making both the work and depth almost optimal, up to a subpolynomial factor. Previous algorithms with $\hat{O}(m)$ work required $Ω(m)$ depth, even for special cases of mincost flow with only edge capacities or max flow with vertex capacities. Our result generalizes prior almost-optimal parallel $(1+ε)$-approximation algorithms for these special cases, including shortest paths [Li, STOC'20] [Andoni, Stein, Zhong, STOC'20] [Rozhen, Haeupler, Marinsson, Grunau, Zuzic, STOC'23] and max flow with only edge capacities [Agarwal, Khanna, Li, Patil, Wang, White, Zhong, SODA'24]. Our key technical contribution is the first construction of length-constrained flow shortcuts with $(1+ε)$ length slack, $\hat{O}(1)$ congestion slack, and $\hat{O}(1)$ step bound. This provides a strict generalization of the influential concept of $(\hat{O}(1),ε)$-hopsets [Cohen, JACM'00], allowing for additional control over congestion. Previous length-constrained flow shortcuts [Haeupler, Hershkowitz, Li, Roeyskoe, Saranurak, STOC'24] incur a large constant in the length slack, which would lead to a large approximation factor. To enable our flow algorithms to work under vertex capacities, we also develop a close-to-linear time algorithm for computing length-constrained vertex expander decomposition. Building on Cohen's idea of path-count flows [Cohen, SICOMP'95], we further extend our algorithm to solve $(1+ε)$-approximate $k$-commodity mincost flow problems with almost-optimal $\hat{O}(mk)$ work and $\hat{O}(1)$ depth, independent of the number of commodities $k$.Open AccessParallel $(1+ε)$-Approximate Multi-Commodity Mincost Flow in Almost Optimal Depth and Work
We present a parallel algorithm for computing $(1+ε)$-approximate mincost flow on an undirected graph with $m$ edges, where capacities and costs are assigned to both edges and vertices. Our algorithm achieves $\hat{O}(m)$ work and $\hat{O}(1)$ depth when $ε> 1/\mathrm{polylog}(m)$, making both the work and depth almost optimal, up to a subpolynomial factor. Previous algorithms with $\hat{O}(m)$ work required $Ω(m)$ depth, even for special cases of mincost flow with only edge capacities or max flow with vertex capacities. Our result generalizes prior almost-optimal parallel $(1+ε)$-approximation algorithms for these special cases, including shortest paths [Li, STOC'20] [Andoni, Stein, Zhong, STOC'20] [Rozhen, Haeupler, Marinsson, Grunau, Zuzic, STOC'23] and max flow with only edge capacities [Agarwal, Khanna, Li, Patil, Wang, White, Zhong, SODA'24]. Our key technical contribution is the first construction of length-constrained flow shortcuts with $(1+ε)$ length slack, $\hat{O}(1)$ congestion slack, and $\hat{O}(1)$ step bound. This provides a strict generalization of the influential concept of $(\hat{O}(1),ε)$-hopsets [Cohen, JACM'00], allowing for additional control over congestion. Previous length-constrained flow shortcuts [Haeupler, Hershkowitz, Li, Roeyskoe, Saranurak, STOC'24] incur a large constant in the length slack, which would lead to a large approximation factor. To enable our flow algorithms to work under vertex capacities, we also develop a close-to-linear time algorithm for computing length-constrained vertex expander decomposition. Building on Cohen's idea of path-count flows [Cohen, SICOMP'95], we further extend our algorithm to solve $(1+ε)$-approximate $k$-commodity mincost flow problems with almost-optimal $\hat{O}(mk)$ work and $\hat{O}(1)$ depth, independent of the number of commodities $k$.