Abstract
Bipartite graphs are used to model and represent many real-world problems in biological and physical sciences. Finding shortest paths in bipartite graphs is an important task and has numerous applications. Different dynamic programming based solutions to find the shortest paths exists which differ on complexity and structure of graph. The computational complexity of these algorithms is a major concern. This work formulates the parallel versions of Floyd-Warshall and Torgasin-Zimmermann algorithms to compute the shortest paths in bipartite graphs efficiently. These algorithms are mapped to graphics processing unit using tropical matrix product. The performance for different realizations and parameters are compared for Floyd-Warshall and Torgasin-Zimmermann algorithms. Parallel implementation of Torgasin-Zimmermann algorithm attained a speed-up factor of almost 274 when compared with serial Floyd-Warshall algorithm for random-generated undirected graphs.
Similar content being viewed by others
References
Ali MKM, Kamoun F (1993) Neural networks for shortest path computation and routing in computer networks. IEEE Transactions on Neural Networks 4 (6):941–954
Araujo F, Ribeiro B, Rodrigues L (2001) A neural network for shortest path computation. IEEE Transactions on Neural Networks 12(5):1067–1073
Asratian AS, Denley TM, Häggkvist R (1998) Bipartite graphs and their applications. vol 131 Cambridge University Press
Bellman R (1956) On a routing problem. Tech. rep., DTIC Document
Cha Y (1997) Navigation of a free-ranging mobile robot using heuristic local path-planning algorithm. Robot Comput Integr Manuf 13(2):145–156
Chabini I (1998) Discrete dynamic shortest path problems in transportation applications: Complexity and algorithms with optimal run time. Transportation Research Record: Journal of the Transportation Research Board (1645) 170–175
Chan TM (2007) More algorithms for all-pairs shortest paths in weighted graphs. In: Proceedings of the Thirty-ninth annual ACM symposium on theory of computing, STOC’07, ACM, pp 590–598
Chen YL, Yang HH (2000) Shortest paths in traffic-light networks. Transportation Research Part B: Methodological 34(4):241–253
Chen L (1995) Solving the shortest-paths problem on bipartite permutation graphs efficiently. Inform Process Lett 55(5):259–264
Chin-Wen H, Chang JM (1999) Solving the all-pairs-shortest-length problem on chordal bipartite graphs. Inform Process Lett 69(2):87–93
Coppersmith D, Winograd S (1990) Matrix multiplication via arithmetic progressions. J Symb Comput 9(3):251–280
Desaulniers G, Soumis F (1995) An efficient algorithm to find a shortest path for a car-like robot. IEEE Trans Robot Autom 11(6):819–828
Dehghan A, Banihashemi AH (2019) On computing the multiplicity of cycles in bipartite graphs using the degree distribution and the spectrum of the graph. IEEE Trans Inf Theory 65(6):3778–3789
Dijkstra EW (1959) A note on two problems in connexion with graphs. Numer Math 1(1):269–271
Dragan FF (2005) Estimating all pairs shortest paths in restricted graph families: a unified approach. Journal of Algorithms 57(1):1–21
Foulds LR (2012) Graph theory applications Springer Science & Business Media
Fu L, Sun D, Rilett LR (2006) Heuristic shortest path algorithms for transportation applications: state of the art. Computers & Operations Research 33(11):3324–3343
Floyd RW (1962) Algorithm 97: Shortest path. Commun ACM 5 (6):345–345
Ghoseiri K, Nadjari B (2010) An ant colony optimization algorithm for the bi-objective shortest path problem. Appl Soft Comput 10(4):1237–1246
Hassin R (1992) Approximation schemes for the restricted shortest path problem. Math Oper Res 17(1):36–42
Harish P, Narayanan PJ (2007) Accelerating large graph algorithms on the GPU using CUDA. In: Proceedings of the 14th international conference on high performance computing, HiPC’07, vol 4873, Springer, pp 197–208
Hanif MK, Zimmermann KH (2017) Accelerating viterbi algorithm on graphics processing units. Computing 99(11):1105–1123
Hanif MK (2014) Mapping dynamic programming algorithms on graphics processing units. Ph.D. thesis, Institut für Rechnertechnologie, Technische Universität Hamburg-Harburg
Humayun A, Asif M, Hanif MK (2017) Btas: A library for tropical algebra. Int J Comput Sci Inform Secur 14:220–225
Hougardy S (2010) The Floyd–Warshall algorithm on graphs with negative cycles. Inf Process Lett 110(8-9):279–281
Johnson DB (1977) Efficient algorithms for shortest paths in sparse networks. J ACM 24(1):1–13
Katz GJ, Kider Jr JT (2008) All-pairs shortest-paths for large graphs on the gpu. In: Proceedings of the 23rd ACM SIGGRAPH/EUROGRAPHICS symposium on graphics hardware, GH’08, pp 47–55
Kirk DB, Hwu WW (2010) Programming massively parallel processors: a hands-on approach. 1st edn Morgan Kaufmann Publishers Inc
Leiserson CE, Rivest RL, Cormen TH, Stein C (2001) Introduction to Algorithms, vol 6. MIT press, Cambridge
Lund BD, Smith JW (2010) A multi-stage CUDA kernel for Floyd–Warshall. CoRR arXiv:abs/1001.4108abs/1001.4108
Mikhalkin G (2006) Tropical geometry and its applications. In: Proceedings oh the international congress of mathematicians: Madrid, August 22-30, 2006: invited lectures, pp 827–852
Nath R, Tomov S, Dongarra J (2010) An improved Magma Gemm for Fermi graphics processing units. International Journal of High Performance Computing Applications 24(4):511–515
NVIDIA: NVIDIA CUDA Compute Unified Device Architecture Programming Guide (2016)
Okuyama T, Ino F, Hagihara K (2012) A task parallel algorithm for finding all-pairs shortest paths using the GPU. International Journal of High Performance Computing and Networking 7(2):87–98
Pachter L, Sturmfels B (2005) Algebraic statistics for computational biology. Cambridge University Press
Roditty L, Shapira A (2011) All-pairs shortest paths with a sublinear additive error. ACM Transactions on Algorithms 7(4):45:1–45:12
Richter-Gebert J, Sturmfels B, Theobald T (2005) First steps in tropical geometry. Contemp Math 377:289–318
Romani F (1980) Shortest-path problem is not harder than matrix multiplication. Inf Process Lett 11(3):134–136
Seidel R (1992) On the all-pairs-shortest-path problem. In: Proceedings of the Twenty-fourth annual ACM symposium on theory of computing, STOC’92, ACM, pp 745–749
Strassen V (1969) Gaussian elimination is not optimal. Numer Math 13:354–356
Takaoka T, Hashim M (2010) A simpler algorithm for the all pairs shortest path problem with o(n2logn) expected time. In: Proceedings of the 4th international conference on combinatorial optimization and applications, COCOA’10, Springer, pp 195–206
Torgasin S, Zimmermann KH (2013) An all-pairs shortest path algorithm for bipartite graphs. Central European Journal of Computer Science 3 (4):149–157
Takaoka T (2013) A simplified algorithm for the all pairs shortest path problem with o(n2logn) expected time. J Comb Optim 25(2):326–337
Warshall S (1962) A theorem on boolean matrices. J ACM 9(1):11–12
Weisstein EW (2002) Complete bipartite graph
Yu F, Li Y, Wu TJ (2010) A temporal ant colony optimization approach to the shortest path problem in dynamic scale-free networks. Physica A: Statistical Mechanics and its Applications 389(3):629–636
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix
Appendix
Rights and permissions
About this article
Cite this article
Hanif, M.K., Zimmermann, KH. & Anees, A. Accelerating all-pairs shortest path algorithms for bipartite graphs on graphics processing units. Multimed Tools Appl 81, 9549–9566 (2022). https://doi.org/10.1007/s11042-022-12066-0
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-022-12066-0