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

  • Authors:
  • Kurt Mehlhorn;Guido Schäfer

  • Affiliations:
  • Max-Planck-Institut für Informatik, Stuhlsatzenhausweg 85, 66123 Saarbrücken, Germany;Max-Planck-Institut für Informatik, Stuhlsatzenhausweg 85, 66123 Saarbrücken, Germany

  • Venue:
  • Journal of Experimental Algorithmics (JEA)
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.