An efficient implementation of an algorithm for finding K shortest simple paths

In this article, we present an efficient computational implementation of an algorithm for finding the K shortest simple paths connecting a pair of vertices in an undirected graph with n vertices, m arcs, and nonnegative arc lengths. A minimal number of intermediate paths is formed based on the method of Katoh, Ibaraki and Mine [Networks 12 (1982), 411–427], which has the lowest worst-case complexity of O(n2) among all other existing algorithms for this problem. A theoretical description of the algorithm is presented with detailed explanations and some examples of the more complicated steps. Efficient data structures for storing and retrieving a large number of paths are given. The results of wide-ranging experimentation with a large number of randomly generated graphs of varying size and density confirm the linear dependency of computing time on K, as proven in Katoh et al., and the quadratic dependency of computing time on graph size as suggested by the worst-case computational complexity. © 1999 John Wiley & Sons, Inc. Networks 34: 88–101, 1999

[1]  Richard Pavley,et al.  A Method for the Solution of the Nth Best Path Problem , 1959, JACM.

[2]  J. Y. Yen Finding the K Shortest Loopless Paths in a Network , 1971 .

[3]  E. Lawler A PROCEDURE FOR COMPUTING THE K BEST SOLUTIONS TO DISCRETE OPTIMIZATION PROBLEMS AND ITS APPLICATION TO THE SHORTEST PATH PROBLEM , 1972 .

[4]  J. W. Suurballe Disjoint paths in a network , 1974, Networks.

[5]  Douglas R. Shier,et al.  Computational experience with an algorithm for finding the k shortest paths in a network , 1974 .

[6]  Ahnont Wongseelashote,et al.  An algebra for determining all path-values in a network with application to K-shortest-paths problems , 1976, Networks.

[7]  Douglas R. Shier,et al.  Iterative methods for determining the k shortest paths in a network , 1976, Networks.

[8]  Donald B. Johnson,et al.  Efficient Algorithms for Shortest Paths in Sparse Networks , 1977, J. ACM.

[9]  Douglas R. Shier,et al.  On algorithms for finding the k shortest paths in a network , 1979, Networks.

[10]  G. J. Horne,et al.  Finding the K Least Cost Paths in an Acyclic Activity Network , 1980 .

[11]  Toshihide Ibaraki,et al.  An efficient algorithm for K shortest simple paths , 1982, Networks.

[12]  Alfred V. Aho,et al.  Data Structures and Algorithms , 1983 .

[13]  Narsingh Deo,et al.  Shortest-path algorithms: Taxonomy and annotation , 1984, Networks.

[14]  Aarni Perko,et al.  Implementation of algorithms for K shortest loopless paths , 1986, Networks.

[15]  Robert E. Tarjan,et al.  Fibonacci heaps and their uses in improved network optimization algorithms , 1987, JACM.

[16]  Christopher C. Skiscim,et al.  Computing k-shortest path lengths in euclidean networks , 1987, Networks.

[17]  Ming S. Hung,et al.  A computational study of efficient shortest path algorithms , 1988, Comput. Oper. Res..

[18]  S.-P. Chan,et al.  An electrical method for finding suboptimal routes , 1989, IEEE International Symposium on Circuits and Systems,.

[19]  Bruce L. Golden,et al.  Solvingk-shortest and constrained shortest path problems efficiently , 1989 .

[20]  Michael L. Fredman,et al.  Trans-Dichotomous Algorithms for Minimum Spanning Trees and Shortest Paths , 1994, J. Comput. Syst. Sci..

[21]  J. Ben Rosen,et al.  Algorithms for the quickest path problem and the enumeration of quickest paths , 1991, Comput. Oper. Res..

[22]  Donald Goldfarb,et al.  Shortest path algorithms using dynamic breadth-first search , 1991, Networks.

[23]  Teodor Gabriel Crainic,et al.  Shortest path algorithms: A computational study with the C programming language , 1991, Comput. Oper. Res..

[24]  Dimitri P. Bertsekas,et al.  A simple and fast label correcting algorithm for shortest paths , 1993, Networks.

[25]  Yen-Liang Chen,et al.  An algorithm for finding the k quickest paths in a network , 1993, Comput. Oper. Res..

[26]  E. Martins,et al.  An algorithm for the ranking of shortest paths , 1993 .

[27]  Gen-Huey Chen,et al.  Algorithms for the constrained quickest path problem and the enumeration of quickest paths , 1994, Comput. Oper. Res..

[28]  Nicos Christofides,et al.  A new exact algorithm for the vehicle routing problem based onq-paths andk-shortest paths relaxations , 1995, Ann. Oper. Res..

[29]  Mikkel Thorup,et al.  Undirected single source shortest paths in linear time , 1997, Proceedings 38th Annual Symposium on Foundations of Computer Science.

[30]  David Eppstein,et al.  Finding the k Shortest Paths , 1999, SIAM J. Comput..

[31]  Eric Ruppert,et al.  Finding the k Shortest Paths in Parallel , 1997, Algorithmica.