CSE 211 Discrete Mathematics and Its Applications

Slides:



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

Graphs, Planar graphs Graph coloring
Discrete Mathematics 6. GRAPHS Lecture 10 Dr.-Ing. Erwin Sitompul
Chapter 9 Graphs.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
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,
Applications of Euler’s Formula for Graphs Hannah Stevens.
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Planar / Non-Planar Graphs Gabriel Laden CS146 – Spring 2004 Dr. Sin-Min Lee.
Applied Combinatorics, 4th Ed. Alan Tucker
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
Applied Combinatorics, 4th Ed. Alan Tucker
Tucker, Applied Combinatorics, Section 1.4, prepared by Patti Bodkin
Graph Colouring Lecture 20: Nov 25.
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.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 4, Monday, September 8.
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.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
Chapter 9.8 Graph Coloring
CS 2813 Discrete Structures
9.8 Graph Coloring. Coloring Goal: Pick as few colors as possible so that two adjacent regions never have the same color. See handout.
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
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.:
More Graphs, Subgraphs and Trees Planarity and Coloring.
CS 200 Algorithms and Data Structures
Planar Graphs Graph Coloring
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
Chapter 10.8 Graph Coloring
Graph.
1.5 Graph Theory. Graph Theory The Branch of mathematics in which graphs and networks are used to solve problems.
Graph Colouring Lecture 20: Nov 25. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including.
Planar Graphs Lecture 10: Oct 21. This Lecture Today we will talk about planar graphs, and how to color a map using 6 colors. Planar graphs Euler’s formula.
Introduction to Graphs Slides by Gene Boggess
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.
Chapter 10.8 Graph Coloring These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7 th ed., by Kenneth.
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.
Chapter 7 Planar Graphs 大葉大學 資訊工程系 黃鈴玲  7.2 Planar Embeddings  7.3 Euler’s Formula and Consequences  7.4 Characterization of Planar Graphs.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
Great Theoretical Ideas In Computer Science
Planar Graphs Hubert Chan (Chapter 9.7) [O2 Proof Techniques]
Outline 1 Properties of Planar Graphs 5/4/2018.
Homework 8 Graph G is given by the figure below.
Discrete Mathematics Graph: Planar Graph Yuan Luo
Euler and Hamilton Cycles; Planar Graphs; Coloring.
Great Theoretical Ideas In Computer Science
Applied Combinatorics, 4th Ed. Alan Tucker
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
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.8 Graph Coloring
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.8 Graph Coloring
Chapter 10.8 Graph Coloring
Applied Combinatorics, 4th Ed. Alan Tucker
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.
Great Theoretical Ideas In Computer Science
Chapter 10.8 Graph Coloring
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.
Gaph Theory Planar Graphs
Discrete Mathematics for Computer Science
GRAPH THEORY Properties of Planar Graphs Ch9-1.
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.
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.
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Presentation transcript:

CSE 211 Discrete Mathematics and Its Applications Chapter 8.7 Planar Graphs

The House-and-Utilities Problem

Planar Graphs Consider the previous slide. Is it possible to join the three houses to the three utilities in such a way that none of the connections cross?

Planar Graphs Phrased another way, this question is equivalent to: Given the complete bipartite graph K3,3, can K3,3 be drawn in the plane so that no two of its edges cross? K3,3

Planar Graphs A graph is called planar if it can be drawn in the plane without any edges crossing. A crossing of edges is the intersection of the lines or arcs representing them at a point other than their common endpoint. Such a drawing is called a planar representation of the graph.

Example A graph may be planar even if it is usually drawn with crossings, since it may be possible to draw it in another way without crossings.

Example A graph may be planar even if it represents a 3-dimensional object.

Planar Graphs We can prove that a particular graph is planar by showing how it can be drawn without any crossings. However, not all graphs are planar. It may be difficult to show that a graph is nonplanar. We would have to show that there is no way to draw the graph without any edges crossing.

Regions Euler showed that all planar representations of a graph split the plane into the same number of regions, including an unbounded region. R4 R3 R2 R1

Regions In any planar representation of K3,3, vertex v1 must be connected to both v4 and v5, and v2 also must be connected to both v4 and v5. v1 v2 v3 v4 v5 v6

Regions The four edges {v1, v4}, {v4, v2}, {v2, v5}, {v5, v1} form a closed curve that splits the plane into two regions, R1 and R2. v1 v5 R2 R1 v4 v2

Regions Next, we note that v3 must be in either R1 or R2. Assume v3 is in R2. Then the edges {v3, v4} and {v4, v5} separate R2 into two subregions, R21 and R22. v1 v5 v1 v5 R21 R2 R1 → v3 R22 v4 v2 v4 v2

Regions Now there is no way to place vertex v6 without forcing a crossing: If v6 is in R1 then {v6, v3} must cross an edge If v6 is in R21 then {v6, v2} must cross an edge If v6 is in R22 then {v6, v1} must cross an edge v1 v5 R21 v3 R1 R22 v4 v2

Regions Alternatively, assume v3 is in R1. Then the edges {v3, v4} and {v4, v5} separate R1 into two subregions, R11 and R12. v1 v5 R11 R2 R12 v3 v4 v2

Regions Now there is no way to place vertex v6 without forcing a crossing: If v6 is in R2 then {v6, v3} must cross an edge If v6 is in R11 then {v6, v2} must cross an edge If v6 is in R12 then {v6, v1} must cross an edge v1 v5 R11 R2 R12 v3 v4 v2

Planar Graphs Consequently, the graph K3,3 must be nonplanar. K3,3

Regions Euler devised a formula for expressing the relationship between the number of vertices, edges, and regions of a planar graph. These may help us determine if a graph can be planar or not.

