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 bucket sort uses a uniform spread

Short answer: Bucket sort drops keys from a known numeric range into n buckets, sorts each bucket, and concatenates them. When keys are independent and uniform, the buckets stay small and the average time is Θ(n). One bucket that receives every key falls back to the inner sort, which…

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…