MST_Handout

MST_Handout - UML CS Analysis of Algorithms 91.503 Fall...

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

UML CS Analysis of Algorithms 91.503 Fall, 2004 Minimum Spanning Trees In class we discussed a greedy algorithm to construct a Minimum Spanning Tree (MST) of an undirected graph G=(V,E). Greedy_MST(G) E’ sort edges of E by non-decreasing weight/cost Initialize T to be empty for each edge e’ in E’ do if T union e’ is acyclic then T T union e’ if Vertices(T) = V and T is a single tree then break out of loop return T How do we know that the resulting tree T is an MST of G? Let cost(e’) = cost of an edge and cost(T) = Σ e’ in T (cost(e’)). Theorem : Let T o be an MST of G. Then cost(T) <= cost(T o ). Proof : [based on Chartrand, Introductory Graph Theory ] If T = T o , then the theorem is trivially true. We therefore concentrate on the case in which T = T o . To prove the theorem in this case, we perform an iterative procedure designed to make T o increasingly similar to T; at the end of this procedure we will have transformed T o into T and this will prove the theorem. Each iteration of the procedure adds an edge to T

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.

{[ snackBarMessage ]}

Page1 / 2

MST_Handout - UML CS Analysis of Algorithms 91.503 Fall...

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

View Full Document
Ask a homework question - tutors are online