# Computing and Listing st-Paths in Public Transportation Networks

• Kateřina Böhmová
• Matúš Mihalák
• Tobias Pröger
• Gustavo Sacomoto
• Marie-France Sagot
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9691)

## Abstract

Given a set of directed paths (called lines) L, a public transportation network is a directed graph $$G_L=(V_L,A_L)$$ which contains exactly the vertices and arcs of every line $$l\in L$$. An st-route is a pair $$(\pi ,\gamma )$$ where $$\gamma =\langle l_1,\ldots ,l_h \rangle$$ is a line sequence and $$\pi$$ is an st-path in $$G_L$$ which is the concatenation of subpaths of the lines $$l_1,\ldots ,l_h$$, in this order. Given a threshold $$\beta$$, we present an algorithm for listing all st-paths $$\pi$$ for which a route $$(\pi ,\gamma )$$ with $$|\gamma | \le \beta$$ exists, and we show that the running time of this algorithm is polynomial with respect to the input and the output size. We also present an algorithm for listing all line sequences $$\gamma$$ with $$|\gamma |\le \beta$$ for which a route $$(\pi ,\gamma )$$ exists, and show how to speed it up using preprocessing. Moreover, we show that for the problem of finding an st-route $$(\pi ,\gamma )$$ that minimizes the number of different lines in $$\gamma$$, even computing an $$o(\log |V|)$$-approximation is NP-hard.

## Keywords

Directed Graph Short Path Problem Recursive Call Listing Problem Transit Network
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.

## Notes

### Acknowledgements

We thank the anonymous reviewers for pointing out how the running times of our listing algorithms can be improved by a factor of $$\varTheta (\log M)$$. Furthermore we thank Peter Widmayer for many helpful discussions. This work has been partially supported by the Swiss National Science Foundation (SNF) under the grant number 200021 138117/1, and by the EU FP7/2007-2013 (DG CONNECT.H5-Smart Cities and Sustainability), under grant agreement no. 288094 (project eCOMPASS). Kateřina Böhmová is a recipient of a Google Europe Fellowship in Optimization Algorithms, and this research is supported in part by this Google Fellowship. Gustavo Sacomoto is a recipient of a grant from the European Research Council under the European Community’s Seventh Framework Programme (FP7/2007-2013)/ERC grant agreement $$\text {n}^\circ$$ [247073]10 SISYPHE.

## References

1. 1.
Bast, H., Delling, D., Goldberg, A.V., Müller-Hannemann, M., Pajor, T., Sanders, P., Wagner, D., Werneck, R.F.: Route planning in transportation networks. CoRR abs/1504.05140 (2015)Google Scholar
2. 2.
Bezem, G., Leeuwen, J.V.: Enumeration in graphs. Technical report RUU-CS-87-07, Utrecht University (1987)Google Scholar
3. 3.
Birmelé, E., Ferreira, R.A., Grossi, R., Marino, A., Pisanti, N., Rizzi, R., Sacomoto, G.: Optimal listing of cycles and st-paths in undirected graphs. In: SODA 2013, pp. 1884–1896 (2013)Google Scholar
4. 4.
Böhmová, K., Mihalák, M., Neubert, P., Pröger, T., Widmayer, P.: Robust routing in urban public transportation: evaluating strategies that learn from the past. In: ATMOS 2015, pp. 68–81 (2015)Google Scholar
5. 5.
Böhmová, K., Mihalák, M., Pröger, T., Šrámek, R., Widmayer, P.: Robust routing in urban public transportation: how to find reliable journeys based on past observations. In: ATMOS 2013, pp. 27–41 (2013)Google Scholar
6. 6.
Brodal, G.S., Jacob, R.: Time-dependent networks as models to achieve fast exact time-table queries. Electr. Notes Theor. Comput. Sci. 92, 3–15 (2004)
7. 7.
Dial, R.B.: Algorithm 360: shortest-path forest with topological ordering. Commun. ACM 12(11), 632–633 (1969)
8. 8.
Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1(1), 269–271 (1959)
9. 9.
Dinur, I., Steurer, D.: Analytical approach to parallel repetition. In: STOC 2014, pp. 624–633 (2014)Google Scholar
10. 10.
Eppstein, D.: Finding the k shortest paths. SIAM J. Comput. 28(2), 652–673 (1998)
11. 11.
Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)
12. 12.
Johnson, D.S., Papadimitriou, C.H., Yannakakis, M.: On generating all maximal independent sets. Inf. Process. Lett. 27(3), 119–123 (1988)
13. 13.
Johnson, D.B.: Finding all the elementary circuits of a directed graph. SIAM J. Comput. 4(1), 77–84 (1975)
14. 14.
Katoh, N., Ibaraki, T., Mine, H.: An efficient algorithm for $$k$$ shortest simple paths. Networks 12(4), 411–427 (1982)
15. 15.
Lawler, E.L.: A procedure for computing the $$k$$ best solutions to discrete optimization problems and its application to the shortest path problem. Mgmt. Sci. 18, 401–405 (1972)
16. 16.
Müller-Hannemann, M., Schulz, F., Wagner, D., Zaroliagis, C.D.: Timetable information: models and algorithms. In: Geraets, F., Kroon, L., et al. (eds.) ATMOS 2004, Part I. LNCS, vol. 4359, pp. 67–90. Springer, Heidelberg (2007)
17. 17.
Rizzi, R., Sacomoto, G., Sagot, M.-F.: Efficiently listing bounded length st-paths. In: Jan, K., Miller, M., Froncek, D. (eds.) IWOCA 2014. LNCS, vol. 8986, pp. 318–329. Springer, Heidelberg (2015)
18. 18.
Schulz, F., Wagner, D., Zaroliagis, C.D.: Using multi-level graphs for timetable information in railway systems. In: Mount, D.M., Stein, C. (eds.) ALENEX 2002. LNCS, vol. 2409, pp. 43–59. Springer, Heidelberg (2002)
19. 19.
Yen, J.Y.: Finding the $$k$$ shortest loopless paths in a network. Mgmt. Sci. 17, 712–716 (1971)
20. 20.
Yuan, S., Varma, S., Jue, J.P.: Minimum-color path problems for reliability in mesh networks. In: INFOCOM 2005, pp. 2658–2669 (2005)Google Scholar

© Springer International Publishing Switzerland 2016

## Authors and Affiliations

• Kateřina Böhmová
• 1
• Matúš Mihalák
• 2
• Tobias Pröger
• 1
Email author
• Gustavo Sacomoto
• 3
• 4
• Marie-France Sagot
• 3
• 4
1. 1.Institut für Theoretische InformatikETH ZürichZürichSwitzerland
2. 2.Department of Knowledge EngineeringMaastricht UniversityMaastrichtThe Netherlands
3. 3.INRIA Grenoble Rhône-AlpesMontbonnot-Saint-MartinFrance
4. 4.UMR CNRS 5558 – LBBEUniversité Lyon 1LyonFrance