Graph Theory37 sections · 1633 units
Open in Course

Core Idea - Stoer-Wagner Basics

(Contracting vertices)

Stoer-Wagner repeatedly finds a minimum ss-tt cut for specific ss and tt, then merges ss and tt into a single vertex (contracting them). After n1n-1 merges, you have found the global minimum cut. The algorithm picks ss and tt based on maximum adjacency: the last two vertices added in a maximum adjacency ordering.

This ordering ensures you do not miss the global min cut across all iterations. Time complexity: O(n3)O(n^3) with adjacency matrix, or O(nm+n2logn)O(nm + n^2 \log n) with a priority queue. Much better than trying all pairs.