arXiv Science⌕ Search

arXiv · 2610.20062

Towards Dynamic Top-$k$ Simple Shortest Paths

Abstract

Computing the top-$k$ \textit{simple} shortest paths between two vertices of a graph, i.e., solving the P-KSSP problem, is a fundamental primitive in graph analytics. In modern scenarios, however, queries are rarely one-shot: parameters change as applications adapt their information needs, and recomputing a solution from scratch at every request quickly becomes a bottleneck. We study P-KSSP in a dynamic setting, focusing on changes of the parameter $k$: given a top-$k$ solution for a pair of vertices and a new value $k'$, the goal is to compute a top-$k'$ solution reusing the previously computed paths. Our approach rests on the \textit{pseudo-tree}, a compact representation of a collection of simple $s$--$t$ paths: we show that building it from an arbitrary, unstructured solution amounts to trie construction, and give two constructions running in time linear in the size of the collection. On top of it, we design UPD, a dynamic algorithm that updates a solution upon a change of $k$; we prove its correctness, analyze its complexity, and show that it is a general, solver-agnostic scheme, which starts from the paths alone, is parametric in the routine that generates candidate paths and combinable with known preprocessing techniques, as well as with an online pruning rule that we formalize. While a worst-case update is asymptotically comparable to recomputing from scratch, an extensive experimental evaluation shows that a variant of UPD is the fastest method in the large majority of tested configurations, often by a wide margin (with speedups over recomputation that grow with $k$ and $k'$ and exceed $60\times$), yielding a practical recipe for the configuration to deploy.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Gianlorenzo D'Angelo, Andrea D'Ascenzo, Mattia D'Emidio, Gabriele Di Stefano, Marta Innamorati. 2026-10-15. Towards Dynamic Top-$k$ Simple Shortest Paths. https://arxiv.org/abs/2610.20062

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Reweighted Spectral Partitioning Works: A Simple Algorithm for Vertex Separators in Special Graph Classes

We establish that a practical polynomial-time algorithm obtains near-optimal $\frac23$-balanced vertex separators for a number of graph classes, including genus-$g$ graphs, $K_h$-minor-free graphs, and geometric graphs. For many of these classes, our polynomial-time separator bounds improve on previous work. Moreover, unlike previous work, all these separators are produced by a single unified algorithm that has no specialization for the graph class, and this algorithm admits a scalable implementation with good empirical results. Furthermore, our approach is robust to graphs falling just outside these classes, making it appropriate for practical applications like road networks. A key distinction of our approach, compared to previous work, is the disentanglement of our algorithm and its analysis for specific graph classes. Our algorithm is based on a newly improved form of a recent Cheeger-style inequality relating the value of a special semidefinite program to vertex expansion. Our analysis then only has to directly bound the value of this semidefinite program for each graph class, and constructions for these bounds need not be algorithmic. Finally, we obtain several results of independent interest. These include an improved (existential) separator theorem for intersection graphs of $k$-ply $d$-dimensional balls, an improved bound on the Fiedler value of genus-$g$ graphs, and a complete spectral proof of the planar separator theorem.

cs.DS↗

Quality control in sublinear time: a case study via random graphs

Many algorithms are designed to work well on average over inputs. But when such an algorithm is run on an arbitrary input, the question arises: Can we trust the algorithm on this input? This question is especially relevant in network science, where algorithms for theoretical random graph models are often applied to individual real-world networks. We identify a new class of algorithmic problems addressing this, which we call "Quality Control Problems." These problems are specified by a "quality function" $ρ$ and a distribution $D$ such that, with high probability, a sample drawn from $D$ is "high quality," meaning its $ρ$-value is near $1$. The goal is to accept most inputs $x \sim D$ and reject potentially adversarially generated inputs $x$ with $ρ(x)$ far from $1$. In this work, we consider the sublinear version of the quality control problem, where $D \in Δ(\{0,1\}^N)$ and the goal is to solve the $(D,ρ)$-quality problem with $o(N)$ queries and time. As a case study, we consider random graphs, i.e., $D = G_{n,p}$ (and $N = \binom{n}2$), and the $k$-clique count function $ρ_k := C_k(G)/\mathbb{E}_{G' \sim G_{n,p}}[C_k(G')]$, where $C_k(G)$ is the number of $k$-cliques in $G$. In suitable parameter ranges, worst-case approximate $k$-clique counting requires $p^{-Ω(k^2)}$ queries. In contrast, we show that the quality control problem for $G_{n,p}$ (with $n\geq p^{-ck}$ for some constant $c$) with respect to $ρ_k$ can be tested with $p^{-O(k)}$ queries and time, showing quality control is provably superpolynomially more efficient in this setting. More generally, for a motif $H$ of maximum degree $Δ(H)$, we show that the corresponding quality control problem can be solved with $p^{-O(Δ(H))}$ queries and running time.

cs.DS↗

Deterministic Volume Estimation of Truncated Hypercubes

We present a deterministic polynomial-time algorithm for estimating the volume of a hypercube intersected by a fixed number of constraints, where each constraint is the sum of univariate functions that are each nonnegative, monotone, and convex. Such constraints include knapsack and norm-ball constraints. The case of the unit hypercube truncated by a single linear constraint (halfspace) is already #P-hard. Given a fixed number of such constraints in a given dimension, together with an error parameter, our algorithm computes a multiplicative approximation of the volume of their intersection with the unit hypercube in time polynomial in the dimension, reciprocal error, input encoding length, and output encoding length.

cs.DS↗