Spanning Tree
Let be a subgraph of an undirected graph . is a spanning tree of if is both acyclic and connected.
The following are equivalent:
- is spanning tree of .
- is acyclic and connected.
- is connected and has edges.
- is acylic and has edges.
- is minimally connected.
- is maximally acyclic.
Minimum Spanning Tree
Spanning tree with minimum costs.
Cayley’s theorem: The complete graph on nodes has spanning trees.
Cut Property
Let be any subset of nodes . Let edge be the minimum cost edge with one end in and the other in .
Then every MST contains the edge .
Kruskal’s Algorithm
- Starts without any edges and insert edges from in order of increasing cost.
- For edge , insert it if it does not create a cycle with all inserted edges, and discard otherwise.
Prim’s Algorithm
- Start with a root node , and try to grow a tree from
- Add the node connected with that can be attached as cheaply as possible.
Inspired by Dijkstra’s Algorithm with difference:
- Compare with every node in known set , not root node. Thus no distance needed.
Cycle Property
Let be any cycle in . Let edge be the most expensive edge on C. Then does not belong to any MST.
Reverse-Delete Algorithm
- Start with the full graph and being deleting edges in order of decreasing cost.
- Delete edges as long as doing do would not actually disconnect the graph.