V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science for Some.
Advertisements

Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
9.7 Planar Graphs. Intro problem- 3 houses and 3 utilities K 3,3 problem: Can 3 houses be connected to 3 utilities so that no 2 lines cross? Similarly,
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Great Theoretical Ideas in Computer Science for Some.
10.4 Spanning Trees. Def Def: Let G be a simple graph. A spanning tree of G is a subgraph of G that is a tree containing every vertex of G See handout.
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Great Theoretical Ideas in Computer Science.
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
Computational Geometry Seminar Lecture 1
Great Theoretical Ideas in Computer Science.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
Drawing of G. Planar Embedding of G Chord A chord of a cycle C is an edge not in C whose endpoints lie in C.
Drawing of G. Planar Embedding of G Proposition Proof. 1. Consider a drawing of K 5 or K 3,3 in the plane. Let C be a spanning cycle. 2. If the.
What is the next line of the proof? a). Assume the theorem holds for all graphs with k edges. b). Let G be a graph with k edges. c). Assume the theorem.
Curve Curve: The image of a continous map from [0,1] to R 2. Polygonal curve: A curve composed of finitely many line segments. Polygonal u,v-curve: A polygonal.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Graph Theory Ch6 Planar Graphs. Basic Definitions  curve, polygon curve, drawing  crossing, planar, planar embedding, and plane graph  open set  region,
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Planar Graphs: Euler's Formula and Coloring Graphs & Algorithms Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
GRAPH SPANNERS by S.Nithya. Spanner Definition- Informal A geometric spanner network for a set of points is a graph G in which each pair of vertices is.
Introduction to Graph Theory
MAT 2720 Discrete Mathematics Section 8.7 Planar Graphs
Planar Graphs Graph Coloring
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
Graph.
Unit – V Graph theory. Representation of Graphs Graph G (V, E,  ) V Set of vertices ESet of edges  Function that assigns vertices {v, w} to each edge.
Graph Theory and Applications
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Chapter 9.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 6th ed., by Kenneth H.
Great Theoretical Ideas in Computer Science for Some.
Prims Algorithm for finding a minimum spanning tree
1) Find and label the degree of each vertex in the graph.
COMPSCI 102 Introduction to Discrete Mathematics.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Planarity Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT.
Relations and Graphs Relations and Graphs Sanjay Jain, Lecturer, School of Computing.
Great Theoretical Ideas In Computer Science
IOI/ACM ICPC Training 4 June 2005.
Discrete Mathematics Graph: Planar Graph Yuan Luo
Çizge Algoritmaları.
Minimum Spanning Tree Chapter 13.6.
Great Theoretical Ideas In Computer Science
What is the next line of the proof?
Great Theoretical Ideas in Computer Science
COMP 6/4030 ALGORITHMS Prim’s Theorem 10/26/2000.
Planarity Testing.
Discrete Mathematics for Computer Science
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Planarity and Euler’s Formula
GRAPH SPANNERS.
Graph.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
4-4 Graph Theory Trees.
Kruskal’s Algorithm for finding a minimum spanning tree
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
MAT 2720 Discrete Mathematics
Planarity.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 8th ed., by Kenneth H.
N(S) ={vV|uS,{u,v}E(G)}
Discrete Mathematics for Computer Science
Planarity.
Concepts of Computation
Agenda Review Lecture Content: Shortest Path Algorithm
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Presentation transcript:

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

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

Spanning Trees 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 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

END OF SEGMENT

Proposition 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). 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.

END OF SEGMENT

Minimal Spanning Trees Singapore KL Jakarta London New York

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

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

END OF SEGMENT

Kruskal’s Algorithm 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

END OF SEGMENT

Example.... Singapore KL Jakarta London New York

Example.... Singapore KL Jakarta London New York

Example.... Singapore KL Jakarta London New York

Example.... Singapore KL Jakarta London New York

Example.... Singapore KL Jakarta London New York

Example.... Singapore KL Jakarta London New York

Example.... Singapore KL Jakarta London New York

Example.... Singapore KL Jakarta London New York

END OF SEGMENT

Planar Graphs 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)

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

END OF SEGMENT

Euler’s Formula 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 connected simple graphs.

END OF SEGMENT

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

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

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

END OF SEGMENT

Planar Graphs A graph is planar iff it does not have K 5 or K 3,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.

END OF SEGMENT

Proof of Euler’s Formula 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 (1)

Proof of Euler’s Formula 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 (1)

Proof of Euler’s Formula 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 (1)

Proof of Euler’s Formula 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 (1)

Proof of Euler’s Formula 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 (1)

Proof of Euler’s Formula 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 (1) f/2  m (2) By substituting (1) in (2) we get 3m - 3n + 6  2m or m  3n - 6

END OF SEGMENT