1 / 40

Main Menu (Click on the topics below)

Spanning Trees Minimum Spanning Trees Kruskal’s Algorithm Example Planar Graphs Euler’s Formula. Main Menu (Click on the topics below). Click here to continue. Sanjay Jain, Lecturer, School of Computing. Spanning Trees and Planar Graphs. Sanjay Jain, Lecturer, School of Computing.

Download Presentation

Main Menu (Click on the topics below)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Spanning Trees Minimum Spanning Trees Kruskal’s Algorithm Example Planar Graphs Euler’s Formula Main Menu (Click on the topics below) Click here to continue Sanjay Jain, Lecturer, School of Computing

  2. Spanning Trees and Planar Graphs Sanjay Jain, Lecturer, School of Computing

  3. Definition: A spanning tree for a graph G is a subgraph of G that a) contains every vertex of G and b) is a tree. . . . . . . Spanning Trees

  4. Definition: A spanning tree for a graph G is a subgraph of G that a) contains every vertex of G and b) is a tree. Spanning Trees . . . . . .

  5. END OF SEGMENT

  6. a) Every connected finite graph G has a spanning tree. b) Any two spanning trees for a graph have the same number of edges (If G has n vertices, then spanning tree of G has n-1 edges). Proposition Proof: (of a) G is connected. Let G’=G 1. If G’ is a tree then we are done. 2. Otherwise, delete an edge from a circuit of G’ and go to 1. At the end of the above algorithm, G’ will be a spanning tree of G.

  7. END OF SEGMENT

  8. . Singapore 89 . 45 New York . 34 76 KL 88 65 . . 23 Jakarta London Minimal Spanning Trees.

  9. Weighted Graph. Each edge has a weight associated with it. Minimal Spanning Trees Minimal spanning tree, is a spanning tree with the minimum weight.

  10. May not be unique . . 1 1 . . 1 1 Minimal Spanning Trees Minimal spanning tree can be formed by taking any three edges in the above graph.

  11. END OF SEGMENT

  12. Input: Graph G, V(G), E(G), weights of edges. Output: Minimal spanning tree of G. Algorithm: 1. Initialize T to contain all vertices of G and no edges. Let E=E(G). n= number of vertices in V(G) m=0 2. While m < n-1 do 2a. Find an edge in E with least weight. 2b. Delete e from E 2c. If adding e to T does not introduce a non-trivial circuit, then add e to the edge set of T m=m+1 Endif Endwhile Kruskal’s Algorithm

  13. END OF SEGMENT

  14. Example . Singapore 89 . 99 New York . 34 76 KL 88 102 . . 23 Jakarta London

  15. Example . Singapore 89 . 99 New York . 34 76 KL 88 102 . . 23 Jakarta London

  16. Example . Singapore 89 . 99 New York . 34 76 KL 88 102 . . 23 Jakarta London

  17. Example . Singapore 89 . 99 New York . 34 76 KL 88 102 . . 23 Jakarta London

  18. Example . Singapore 89 . 99 New York . 34 76 KL 88 102 . . 23 Jakarta London

  19. Example . Singapore 89 . 99 New York . 34 76 KL 88 102 . . 23 Jakarta London

  20. Example . Singapore 89 . 99 New York . 34 76 KL 88 102 . . 23 Jakarta London

  21. Example . Singapore 89 . 99 New York . 34 76 KL 88 102 . . 23 Jakarta London

  22. END OF SEGMENT

  23. Definition: A graph G is planar iff it can be drawn on a plane in such a way that edges never “cross” (I.e. edges meet only at the endpoints). . . . . . . Planar Graphs

  24. A drawing of planar graph G on a plane, without any crossing, is called the plane graph representation of G . . . . . . . . Plane Graph

  25. END OF SEGMENT

  26. Theorem: Suppose G is a connected simple planar graph with n3 vertices and m edges. Then, m  3n-6. Note that the above theorem is applicable only for connectedsimple graphs. Euler’s Formula

  27. END OF SEGMENT

  28. Euler’s Formula Examples K5 number of vertices: 5 number of edges : 10 m  3n-6 does not hold. 10  3*5-6 =9 So K5 is not planar.

  29. K4 number of vertices: 4 number of edges : 6 m  3n-6 holds. 6  3*4-6 =6 So K4 may be planar (it is actually planar as we have already seen). Euler’s Formula Examples

  30. K3,3 number of vertices: 6 number of edges : 9 m  3n-6 holds. 9  3*6-6 =12 So K3,3 may be planar (however K3,3 is not planar). Euler’s Formula Examples

  31. END OF SEGMENT

  32. A graph is planar iff it does not have K5 or K3,3 as a “portion” of it. There is a linear time algorithm to determine whether a given graph is planar or not. If the graph is planar, then the algorithm also gives a plane graph drawing of it. Planar Graphs

  33. END OF SEGMENT

  34. Faces: The portion enclosed by edges. The outside is also a face. Let m be number of edges, n be number of vertices, and f be number of faces. Then: f = m-n+2 ----------- (1) . . . . . . . . . Proof of Euler’s Formula

  35. Faces: The portion enclosed by edges. The outside is also a face. Let m be number of edges, n be number of vertices, and f be number of faces. Then: f = m-n+2 ----------- (1) Proof of Euler’s Formula . . . . . . . . .

  36. Faces: The portion enclosed by edges. The outside is also a face. Let m be number of edges, n be number of vertices, and f be number of faces. Then: f = m-n+2 ----------- (1) Proof of Euler’s Formula . . . . . . . . .

  37. Faces: The portion enclosed by edges. The outside is also a face. Let m be number of edges, n be number of vertices, and f be number of faces. Then: f = m-n+2 ----------- (1) Proof of Euler’s Formula . . . . . . . . .

  38. Faces: The portion enclosed by edges. The outside is also a face. Let m be number of edges, n be number of vertices, and f be number of faces. Then: f = m-n+2 ----------- (1) Proof of Euler’s Formula . . . . . . . . .

  39. Faces: The portion enclosed by edges. The outside is also a face. Let m be number of edges, n be number of vertices, and f be number of faces. Then: f = m-n+2 ----------- (1) Proof of Euler’s Formula . . . . . . . . 3f/2  m ----------- (2) By substituting (1) in (2) we get 3m - 3n + 6  2m or m  3n - 6 .

  40. END OF SEGMENT

More Related