Suppose that the edges added to e t by the algorithm

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: s acyclic, with v (G) vertices and v (G) − 1 edges. Hence T is a tree (from a lemma). (c) Assume G has n vertices. Suppose that the edges added to E (T ) by the algorithm are e1 , e2 , . . . , en−1 so that if i < j then ei is added before ej . That is, the edges are arranged in the order of their appearance in E (T ). For any minimum weight spanning tree (MWST) H of G, let τ (H ) = max{i : edges e1 , e2 , . . . , ei are in H }. Let T ∗ be a MWST of G such that τ (T ∗ ) is the largest among all MWST of G. We say that T ∗ agrees with T the “longest time.” Assume for the purpose of contradiction that T ∗ = T . Then let e be the first edge, not in T ∗ , added to T by Prim’s algorithm. Consider the set S immediately before e is added to T . Now T ∗ + e contains a cycle C and hence must contain another edge e∗ that joins a vertex in S to a vertex not in S . Now e∗ cannot be one of those edges added by the algorithm to T before e because e∗ is one of those edges being examined by the algorithm at the current step when e is added. By line 3 in the algorithm, we see that wt(e) ≤ wt(e∗ ). Now T ∗ + e − e∗ is a spanning tree of G and wt(T ∗ + e − e∗ ) = wt(T ∗ ) + wt(e) − wt(e∗ ) ≤ wt(T ∗ ). Since T ∗ is a MWST of G, we see that T ∗ + e − e∗ is also a MWST of G. But now T ∗ + e − e∗ agrees with T on the edges added to T before e as well as e also. This contradicts the definition of T ∗ . Therefore, we must have T ∗ = T and hence T is a MWST of G. NOTE: It took me a while to define all notation so that the proof is hopefully readable to you. The definition of τ is for explaining (precisely) our choice of T ∗ . This choice of T ∗ is different from the one we used in proving that Kruskal’s algorithm works. If you have problems in understanding it, please come and talk with me. 3 Question 4. (2 points) Exercise 2.3.23. Consider the following weighted graph G. c 11 00 11 00 11 00 8 d 1 0 1 0 1 0 4 00b 2 11 e0 1 7 1 0 p0 1 2 3 11 00 2 3 1 11...
View Full Document

This note was uploaded on 01/13/2014 for the course MAD 5305 taught by Professor Suen during the Spring '12 term at University of South Florida - Tampa.

Ask a homework question - tutors are online