2

Given a bipartite graph with equal-sized sides X and Y, how can we efficiently find the minimum number of edges we have to add so that the graph will have a perfect matching? is there a better solution than iterating over all 2^(|X|) subsets and adding edges until Hall's theorem is satisfied?

Thanks.

user1767774
  • 1,775
  • 3
  • 24
  • 32

1 Answers1

2

If I understood the question correctly, it should be possible to generate a cardinality-maximal matching of the initial graph efficiently, by either using the so-called Hungarian method or modelization as a network flow problem. Once the cardinality-maximal matching has been found, there must be an equal number of unmatched nodes in either partition, which can be matched using additional edges at will.

In other words, if M is the cardinality of a cardinality-maximal matching in the original graph and |X|=|Y| holds, then at at least M-|X| edges have to be added in order to have a perfect matching contained in the graph.

Codor
  • 17,447
  • 9
  • 29
  • 56