Finding the k Shortest Simple Paths: A New Algorithm and Its Implementation

被引:91
作者
Hershberger, John [1 ]
Maxel, Matthew [2 ]
Suri, Subhash [2 ]
机构
[1] Mentor Graph Corp, 8005 SW Boeckman Rd, Wilsonville, OR 97070 USA
[2] Univ Calif Santa Barbara, Dept Comp Sci, Santa Barbara, CA 93106 USA
基金
美国国家科学基金会;
关键词
Loop-free paths; replacement paths; path equivalence class; directed paths;
D O I
10.1145/1290672.1290682
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We describe a new algorithm to enumerate the k shortest simple (loopless) paths in a directed graph and report on its implementation. Our algorithm is based on a replacement paths algorithm proposed by Hershberger and Suri [2001], and can yield a factor e(n) improvement for this problem. But there is a caveat: The fast replacement paths subroutine is known to fail for some directed graphs. However, the failure is easily detected, and so our k shortest paths algorithm optimistically uses the fast subroutine, then switches to a slower but correct algorithm if a failure is detected. Thus, the algorithm achieves its e(n) speed advantage only when the optimism is justified. Our empirical results show that the replacement paths failure is a rare phenomenon, and the new algorithm outperforms the current best algorithms; the improvement can be substantial in large graphs. For instance, on GIS map data with about 5,000 nodes and 12.000 miges, our algorithm is 4-8 times faster. In synthetic graphs modeling wireless ad hoc networks, our algorithm is about 20 times faster.
引用
收藏
页数:19
相关论文
共 24 条
  • [1] [Anonymous], 2003, Q J BELGIAN FRENCH I, DOI DOI 10.1007/S10288-002-0010-2
  • [2] [Anonymous], 2007, ACM T ALGORITHMS, DOI DOI 10.1145/1219944.1219951
  • [3] Brander A., 1995, P 11 UK PERF ENG WOR, P370
  • [4] COMPUTATIONAL ANALYSIS OF ALTERNATIVE ALGORITHMS AND LABELING TECHNIQUES FOR FINDING SHORTEST PATH TREES
    DIAL, R
    GLOVER, F
    KARNEY, D
    KLINGMAN, D
    [J]. NETWORKS, 1979, 9 (03) : 215 - 248
  • [5] Finding the k shortest paths
    Eppstein, D
    [J]. SIAM JOURNAL ON COMPUTING, 1998, 28 (02) : 652 - 673
  • [6] FOX BL, 1975, OPER RES, V23, pB263
  • [7] Fredman M. L., 1976, SIAM Journal on Computing, V5, P83, DOI 10.1137/0205006
  • [8] FIBONACCI HEAPS AND THEIR USES IN IMPROVED NETWORK OPTIMIZATION ALGORITHMS
    FREDMAN, ML
    TARJAN, RE
    [J]. JOURNAL OF THE ACM, 1987, 34 (03) : 596 - 615
  • [9] Hadjiconstantinou E, 1999, NETWORKS, V34, P88, DOI 10.1002/(SICI)1097-0037(199909)34:2<88::AID-NET2>3.0.CO
  • [10] 2-1