How IDA* deepens an f-cost bound

Short answer: IDA* applies iterative deepening to A*. Each pass is a depth-first search that refuses to step onto a vertex whose f = g + h exceeds the current bound. The next bound is the smallest f that was blocked. With an admissible heuristic, the first time the…

How Hopcroft-Karp phases bipartite matching

Short answer: Hopcroft-Karp computes a maximum matching in a bipartite graph in phases. Each phase breadth-first searches for the shortest augmenting paths and then depth-first searches a maximal set of vertex-disjoint paths of that length. The matching grows by all of them at once. There are O(√V) phases and…

How Gale-Shapley builds a stable matching

Short answer: The Gale-Shapley deferred-acceptance algorithm builds a stable matching of two sides that have ranked each other. One side proposes, in preference order, and the other side keeps the better proposal so far and rejects the rest. A rejected proposer asks the next choice. The result is a…

How Ford-Fulkerson augments residual paths

Short answer: Ford-Fulkerson sends flow along any path from source to sink in the residual graph, then updates residual capacities in both directions. A residual edge backward carries the option to undo flow. When no residual path remains, the flow is maximum, and the reachable set from the source…

How Floyd-Warshall closes all-pairs distances

Short answer: Floyd-Warshall computes the shortest path between every pair by allowing intermediate vertices in order. After step k, dist[i][j] is the best path that uses only intermediates among the first k vertices. The triple loop is Θ(V³) time and Θ(V²) memory. Negative edges are allowed. A negative value…

How Edmonds finds a minimum arborescence

Short answer: Edmonds’ branching algorithm, also called Chu-Liu/Edmonds, finds a minimum-cost spanning arborescence of a directed graph: a directed tree in which every vertex except the root has in-degree one and every vertex is reachable from the root. Each vertex selects its cheapest incoming edge. If those edges form…

How Dinic blocks a level graph

Short answer: Dinic’s algorithm repeats two steps. Breadth-first search assigns a level, the residual distance from the source, and discards every edge that does not advance exactly one level. Depth-first search then pushes a blocking flow: every residual source-sink path in that level graph is saturated. The level of…

How Christofides approximates a metric tour

Short answer: Christofides’ algorithm builds a traveling-salesman tour that is at most 3/2 times optimal when the distances are symmetric and obey the triangle inequality. It computes a minimum spanning tree, finds a minimum-cost perfect matching on the vertices of odd degree, and shortcuts an Eulerian circuit of the…

How Brandes accumulates betweenness

Short answer: Brandes’ algorithm computes betweenness centrality. For every source it builds a shortest-path DAG, counts the number of shortest paths σ through each vertex, and walks that DAG backward to add dependencies. One source costs a BFS, or a Dijkstra run when weights are nonnegative. All sources cost…