Abstract
Many activities of modern day living operate on the basis of graph structures that change over time (e.g. social networks, city traffic navigation, disease transmission paths). Hence, the problem of dynamically maintaining properties of such structures after modifying one of its edges (or links), specially for large-scale graphs, has received a great amount of attention in recent years. We address the particular case of updating all-pairs shortest distances upon incremental changes, i.e. re-computing shortest distances among all the nodes of a graph when a new or smaller shortcut between two nodes arises. We build upon the naive algorithm that visits all pairs of nodes comparing if the new shortcut shortens the distances, and propose a simple variation that instead chooses pairs of source and target nodes, only from the affected shortest paths. The new algorithm works with an optimal data structure, constant query time and worst-case \(O(n^2)\) update cost, although our results on synthetic datasets hints at its practicality when compared with state-of-the-art approaches.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Alshammari, M., Rezgui, A.: An all pairs shortest path algorithm for dynamic graphs. Comput. Sci. 15(1), 347–365 (2020)
Ardakani, M.K., Tavana, M.: A decremental approach with the A* algorithm for speeding-up the optimization process in dynamic shortest path problems. Measurement 60, 299–307 (2015)
Ausiello, G., Italiano, G.F., Spaccamela, A.M., Nanni, U.: Incremental algorithms for minimal length paths. J. Algorithms 12(4), 615–638 (1991)
Bergamini, E., Meyerhenke, H., Staudt, C.: Approximating betweenness centrality in large evolving networks. In: ALENEX, pp. 133–146. SIAM (2015)
Delling, D., Goldberg, A.V., Pajor, T., Werneck, R.F.: Customizable route planning in road networks. Transp. Sci. 51(2), 566–591 (2017)
Delling, D., Sanders, P., Schultes, D., Wagner, D.: Engineering route planning algorithms. In: Lerner, J., Wagner, D., Zweig, K.A. (eds.) Algorithmics of Large and Complex Networks. LNCS, vol. 5515, pp. 117–139. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-02094-0_7
Demetrescu, C., Italiano, G.F.: Experimental analysis of dynamic all pairs shortest path algorithms. ACM Trans. Algorithms (TALG) 2(4), 578–601 (2006)
Dijkstra, E.W.: A note on two problems in connection with graphs. Numer. Math. 1, 269–271 (1959)
Dunn, C.E., Newton, D.: Optimal routes in GIS and emergency planning applications. Area 24(3), 259–267 (1992)
Even, S., Gazit, H.: Updating distances in dynamic graphs. Methods Oper. Res. 49, 371–387 (1985)
Floyd, R.W.: Algorithm 97: shortest path. Commun. ACM 5(6), 345+ (1962)
Henzinger, M., Krinninger, S., Nanongkai, D.: Decremental single-source shortest paths on undirected graphs in near-linear total update time. In: 2014 IEEE 55th Annual Symposium on Foundations of Computer Science (FOCS), pp. 146–155. IEEE (2014)
Keeling, M.J., Deirdre Hollingsworth, T., Read, J.M.: The efficacy of contact tracing for the containment of the 2019 novel coronavirus (COVID-19). medRxiv (2020)
Khopkar, S.S., Nagi, R., Nikolaev, A.G., Bhembre, V.: Efficient algorithms for incremental all pairs shortest paths, closeness and betweenness in social network analysis. Soc. Netw. Anal. Min. 4(1), 1–20 (2014). https://doi.org/10.1007/s13278-014-0220-6
Lissovoi, A., Witt, C.: Runtime analysis of ant colony optimization on dynamic shortest path problems. Theoret. Comput. Sci. 561, 73–85 (2015)
Liu, J., Wan, J., Wang, Q., Deng, P., Zhou, K., Qiao, Y.: A survey on position-based routing for vehicular ad hoc networks. Telecommun. Syst. 62(1), 15–30 (2015). https://doi.org/10.1007/s11235-015-9979-7
Moy, J.T.: OSPF: Anatomy of an Internet Routing Protocol. Addison-Wesley Longman Publishing Co., Inc., Boston (1998)
Ramalingam, G., Reps, T.: An incremental algorithm for a generalization of the shortest-path problem. J. Algorithms 21(2), 267–305 (1996)
Sarmento, R., Oliveira, M., Cordeiro, M., Tabassum, S., Gama, J.: Social network analysis in streaming call graphs. In: Japkowicz, N., Stefanowski, J. (eds.) Big Data Analysis: New Algorithms for a New Society. SBD, vol. 16, pp. 239–261. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-26989-4_10
Slobbe, A., Bergamini, E., Meyerhenke, H.: Faster incremental all-pairs shortest paths. Technical report, Karlsruhe Institute of Technology, Faculty of Informatics (2016)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Verbel, A., Rodriguez, N., Rojas–Galeano, S. (2020). A Simple Yet Effective Algorithm to Compute Incremental All-Pairs Shortest Distances. In: Figueroa-García, J.C., Garay-Rairán, F.S., Hernández-Pérez, G.J., Díaz-Gutierrez, Y. (eds) Applied Computer Sciences in Engineering. WEA 2020. Communications in Computer and Information Science, vol 1274. Springer, Cham. https://doi.org/10.1007/978-3-030-61834-6_19
Download citation
DOI: https://doi.org/10.1007/978-3-030-61834-6_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-61833-9
Online ISBN: 978-3-030-61834-6
eBook Packages: Computer ScienceComputer Science (R0)