Mathematical Programming Computation

, Volume 1, Issue 1, pp 43–67 | Cite as

Blossom V: a new implementation of a minimum cost perfect matching algorithm

  • Vladimir KolmogorovEmail author
Full Length Paper


We describe a new implementation of the Edmonds’s algorithm for computing a perfect matching of minimum cost, to which we refer as Blossom V. A key feature of our implementation is a combination of two ideas that were shown to be effective for this problem: the “variable dual updates” approach of Cook and Rohe (INFORMS J Comput 11(2):138–148, 1999) and the use of priority queues. We achieve this by maintaining an auxiliary graph whose nodes correspond to alternating trees in the Edmonds’s algorithm. While our use of priority queues does not improve the worst-case complexity, it appears to lead to an efficient technique. In the majority of our tests Blossom V outperformed previous implementations of Cook and Rohe (INFORMS J Comput 11(2):138–148, 1999) and Mehlhorn and Schäfer (J Algorithmics Exp (JEA) 7:4, 2002), sometimes by an order of magnitude. We also show that for large VLSI instances it is beneficial to update duals by solving a linear program, contrary to a conjecture by Cook and Rohe.

Mathematics Subject Classification (2000)



Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
  2. 2.
  3. 3.
  4. 4.
    Ahuja R.K., Magnanti T.L., Orlin J.B.: Network Flows: Theory, Algorithms, and Applications. Prentice Hall, Englewood Cliffs (1993)Google Scholar
  5. 5.
    Applegate, D., Cook, W.: Solving large-scale matching problems. Network Flows and Matchings. DIMACS Series in Discrete Mathematics and Theoretical Computer Science, vol. 12, pp. 557–576 (1993)Google Scholar
  6. 6.
    Ball M.O., Derigs U.: An analysis of alternate strategies for implementing matching algorithms. Networks 13, 517–549 (1983)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Berkman O., Vishkin U.: Recursive star-tree parallel data structure. SIAM J. Comput. 22(2), 221–242 (1993)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Cook, W., Rohe, A.: Computing minimum-weight perfect matchings. INFORMS J. Comput. 11(2), 138–148, (1999). Computer code available at
  9. 9.
    Derigs U., Metz A.: On the use of optimal fractional matchings for solving the (integer) matching problem. Computing 36, 263–270 (1986)zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Derigs U., Metz A.: Solving (large scale) matching problems combinatorially. Math. Program. 50, 113–122 (1991)zbMATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Edmonds J.: Maximum matching and a polyhedron with 0-1 vertices. J. Res. Natl. Bur. Stand. 69, 125–130 (1965)zbMATHMathSciNetGoogle Scholar
  12. 12.
    Edmonds J.: Path, trees, and flowers. Can. J. Math. 17, 449–467 (1965)zbMATHMathSciNetGoogle Scholar
  13. 13.
    Edmonds J., Johnson E.L., Lockhart S.C.: Blossom I: A Computer Code for the Matching Problem. IBM T. J. Watson Research Center, Yorktown Heights, New York (1969)Google Scholar
  14. 14.
    Fredman M., Sedgewick R., Sleator D., Tarjan R.: The pairing heap: a new form of self-adjusting heap. Algorithmica 1(1), 111–129 (1986)zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Fredman M.L., Tarjan R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)CrossRefMathSciNetGoogle Scholar
  16. 16.
    Gabow, H.: Implementation of Algorithms for Maximum Matching on Nonbipartite Graphs. PhD thesis, Stanford University (1973)Google Scholar
  17. 17.
    Gabow, H.N.: Data structures for weighted matching and nearest common ancestors with linking. In: Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 434–443 (1990)Google Scholar
  18. 18.
    Gabow H.N., Galil Z., Spencer T.H.: Efficient implementation of graph algorithms using contraction. J. ACM 36(3), 540–572 (1989)CrossRefMathSciNetGoogle Scholar
  19. 19.
    Gerngross, P.: Zur implementation von edmonds’ matching algorithmus: Datenstrukturen und verschiedene varianten. Diplomarbeit, Institut fur Mathematik, Universitat Augsburg (1991)Google Scholar
  20. 20.
    Hochbaum, D.: Instant recognition of half integrality and 2-approximations. In: 3rd International Workshop on Approximation Algorithms for Combinatorial Optimization (1998)Google Scholar
  21. 21.
    Johnson, D.S., McGeoch, C.C.: Network Flows and Matching: First DIMACS Implementation Challenge. American Mathematical Society, Providence (1993). Generators available at
  22. 22.
    Lawler, E.L.: Combinatorial Optimization: Networks and Matroids. Holt, Rinehart, and Winston, New York (1976)Google Scholar
  23. 23.
    Mehlhorn K., Näher S.: LEDA: a Platform for Combinatorial and Geometric Computing. Cambridge University Press, New York (1999)zbMATHGoogle Scholar
  24. 24.
    Mehlhorn K., Schäfer G.: Implementation of O(nmlogn) weighted matchings in general graphs: the power of data structures. J. Exp. Algorithmics (JEA) 7, 4 (2002)CrossRefGoogle Scholar
  25. 25.
    Moret, B., Shapiro, H.: An empirical analysis of algorithms for constructing a minimum spanning tree. In: 2nd Workshop on Algorithms and Data Structures, pp. 400–411 (1991)Google Scholar
  26. 26.
    Shewchuk, J.R.: Triangle: Engineering a 2D quality mesh generator and delaunay triangulator. In: Applied Computational Geometry: Towards Geometric Engineering. LNCS, vol. 1148, pp. 203–222. Springer, Heideberg (1996). Computer code available at
  27. 27.
    Shih W.-K., Wu S., Kuo Y.S.: Unifying maximum cut and minimum cut of a planar graph. Trans. Comput. 39(5), 694–697 (1990)CrossRefMathSciNetGoogle Scholar
  28. 28.
    Gabow H., Galil Z., Micali S.: An O(EV log V) algorithm for finding a maximal weighted matching in general graphs. SIAM J. Comput. 15, 120–130 (1986)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer and Mathematical Programming Society 2009

Authors and Affiliations

  1. 1.University College LondonLondonUK

Personalised recommendations