Skip to content
BY-NC-ND 3.0 license Open Access Published by De Gruyter Open Access December 28, 2013

An all-pairs shortest path algorithm for bipartite graphs

Svetlana Torgasin EMAIL logo and Karl-Heinz Zimmermann
From the journal Open Computer Science


Bipartite graphs are widely used for modeling of complex structures in biology, engineering, and computer science. The search for shortest paths in such structures is a highly demanded procedure that requires optimization. This paper presents a variant of the all-pairs shortest path algorithm for bipartite graphs. The method is based on the distance matrix product and improves the general algorithm by exploiting the graph topology. The space complexity is reduced by a factor of at least four and the time complexity decreased by almost an order of magnitude when compared with the basic APSP algorithm.

[1] R. W. Floyd, Algorithm 97: Shortest path, Commun. ACM. 5(6), 345, 1962 in Google Scholar

[2] S. Warshall, A theorem on boolean matrices, J. ACM, 9(1), 11, 1962 in Google Scholar

[3] D. B. Johnson, Efficient algorithms for shortest paths in sparse networks, J. ACM, 24(1), 1, 1977 in Google Scholar

[4] M. L. Fredman, New bounds on the complexity of the shortest path problem, SIAM J. Comput. 5, 83, 1976 in Google Scholar

[5] W. Dobosiewicz, A more efficient algorithm for the min-plus multiplication, Int. J. Comput. Math. 32(1), 49, 1990 in Google Scholar

[6] L. Chen, Solving the shortest-paths problem on bipartite permutation graphs efficiently, Inform. Process. Lett. 55(5), 259, 1995 in Google Scholar

[7] T. Takaoka, Sub-cubic Cost Algorithms for the All Pairs Shortest Path Problem, Algorithmica 20, 309, 1995 in Google Scholar

[8] D. Dor, S. Halperin, U. Zwick, All-pairs almost shortest paths, SIAM J. Comput. 29, 1740, 2000 in Google Scholar

[9] F. F. Dragan, Estimating all pairs shortest paths in restricted graph families: a unified approach, J. Algorithm. 57(1), 1, 2005 in Google Scholar

[10] U. Zwick, A slightly improved sub-cubic algorithm for the all pairs shortest paths problem with real edge lengths, Algorithmica 46(2), 181, 2006 in Google Scholar

[11] H. Chin-Wen, J. M. Chang, Solving the all-pairs-shortest-length problem on chordal bipartite graphs, Inform. Process. Lett. 69(2), 87, 1999 in Google Scholar

[12] A. Shimbel, Structure in communication nets. Proceedings of the Symposium on Information Networks, Vol. 4 (New York, 1954, Polytechnic Press of the Polytechnic Institute of Brooklyn, NY, 1955) 199 Search in Google Scholar

[13] M. Leyzorek, R. S. Gray, A. A. Johnson, W. C. Ladew, S. R. Meaker Jr, R. M. Petry, R. N. Seitz, Investigation of Model Techniques — First Annual Report — A Study of Model Techniques for Communication Systems, (Case Institute of Technology, Cleveland, Ohio, 1957) Search in Google Scholar

[14] I. Simon, In: M. P. Chytill (Ed.), Recognizable sets with multiplicities in the tropical semiring, Mathematical Foundations of Computer Science 1988, Proc. MFCS’88, Lecture Notes in Computer Science Vol. 324 (Springer, Berlin, 1988) 107–120 10.1007/BFb0017135Search in Google Scholar

[15] D. Speyer, B. Sturmfels, Tropical Mathematics, arXiv/math/0408099v1 Search in Google Scholar

[16] V. Strassen, Gaussian elimination is not optimal, Numerische Mathematik, 13(4), 354, 1969 in Google Scholar

[17] D. Coppersmith, S. Winograd, Matrix multiplication via arithmetic progressions, J. Symb. Comput. 9(3), 251, 1990 in Google Scholar

[18] P. Micikevicius, General parallel computation on commodity graphics hardware: Case study with the all-pairs shortest paths problem, PDPTA, Citeseer, 4, 1359, 2004 Search in Google Scholar

[19] P. Harish, P. Narayanan, Accelerating large graph algorithms on the GPU using CUDA, High Perform. Comput.-HiPC 2007, 197, 2007 10.1007/978-3-540-77220-0_21Search in Google Scholar

Published Online: 2013-12-28
Published in Print: 2013-12-1

© 2013 Versita Warsaw

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 3.0 License.

Downloaded on 26.11.2022 from
Scroll Up Arrow