Graph Theory37 sections · 1633 units
Open in Course

Algorithm - Stoer-Wagner

(Step by step)

Initialize graph GG with all vertices and edges. Min_cut = infinity While V>1|V| > 1: Run maximum adjacency ordering on GG to get vertex sequence. Let ss = second-to-last vertex, tt = last vertex. Cut_value = sum of edge weights from tt to all other vertices. Min_cut = min(min_cut, cut_value).

Merge ss and tt in GG (combine their edges into a supernode). Output min_cut. Each iteration considers one cut and contracts the graph.