Skip to main content
Log in

A Parallel Implementation for the Negative Cost Girth Problem

  • Published:
International Journal of Parallel Programming Aims and scope Submit manuscript

Abstract

This paper discusses the implementation of a new parallel algorithm for the negative cost girth (NCG) problem. The girth of an unweighted graph (directed or undirected) is defined as the length of the shortest cycle in the graph. We extend the notion of girth to networks with arbitrary weights in the following way: The negative cost girth of a network is the number of edges of the shortest negative cost cycle (i.e., the negative cost cycle with the fewest number of edges). The NCG problem has been well-studied, and there exist several polynomial time algorithms for the same. This problem finds applications in several domains, including constraint-solving, real-time scheduling, and program verification. In this paper, our focus is on a parallel implementation for solving the NCG problem that runs in \(O(\log k \cdot \log n)\) parallel time using \(O(n^3)\) processors, where \(n\) is the number of vertices, and \(k\) is the NCG. We conduct an empirical analysis for both the parallel implementation, using MPI, and the corresponding sequential NCG implementation. Our experiments indicate that as the number of processors doubles, the total execution time reduces by approximately one-half.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

References

  1. Amdahl, G.M.: Validity of the single processor approach to achieving large scale computing capabilities. In: Proceedings of the April 18–20. 1967, spring joint computer conference, AFIPS ’67 (Spring), pp. 483–485. NY, USA. ACM, New York (1967)

  2. Chen, W.-K.: The VLSI Handbook, 2nd edn. CRC Press Inc, Boca Raton, FL, USA (2006)

    Google Scholar 

  3. Chen, G.H., Wang, B.F., Lu, C.J.: On the parallel computation of the algebraic path problem. IEEE Trans. Parallel Distrib. Syst. 3(2), 251–256 (1992)

    Article  Google Scholar 

  4. Chen, G.H., Olariu, S., Schwing, J.L., Wang, B.F., Zhang, J.: Constant-time tree algorithms on reconfigurable meshes of size \(n \times n\). J. Parallel Distrib. Comput. 26(2), 150–187 (1995)

    Article  Google Scholar 

  5. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. The MIT Press, Cambridge, MA (2009)

    MATH  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  7. Dekel, E., Nassimi, D., Sahni, S.: Parallel matrix and graph algorithms. SIAM J. Comput. 10(4), 657–675 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  8. Demetrescu, C., Goldberg, A.V., Johnson, D.: 9th DIMACS implementation challenge—shortest paths. http://www.dis.uniroma1.it/challenge9/ (2005)

  9. Floyd, R.W.: Algorithm 97: Shortest path. Commun. ACM 5(6), 345 (1962)

    Article  Google Scholar 

  10. Han, Y., Pan, V.Y., Reif, J.H.: Efficient parallel algorithms for computing all pair shortest paths in directed graphs. Algorithmica 17(4), 399–415 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  11. JaJa, J.: Introduction to Parallel Algorithms, 1st edn. Addison Wesley, Reading (1992).

  12. Johnson, D.B.: Efficient algorithms for shortest paths in sparse networks. J. ACM 24(1), 1–13 (1977)

    Article  MATH  Google Scholar 

  13. Kucera, L.: Parallel computation and conflicts in memory access. Inf. Process. Lett. 14(2), 93–96 (1982)

    Article  MATH  Google Scholar 

  14. Pan, V.Y., Preparata, F.P.: Supereffective slow-down of parallel computations. In: Proceedings of the Fourth Annual ACM Symposium on Parallel Algorithms and Architectures. SPAA ’92, pp. 402–409. NY, USA. ACM, New York (1992)

  15. Pan, V.Y., Preparata, F.P.: Work-preserving speed-up of parallel matrix computations. SIAM J. Comput. 24(3), 811–821 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  16. Quinn, M.J.: Parallel Programming in C with MPI and OpenMP. McGraw-Hill Education Group, New York (2003)

    Google Scholar 

  17. Reischuk, R.: Probabilistic parallel algorithms for sorting and selection. SIAM J. Comput. 14(2), 396–409 (1985)

    Article  MATH  MathSciNet  Google Scholar 

  18. Smith, J.R.: The Design and Analysis of Parallel Algorithms. Oxford University Press, New York, NY, USA (1993)

    MATH  Google Scholar 

  19. Subramani, K.: Optimal length resolution refutations of difference constraint systems. J. Autom. Reason. (JAR) 43(2), 121–137 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  20. Subramani, K., Williamson, M., Gu, X.: Improved algorithms for optimal length resolution refutation in difference constraint systems. Formal Asp. Comput. 25(2), 319–341 (2013)

    Article  MATH  MathSciNet  Google Scholar 

  21. Valiant, L.G.: Parallelism in comparison models. SIAM J. Comput. 4(3), 348–355 (1975)

    Article  MATH  MathSciNet  Google Scholar 

  22. Wang, B.F., Chen, G.H.: Constant time algorithms for the transitive closure and some related graph problems on processor arrays with reconfigurable bus systems. IEEE Trans. Parallel Distrib. Syst. 1(4), 500–507 (1990)

    Article  Google Scholar 

Download references

Acknowledgments

We would like to thank Kamesh Madduri for his help with developing the implementation of the parallel algorithm. We would also like to thank the NCSA and TeraGrid for their assistance with supplying the hardware required for our empirical study.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Matthew Williamson.

Additional information

The first author was supported by the National Science Foundation through TeraGrid resources provided by NCSA under Grant Number TG-CCR100036 and by the NASA WV Space Grant Consortium through a NASA Grant and Cooperative Agreement Number NNX10AK62H, and the second author was supported in part by the National Science Foundation through Award CCF-1305054 and the Air Force of Scientific Research through Award FA9550-12-1-0199.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Williamson, M., Subramani, K. A Parallel Implementation for the Negative Cost Girth Problem. Int J Parallel Prog 43, 240–259 (2015). https://doi.org/10.1007/s10766-013-0300-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10766-013-0300-7

Keywords

Navigation