What is the Stoer-Wagner algorithm?

Graph Theory Questions Long



63 Short 66 Medium 48 Long Answer Questions Question Index

What is the Stoer-Wagner algorithm?

The Stoer-Wagner algorithm is a graph algorithm used to find the minimum cut in an undirected graph. It was developed by Stoer and Wagner in 1997.

The algorithm starts with an input graph and iteratively contracts the graph by merging two vertices with the minimum sum of weights of their incident edges. This contraction process continues until only two vertices remain. The algorithm then returns the sum of weights of the edges between these two remaining vertices, which represents the minimum cut in the original graph.

The Stoer-Wagner algorithm is based on the concept of a cut in a graph. A cut is a partition of the vertices of a graph into two disjoint sets. The weight of a cut is defined as the sum of the weights of the edges crossing the cut. The minimum cut is the cut with the smallest weight among all possible cuts in the graph.

The algorithm utilizes the concept of a minimum cut tree. It maintains a tree structure that represents the minimum cut at each step of the contraction process. The tree is updated after each contraction by merging the two vertices into a single supervertex and updating the weights of the edges incident to the supervertex.

The contraction process continues until only two vertices remain in the graph. At this point, the algorithm returns the sum of weights of the edges between these two vertices, which represents the minimum cut in the original graph.

The Stoer-Wagner algorithm has a time complexity of O(n^3), where n is the number of vertices in the graph. It is an efficient algorithm for finding the minimum cut in a graph and has applications in various fields such as network analysis, image segmentation, and clustering.