18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Matching<br />

Next: Eulerian Cycle / Chinese Up: Graph Problems: Polynomial-Time Previous: Transitive Closure<br />

and Reduction<br />

Matching<br />

Input description: A (weighted) graph G=(V,E).<br />

Problem description: Find the largest-size set of edges S from E such that each vertex in V is incident to<br />

at most one edge of S.<br />

Discussion: Consider a set of employees, each of whom is capable of doing some subset of the tasks that<br />

must be performed. We seek to find an assignment of employees to tasks such that each task is<br />

assigned to a unique employee. Each mapping between an employee and a task they can handle defines<br />

an edge, so what we need is a set of edges with no employee or job in common, i.e. a matching.<br />

Efficient algorithms for constructing matchings are based on constructing augmenting paths in graphs.<br />

Given a (partial) matching M in a graph G, an augmenting path P is a path of edges where every oddnumbered<br />

edge (including the first and last edge) is not in M, while every even-numbered edge is.<br />

Further, the first and last vertices must not be already in M. By deleting the even-numbered edges of P<br />

from M and replacing them with the odd-numbered edges of P, we enlarge the size of the matching by<br />

one edge. Berge's theorem states that a matching is maximum if and only if it does not contain any<br />

augmenting path. <strong>The</strong>refore, we can construct maximum-cardinality matchings by searching for<br />

file:///E|/BOOK/BOOK4/NODE164.HTM (1 of 4) [19/1/2003 1:31:03]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!