arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1105.0608cs.DS
收藏

次短路问题的一种简单有效算法

A simpler and more efficient algorithm for the next-to-shortest path problem

Bang Ye Wu

摘要:

给定一个边长为正的无向图$G=(V,E)$和两个顶点$s$和$t$,次短路问题是在所有严格长于最短路长的$st$-路中寻找一条长度最小的$st$-路.在本文中,我们表明,该问题可以在线性时间内解决,如果从$s$和$t$到所有其他顶点的距离。特别地,我们的新算法对于一般图的运行时间为$O(|V|\log |V|+|E|)$,改进了以前对于稀疏图的运行时间为$O(|V|^2)$的结果,对于无权图、平面图和具有正整数边长的图的运行时间仅为线性时间.

英文摘要:

Given an undirected graph $G=(V,E)$ with positive edge lengths and two vertices $s$ and $t$, the next-to-shortest path problem is to find an $st$-path which length is minimum amongst all $st$-paths strictly longer than the shortest path length. In this paper we show that the problem can be solved in linear time if the distances from $s$ and $t$ to all other vertices are given. Particularly our new algorithm runs in $O(|V|\log |V|+|E|)$ time for general graphs, which improves the previous result of $O(|V|^2)$ time for sparse graphs, and takes only linear time for unweighted graphs, planar graphs, and graphs with positive integer edge lengths.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