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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.5 Minimum Cut ( min cut )<br />

A cut C in a network is a set S of nodes that is neither empty nor the entire set of nodes.<br />

<strong>The</strong> weight of a cut is the sum of the weights of the edges having exactly one endpoint in<br />

S.<br />

int<br />

list<br />

int<br />

MIN CUT(const graph& G, const edge array& weight,<br />

list& C, bool use heuristic = true)<br />

MIN CUT takes a graph G and an edge array weight<br />

that gives for each edge a non-negative integer weight.<br />

<strong>The</strong> algorithm ([82]) computes a cut of minimum<br />

weight. A cut of minimum weight is returned in C<br />

and the value of the cut is the return value of the<br />

function. <strong>The</strong> running time is O(nm + n 2 log n). <strong>The</strong><br />

function uses a heuristic to speed up its computation.<br />

Precondition: <strong>The</strong> edge weights are non-negative.<br />

MIN CUT(const graph& G, const edge array& weight)<br />

as above, but the cut C is returned.<br />

CUT VALUE(const graph& G, const edge array& weight,<br />

const list& C)<br />

returns the value of the cut C.

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

Saved successfully!

Ooh no, something went wrong!