31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

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.

template <br />

bool CHECK MIN WEIGHT ASSIGNMENT T(const graph& G,<br />

const edge array& c,<br />

const list& M,<br />

const node array& pot)<br />

checks that pot is a tight feasible potential function with respect to M<br />

and that M is a perfect matching. Tightness of pot implies that M is a<br />

minimum cost assignment.<br />

template <br />

list MWMCB MATCHING T(graph& G, const list& A,<br />

const list& B, const edge array& c,<br />

node array& pot)<br />

Returns a maximum weight matching among the matching of maximum<br />

cardinality. <strong>The</strong> potential function pot is tight with respect to a modified<br />

cost function which increases the cost of every edge by L = 1+2kC where<br />

C is the maximum absolute value of any weight and k = min(|A|, |B|).<br />

It is assumed that the partition (A, B) witnesses that G is bipartite and<br />

that all edges of G are directed from A to B. If A and B have different<br />

sizes, it is advisable that A is the smaller set; in general, this leads to<br />

smaller running time. <strong>The</strong> argument pot is optional.<br />

bool MWBM SCALE WEIGHTS(const graph& G, edge array& c)<br />

replaces c[e] by c1 [e] for every edge e, where c1 [e] was defined above<br />

and f = 3. This scaling function is appropriate for the maximum weight<br />

matching algorithm. <strong>The</strong> function returns false if the scaling changed<br />

some weight, and returns true otherwise.<br />

bool MWA SCALE WEIGHTS(const graph& G, edge array& c)<br />

replaces c[e] by c1 [e] for every edge e, where c1 [e] was defined above<br />

and f = 4n. This scaling function should be used for the algorithm<br />

that compute minimum of maximum weight assignments or maximum<br />

weighted matchings of maximum cardinality. <strong>The</strong> function returns false<br />

if the scaling changed some weight, and returns true otherwise.<br />

12.8 Maximum Cardinality Matchings in General<br />

Graphs ( mc matching )<br />

A matching in a graph G is a subset M of the edges of G such that no two share an<br />

endpoint.<br />

An odd-set cover OSC of G is a labeling of the nodes of G with non-negative integers<br />

such that every edge of G (which is not a self-loop) is either incident to a node labeled 1

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

Saved successfully!

Ooh no, something went wrong!