This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 473: Algorithms Chandra Chekuri [email protected] 3228 Siebel Center University of Illinois, UrbanaChampaign Fall 2009 Chekuri CS473ug Minimum Spanning Tree Part I Greedy Algorithms: Minimum Spanning Tree Chekuri CS473ug Minimum Spanning Tree The Problem The Algorithms Correctness Minimum Spanning Tree Input Connected graph G = ( V , E ) with edge costs Goal Find T ⊆ E such that ( V , T ) is connected and total cost of all edges in T is smallest T is the minimum spanning tree (MST) of G 1 2 3 4 5 6 7 20 15 3 17 28 23 1 4 9 16 25 36 Chekuri CS473ug Minimum Spanning Tree The Problem The Algorithms Correctness Minimum Spanning Tree Input Connected graph G = ( V , E ) with edge costs Goal Find T ⊆ E such that ( V , T ) is connected and total cost of all edges in T is smallest T is the minimum spanning tree (MST) of G 1 2 3 4 5 6 7 20 15 3 17 28 23 1 4 9 16 25 36 Chekuri CS473ug Minimum Spanning Tree The Problem The Algorithms Correctness Applications Network Design Designing networks with minimum cost but maximum connectivity Approximation algorithms Can be used to bound the optimality of algorithms to approximate Travelling Salesman Problem, Steiner Trees, etc. Cluster Analysis Chekuri CS473ug Minimum Spanning Tree The Problem The Algorithms Correctness Greedy Template Initially E is the set of all edges in G T is empty (* T will store edges of a MST *) while E is not empty choose i ∈ E if (i satisfies condition ) add i to T return the set T Main Task: In what order should edges be processed? When should we add edge to spanning tree? KA PA RD Chekuri CS473ug Minimum Spanning Tree The Problem The Algorithms Correctness Kruskal’s Algorithm Process edges in the order of their costs (starting from the least) and add edges to T as long as they don’t form a cycle. 1 2 3 4 5 6 7 20 15 3 17 28 23 1 4 9 16 25 36 Figure: Graph G 1 2 3 4 5 6 7 Figure: MST of G Back Chekuri CS473ug Minimum Spanning Tree The Problem The Algorithms Correctness Kruskal’s Algorithm Process edges in the order of their costs (starting from the least) and add edges to T as long as they don’t form a cycle. 1 2 3 4 5 6 7 20 15 3 17 28 23 1 4 9 16 25 36 Figure: Graph G 1 2 3 4 5 6 7 1 Figure: MST of G Back Chekuri CS473ug Minimum Spanning Tree The Problem The Algorithms Correctness Kruskal’s Algorithm Process edges in the order of their costs (starting from the least) and add edges to T as long as they don’t form a cycle. 1 2 3 4 5 6 7 20 15 3 17 28 23 1 4 9 16 25 36 Figure: Graph G 1 2 3 4 5 6 7 3 1 Figure: MST of G Back Chekuri CS473ug Minimum Spanning Tree The Problem The Algorithms Correctness Kruskal’s Algorithm Process edges in the order of their costs (starting from the least) and add edges to T as long as they don’t form a cycle....
View
Full Document
 Fall '08
 Chekuri,C
 Algorithms, Graph Theory, Data Structures, Greedy algorithm, Kruskal's algorithm, Spanning tree

Click to edit the document details