Implementation of O(nmlogn) weighted matchings in general graphs: the power of data structures

We describe the implementation of an algorithm which solves the weighted matching problem in general graphs with n vertices and m edges in time O(nm log n). Our algorithm is a variant of the algorithm of Galil, Micali and Gabow [Galil et al. 1986] and extensively uses sophisticated data structures, in particular concatenable priority queues, so as to reduce the time needed to perform dual adjustments and to find tight edges in Edmonds' blossom-shrinking algorithm.We compare our implementation to the experimentally fastest implementation, named Blossom IV, due to Cook and Rohe [Cook and Rohe 1997]. Blossom IV requires only very simple data structures and has an asymptotic running time of O(n2m). Our experiments show that our new implementation is superior to Blossom IV. A closer inspection reveals that the running time of Edmonds' blossom-shrinking algorithm in practice heavily depends on the time spent to perform dual adjustments and to find tight edges. Therefore, optimizing these operations, as is done in our implementation, indeed speeds-up the practical performance of implementations of Edmonds' algorithm.

[1]  Kurt Mehlhorn,et al.  A Heuristic for Dijkstra's Algorithm with Many Targets and Its Use in Weighted Matching Algorithms , 2001, ESA.

[2]  Kurt Mehlhorn,et al.  Data structures and algorithms. Volume 1 : Sorting and searching , 1984 .

[3]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[4]  Harold N. Gabow,et al.  Data structures for weighted matching and nearest common ancestors with linking , 1990, SODA '90.

[5]  William J. Cook,et al.  Computing Minimum-Weight Perfect Matchings , 1999, INFORMS J. Comput..

[6]  Kurt Mehlhorn,et al.  The LEDA Platform of Combinatorial and Geometric Computing , 1997, ICALP.

[7]  J. Edmonds Paths, Trees, and Flowers , 1965, Canadian Journal of Mathematics.

[8]  Jack Edmonds,et al.  Maximum matching and a polyhedron with 0,1-vertices , 1965 .

[9]  Kurt Mehlhorn,et al.  Data Structures and Algorithms 3: Multi-dimensional Searching and Computational Geometry , 2012, EATCS Monographs on Theoretical Computer Science.

[10]  Silvio Micali,et al.  Priority queues with variable priority and an O(EV log V) algorithm for finding a maximal weighted matching in general graphs , 1982, 23rd Annual Symposium on Foundations of Computer Science (sfcs 1982).

[11]  Harold Neil Gabow,et al.  Implementation of algorithms for maximum matching on nonbipartite graphs , 1973 .

[12]  William J. Cook,et al.  Solving Large-Scale Matching Problems , 1991, Network Flows And Matching.

[13]  Michael B. Dillencourt Toughness and Delaunay triangulations , 1990, Discret. Comput. Geom..

[14]  Kurt Mehlhorn,et al.  Sorting and Searching (Eatcs Monographs on Theoretical Computer Science) , 1984 .

[15]  Ulrich Derigs,et al.  Solving (large scale) matching problems combinatorially , 1991, Math. Program..

[16]  Kurt Mehlhorn,et al.  LEDA: a platform for combinatorial and geometric computing , 1997, CACM.