Lecture10 - CSE 421 Algorithms Richard Anderson Lecture 10...

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

View Full Document Right Arrow Icon
CSE 421 Algorithms Richard Anderson Lecture 10 Minimum Spanning Trees
Background image of page 1

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

View Full DocumentRight Arrow Icon
Minimum Spanning Tree a b c s e g f 9 2 13 6 4 11 5 7 20 14 t u v 15 10 1 8 12 16 22 17 3 Undirected Graph G=(V,E) with edge weights
Background image of page 2
Greedy Algorithms for Minimum Spanning Tree [Prim] Extend a tree by including the cheapest out going edge [Kruskal] Add the cheapest edge that joins disjoint components [ReverseDelete] Delete the most expensive edge that does not disconnect the graph 4 11 5 7 20 8 22 a b c d e
Background image of page 3

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

View Full DocumentRight Arrow Icon
Why do the greedy algorithms work? For simplicity, assume all edge costs are distinct
Background image of page 4
Edge inclusion lemma Let S be a subset of V, and suppose e = (u, v) is the minimum cost edge of E, with u in S and v in V-S e is in every minimum spanning tree of G Or equivalently, if e is not in T, then T is not a minimum spanning tree S V - S e
Background image of page 5

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

View Full DocumentRight Arrow Icon
Proof Suppose T is a spanning tree that does not contain e Add e to T, this creates a cycle The cycle must have some edge e 1 = (u 1 , v 1 ) with u
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/25/2012 for the course CSE 421 taught by Professor Richardanderson during the Fall '06 term at University of Washington.

Page1 / 20

Lecture10 - CSE 421 Algorithms Richard Anderson Lecture 10...

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

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