arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

有向图中次短路径的局部代表与最短补全

Local Representatives and Shortest Completions for Next-to-Shortest Paths in Directed Graphs

Shisheng Li

arXiv 2609.22940首次发表:更新:

AI 中文总结

针对正权有向图的次短路径问题,提出基于最优中间段框架的快速算法,通过局部代表和二维动态规划将复杂度降至O(n^3(m+n log n))。

AI 中文摘要

给定一个具有正边权重的有向图以及两个顶点s和t,一条次短s-t路径是指长度严格大于最短路径距离的所有简单s-t路径中最短的一条。该问题由Lalgudi、Papaefthymiou和Potkonjak于1996年提出;当允许零权重边时,该问题是NP困难的,而在正权重有向图上的复杂度在近三十年内一直悬而未决,直到Chen、Wein和Zhang最近给出了一个运行时间为O(n^4 m^3 log n)的多项式时间算法。我们在他们的最优中间段框架内给出了一个显著更快的算法。核心思想是将问题分解为“选择前缀”和“补全前缀”两部分。给定一个由最短路径边构成的前缀P: s -> A,删除P所使用的顶点,禁止沿最短路径边离开A,则最佳补全就是一次最短路径计算。难点在于选择P:即使对于固定的A,判断某个最短前缀是否存在补全也是NP完全的。我们并不逐一解决这些固定A的子问题。固定任意一条全局最优的次短路径;其中间段在最短路径DAG中诱导出一条边界边x -> c。对于正确的三元组(A,B,x),最优路径证明c是一个可行的下一跳,并且我们证明,在拓扑序中不早于c的每个可行下一跳都可以与同一中间段组合成另一条全局最优路径。因此,每个三元组仅保留具有最大拓扑索引的可行下一跳,从而得到O(n^3)个代表,所有这些代表通过一个带局部奖励的二维DAG动态规划生成。总运行时间为O(n^3 (m + n log n)),在无权图上为O(n^3 m)。证明依赖于一个非交叉引理:参考前缀与候选伙伴后缀之间的最后一次交点总是可以严格地提前移动,而这一过程不能无限进行。

英文摘要

Given a directed graph with positive edge weights and two vertices s,t, a next-to-shortest s-t path is a shortest simple s-t path among those whose length is strictly larger than the shortest-path distance. The problem was introduced by Lalgudi, Papaefthymiou and Potkonjak in 1996; it is NP-hard when zero-weight edges are allowed, and its complexity on positively weighted digraphs remained open for almost three decades until Chen, Wein and Zhang recently gave a polynomial-time algorithm running in O(n^4 m^3 log n) time. We give a substantially faster algorithm within their optimal-middle-segment framework. The core idea is to split the problem into "choosing a prefix" and "completing it". Given a prefix P: s -> A made of shortest-path edges, delete the vertices used by P, forbid leaving A along shortest-path edges, and the best completion is one shortest-path computation. The difficulty lies in choosing P: even for a fixed A, deciding whether some shortest prefix admits a completion is NP-complete. We do not solve these fixed-A subproblems one by one. Fix any globally optimal next-to-shortest path; its middle segment induces a boundary edge x -> c in the shortest-path DAG. For the correct triple (A,B,x), the optimal path certifies c as a feasible next hop, and we prove that every feasible next hop that is not earlier than c in a topological order can be combined with the same middle segment into another globally optimal path. Hence only the feasible next hop of maximum topological index is kept per triple, giving O(n^3) representatives, all generated by a two-dimensional DAG dynamic program with a local reward. The total running time is O(n^3 (m + n log n)), and O(n^3 m) on unweighted graphs. The proof rests on an uncrossing lemma: the last intersection between a reference prefix and the candidate's partner suffix can always be moved strictly earlier, which cannot go on forever.

Comments15 pages

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