Graph Theory37 sections · 1633 units
Open in Course

Core Idea - Try All Pairs

(Brute force approach)

One approach: for each pair of vertices (s,t)(s, t), compute the minimum ss-tt cut. The global minimum cut is the smallest among all these cuts. This is conceptually simple. There are O(n2)O(n^2) pairs, and each min cut takes O(nm)O(n \cdot m) time with max flow.

Total time: O(n3m)O(n^3 \cdot m), which is too slow for large graphs with thousands of vertices. You need a smarter algorithm like Stoer-Wagner that avoids checking all pairs explicitly.