lecture9 - CS 473: Algorithms Chandra Chekuri...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 473: Algorithms Chandra Chekuri chekuri@cs.illinois.edu 3228 Siebel Center University of Illinois, Urbana-Champaign 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 Kruskals Algorithm Process edges in the order of their costs (starting from the least) and add edges to T as long as they dont 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 Kruskals Algorithm Process edges in the order of their costs (starting from the least) and add edges to T as long as they dont 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 Kruskals Algorithm Process edges in the order of their costs (starting from the least) and add edges to T as long as they dont 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 Kruskals Algorithm Process edges in the order of their costs (starting from the least) and add edges to T as long as they dont form a cycle....
View Full Document

This note was uploaded on 01/22/2012 for the course CS 573 taught by Professor Chekuri,c during the Fall '08 term at University of Illinois, Urbana Champaign.

Page1 / 141

lecture9 - CS 473: Algorithms Chandra Chekuri...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online