Space and Time Trade-Off for the k Shortest Simple Paths Problem

Authors Ali Al Zoobi, David Coudert , Nicolas Nisse

Thumbnail PDF


  • Filesize: 0.64 MB
  • 13 pages

Document Identifiers

Author Details

Ali Al Zoobi
  • Université Côte d'Azur, Inria, CNRS, I3S, Sophia Antipolis Cedex, France
David Coudert
  • Université Côte d'Azur, Inria, CNRS, I3S, Sophia Antipolis Cedex, France
Nicolas Nisse
  • Université Côte d'Azur, Inria, CNRS, I3S, Sophia Antipolis Cedex, France

Cite AsGet BibTex

Ali Al Zoobi, David Coudert, and Nicolas Nisse. Space and Time Trade-Off for the k Shortest Simple Paths Problem. In 18th International Symposium on Experimental Algorithms (SEA 2020). Leibniz International Proceedings in Informatics (LIPIcs), Volume 160, pp. 18:1-18:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020)


The k shortest simple path problem (kSSP) asks to compute a set of top-k shortest simple paths from a vertex s to a vertex t in a digraph. Yen (1971) proposed the first algorithm with the best known theoretical complexity of O(kn(m+n log n)) for a digraph with n vertices and m arcs. Since then, the problem has been widely studied from an algorithm engineering perspective, and impressive improvements have been achieved. In particular, Kurz and Mutzel (2016) proposed a sidetracks-based (SB) algorithm which is currently the fastest solution. In this work, we propose two improvements of this algorithm. We first show how to speed up the SB algorithm using dynamic updates of shortest path trees. We did experiments on some road networks of the 9th DIMAC'S challenge with up to about half a million nodes and one million arcs. Our computational results show an average speed up by a factor of 1.5 to 2 with a similar working memory consumption as SB. We then propose a second algorithm enabling to significantly reduce the working memory at the cost of an increase of the running time (up to two times slower). Our experiments on the same data set show, on average, a reduction by a factor of 1.5 to 2 of the working memory.

Subject Classification

ACM Subject Classification
  • Mathematics of computing → Graph algorithms
  • Theory of computation → Shortest paths
  • Theory of computation → Design and analysis of algorithms
  • k shortest simple paths
  • graph algorithm
  • space-time trade-off


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. M. Arita. Metabolic reconstruction using shortest paths. Simulation Practice and Theory, 8(1-2):109-125, 2000. URL:
  2. M. Betz and H. Hild. Language models for a spelled letter recognizer. In 1995 International Conference on Acoustics, Speech, and Signal Processing, volume 1, pages 856-859. IEEE, 1995. URL:
  3. S. Clarke, A. Krikorian, and J. Rausen. Computing the n best loopless paths in a network. Journal of the Society for Industrial and Applied Mathematics, 11(4):1096-1102, 1963. URL:
  4. C. Demetrescu, A. Goldberg, and D. Johnson. 9th dimacs implementation challenge - shortest paths, 2006. URL:
  5. D. Eppstein. Finding the k shortest paths. SIAM Journal on Computing, 28(2):652-673, 1998. URL:
  6. David Eppstein. k-Best Enumeration, pages 1003-1006. Springer New York, New York, NY, 2016. URL:
  7. G. Feng. Finding k shortest simple paths in directed graphs: A node classification algorithm. Networks, 64(1):6-17, 2014. URL:
  8. M. L. Fredman, R. Sedgewick, D. D. Sleator, and R. E. Tarjan. The pairing heap: A new form of self-adjusting heap. Algorithmica, 1(1):111-129, 1986. URL:
  9. D. Frigioni, A. Marchetti-Spaccamela, and U. Nanni. Fully dynamic algorithms for maintaining shortest paths trees. Journal of Algorithms, 34(2):251-281, 2000. URL:
  10. Eleni Hadjiconstantinou and Nicos Christofides. An efficient implementation of an algorithm for finding k shortest simple paths. Networks, 34(2):88-101, 1999. URL:<88::AID-NET2>3.0.CO;2-1.
  11. J. Hershberger, M. Maxel, and S. Suri. Finding the k shortest simple paths: A new algorithm and its implementation. ACM Transactions on Algorithms, 3(4):45, 2007. URL:
  12. W. Jin, S. Chen, and H. Jiang. Finding the k shortest paths in a time-schedule network with constraints on arcs. Computers & operations research, 40(12):2975-2982, 2013. URL:
  13. David S. Johnson. A theoretician’s guide to the experimental analysis of algorithms. Data structures, near neighbor searches, and methodology: fifth and sixth DIMACS implementation challenges, 59:215-250, 2002. URL:
  14. N. Katoh, T. Ibaraki, and H. Mine. An efficient algorithm for k shortest simple paths. Networks, 12(4):411-427, 1982. URL:
  15. D. Kurz. k-best enumeration - theory and application. Theses, Technischen Universität Dortmund, March 2018. URL:
  16. D. Kurz and P. Mutzel. A sidetrack-based algorithm for finding the k shortest simple paths in a directed graph. In Int. Symp. on Algorithms and Computation (ISAAC), volume 64 of LIPIcs, pages 49:1-49:13. Schloss Dagstuhl, 2016. URL:
  17. T. Shibuya and H. Imai. New flexible approaches for multiple sequence alignment. Journal of Computational Biology, 4(3):385-413, 1997. URL:
  18. The Sage Developers. SageMath, the Sage Mathematics Software System (Version 8.9), 2019. Google Scholar
  19. W. Xu, S. He, R. Song, and S. S. Chaudhry. Finding the k shortest paths in a schedule-based transit network. Computers & Operations Research, 39(8):1812-1826, 2012. URL:
  20. J. Y. Yen. Finding the k shortest loopless paths in a network. Management Science, 17(11):712-716, 1971. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail