Skip to main content

A Simple Yet Effective Algorithm to Compute Incremental All-Pairs Shortest Distances

  • Conference paper
  • First Online:
Applied Computer Sciences in Engineering (WEA 2020)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1274))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Alshammari, M., Rezgui, A.: An all pairs shortest path algorithm for dynamic graphs. Comput. Sci. 15(1), 347–365 (2020)

    MathSciNet  MATH  Google Scholar 

  2. 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)

    Article  Google Scholar 

  3. Ausiello, G., Italiano, G.F., Spaccamela, A.M., Nanni, U.: Incremental algorithms for minimal length paths. J. Algorithms 12(4), 615–638 (1991)

    Article  MathSciNet  Google Scholar 

  4. Bergamini, E., Meyerhenke, H., Staudt, C.: Approximating betweenness centrality in large evolving networks. In: ALENEX, pp. 133–146. SIAM (2015)

    Google Scholar 

  5. Delling, D., Goldberg, A.V., Pajor, T., Werneck, R.F.: Customizable route planning in road networks. Transp. Sci. 51(2), 566–591 (2017)

    Article  Google Scholar 

  6. 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

    Chapter  Google Scholar 

  7. Demetrescu, C., Italiano, G.F.: Experimental analysis of dynamic all pairs shortest path algorithms. ACM Trans. Algorithms (TALG) 2(4), 578–601 (2006)

    Article  MathSciNet  Google Scholar 

  8. Dijkstra, E.W.: A note on two problems in connection with graphs. Numer. Math. 1, 269–271 (1959)

    Article  MathSciNet  Google Scholar 

  9. Dunn, C.E., Newton, D.: Optimal routes in GIS and emergency planning applications. Area 24(3), 259–267 (1992)

    Google Scholar 

  10. Even, S., Gazit, H.: Updating distances in dynamic graphs. Methods Oper. Res. 49, 371–387 (1985)

    MathSciNet  MATH  Google Scholar 

  11. Floyd, R.W.: Algorithm 97: shortest path. Commun. ACM 5(6), 345+ (1962)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. 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

    Article  Google Scholar 

  15. Lissovoi, A., Witt, C.: Runtime analysis of ant colony optimization on dynamic shortest path problems. Theoret. Comput. Sci. 561, 73–85 (2015)

    Article  MathSciNet  Google Scholar 

  16. 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

    Article  Google Scholar 

  17. Moy, J.T.: OSPF: Anatomy of an Internet Routing Protocol. Addison-Wesley Longman Publishing Co., Inc., Boston (1998)

    Google Scholar 

  18. Ramalingam, G., Reps, T.: An incremental algorithm for a generalization of the shortest-path problem. J. Algorithms 21(2), 267–305 (1996)

    Article  MathSciNet  Google Scholar 

  19. 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

    Chapter  Google Scholar 

  20. Slobbe, A., Bergamini, E., Meyerhenke, H.: Faster incremental all-pairs shortest paths. Technical report, Karlsruhe Institute of Technology, Faculty of Informatics (2016)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sergio Rojas–Galeano .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics