Skip to main content

Incremental maintenance of all-pairs shortest paths in relational DBMSs

Abstract

Computing shortest paths is a classical graph theory problem and a central task in many applications. Although many algorithms to solve this problem have been proposed over the years, they are designed to work in the main memory and/or with static graphs, which limits their applicability to many current applications where graphs are highly dynamic, that is, subject to frequent updates. In this paper, we propose novel efficient incremental algorithms for maintaining all-pairs shortest paths and distances in dynamic graphs. We experimentally evaluate our approach on several real-world datasets, showing that it significantly outperforms current algorithms designed for the same problem.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18

Notes

  1. In this paper, we consider positive real weights.

  2. http://www.netdimes.org/new/.

  3. http://www.cs.utah.edu/~lifeifei/SpatialDataset.htm.

  4. http://konect.uni-koblenz.de/networks/munmun_twitter_social.

  5. http://snap.stanford.edu/data/p2p-Gnutella31.html.

  6. http://uweb.dimes.unical.it/tagarelli/data/.

  7. The time taken to generate all-pairs shortest paths for the original datasets ranges from around 222 seconds for the smallest dataset, namely DIMES, to around 4800 seconds for the biggest dataset, namely Instagram. It is worth noticing that computing all-pairs shortest paths is a task performed only once at the beginning, provided that incremental algorithms are subsequently used to maintain shortest paths and distances.

  8. Clearly, the input of PDR consists of a graph and the corresponding shortest distances, rather than the actual paths.

