Imagine you need to broadcast a signal from one hub to every city in a network. The links are directed â a cable from A to B doesn't help traffic going the other way â and each link has a cost. You want to spend as little as possible while still reaching every city from that hub.
What you're looking for is called a minimum arborescence: a directed spanning tree rooted at the hub, where every edge points away from the root (or, equivalently, every node has a unique directed path back to the root), and the total edge cost is minimized.
For undirected graphs, Kruskal's greedy algorithm solves the minimum spanning tree problem in by just sorting edges and picking the cheapest non-cycle-forming one. But the moment edges have directions, that greedy fails. The same edge set can form a valid arborescence or a dead end depending on which way the arrows point.
The key insight took until 1965, when Y. J. Chu and T. H. Liu (and independently Jack Edmonds in 1967) published an algorithm elegant enough to teach in a single lecture: pick the cheapest incoming edge for every non-root node, and if the result is a valid arborescence you're done. If not, it contains a directed cycle â and the algorithm contracts that cycle into a single super-node, adjusts edge weights to account for what you'd replace, and recurses.
Comments
Loading comments...