K shortest path routing explained

The k shortest path routing problem is a generalization of the shortest path routing problem in a given network. It asks not only about a shortest path but also about next k−1 shortest paths (which may be longer than the shortest path). A variation of the problem is the loopless k shortest paths.

Finding k shortest paths is possible by extending Dijkstra's algorithm or the Bellman-Ford algorithm.

History

Since 1957, many papers have been published on the k shortest path routing problem. Most of the fundamental works were done between 1960s and 2001. Since then, most of the research has been on the problem's applications and its variants. In 2010, Michael Günther et al. published a book on Symbolic calculation of k-shortest paths and related measures with the stochastic process algebra tool CASPA.[1]

Algorithm

Dijkstra's algorithm can be generalized to find the k shortest paths.

Variations

There are two main variations of the k shortest path routing problem. In one variation, paths are allowed to visit the same node more than once, thus creating loops. In another variation, paths are required to be simple and loopless. The loopy version is solvable using Eppstein's algorithm and the loopless variation is solvable by Yen's algorithm.[2] [3]

Loopy variant

In this variant, the problem is simplified by not requiring paths to be loopless. A solution was given by B. L. Fox in 1975 in which the k-shortest paths are determined in asymptotic time complexity (using big O notation.[4] In 1998, David Eppstein reported an approach that maintains an asymptotic complexity of by computing an implicit representation of the paths, each of which can be output in O(n) extra time.[5] In 2015, Akiba et al. devised an indexing method as a significantly faster alternative for Eppstein's algorithm, in which a data structure called an index is constructed from a graph and then top-k distances between arbitrary pairs of vertices can be rapidly obtained.[6]

Loopless variant

In the loopless variant, the paths are forbidden to contain loops, which adds an additional level of complexity. It can be solved using Yen's algorithm to find the lengths of all shortest paths from a fixed node to all other nodes in an n-node non negative-distance network, a technique requiring only 2n2 additions and n2 comparison, fewer than other available shortest path algorithms need. The running time complexity is pseudo-polynomial, being (where m and n represent the number of edges and vertices, respectively). In 2007, John Hershberger and Subhash Suri proposed a replacement paths algorithm, a more efficient implementation of Lawler's [7] and Yen's algorithm with O(n) improvement in time for a large number of graphs, but not all of them (therefore not changing the asymptotic bound of Yen's algorithm).[8]

Some examples and description

Example 1

The following example makes use of Yen’s model to find k shortest paths between communicating end nodes. That is, it finds a shortest path, second shortest path, etc. up to the Kth shortest path. More details can be found here.The code provided in this example attempts to solve the k shortest path routing problem for a 15-nodes network containing a combination of unidirectional and bidirectional links:

Example 2

Another example is the use of k shortest paths algorithm to track multiple objects. The technique implements a multiple object tracker based on the k shortest paths routing algorithm. A set of probabilistic occupancy maps is used as input. An object detector provides the input.

The complete details can be found at "Computer Vision Laboratory – CVLAB".

Example 3

Another use of k shortest paths algorithms is to design a transit network that enhances passengers' experience in public transportation systems. Such an example of a transit network can be constructed by putting traveling time under consideration. In addition to traveling time, other conditions may be taken depending upon economical and geographical limitations. Despite variations in parameters, the k shortest path algorithms finds the most optimal solutions that satisfies almost all user needs. Such applications of k shortest path algorithms are becoming common, recently Xu, He, Song, and Chaudry (2012) studied the k shortest path problems in transit network systems.[9]

Applications

The k shortest path routing is a good alternative for:

Related problems

Cherkassky et al.[10] provide more algorithms and associated evaluations.

See also

External links

Notes and References

  1. Günther . Michael . Schuster . Johann . Siegle . Markus . Symbolic calculation of k-shortest paths and related measures with the stochastic process algebra tool CASPA . Symbolic calculation of k-shortest paths and related measures with the stochastic process algebra tool CASPA . ACM . 2010-04-27 . 978-1-60558-916-9 . 10.1145/1772630.1772635 . 13–18.
  2. Yen. J. Y.. 1971. Finding the k-Shortest Loopless Paths in a Network. Management Science. 1 7. 11. 712–716. 10.1287/mnsc.17.11.712. .
  3. Book: Path Routing in Mesh Optical Networks. Eric. Bouillet. Georgios. Ellinas. Jean-Francois. Labourdette. Ramu. Ramamurthy. John Wiley & Sons. 2007. 9780470015650. Path Routing  - Part 2: Heuristics. https://books.google.com/books?id=zSSjFf-jZT8C&pg=PG129. 125–138.
  4. Kth shortest paths and applications to the probabilistic networks. B. L.. Fox. ORSA/TIMS Joint National Meeting. 23. B263. 1975. CiNii National Article ID: 10012857200.
  5. David. Eppstein. David Eppstein. Finding the k Shortest Paths. 1998. SIAM J. Comput.. 28. 2. 652–673. 10.1137/S0097539795290477.
  6. Book: Takuya. Akiba. Takanori. Hayashi. Nozomi. Nori. Yoichi. Iwata. Yuichi. Yoshida. Efficient Top-k Shortest-Path Distance Queries on Large Networks by Pruned Landmark Labeling. Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence. https://www.aaai.org/ocs/index.php/AAAI/AAAI15/paper/view/9320/9217. January 2015. Austin, TX. 2–8. Association for the Advancement of Artificial Intelligence.
  7. Lawler. Eugene L.. 1972-03-01. A Procedure for Computing the K Best Solutions to Discrete Optimization Problems and Its Application to the Shortest Path Problem. Management Science. 18. 7. 401–405. 10.1287/mnsc.18.7.401. 0025-1909.
  8. Hershberger. John. Maxel. Matthew. Suri. Subhash. 2007. Finding the k Shortest Simple Paths: A New Algorithm and its Implementation. ACM Transactions on Algorithms. 3. 4. Article 45 (19 pages). 10.1145/1290672.1290682. 10703503 . John Hershberger. Subhash Suri.
  9. Xu . Wangtu . He . Shiwei . Song . Rui . Chaudhry . Sohail S. . Finding the k shortest paths in a schedule-based transit network . Computers & Operations Research . 39 . 8 . 2012 . 10.1016/j.cor.2010.02.005 . 1812–1826. 29232689 .
  10. Cherkassky . Boris V. . Goldberg . Andrew V. . Andrew V. Goldberg . Radzik . Tomasz . Shortest paths algorithms: Theory and experimental evaluation . Mathematical Programming . 73 . 2 . 1996 . 0025-5610 . 10.1007/BF02592101 . 129–174. 414427 .