Minimum Spanning Tree
Summarized notes on Introduction to Algorithms, Chapter 23
- tree - is an undirected graph with no cycles, i.e. connected graph with
nodes and edges - spanning tree - acyclic subset
that connects all vertices - minimum-spanning tree problem - process of determining
- greedy algorithm - perform locally optimal choices → solution not guaranteed to be globally optimal
Growing a Minimum Spanning Tree
Generic algorithm that grows the MST one edge at a time
- manages a set od edges
prior to each iteration,
is a subset of some minimum spanning tree - at each step, determine safe edge that can be added to without violating this invariant - algorithm terminates as soon as forms a MST
Finding a safe edge
- looking for
such that → one must exist since - cut
of undirected graph is a partition of - edge crosses the cut if one endpoint is in
and other is in - cut respects edges of
if no edge in crosses the cut - light edge is the minimum weight edge crossing a cut → multiple may exist
is always acyclic- asymptotic time not given, but
iterations over edges →
Theorem for identifying safe edge
Let
be connected, undirected graph with real-valued weight function defined on . Let be a subset of that is included in some minimum spanning tree for , left be any cut of that respects , and let be a light edge crossing . Then edge is safe for .