Maximally matchable edge explained

In graph theory, a maximally matchable edge in a graph is an edge that is included in at least one maximum-cardinality matching in the graph.[1] An alternative term is allowed edge.[2] [3]

A fundamental problem in matching theory is: given a graph G, find the set of all maximally matchable edges in G. This is equivalent to finding the union of all maximum matchings in G (this is different than the simpler problem of finding a single maximum matching in G). Several algorithms for this problem are known.

Motivation

Consider a matchmaking agency with a pool of men and women. Given the preferences of the candidates, the agency constructs a bipartite graph where there is an edge between a man and a woman if they are compatible. The ultimate goal of the agency is to create as many compatible couples as possible, i.e., find a maximum-cardinality matching in this graph. Towards this goal, the agency first chooses an edge in the graph, and suggests to the man and woman on both ends of the edge to meet. Now, the agency must take care to only choose a maximally matchable edge. This is because, if it chooses a non-maximally matchable edge, it may get stuck with an edge that cannot be completed to a maximum-cardinality matching.

Definition

Let G = (V,E) be a graph, where V are the vertices and E are the edges. A matching in G is a subset M of E, such that each vertex in V is adjacent to at most a single edge in M. A maximum matching is a matching of maximum cardinality.

An edge e in E is called maximally matchable (or allowed) if there exists a maximum matching M that contains e.

Algorithms for general graphs

Currently, the best known deterministic algorithm for general graphs runs in time

O(VE)

.[2]

There is a randomized algorithm for general graphs in time

\tilde{O}(V2.376)

.[4]

Algorithms for bipartite graphs

In bipartite graphs, if a single maximum-cardinality matching is known, it is possible to find all maximally matchable edges in linear time -

O(V+E)

.

If a maximum matching is not known, it can be found by existing algorithms. In this case, the resulting overall runtime is

O(V1/2E)

for general bipartite graphs and

O((V/logV)1/2E)

for dense bipartite graphs with

E=\Theta(V2)

.

Bipartite graphs with a perfect matching

The algorithm for finding maximally matchable edges is simpler when the graph admits a perfect matching.

Let the bipartite graph be

G=(X+Y,E)

, where

X=(x1,\ldots,xn)

and

Y=(y1,\ldots,yn)

. Let the perfect matching be

M=\{(x1,y1),\ldots,(xn,yn)\}

.

Theorem: an edge e is maximally matchable if-and-only-if e is included in some M-alternating cycle - a cycle that alternates between edges in M and edges not in M. Proof:

Now, consider a directed graph

H=(Z,E)

, where

Z=(z1,\ldots,zn)

and there is an edge from

zi

to

zj

in H iff

ij

and there is an edge between

xi

and

yj

in G (note that by assumption such edges are not in M). Each M-alternating cycle in G corresponds to a directed cycle in H. A directed edge belongs to a directed cycle iff both its endpoints belong to the same strongly connected component. There are algorithms for finding all strongly connected components in linear time. Therefore, the set of all maximally matchable edges can be found as follows:

G=(X+Y,E)

and the perfect matching M, mark every edge

(xi,yi)

in M as maximally matchable.

H=(Z,E)

as above.

(zi,zj)

are in the same component, mark the edge

(xi,yj)

as maximally matchable.

Bipartite graphs without a perfect matching

Let the bipartite graph be

G=(X+Y,E)

, where

X=(x1,\ldots,xn)

and

Y=(y1,\ldots,yn')

and

n\leqn'

. Let the given maximum matching be

M=\{(x1,y1),\ldots,(xt,yt)\}

, where

t\leqn\leqn'

. The edges in E can be categorized into two classes:

Theorem: All

M

-lower edges are maximally matchable. Proof: suppose

e=(xi,yj)

where

xi

is saturated and

yi

is not. Then, removing

e=(xi,yj)

from

M

and adding

e=(xi,yj)

yields a new maximum-cardinality matching.

Hence, it remains to find the maximally matchable edges among the M-upper ones.

Let H be the subgraph of G induced by the M-saturated nodes. Note that M is a perfect matching in H. Hence, using the algorithm of the previous subsection, it is possible to find all edges that are maximally matchable in H. Tassa explains how to find the remaining maximally matchable edges, as well as how to dynamically update the set of maximally matchable edges when the graph changes.

References

  1. Tassa. Tamir. 2012-03-16. Finding all maximally-matchable edges in a bipartite graph. Theoretical Computer Science. 423. 50–58. 10.1016/j.tcs.2011.12.071. 0304-3975. free.
  2. De Carvalho. Marcelo H.. Cheriyan. Joseph. 2005-10-01. An

    O(VE)

    algorithm for ear decompositions of matching-covered graphs. ACM Transactions on Algorithms. 1. 2. 324–337. 10.1145/1103963.1103969. 1549-6325.
  3. Book: Lovász, László. Matching Theory. Plummer. Michael. 2009-08-18. American Mathematical Society. 9780821847596. Providence, Rhode Island. 10.1090/chel/367.
  4. Rabin. Michael O.. Maximum matchings in general graphs through randomization. Journal of Algorithms. 10. 4. 557–567. 1989. 10.1016/0196-6774(89)90005-9. Vazirani. Vijay V.. .