Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics and Its Applications
Advertisements

Great Theoretical Ideas in Computer Science
Great Theoretical Ideas in Computer Science for Some.
Chapter 9 Graphs.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
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.
GOLOMB RULERS AND GRACEFUL GRAPHS
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
1 Representing Graphs. 2 Adjacency Matrix Suppose we have a graph G with n nodes. The adjacency matrix is the n x n matrix A=[a ij ] with: a ij = 1 if.
Applied Combinatorics, 4th Ed. Alan Tucker
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.
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.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
CS 2813 Discrete Structures
Coloring 3/16/121. Flight Gates flights need gates, but times overlap. how many gates needed? 3/16/122.
9.8 Graph Coloring. Coloring Goal: Pick as few colors as possible so that two adjacent regions never have the same color. See handout.
Let G be a pseudograph with vertex set V, edge set E, and incidence mapping f. Let n be a positive integer. A path of length n between vertex v and vertex.
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.:
Graph Theory Topics to be covered:
CS 200 Algorithms and Data Structures
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.
Data Structures & Algorithms Graphs
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
Planar Graphs Graph Coloring
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
Chapter 10.8 Graph Coloring
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.
1.5 Graph Theory. Graph Theory The Branch of mathematics in which graphs and networks are used to solve problems.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
Graph Colouring Lecture 20: Nov 25. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including.
Graph Theory and Applications
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.
Graphs and 2-Way Bounding Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 /File:7_bridgesID.png.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Eulerian Paths and Cycles. What is a Eulerian Path Given an graph. Find a path which uses every edge exactly once. This path is called an Eulerian Path.
Introduction to Graph Theory
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.
Trees.
Great Theoretical Ideas In Computer Science
Planar Graphs Hubert Chan (Chapter 9.7) [O2 Proof Techniques]
Discrete Mathematics Graph: Planar Graph Yuan Luo
Graph Coloring Lots of application – be it mapping routes, coloring graphs, building redundant systems, mapping genes, looking at traffic patterns (see.
Great Theoretical Ideas In Computer Science
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
Applied Combinatorics, 4th Ed. Alan Tucker
Graph theory Definitions Trees, cycles, directed graphs.
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.
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
MAT 2720 Discrete Mathematics
Chapter 10.8 Graph Coloring
Proof Techniques.
Graph Colouring & Tress in Graph Theory
N(S) ={vV|uS,{u,v}E(G)}
Discrete Mathematics for Computer Science
Concepts of Computation
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:

Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components Spanning Tree

vertex (node) edge Vertex degree is 3

Spanning Trees A spanning tree of a graph G is a tree that touches every node of G and uses only edges from G Every connected graph has a spanning tree

Dual = put a node in every face, and an edge between every adjacent face Dual Graph

Graph Colouring

Graph Colouring Problem: Given a graph, colour all the vertices so that two adjacent vertices get different colours. Objective: use minimum number of colours. 3-colourable

Optimal Colouring What graphs have chromatic number one? when there are no edges… What graphs have chromatic number 2? A path? A cycle? A triangle? What graphs have chromatic number larger than 2? Definition. min #colors for G is chromatic number,  (G)

Simple Cycles

Complete Graphs

Wheels

Trees Pick any vertex as “root.” if (unique) path from root is even length: odd length: root Can prove more formally using induction (classwork).

Chromatic Number What graphs are 3-colourable? No one knows… How do we estimate the chromatic number of a graph? If there is a complete subgraph of size k, then we need at least k colours? YES Is the converse true? If a graph has no complete subgraph of size 4, then we can colour it using 4 colours? NO

Flight Gates flights need gates, but times overlap. how many gates needed? Flights time

Conflict Graph Needs gate at same time Each vertex represents a flight Each edge represents a conflict

Graph Colouring There is a k-colouring in this graph iff the flights can be scheduled using k gates. => If there is a schedule, the flights scheduled at the same gate have no conflict, and so we can colour the graph by using one colour for flights in each gate. <= If there is a graph colouring, then the vertices using each colour have no conflict, and so we can schedule the flights having the same colour in one gate.

257, , colors 4 gates assign gates: Colouring the Vertices

Better Colouring 3 colors 3 gates

Final Exams subjects conflict if student takes both, so need different time slots. how short an exam period? This is a graph colouring problem. Each vertex is a course, two courses have an edge if there is a conflict. The graph has a k-colouring if and only if the exams can be scheduled in k days.

Frequency Assignment Assign frequencies to radio stations to avoid interference. minimum number of

Register Allocation Given a program, we want to execute it as quick as possible. Calculations can be done most quickly if the values are stored in registers. But registers are very expensive, and there are only a few in a computer. Therefore we need to use the registers efficiently. This is a graph colouring problem.

Register Allocation Each node is a variable. Two variables have a conflict if they cannot be put into the same register. a and b cannot use the same register, because they store different values. c and d cannot use the same register otherwise the value of c is overwritten. Each colour corresponds to a register.

Good News For some special graphs, we know exactly when they are k-colourable. Interval graphs (conflict graphs of intervals): a b c d a b c d For interval graphs, minimum number of colours need = maximum size of a complete subgraph So the “flight gate” problem and the “register allocation” can be solved.

Map Colouring Colour the map using minimum number of colours so that two countries sharing a border are assigned different colours.

Map Colouring Theorem (Apple Haken 1977). Every map is 4-colourable. NO Can we draw a map which needs 5 colours? NO Conjecture (1852) Every map is 4-colourable. “Proof” by Kempe 1879, an error is found 11 years later. (Kempe 1879) Every map is 5-colourable. The proof is computer assisted, some mathematics are still not happy.

A graph is planar if it can be drawn in the plane without crossing edges

Non-Planar Graphs

If a connected planar graph has v vertices, e edges, and f faces, then v –e +f = 2 Euler’s Formula v=5, e=5, f=2 v=6, e=10, f=6v=9, e=8, f=1

Let G* be the dual graph of G Let T be a spanning tree of G Let T* be the graph where there is an edge in the dual graph for each edge in G – T Then T* is a spanning tree for G* (Justify!) n = e T + 1 f = e T* + 1 n + f = e T + e T* + 2 = e + 2

Applications of Euler’s Formula Claim. Every simple planar graph has a vertex of degree at most 5. (Proof by contradiction) (Last time)

Applications of Euler’s Formula Let be the face lengths. Note that because each edge contributes 2 to the sum Contributes one to two faces Contributes two to one face Claim. If G is a simple planar graph with at least 3 nodes, then G has a node of degree at most 5 Claim. If G is a simple planar graph with at least 3 vertices, then e <= 3v-6

Application of Euler’s Formula Claim. If G is a simple planar graph with at least 3 vertices, then e <= 3v-6 Let be the face lengths. Note that Since the graph is simple, each face is of length at least 3. So Since e = v+f-2, this implies

Claim. Every simple planar graph has a vertex of degree at most 5. 6-Colouring Planar Graphs Theorem. Every planar graph is 6-colourable. 1.Proof by induction on the number of vertices. 2.Let v be a vertex of degree at most 5. 3.Remove v from the planar graph G. 4.Note that G-v is still a planar graph. 5.By induction, G-v is 6-colourable. 6.Since v has at most 5 neighbours, 7.v can always choose a colour (from the 6 colours). G-v v

To Remember Graph coloring Mapping real-world problems to graph colouring Planar Graphs Definition Euler’s Theorem Coloring Planar Graphs Proving techniques Dual graph