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

Abstract

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.

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

References

  1. 1

    http://www.cs.ucl.ac.uk/staff/V.Kolmogorov/software.html (Blossom V code, version 1.0)

  2. 2

    http://www.iwr.uni-heidelberg.de/groups/comopt/software/tsplib95/tsp/

  3. 3

    http://www.tsp.gatech.edu/vlsi/index.html

  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)

  6. 6

    Ball M.O., Derigs U.: An analysis of alternate strategies for implementing matching algorithms. Networks 13, 517–549 (1983)

    MATH  Article  MathSciNet  Google Scholar 

  7. 7

    Berkman O., Vishkin U.: Recursive star-tree parallel data structure. SIAM J. Comput. 22(2), 221–242 (1993)

    MATH  Article  MathSciNet  Google Scholar 

  8. 8

    Cook, W., Rohe, A.: Computing minimum-weight perfect matchings. INFORMS J. Comput. 11(2), 138–148, (1999). Computer code available at http://www2.isye.gatech.edu/~wcook/blossom4/

  9. 9

    Derigs U., Metz A.: On the use of optimal fractional matchings for solving the (integer) matching problem. Computing 36, 263–270 (1986)

    MATH  Article  MathSciNet  Google Scholar 

  10. 10

    Derigs U., Metz A.: Solving (large scale) matching problems combinatorially. Math. Program. 50, 113–122 (1991)

    MATH  Article  MathSciNet  Google Scholar 

  11. 11

    Edmonds J.: Maximum matching and a polyhedron with 0-1 vertices. J. Res. Natl. Bur. Stand. 69, 125–130 (1965)

    MATH  MathSciNet  Google Scholar 

  12. 12

    Edmonds J.: Path, trees, and flowers. Can. J. Math. 17, 449–467 (1965)

    MATH  MathSciNet  Google 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)

    MATH  Article  MathSciNet  Google 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)

    Article  MathSciNet  Google Scholar 

  16. 16

    Gabow, H.: Implementation of Algorithms for Maximum Matching on Nonbipartite Graphs. PhD thesis, Stanford University (1973)

  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)

  18. 18

    Gabow H.N., Galil Z., Spencer T.H.: Efficient implementation of graph algorithms using contraction. J. ACM 36(3), 540–572 (1989)

    Article  MathSciNet  Google Scholar 

  19. 19

    Gerngross, P.: Zur implementation von edmonds’ matching algorithmus: Datenstrukturen und verschiedene varianten. Diplomarbeit, Institut fur Mathematik, Universitat Augsburg (1991)

  20. 20

    Hochbaum, D.: Instant recognition of half integrality and 2-approximations. In: 3rd International Workshop on Approximation Algorithms for Combinatorial Optimization (1998)

  21. 21

    Johnson, D.S., McGeoch, C.C.: Network Flows and Matching: First DIMACS Implementation Challenge. American Mathematical Society, Providence (1993). Generators available at ftp://dimacs.rutgers.edu/pub/netflow/generators/matching

  22. 22

    Lawler, E.L.: Combinatorial Optimization: Networks and Matroids. Holt, Rinehart, and Winston, New York (1976)

  23. 23

    Mehlhorn K., Näher S.: LEDA: a Platform for Combinatorial and Geometric Computing. Cambridge University Press, New York (1999)

    Google 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)

    Article  Google 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)

  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 http://www.cs.cmu.edu/quake/triangle.html

  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)

    Article  MathSciNet  Google 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)

    MATH  Article  MathSciNet  Google Scholar 

Download references

Author information

Affiliations

Authors

Corresponding author

Correspondence to Vladimir Kolmogorov.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Kolmogorov, V. Blossom V: a new implementation of a minimum cost perfect matching algorithm. Math. Prog. Comp. 1, 43–67 (2009). https://doi.org/10.1007/s12532-009-0002-8

Download citation

Mathematics Subject Classification (2000)

  • 68R10