References

  • Akiba T, Iwata Y, Yoshida Y (2013) Fast exact shortest-path distance queries on large networks by pruned landmark labeling. In: Proceeding of international conference on management of data (SIGMOD), pp 349–360

  • Baswana S, Hariharan R, Sen S (2003) Maintaining all-pairs approximate shortest paths under deletion of edges. In: Proceedings of ACM-SIAM symposium on discrete algorithms (SODA), pp 394–403

  • Bernstein A (2013) Maintaining shortest paths under deletions in weighted directed graphs: (extended abstract). In: Proceedings of ACM on symposium on theory of computing (STOC), pp 725–734

  • Bouros P, Skiadopoulos S, Dalamagas T, Sacharidis D, Sellis T.K (2009) Evaluating reachability queries over path collections. In: Proceedings of international conference on scientific and statistical database management (SSDBM), pp 398–416

  • Chang L, Yu JX, Qin L, Cheng H, Qiao M (2012) The exact distance to destination in undirected world. VLDB J 21(6):869–888

    Article  Google Scholar 

  • Cheng J, Ke Y, Chu S, Cheng C (2012) Efficient processing of distance queries in large graphs: a vertex cover approach. In: Proceedings of international conference on management of data (SIGMOD), pp 457–468

  • Crecelius T, Schenkel R (2012) Pay-as-you-go maintenance of precomputed nearest neighbors in large graphs. In: Proceedings of ACM conference on information and knowledge management (CIKM), pp 952–961

  • Cuzzocrea A, Papadimitriou A, Katsaros D, Manolopoulos Y (2012) Edge betweenness centrality: a novel algorithm for qos-based topology control over wireless sensor networks. J Netw Comput Appl 35(4):1210–1217

    Article  Google Scholar 

  • Demetrescu C, Emiliozzi S, Italiano G.F (2004) Experimental analysis of dynamic all pairs shortest path algorithms. In: Proceedings of ACM-SIAM symposium on discrete algorithms (SODA), pp 369–378

  • Demetrescu C, Italiano GF (2004) A new approach to dynamic all pairs shortest paths. J ACM 51(6):968–992

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  • Dijkstra EW (1959) A note on two problems in connexion with graphs. Numerische Mathematik 1(1):269–271

    Article  MathSciNet  MATH  Google Scholar 

  • Fan W, Li J, Ma S, Tang N, Wu Y, Wu Y (2010) Graph pattern matching: from intractable to polynomial time. Proc VLDB Endow (PVLDB) 3(1):264–275

    Article  Google Scholar 

  • Fu AWC, Wu H, Cheng J, Wong RCW (2013) Is-label: an independent-set based labeling scheme for point-to-point distance querying. Proc VLDB Endow (PVLDB) 6(6):457–468

    Article  Google Scholar 

  • Gao J, Zhou J, Yu JX, Wang T (2014) Shortest path computing in relational dbmss. IEEE Trans Knowl Data Eng 26(4):997–1011

    Article  Google Scholar 

  • Goldberg, A.V., Werneck, R.F.F. (2005) Computing point-to-point shortest paths from external memory. In: Proceedings of workshop on algorithm engineering and experiments and workshop on analytic algorithmics and combinatorics (ALENEX/ANALCO), pp 26–40

  • Greco S, Molinaro C, Pulice C (2016) Efficient maintenance of all-pairs shortest distances. In: Proceedings of international conference on scientific and statistical database management (SSDBM), pp 9:1–9:12

  • Greco S, Molinaro C, Pulice C, Quintana X (2016) All-pairs shortest distances maintenance in relational dbmss. In: Proceedings of IEEE/ACM international conference on advances in social networks analysis and mining (ASONAM), pp 215–222

  • Greco S, Molinaro C, Pulice C, Quintana X (2017) Efficient maximum flow maintenance on dynamic networks. In: Proceedings of international conference on world wide web companion (WWW), pp 1383–1385

  • Greco S, Molinaro C, Pulice C, Quintana X (2017) Incremental maximum flow computation on evolving networks. In: Proceedings of the symposium on applied computing (SAC), pp 1061–1067

  • Gupta A, Mumick I.S, Subrahmanian V.S (1993) Maintaining views incrementally. In: Proceedings of international conference on management of data (SIGMOD), pp 157–166

  • Henzinger M, Krinninger S, Nanongkai D (2013) Dynamic approximate all-pairs shortest paths: Breaking the O(mn) barrier and derandomization. In: Proceedings of IEEE symposium on foundations of computer science (FOCS), pp 538–547

  • Italiano GF (1988) Finding paths and deleting edges in directed acyclic graphs. Inf Process Lett 28(1):5–11

    Article  MathSciNet  MATH  Google Scholar 

  • Jin R, Ruan N, Xiang Y, Lee V.E. (2012) A highway-centric labeling approach for answering distance queries on large sparse graphs. In: Proceedings of international conference on management of data (SIGMOD), pp 445–456

  • Kang C, Kraus S, Molinaro C, Spezzano F, Subrahmanian VS (2016) Diffusion centrality: a paradigm to maximize spread in social networks. Artif Intell 239:70–96

    Article  MathSciNet  MATH  Google Scholar 

  • Kang C, Molinaro C, Kraus S, Shavitt Y, Subrahmanian V.S (2012) Diffusion centrality in social networks. In: Proceedings of international conference on advances in social networks analysis and mining (ASONAM), pp 558–564

  • Khopkar SS, Nagi R, Nikolaev AG, Bhembre V (2014) Efficient algorithms for incremental all pairs shortest paths, closeness and betweenness in social network analysis. Soc Netw Anal Min 4(1):220

    Article  Google Scholar 

  • King, V (1999) Fully dynamic algorithms for maintaining all-pairs shortest paths and transitive closure in digraphs. In: Proceedings of IEEE symposium on foundations of computer science (FOCS), pp 81–91

  • Pang C, Dong G, Ramamohanarao K (2005) Incremental maintenance of shortest distance and transitive closure in first-order logic and SQL. ACM Trans Database Syst 30(3):698–721

    Article  Google Scholar 

  • Planken L, de Weerdt M, van der Krogt R (2012) Computing all-pairs shortest paths by leveraging low treewidth. J Artif Intell Res 43:353–388

    MathSciNet  MATH  Google Scholar 

  • Przulj N, Wigle DA, Jurisica I (2004) Functional topology in a network of protein interactions. Bioinformatics 20(3):340–348

    Article  Google Scholar 

  • Qi Z, Xiao Y, Shao B, Wang H (2013) Toward a distance oracle for billion-node graphs. Proc VLDB Endow (PVLDB) 7(1):61–72

    Article  Google Scholar 

  • Qiao M, Cheng H, Chang L, Yu J.X (2012) Approximate shortest distance computing: A query-dependent local landmark scheme. In: Proceedings of IEEE international conference on data engineering (ICDE), pp 462–473

  • Rahman SA, Advani P, Schunk R, Schrader R, Schomburg D (2005) Metabolic pathway analysis web service (pathway hunter tool at cubic). Bioinformatics 21(7):1189–1193

    Article  Google Scholar 

  • Roditty L, Zwick U (2012) Dynamic approximate all-pairs shortest paths in undirected graphs. SIAM J Comput 41(3):670–683

    Article  MathSciNet  MATH  Google Scholar 

  • Shakarian P, Broecheler M, Subrahmanian VS, Molinaro C (2013) Using generalized annotated programs to solve social network diffusion optimization problems. ACM Trans Comput Logic 14(2):10:1–10:40

    Article  MathSciNet  MATH  Google Scholar 

  • Sommer C (2014) Shortest-path queries in static networks. ACM Comput Surv 46:45:1–45:31

    Article  MATH  Google Scholar 

  • Tagarelli A, Interdonato R (2015) Time-aware analysis and ranking of lurkers in social networks. Soc Netw Anal Min 5(1):46:1–46:23

    Article  Google Scholar 

  • Wu L, Xiao X, Deng D, Cong G, Zhu AD, Zhou S (2012) Shortest path and distance queries on road networks: an experimental evaluation. Proc VLDB Endow (PVLDB) 5(5):406–417

    Article  Google Scholar 

  • Zhu A.D, Ma H, Xiao X, Luo S, Tang Y, Zhou S (2013) Shortest path and distance queries on road networks: towards bridging theory and practice. In: Proceedings of international conference on management of data (SIGMOD), pp 857–868

  • Zhu A.D, Xiao X, Wang S, Lin W (2013) Efficient single-source shortest path and distance queries on large graphs. In: Proceedings of ACM SIGKDD international conference on knowledge discovery and data mining (KDD), pp 998–1006

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cristian Molinaro.

Additional information

This paper was invited as an extended version of Greco et al. (2016b) presented at the 2016 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM), August 18–21, 2016, San Francisco, USA.

Rights and permissions

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Greco, S., Molinaro, C., Pulice, C. et al. Incremental maintenance of all-pairs shortest paths in relational DBMSs. Soc. Netw. Anal. Min. 7, 36 (2017). https://doi.org/10.1007/s13278-017-0457-y

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s13278-017-0457-y

Keywords