18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Minimum Spanning Tree<br />

Next: Shortest Path Up: Graph Problems: Polynomial-Time Previous: Topological Sorting<br />

Minimum Spanning Tree<br />

Input description: A graph G = (V,E) with weighted edges.<br />

Problem description: <strong>The</strong> subset of of minimum weight forming a tree on V.<br />

Discussion: <strong>The</strong> minimum spanning tree (MST) of a graph defines the cheapest subset of edges that keeps the graph in one<br />

connected component. Telephone companies are particularly interested in minimum spanning trees, because the<br />

minimum spanning tree of a set of sites defines the wiring scheme that connects the sites using as little wire as possible. It<br />

is the mother of all network design problems.<br />

Minimum spanning trees prove important for several reasons:<br />

● <strong>The</strong>y can be computed quickly and easily, and they create a sparse subgraph that reflects a lot about the original<br />

graph.<br />

● <strong>The</strong>y provide a way to identify clusters in sets of points. Deleting the long edges from a minimum spanning tree<br />

leaves connected components that define natural clusters in the data set, as shown in the output figure above.<br />

● <strong>The</strong>y can be used to give approximate solutions to hard problems such as Steiner tree and traveling salesman.<br />

● As an educational tool, minimum spanning tree algorithms provide graphic evidence that greedy algorithms can give<br />

provably optimal solutions.<br />

Two classical algorithms efficiently construct minimum spanning trees, namely Prim's and Kruskal's. Brief overviews of<br />

both algorithms are given below, with correctness arguments in Section . We refer the reader to the codes for<br />

implementation details.<br />

Prim's algorithm starts with an arbitrary vertex v and ``grows'' a tree from it, repeatedly finding the lowest-cost edge that<br />

will link some new vertex into this tree. During execution we will label each vertex as either in the tree, fringe - meaning<br />

there exists an edge from a tree vertex, or unseen - meaning the vertex is more than one edge away from the tree.<br />

file:///E|/BOOK/BOOK4/NODE161.HTM (1 of 4) [19/1/2003 1:30:57]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!