Implementing Minimum Cycle Basis Algorithms

  • Kurt Mehlhorn
  • Dimitrios Michail
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3503)


In this paper we consider the problem of computing a minimum cycle basis of an undirected graph G = (V,E) with n vertices and m edges. We describe an efficient implementation of an O(m 3 + mn 2log n) algorithm presented in [1]. For sparse graphs this is the currently best known algorithm. This algorithm’s running time can be partitioned into two parts with time O(m 3) and O( m 2 n + mn 2 log n) respectively. Our experimental findings imply that the true bottleneck of a sophisticated implementation is the O( m 2 n + mn 2 log n) part. A straightforward implementation would require Ω(nm) shortest path computations, thus we develop several heuristics in order to get a practical algorithm. Our experiments show that in random graphs our techniques result in a significant speedup.

Based on our experimental observations, we combine the two fundamentally different approaches to compute a minimum cycle basis used in [1,2] and [3,4], to obtain a new hybrid algorithm with running time O(m 2 n 2). The hybrid algorithm is very efficient in practice for random dense unweighted graphs.

Finally, we compare these two algorithms with a number of previous implementations for finding a minimum cycle basis in an undirected graph.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    de Pina, J.: Applications of Shortest Path Methods. PhD thesis, University of Amsterdam, Netherlands (1995)Google Scholar
  2. 2.
    Kavitha, T., Mehlhorn, K., Michail, D., Paluch, K.E.: A faster algorithm for minimum cycle basis of graphs. In: 31st International Colloquium on Automata, Languages and Programming, Finland, pp. 846–857 (2004)Google Scholar
  3. 3.
    Horton, J.D.: A polynomial-time algorithm to find a shortest cycle basis of a graph. SIAM Journal of Computing 16, 359–366 (1987)CrossRefMathSciNetGoogle Scholar
  4. 4.
    Golynski, A., Horton, J.D.: A polynomial time algorithm to find the minimum cycle basis of a regular matroid. In: 8th Scandinavian Workshop on Algorithm Theory (2002)Google Scholar
  5. 5.
    Chua, L.O., Chen, L.: On optimally sparse cycle and coboundary basis for a linear graph. IEEE Trans. Circuit Theory CT-20, 495–503 (1973)Google Scholar
  6. 6.
    Cassell, A.C., Henderson, J.C., Ramachandran, K.: Cycle bases of minimal measure for the structural analysis of skeletal structures by the flexibility method. Proc. Royal Society of London Series A 350, 61–70 (1976)zbMATHCrossRefGoogle Scholar
  7. 7.
    Coppersmith, D., Winograd, S.: Matrix multiplications via arithmetic progressions. Journal of Symb. Comput. 9, 251–280 (1990)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Berger, F., Gritzmann, P., de Vries, S.: Minimum cycle basis for network graphs. Algorithmica 40, 51–62 (2004)zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Mehlhorn, K., Naher, S.: LEDA: A Platform for Combinatorial and Geometric Computing. Cambridge University Press, Cambridge (1999)zbMATHGoogle Scholar
  10. 10.
    Bast, H., Mehlhorn, K., Schäfer, G.: A heuristic for dijkstra’s algorithm with many targets and its use in weighted matching algorithms. Algorithmica 36, 75–88 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Boost: C++ Libraries (2001),
  12. 12.
    Kreisbasenbibliothek: CyBaL (2004),
  13. 13.
    Huber, M.: Implementation of algorithms for sparse cycle bases of graphs (2002),

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Kurt Mehlhorn
    • 1
  • Dimitrios Michail
    • 1
  1. 1.Max-Planck-Institut für InformatikSaarbrückenGermany

Personalised recommendations