Finding the k Shortest Simple Paths: Time and Space trade-offs - Archive ouverte HAL Access content directly
Journal Articles ACM Journal of Experimental Algorithmics Year : 2023

Finding the k Shortest Simple Paths: Time and Space trade-offs


The k shortest simple path problem (kSSP) asks to compute a set of top-k shortest simple paths from a source to a sink in a digraph. Yen (1971) proposed an algorithm with the best known polynomial time complexity for this problem. Since then, the problem has been widely studied from an algorithm engineering perspective. The most noticeable proposals are the node-classification (NC) algorithm (Feng, 2014) and the sidetracks-based (SB) algorithm (Kurz, Mutzel, 2016). The latest offers the best running time at the price of a significant memory consumption. We first show how to speed up the SB algorithm using dynamic updates of shortest path trees resulting in a faster algorithm (SB*) with the same memory consumption. We then propose the parsimonious SB (PSB) algorithm that significantly reduces the memory consumption of SB at the cost of a small increase of the running time. Furthermore, we propose the postponed node-classification (PNC) algorithm that combines the best of the NC and the SB algorithms. It offers a significant speed up compared to the SB algorithm while using the same amount of memory as the NC algorithm. Our experimental results on complex networks show that all the considered algorithms have low memory consumption, and that the PSB algorithm is the fastest. On road networks, the relative performances of the algorithms depend on the number k of requested paths. Indeed, when the number k of requested paths is small (i.e., k ≤ 20 in our experiments), the SB* algorithm is the fastest among the considered algorithms, but it suffers from a large memory consumption and it offers very bad performances on some queries. When the number of requested paths is large (i.e., larger than 20 according to our experiments), the PNC algorithm is the fastest among the considered algorithms on road networks and it has a low memory footprint. The PNC algorithm is therefore a better choice on road networks.
Fichier principal
Vignette du fichier
JEA-HAL.pdf (1005.5 Ko) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-03196830 , version 1 (13-04-2021)
hal-03196830 , version 2 (07-10-2023)



Ali Al Zoobi, David Coudert, Nicolas Nisse. Finding the k Shortest Simple Paths: Time and Space trade-offs. ACM Journal of Experimental Algorithmics, inPress, pp.23. ⟨10.1145/3626567⟩. ⟨hal-03196830v2⟩
255 View
356 Download



Gmail Facebook X LinkedIn More