How Stoer-Wagner finds a global min-cut

Short answer: Stoer-Wagner computes a global minimum cut of an undirected weighted graph deterministically. Each phase grows a set like Prim, always adding the vertex most tightly connected to the set. The cut that separates the last vertex of the phase from the rest is a candidate. The phase…

How PageRank iterates a damped link matrix

Short answer: PageRank assigns every page a score that is the stationary distribution of a random surfer. With probability d the surfer follows a link chosen uniformly among the page’s out-links. With probability 1−d the surfer jumps to a uniformly random page. The usual damping factor is 0.85. The…

How Kuhn matches by augmenting DFS

Short answer: Kuhn’s algorithm builds a bipartite matching by a depth-first search for one augmenting path at a time. Each free left vertex tries to find an alternating path to a free right vertex, flipping the matching if it succeeds. With a visited mark cleared every search, the time…

How Kruskal adds the cheapest safe edge

Short answer: Kruskal’s algorithm sorts the undirected edges by weight and adds an edge when its ends lie in different trees of a forest. A union-find structure answers that test. The sort dominates, at O(E log E), and the union-find work is essentially linear. The first |V|−1 accepted edges…

How Kosaraju uses a transpose graph

Short answer: Kosaraju’s algorithm finds strongly connected components with two depth-first searches. The first search records vertices in reverse order of finish time on the original graph. The second search runs on the transpose, in which every edge is reversed, and starts vertices in that recorded order. Each tree…

How Karger contracts a random min-cut

Short answer: Karger’s algorithm finds a global minimum cut of an undirected multigraph by randomly contracting edges until two supernodes remain. The edges between those two supernodes are a cut, and each run returns the minimum cut with probability at least 1/binom(n, 2), about 2/n². Repeating O(n² log n)…