# Lecture10 - Minimum Spanning Tree CSE 421 Algorithms...

This preview shows pages 1–2. Sign up to view the full content.

1 CSE 421 Algorithms Richard Anderson Lecture 10 Minimum Spanning Trees 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 Greedy Algorithms for Minimum Spanning Tree •[ P r im ] 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 Why do the greedy algorithms work? • For simplicity, assume all edge costs are distinct 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 SV - S e 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

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

View Full Document
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 / 4

Lecture10 - Minimum Spanning Tree CSE 421 Algorithms...

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

View Full Document
Ask a homework question - tutors are online