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…
Category: Graphs
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 HITS scores hubs and authorities
Short answer: HITS gives every page two scores. The authority score is the sum of the hub scores of pages that link to it. The hub score is the sum of the authority scores of pages it links to. Iterating those two sums and normalizing is power iteration on…
How Hierholzer builds an Eulerian circuit
Short answer: Hierholzer’s algorithm builds a closed walk that uses every edge exactly once. An undirected graph has such a circuit when it is connected aside from isolated vertices and every degree is even. The algorithm walks unused edges until it returns, then splices in a side tour at…
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 Fleury avoids burning a bridge early
Short answer: Fleury’s algorithm builds an Eulerian tour by a walking rule: from the current vertex, take an edge that is not a bridge of the remaining graph, unless every remaining edge is a bridge. The rule keeps the unused edges in one connected piece until they are consumed.…
How Edmonds-Karp bounds augmentations with BFS
Short answer: Edmonds-Karp is Ford-Fulkerson with one restriction: the augmenting path is a shortest residual path, measured by number of edges, so the search is breadth-first. Each augmentation can be found in O(E), and the number of augmentations is O(VE), for a total of O(VE²). The bound is polynomial…
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 Dijkstra grows a settled shortest-path tree
Short answer: Dijkstra’s algorithm grows a set of settled vertices whose distances from the source are final. The next vertex settled is the unsettled vertex with the smallest tentative distance, and its outgoing edges relax their heads. With a binary heap the time is O((V+E) log V) on nonnegative…
How Dial’s algorithm buckets integer distances
Short answer: Dial’s algorithm is Dijkstra for nonnegative integer weights whose maximum is C. It keeps a bucket for each possible distance. Because an edge increases distance by at most C, a circular array of C+1 buckets holds the whole frontier. Scanning buckets in order and relaxing edges is…
How depth-first search records discovery and finish
Short answer: Depth-first search follows an edge as far as it can, then backtracks, using a stack or the call stack. Each vertex receives a discovery time and a finish time. Those times classify every edge as tree, back, forward, or cross, and the finish order is the input…
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 Bron-Kerbosch lists maximal cliques
Short answer: The Bron-Kerbosch algorithm lists every maximal clique of an undirected graph. It keeps a current clique R, a set P of candidates that can still extend R, and a set X of vertices already excluded. A pivot taken from P ∪ X limits the branches to candidates…
How breadth-first search measures unweighted distance
Short answer: Breadth-first search expands a graph level by level from a source, using a queue. The first time a vertex is reached, the path that reached it is a shortest path in an unweighted graph, or in a graph whose edges all have the same positive cost. 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…
