International Workshop on Combinatorial Algorithms

IWOCA 2014: Combinatorial Algorithms pp 318-329 | Cite as

Efficiently Listing Bounded Length st-Paths

  • Romeo Rizzi
  • Gustavo SacomotoEmail author
  • Marie-France Sagot
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8986)


The problem of listing the K shortest simple (loopless) st-paths in a graph has been studied since the early 1960s. For a non-negatively weighted graph with n vertices and m edges, the most efficient solution is an \(O(K(mn + n^2 \log n))\) algorithm for directed graphs by Yen and Lawler [Management Science, 1971 and 1972], and an \(O(K(m+n \log n))\) algorithm for the undirected version by Katoh et al. [Networks, 1982], both using \(O(Kn + m)\) space. In this work, we consider a different parameterization for this problem: instead of bounding the number of st-paths output, we bound their length. For the bounded length parameterization, we propose new non-trivial algorithms matching the time complexity of the classic algorithms but using only \(O(m+n)\) space. Moreover, we provide a unified framework such that the solutions to both parameterizations – the classic K-shortest and the new length-bounded paths – can be seen as two different traversals of a same tree, a Dijkstra-like and a DFS-like traversal, respectively.


Undirected Graph Priority Queue Recursive Call Short Path Tree Naive Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Ahuja, R.K., Mehlhorn, K., Orlin, J.B., Tarjan, R.E.: Faster algorithms for the shortest path problem. J. ACM 37, 213–223 (1990)zbMATHMathSciNetCrossRefGoogle Scholar
  2. 2.
    Bernstein, A.: A nearly optimal algorithm for approximating replacement paths and k shortest simple paths in general graphs. In: Proceedings of the 20th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 742–755 (2010)Google Scholar
  3. 3.
    Birmelé, E., Ferreira, R., Grossi, R., Marino, A., Pisanti, N., Rizzi, R., Sacomoto, G.: Optimal listing of cycles and st-paths in undirected graphs. In: Proceedings of the 24th Symposium on Discrete Algorithms (SODA), pp. 1884–1896 (2013)Google Scholar
  4. 4.
    Böhmová, K., Mihalák, M., Pröger, T., Srámek, R., Widmayer, P.: Robust routing in urban public transportation: how to find reliable journeys based on past observations. In: 13th Workshop on Algorithmic Approaches for Transportation Modelling, Optimization, and Systems (ATMOS), pp. 27–41 (2013)Google Scholar
  5. 5.
    Dechter, R., Pearl, J.: Generalized best-first search strategies and the optimality of A*. J. ACM 32(3), 505–536 (1985)zbMATHMathSciNetCrossRefGoogle Scholar
  6. 6.
    Dreyfus, S.E.: An appraisal of some shortest-path algorithms. Oper. Res. 17(3), 395–412 (1969)zbMATHCrossRefGoogle Scholar
  7. 7.
    Eppstein, D.: Finding the k shortest paths. SIAM J. Comput. 28(2), 652–673 (1999)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Hershberger, J., Suri, S.: Vickrey prices and shortest paths: what is an edge worth? In: Proceedings of the 42nd Symposium on Foundations of Computer Science (FOCS), pp. 252–259. IEEE Computer Society (2001)Google Scholar
  9. 9.
    Johnson, D.S., Papadimitriou, C.H., Yannakakis, M.: On generating all maximal independent sets. Inf. Process. Lett. 27(3), 119–123 (1988)zbMATHMathSciNetCrossRefGoogle Scholar
  10. 10.
    Johnson, D.B.: Efficient algorithms for shortest paths in sparse networks. J. ACM 24(1), 1–13 (1977)zbMATHCrossRefGoogle Scholar
  11. 11.
    Katoh, N., Ibaraki, T., Mine, H.: An efficient algorithm for \(K\) shortest simple paths. Networks 12(4), 411–427 (1982)zbMATHMathSciNetCrossRefGoogle Scholar
  12. 12.
    Lawler, E.L.: A procedure for computing the \(K\) best solutions to discrete optimization problems and its application to the shortest path problem. Manage. Sci. 18, 401–405 (1972)zbMATHMathSciNetCrossRefGoogle Scholar
  13. 13.
    Malik, K., Mittal, A.K., Gupta, S.K.: The \(k\) most vital arcs in the shortest path problem. Oper. Res. Lett. 8(4), 223–227 (1989)zbMATHMathSciNetCrossRefGoogle Scholar
  14. 14.
    Ferreira, R., Grossi, R., Rizzi, R., Sacomoto, G., Sagot, M.-F.: Amortized \(\tilde{O}(|V|)\)-delay algorithm for listing chordless cycles in undirected graphs. In: Schulz, A.S., Wagner, D. (eds.) ESA 2014. LNCS, vol. 8737, pp. 418–429. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  15. 15.
    Roditty, L.: On the k-simple shortest paths problem in weighted directed graphs. In: Proceedings of the 18th ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM (2007)Google Scholar
  16. 16.
    Roditty, L., Zwick, U.: Replacement paths and k simple shortest paths in unweighted directed graphs. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 249–260. Springer, Heidelberg (2005) CrossRefGoogle Scholar
  17. 17.
    Sedgewick, R.: Algorithms in C, Part 5: Graph Algorithms, 3rd edn. Addison-Wesley Professional, Reading (2001) Google Scholar
  18. 18.
    Yen, J.Y.: Finding the \(K\) shortest loopless paths in a network. Manage. Sci. 17, 712–716 (1971)zbMATHCrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Romeo Rizzi
    • 1
  • Gustavo Sacomoto
    • 2
    • 3
    Email author
  • Marie-France Sagot
    • 2
    • 3
    • 4
  1. 1.Dipartimento di InformaticaUniversità di VeronaVeronaItaly
  2. 2.Université de LyonLyonFrance
  3. 3.CNRS, UMR5558, Laboratoire de Biométrie et Biologie ÉvolutiveUniversité Lyon 1VilleurbanneFrance
  4. 4.INRIA Grenoble Rhône-AlpesMontbonnot-saint-martinFrance

Personalised recommendations