HOME

TheInfoList



OR:

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 algorithm or Bellman-Ford algorithm.


History

Since 1957 many papers were 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''.


Algorithm

The Dijkstra 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 In graph theory, Yen's algorithm computes single-source ''K''-shortest loopless paths for a graph with non-negative edge cost. The algorithm was published by Jin Y. Yen in 1971 and employs any shortest path algorithm to find the best path, then p ...
..


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. In 1998,
David Eppstein David Arthur Eppstein (born 1963) is an American computer scientist and mathematician. He is a Distinguished Professor of computer science at the University of California, Irvine. He is known for his work in computational geometry, graph algorit ...
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. In 2015, Akuba ''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.


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 In graph theory, Yen's algorithm computes single-source ''K''-shortest loopless paths for a graph with non-negative edge cost. The algorithm was published by Jin Y. Yen in 1971 and employs any shortest path algorithm to find the best path, then p ...
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 2''n''2 additions and ''n''2 comparison, fewer than other available
shortest path algorithms In graph theory, the shortest path problem is the problem of finding a path between two vertices (or nodes) in a graph such that the sum of the weights of its constituent edges is minimized. The problem of finding the shortest path between tw ...
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 Subhash Suri (born July 7, 1960) is an Indian-American computer scientist, a professor at the University of California, Santa Barbara. He is known for his research in computational geometry, computer networks, and algorithmic game theory. Biograp ...
proposed a replacement paths algorithm, a more efficient implementation of Lawler's and Yen's algorithm with ''O''(''n'') improvement in time.


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 foun
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.


Applications

The ''k'' shortest path routing is a good alternative for:

:* Network routing, especially in
optical mesh network An optical mesh network is a type of optical telecommunications network employing wired fiber-optic communication or wireless free-space optical communication in a mesh network architecture. Most optical mesh networks use fiber-optic communicatio ...
where there are additional constraints that cannot be solved by using ordinary shortest path algorithms. :* Hypothesis generation in computational linguistics
Sequence alignment and metabolic pathway finding in bioinformatics

Multiple object tracking
as described above :* Road Networks: road junctions are the nodes (vertices) and each edge (link) of the graph is associated with a road segment between two junctions.


Related problems

*The breadth-first search algorithm is used when the search is only limited to two operations. *The
Floyd–Warshall algorithm In computer science, the Floyd–Warshall algorithm (also known as Floyd's algorithm, the Roy–Warshall algorithm, the Roy–Floyd algorithm, or the WFI algorithm) is an algorithm for finding shortest paths in a directed weighted graph with p ...
solves all pairs shortest paths. *
Johnson's algorithm Johnson's algorithm is a way to find the shortest paths between all pairs of vertices in an edge-weighted directed graph. It allows some of the edge weights to be negative numbers, but no negative-weight cycles may exist. It works by using ...
solves all pairs' shortest paths, and may be faster than Floyd–Warshall on
sparse graph In mathematics, a dense graph is a graph in which the number of edges is close to the maximal number of edges (where every pair of vertices is connected by one edge). The opposite, a graph with only a few edges, is a sparse graph. The distinction ...
s. *
Perturbation theory In mathematics and applied mathematics, perturbation theory comprises methods for finding an approximate solution to a problem, by starting from the exact solution of a related, simpler problem. A critical feature of the technique is a middle ...
finds (at worst) the locally shortest path. Cherkassky et al.Cherkassky, Boris V.; Goldberg, Andrew V.; Radzik, Tomasz (1996). "Shortest paths algorithms: theory and experimental evaluation". Mathematical Programming. Ser. A 73 (2): 129–174. provide more algorithms and associated evaluations.


See also

* Constrained shortest path routing


Notes

{{reflist


External links


Implementation of Yen's algorithmImplementation of Yen's and fastest k shortest simple paths algorithms
* http://www.technical-recipes.com/2012/the-k-shortest-paths-algorithm-in-c/#more-2432 * Multiple objects tracking technique using K-shortest path algorithm: http://cvlab.epfl.ch/software/ksp/ *Computer Vision Laboratory: http://cvlab.epfl.ch/software/ksp/ Network theory Polynomial-time problems Graph algorithms Computational problems in graph theory