Euler’s Formula 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. R4 R3 R2 R1 # of edges, e = 6 # of vertices, v = 4 # of regions, r = e - v + 2 = 4

Euler’s Formula (Cont.) Corollary 1: If G is a connected planar simple graph with e edges and v vertices where v  3, then e  3v - 6. Is K5 planar? K5

Euler’s Formula (Cont.) K5 has 5 vertices and 10 edges. We see that v  3. So, if K5 is planar, it must be true that e  3v – 6. 3v – 6 = 3*5 – 6 = 15 – 6 = 9. So e must be  9. But e = 10. So, K5 is nonplanar. K5

Euler’s Formula (Cont.) Corollary 2: If G is a connected planar simple graph, then G has a vertex of degree not exceeding 5.

Euler’s Formula (Cont.) Corollary 3: If a connected planar simple graph has e edges and v vertices with v  3 and no circuits of length 3, then e  2v - 4. Is K3,3 planar?

Euler’s Formula (Cont.) K3,3 has 6 vertices and 9 edges. Obviously, v  3 and there are no circuits of length 3. If K3,3 were planar, then e  2v – 4 would have to be true. 2v – 4 = 2*6 – 4 = 8 So e must be  8. But e = 9. So K3,3 is nonplanar. K3,3

CSE 211 Discrete Mathematics Chapter 8.8 Graph Coloring

Introduction When a map is colored, two regions with a common border are customarily assigned different colors. We want to use the smallest number of colors instead of just assigning every region its own color.

4-Color Map Theorem It can be shown that any two-dimensional map can be painted using four colors in such a way that adjacent regions (meaning those which sharing a common boundary segment, and not just a point) are different colors.

Map Coloring Four colors are sufficient to color a map of the contiguous United States. Source of map: http://www.math.gatech.edu/~thomas/FC/fourcolor.html

Dual Graph Each map in a plane can be represented by a graph. Each region is represented by a vertex. Edges connect to vertices if the regions represented by these vertices have a common border. Two regions that touch at only one point are not considered adjacent. The resulting graph is called the dual graph of the map.

Graph Theoretic Foundations Dual graph:

Dual Graph Examples A B C D E A B C D E F G c b a d f g e b a e d c

Graph Coloring A coloring of a simple graph is the assignment of a color to each vertex of the graph so that no two adjacent vertices are assigned the same color. The chromatic number of a graph is the least number of colors needed for a coloring of the graph. The Four Color Theorem: The chromatic number of a planar graph is no greater than four.

Example What is the chromatic number of the graph shown below? The chromatic number must be at least 3 since a, b, and c must be assigned different colors. So Let’s try 3 colors first. 3 colors work, so the chromatic number of this graph is 3. b e a d g c f

Example What is the chromatic number for each of the following graphs? White White Yellow Yellow Green Yellow White White Yellow Yellow White Chromatic number: 2 Chromatic number: 3

Graph Coloring and Schedules EG: Suppose want to schedule some final exams for CS courses with following call numbers: 1007, 3137, 3157, 3203, 3261, 4115, 4118, 4156 Suppose also that there are no common students in the following pairs of courses because of prerequisites: 1007-3137 1007-3157, 3137-3157 1007-3203 1007-3261, 3137-3261, 3203-3261 1007-4115, 3137-4115, 3203-4115, 3261-4115 1007-4118, 3137-4118 1007-4156, 3137-4156, 3157-4156 How many exam slots are necessary to schedule exams? Assume that in all other pairs there are students. L25

Graph Coloring and Schedules Turn this into a graph coloring problem. Vertices are courses, and edges are courses which cannot be scheduled simultaneously because of possible students in common: 3203 3261 3137 4115 1007 4118 3157 4156 L25

Graph Coloring and Schedules One way to do this is to put edges down where students mutually excluded… 3203 3261 3137 4115 1007 4118 3157 4156 L25

Graph Coloring and Schedules …and then compute the complementary graph: 3203 3261 3137 4115 1007 4118 3157 4156 L25

Graph Coloring and Schedules …and then compute the complementary graph: 3203 3261 3137 4115 1007 4118 3157 4156 L25

Graph Coloring and Schedules Redraw: 3137 3203 3261 4115 1007 3157 4118 4156 L25

Graph Coloring and Schedules Not 1-colorable because of edge 3137 3203 3261 4115 1007 3157 4118 4156 L25

Graph Coloring and Schedules Not 2-colorable because of triangle 3137 3203 3261 4115 1007 3157 4118 4156 L25

Graph Coloring and Schedules Is 3-colorable. Try to color by Red, Green, Blue. 3137 3203 3261 4115 1007 3157 This method is also would have discovered if graph were not 3-colorable and given a proof by contradiction. 4118 4156 L25

Graph Coloring and Schedules WLOG. 3203-Red, 3157-Blue, 4118-Green: 3137 3203 3261 4115 1007 3157 4118 4156 L25

Graph Coloring and Schedules So 4156 must be Blue: 3137 3203 3261 4115 1007 3157 4118 4156 L25

Graph Coloring and Schedules So 3261 and 4115 must be Red. 3137 3203 3261 4115 1007 3157 4118 4156 L25

Graph Coloring and Schedules 3137 and 1007 easy to color. 3137 3203 3261 4115 1007 3157 4118 4156 L25

Graph Coloring and Schedules So need 3 exam slots: Slot 2 3137 3203 3261 Slot 1 4115 1007 3157 4118 Slot 3 4156 L25

Conclusion In this chapter we have covered: Introduction to Graphs Graph Terminology Representing Graphs and Graph Isomorphism Graph Connectivity Euler and Hamilton Paths Planar Graphs Graph Coloring