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.
Similar content being viewed by others
References
http://www.cs.ucl.ac.uk/staff/V.Kolmogorov/software.html (Blossom V code, version 1.0)
http://www.iwr.uni-heidelberg.de/groups/comopt/software/tsplib95/tsp/
Ahuja R.K., Magnanti T.L., Orlin J.B.: Network Flows: Theory, Algorithms, and Applications. Prentice Hall, Englewood Cliffs (1993)
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)
Ball M.O., Derigs U.: An analysis of alternate strategies for implementing matching algorithms. Networks 13, 517–549 (1983)
Berkman O., Vishkin U.: Recursive star-tree parallel data structure. SIAM J. Comput. 22(2), 221–242 (1993)
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/
Derigs U., Metz A.: On the use of optimal fractional matchings for solving the (integer) matching problem. Computing 36, 263–270 (1986)
Derigs U., Metz A.: Solving (large scale) matching problems combinatorially. Math. Program. 50, 113–122 (1991)
Edmonds J.: Maximum matching and a polyhedron with 0-1 vertices. J. Res. Natl. Bur. Stand. 69, 125–130 (1965)
Edmonds J.: Path, trees, and flowers. Can. J. Math. 17, 449–467 (1965)
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)
Fredman M., Sedgewick R., Sleator D., Tarjan R.: The pairing heap: a new form of self-adjusting heap. Algorithmica 1(1), 111–129 (1986)
Fredman M.L., Tarjan R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)
Gabow, H.: Implementation of Algorithms for Maximum Matching on Nonbipartite Graphs. PhD thesis, Stanford University (1973)
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)
Gabow H.N., Galil Z., Spencer T.H.: Efficient implementation of graph algorithms using contraction. J. ACM 36(3), 540–572 (1989)
Gerngross, P.: Zur implementation von edmonds’ matching algorithmus: Datenstrukturen und verschiedene varianten. Diplomarbeit, Institut fur Mathematik, Universitat Augsburg (1991)
Hochbaum, D.: Instant recognition of half integrality and 2-approximations. In: 3rd International Workshop on Approximation Algorithms for Combinatorial Optimization (1998)
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
Lawler, E.L.: Combinatorial Optimization: Networks and Matroids. Holt, Rinehart, and Winston, New York (1976)
Mehlhorn K., Näher S.: LEDA: a Platform for Combinatorial and Geometric Computing. Cambridge University Press, New York (1999)
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)
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)
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
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)
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)
Author information
Authors and Affiliations
Corresponding author
Rights 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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12532-009-0002-8