202402211402

Tags : Combinatorial Optimisation

Primal-Dual Algorithm for general Min-cost Perfect Matching


We will show a Primal-Dual algorithm using a combination of Primal-Dual Algorithm for Bipartite Min-cost Perfect Matching and Edmond’s algorithm for general Matching.

Tutte-Berge formula


, where is the number of odd components in . A that achieves the above equality is called a Tutte-Berge witness.

Factor-critical graphs


is factor-critical if has no perfect matching but , has a perfect matching. Claim: If is factor-critical then:

  • has odd ,
  • is connected,
  • is the unique Tutte-Berge witness for . (Prove.)

Edmonds-Gallai decomposition


For , let

Then the following hold:

  1. is a Tutte-Berge witness,
  2. is the union of all even components of ,
  3. is the union of all odd components of ,
  4. Each component in is factor-critical.

Lemma 1: For any max matching , according to the labelling during Edmond's algorithm,

Proof:

  1. . So, has an alternating path from some , ( is the set of unmatched vertices in ). We take the path, and alternate the matching along it to get , which is also a max matching, and it leaves unmatched. Conversely, if , then there exists a matching that leaves unmatched. Following the ‘alternating’ path , we get that is an endpoint of an even length alternating path starting from some unmatched vertex.
  2. By definition, has a neighbour in , so , and vice versa. So .

Subtlety: is the set of all vertices that have an even length alternating path from . So in a blossom, all the vertices will be labelled even.

In Edmond’s algorithm, whenever a vertex can be labelled both even and odd, label it even. So essentially,

  1. It follows that .

Every vertex in must be matched in every max matching, by definition. Also, has no edge to . Every vertex in is matched to . Every vertex in is matched to some . So all its components are even.

Lemma

Every component in has the following property: Either has one unmatched vertex and or . Moreover, is factor-critical. Proof: Induction on . Base case is fine. Induction step: If is a bunch of singleton vertices, then we are fine. Otherwise, contains a blossom, which we shrink and apply induction hypothesis. Thus we get 2 and 4. (This is not a complete argument, but can be completed. We need to show that before/after of shrinking preserves the claims in the lemma.)

To show: is a Tutte-Berge witness. Or, that . But . To show: . Everything in can be matched within. Everything in is matched to something in . So, among all the odd components, i.e. all the components of , exactly many components are matched (to ), and the rest have exactly one unmatched vertex each. That is what we wanted to show.

Primal-Dual Algorithm


Min-cost perfect matching LP:

s.t.

  • .

Dual variables:

Algorithm


Idea

The idea is, because the number of dual variables is exponential, we only maintain a small set of “active” variables, and execute the primal-dual algorithm.

set of “active” dual variables (Other are assumed to be .)

Initialise . (This is feasible for dual.) But , so this is infeasible for primal.

Success

graph on tight edges set of vertices unmatched in while is not perfect:

Find an alternating walk from to in . If is an augmenting path, update , continue; else, we have a blossom . Shrink to one vertex . Add to , set .

Note: is an even vertex.

Continue on . If no alternating walk from to is found, then is maximum in , update the dual values:

Find the largest s.t. for even , for odd

If becomes for , then unshrink the blossom corresponding to , continue.

Obs.: Some edges which were once tight, can become slack (odd-odd/unlabelled). So number of tight edges is not a measure of progress. The measure of progress is the dual objective value.

Correctness/Optimality


Primal objective value Dual objective value.

For all edges in , the dual constraint is tight, which gives the second equality. Each non zero appears exactly once, because it is a perfect matching and, for , only one edge is incident on . For a shrunk blossom, .

Running time


augmentations, we will need time to go over all the edges here, and also during the updating values part. Between any two augmentations, shrinking operations.


References

Linear Programming