# Chapter 23 - SHEN'S CLASS NOTES Chapter 23 Minimum Spanning...

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

SHEN’S CLASS NOTES Chapter 23 Minimum Spanning Trees Definition 1 Given a connected (undirected) graph G(V, E), a  spanning tree   T of G is a subgraph of G that is a tree and  contains all vertices in V. Definition 2 Given   a   connected   (undirected)   and   weighted  graph G(V, E), a spanning tree T of G is called   a minimum  spanning tree  (MST) if the total edge weight of T is minimized. Example 1 a c b d 5 7 6 2 8 a c b d 5 7 6 (a) Graph G a c b d 5 7 (b) A non-minimum spanning tree 2 (c) A MST with w(T) =14 Fig. 23-1 1

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

View Full Document
SHEN’S CLASS NOTES Many applications need to find a MST in a graph. For example, design a multicast routing paths from a source node to all other nodes such that the total transmission delay is minimal. Another example is to build a high way system that connect all major cities with minimal total cost, assuming the cost is proportional to the length of the road. 23.1 A generic algorithm Now, as a graph problem, how can we find a MST for a given G? Two well-known MST algorithms are (1) Kruskal algorithm (2) Prim algorithm. Both take the following greedy method: The algorithm starts from an empty graph or from a single vertex. Let us use A to denote the initial graph. Then, at each step, the algorithm adds an edge ( u , v ) into the graph A such that the growing graph A will be contained in a MST eventually, that is, A {( u , v)} an MST. The edge ( u , v ) is called a safe edge . A pseudo code for this approach is given below. Generic-MST (G, w) 1 A φ 2 while A does not form a spanning tree 3 do { find a safe edge ( u , v ) for A 2
SHEN’S CLASS NOTES 4 A A {( u , v)} 5 } 6 return A 7 End Now, the focus is on how to find a safe edge. Definition 3 Given a graph G(V, E), a cut C = (S, V-S) is a partition of vertex set V into two subsets, S and V-S such that every vertex must belong to either S or V-S, but not both. Definition 4 Given a cut C = (S, V-S), an edge ( u , v ) is said to cross the cut if u S and v V-S. Definition 5 Given a set A of edges, a cut C = (S, V-S) is said to respect the set A if no edges in A crosses the cut. Definition 6 Given a cut C , an edge is called a light edge crossing the cut if its weight is the minimum among all crossing edges. Example 2 3

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

View Full Document
SHEN’S CLASS NOTES b h a i g c d e f 4 11 8 8 7 7 1 2 6 2 14 9 10 4 S V-S S = { a , b , d , e } V - S = { c , f , g , h , i } A = {( a , b ), ( i , c ), ( c , f ), ( f , g ), ( g , h )} (bold edges) Crossing edges = {( a , h ), ( b , h ), ( b , c ), ( d , c ), ( d , f ), ( e , f )} Light edge = ( d , c ), w ( d , c ) = 7. Fig. 23-2
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/12/2008 for the course CS 592 taught by Professor Shen during the Fall '05 term at University of Missouri-Kansas City .

### Page1 / 14

Chapter 23 - SHEN'S CLASS NOTES Chapter 23 Minimum Spanning...

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

View Full Document
Ask a homework question - tutors are online