This preview shows pages 1–3. 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: Proof. Let A,B be such a partition. Let e be the cheapest edge from A to B. Let T be any tree that avoids e. Then T U {e} must contain a cycle. The most expensive edge on this cycle is e e (The cycle crosses from A to B at least twice.) c e &gt; c e . 72 Therefore T  {e} U {e} is a cheaper spanning tree. Correctness of K&amp;P Approach: Prove the algorithm outputs a subgraph which is (i) connected (ii) contained in the MST. PRIM's (1) (W,F) is always connected. (2) At termination W = V. &gt; (i) (3) Whenever we add e, it is the cheapest edge from W to V W. &gt; (ii) KRUSKAL (1) If (A,B) is any partition of V, we pick at least one AB edge. (the first one encountered in the loop). &gt; (i) (2) When alg. Picks edge e = (u,v) Let A = {vertices reachable from u at that stage B = all other vertices. e is the cheapest AB edge. (If e were cheaper, we would have already looked at it and picked it.) &gt; (ii) v 73...
View
Full
Document
This note was uploaded on 10/02/2008 for the course CS 482 taught by Professor Kleinberg during the Spring '08 term at Cornell University (Engineering School).
 Spring '08
 KLEINBERG
 Algorithms

Click to edit the document details