Skip to content
Preprint

Instance-Optimality of Bidirectional Dijkstra on Simple Graphs

Aug 2026 · 0 citations · 28 references
Computer Science

TL;DR

It is shown that bidirectional Dijkstra is still instance-optimal on simple undirected weighted graphs under the order-oblivious model, where incident edges are given in a random order, and under the order-dependent model, where bidirectional Dijkstra is not instance-optimal.

Abstract

We study the shortest-path problem on graphs with positive real-valued edge weights. Given a source vertex $s$ and a target vertex $t$, the goal is to calculate the length of the shortest path from $s$ to $t$. We are particularly interested in instances that can be solved in sublinear time. Recently, Haeupler, Hlad\'ik, Rozho\v{n}, Tarjan, and T\v{e}tek proved that (a version of) the bidirectional Dijkstra's algorithm is instance-optimal on positively weighted multigraphs, both directed and undirected, considering the number of vertices and edges queried by the algorithm. However, multigraphs are not the canonical setting for the shortest-path problem. The problem is typically formulated on simple graphs without loops and parallel edges. They therefore left as an open problem whether bidirectional Dijkstra remains instance-optimal on simple weighted graphs. We answer this question, but for simple graphs, the answer is more complex, depending on the setting. We show that bidirectional Dijkstra is still instance-optimal on simple undirected weighted graphs under the order-oblivious model, where incident edges are given in a random order. In contrast, under the order-dependent model, where incident edges have a given order, we show that bidirectional Dijkstra is not instance-optimal. For simple directed weighted graphs, we show that bidirectional Dijkstra is not instance-optimal under either the order-oblivious or the order-dependent model, being off by a factor of $\Theta(m/n)$ in both cases. We further show that no algorithm can have instance-optimality ratio $o(m/n)$ under the order-dependent model, or under the order-oblivious model when $m=O(n\sqrt{n})$. On the positive side, the above results imply that bidirectional Dijkstra is instance-optimal up to logarithmic factors on all sparse directed and undirected graphs satisfying $m/n=\log^{O(1)} n$.

View source

Similar papers

Preprint Aug 2026

On the Instance Optimality of Bidirectional Dijkstra's Algorithm

Recent work by Haeupler, Hlad\'ik, Rozhon, Tarjan, and T\v{e}tek on the instance optimality of shortest-path algorithms established several results concerning Dijkstra's algorithm and bidirectional Dijkstra's algorithm in weighted and unweighted graphs. Motivated by these results, we revisit the question of instance optimality for shortest $st$-path algorithms in the standard query model. We identify several issues in the analysis of the instance optimality of both unidirectional and bidirectional Dijkstra's algorithms and provide corresponding counterexamples. We then propose a minimal simple modification of the bidirectional Dijkstra algorithm and prove that the resulting variant is instance optimal in the weighted setting. Furthermore, we revisit the unweighted case, provide a simplified proof of the lower bound showing that no algorithm can achieve instance optimality up to a factor better than $O(\Delta)$, where $\Delta$ denotes the maximum degree of the graph, and discuss the implications of this result for approximation algorithms. Finally, we make progress on the open problem of instance optimality in simple graphs. We show that if the problem instance satisfies $n\ge m/16$, where $n$ is the number of nodes and $m$ is the number of edges queried by our algorithm, then it is optimal up to a constant factor. Additionally, we show instance optimality for a broad class of instances, in particular when the largest degree in the graph is at most the square root of the number of explored edges, our algorithm exhibits optimality up to a constant factor.

Matic Požar · 0 citations
Preprint Aug 2026

A Separator-based Algorithm for the Graph Edit Distance Problem

The Graph Edit Distance (GED) is a widely used graph similarity measure asking for the minimum cost of a sequence of edits transforming one (labeled) graph into another. The considered edit operations are deletion, insertion, and relabeling of nodes and edges. Special cases include the Graph Isomorphism problem, as well as many other graph problems that ask for the existence or minimum cost of a certain substructure, like the Traveling Salesman or Maximum Clique problem. We present a novel exponential time algorithm to compute the exact GED and a corresponding edit sequence in $O^*(4 + \varepsilon)^n$ time and polynomial space, provided one of the two graphs admits strictly sublinear balanced separators. In particular, the claimed runtime holds if one of the graphs is $K_h$-minor free (e.g., planar), or has bounded treewidth, which is the case for many real-world applications (e.g., all instances in GEDLIB). This substantially improves the best known worst-case running time bounds of $O^*(n!)$ for these graph classes.

Laura Bülte, Philip Mayer, Lars Müller et al. · 0 citations
Jul 2026

Solving Stackelberg Vertex Cover on trees using split and join

The Stackelberg Vertex Cover problem is a bilevel optimization problem with two players on a graph $G = (F \cup P, E)$ where each vertex from $F$ has a weight and the first player selects a price for each vertex in $P$. Afterwards, the second player finds a minimum vertex cover $X$ and the first player receives the set price for each vertex from $X \cap P$. The goal is to maximize the revenue of the first player. This problem was recently shown to be NP-complete for bipartite graphs while being solvable in linear time on paths. We present three new algorithms for solving Stackelberg Vertex Cover on certain kinds of trees: (1) a pseudo-polynomial algorithm working on general trees when all weights are integer, i.e., it is FPT with the maximum weight as a parameter; (2) a strongly polynomial algorithm for trees having the property that the least common ancestor of any two vertices from $P$ is again in $P$ (this case includes paths); and (3) an FPT-algorithm for trees, where the parameter is the maximum number $P$-vertices $v_i$ that an $F$-vertex $u$ can reach while using no other $P$-vertices. These algorithms are based on a lemma that allows us to split instances at a vertex $u$ into multiple sub-instances, which follows from LP duality and integrality of the vertex cover LP on bipartite graphs. The lemma requires that the minimum vertex covers of the sub-instances agree on $u$ (either all include $u$ or all don't). For this we introduce the concept of commitments. Finally, we show that the Stackelberg Vertex Cover problem with commitments is weakly NP-complete.

Dominik Scheder, Johannes Tantow · 0 citations
Jul 2026

Reachability in Directed Acyclic Graphs with Near-Linear Cut Queries

This work begins a systematic study of basic problems in directed \emph{acyclic} graphs (DAGs) and shows that reachability from a single vertex and even topological sorting are both computable in O(n \log^3 n) many cut queries.

Sanjeev Khanna, Aaron Putterman, Junkai Song · 1 citation

Finding Simple Shortest-Paths via Centroids

Centroids are used to compute an arbitrary number of simple paths with some important benefits: the expansion of a single centroid delivers an arbitrary number of paths; only a single Dijk-stra search is required to complete the task; the same algorithm can be easily coupled with heuristics that improve search efficiency.

Carlos Linares L'opez, I. Herman · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.