arXiv:2509.26094cs.DScs.AI2025-09

提出首个高效算法求单源top-k最短路径,显著快于传统方法。

On Computing Top-$k$ Simple Shortest Paths from a Single Source

  • 基于解的结构特性设计新算法,避免重复计算。
  • 实验显示速度比逐对求解快数个数量级。
  • 适合需快速获取多条最优路径的实际场景。

本文研究加权有向图中从单源点出发的top-k条简单最短路径问题。尽管单对顶点的top-k路径已有多项研究(如Yen算法),但更通用的单源版本仍缺乏高效解法。本文首次揭示该问题解的结构性质,并提出首个专门为此设计的多项式时间算法。理论上,其时间复杂度与将最快单对算法分别应用于每对源-目标的基线方法相当;实验上,在真实和合成图上均显著优于基线,运行时间提升达数个数量级。结果表明,该算法是实际应用中求解单源top-k最短路径的优选方案。

原文摘要 · Abstract (English)

We investigate the problem of computing the top-$k$ simple shortest paths in weighted digraphs. While the single-pair variant -- finding the top-$k$ simple shortest paths between two specified vertices -- has been extensively studied over the past decades, with Yen's algorithm and its heuristic improvements emerging as the most effective solving strategies, relatively little attention has been devoted to the more general single-source version, where the goal is determining top-$k$ simple shortest paths from a source vertex to all other vertices. Motivated by the numerous practical applications of ranked shortest paths, in this paper we provide new insights and algorithmic contributions to this problem. In particular, we first present a theoretical characterization of the structural properties of its solutions. Then, we introduce the first polynomial-time algorithm specifically designed to handle it. On the one hand, we prove our new algorithm is on par, in terms of time complexity, with the best (and only) polynomial-time approach known in the literature to solve the problem, that is applying the fastest single-pair algorithm independently to each vertex pair formed by the source and the remaining vertices. On the other hand, through an extensive experimental evaluation on both real-world and synthetic graphs, we demonstrate that our algorithm consistently and significantly outperforms the latter baseline in terms of running time, achieving speed-ups of up to several orders of magnitude. These results establish our new algorithm as the solution to be preferred for computing $k$ simple shortest paths from a single source in practical settings.

最短路径算法优化图算法

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。