19. MSTs

# 19. MSTs - Maggie Johnson CS103B Handout #19 Minimal...

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

Maggie Johnson CS103B Handout #19 Minimal Spanning Trees Key Topics: * Planar Graphs * Spanning Trees: Algorithms and Applications _____________________________________________________________________ Planar Graphs Say you have three houses, each of which must be hooked up to three utilities: One way to represent this is with a complete bipartite graph K 3,3 . Is it possible to join these houses and these utilities so that none of the connections cross? Or, a more general graph question: Can K3,3 be drawn in a plane so that no two edges cross. There are many ways to draw the same graph. A graph is defined by its vertex and edge set, not by how you choose to draw the edges. A graph is planar if there is a representation of it where none of its edges cross. Is K 4 planar? Is K 3,3 planar? Any attempt to draw K 3,3 as a planar graph won't work. In any planar representation of this bipartite graph, the vertices v1 and v2 must be connected to v4 and v5. These four edges create a closed area that divides the plane into two regions (one region inside the area R2, and one on the outside R1).

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

View Full Document
The vertex v3 must be in R1 or R2. When v3 is in R2, it subdivides R2 into two more regions: R21 and R22: Where can we put v6 without crossing any edges? It must be connected to v1, v2 and v3. If we put it in R21, it crosses the subdivider to get to v2; if we put it in R22, same problem with v1; if we put it outside in R1, we can't get to v3. That takes care of one case. The other case is if we had put v3 in R1 to begin with. We end up with the same problem - there's no place to put v6: Consequently, K 3,3 is not planar. Euler’s Theorem and proof: Let G be a connected planar simple graph with e edges and v vertices. Let r be the number of regions in a planar representation of G. Then, r = e – v + 2. Spanning Trees Consider a road system in New York represented by the following graph: In the winter, the only way to keep the main roads open is to keep plowing them. The county of Westchester wants to plow as few roads as possible so that there will always be a cleared road between any two towns. How can this be done? At least 5 roads must be plowed:
Notice that this subgraph is a tree. This problem was solved by finding a connected subgraph with a

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.

## This note was uploaded on 10/01/2011 for the course CS 103B taught by Professor Sahami,m during the Winter '08 term at Stanford.

### Page1 / 8

19. MSTs - Maggie Johnson CS103B Handout #19 Minimal...

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

View Full Document
Ask a homework question - tutors are online