This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 65 f 30 d 29 c 25 a, b 75% = A63% = B42% = Ce. Why does a greedy strategy work here? Suppose weve already added some edges, and they are a part of an MST, which edges can we add next? Cut property: Suppose edges X < E are part of some MST T. pick any subset of nodes S in V such that X has no edges between S and V S. Let e be the lightest edge across cut (S, V S). Then X U {e} is part of some MST T e.i. If e is in T: were done. Otherwise, we will show that there iiis a different MST T that contains e e.ii. Ad e to T T + e: contains a cycle, the cycle must cross the cut with another edge e.look at e.iii. Look at T = T + e e T is connected (removing a cycle edge cannot disconnect a graph) T has V 1 edges Therefore, T is a tree Weight(T) = weight(T) + w e w e <= weight(T) Weight(T) = weight(T) and T is an MST. e.iv....
View Full
Document
 Spring '08
 staff
 Algorithms

Click to edit the document details