An Introduction to Graph Theory Chapter 11. Chapter 11 An Introduction to Graph Theory 11.1 Definitions and Examples Undirected graph Directed graph isolated.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Chapter 8 Topics in Graph Theory
Chapter 9 Graphs.
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 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,
1 Lecture 5 (part 2) Graphs II Euler and Hamiltonian Path / Circuit Reading: Epp Chp 11.2, 11.3.
1 An Introduction to Graph Theory Chapter Definitions and Examples Undirected graph Directed graph isolated vertex adjacent loop multiple edges.
+ Graph Theory to the Rescue Using graph theory to solve games and problems Dr. Carrie Wright University of Arizona Teacher’s Circle November 17, 2011.
Section 2.1 Euler Cycles Vocabulary CYCLE – a sequence of consecutively linked edges (x 1,x2),(x2,x3),…,(x n-1,x n ) whose starting vertex is the ending.
Applied Combinatorics, 4th Ed. Alan Tucker
Graph Colouring Lecture 20: Nov 25.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
GRAPH Learning Outcomes Students should be able to:
Graphs Chapter 10.
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
More Graphs, Subgraphs and Trees Planarity and Coloring.
Graph Theory Topics to be covered:
مادسیج، شبکه آموزشی پژوهشی دانشجویان ایران
Chapter 6 Graph Theory R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001.
1 CS104 : Discrete Structures Chapter V Graph Theory.
CS 200 Algorithms and Data Structures
Planar Graphs. A graph is called planar if it can be drawn in the plane in such a way that no two edges cross. Example of a planar graph: The clique on.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Planar Graphs Graph Coloring
Many structures involving real world situations can be conveniently represented on a paper by means of a diagram consisting of a set of points together.
Chapter 5 Graphs  the puzzle of the seven bridge in the Königsberg,  on the Pregel.
1 Graphs Theory UNIT IV. 2Contents  Basic terminology,  Multi graphs and weighted graphs  Paths and circuits  Shortest path in weighted graph  Hamiltonian.
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.
An Introduction to Graph Theory
Graph Colouring Lecture 20: Nov 25. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including.
Discrete Mathematical Structures: Theory and Applications
Graph Theory and Applications
Chap. 11 Graph Theory and Applications 1. Directed Graph 2.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Graph Theory Unit: 4.
Chapter 9: Graphs.
COMPSCI 102 Introduction to Discrete Mathematics.
Chapter 7 Planar Graphs 大葉大學 資訊工程系 黃鈴玲  7.2 Planar Embeddings  7.3 Euler’s Formula and Consequences  7.4 Characterization of Planar Graphs.
Graphs Rosen, Chapter 8. NOT ONE OF THESE! One of these!
(CSC 102) Lecture 30 Discrete Structures. Graphs.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
1 Lecture 5 (part 2) Graphs II (a) Circuits; (b) Representation Reading: Epp Chp 11.2, 11.3
Trees.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
An Introduction to Graph Theory
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Planar Graphs Hubert Chan (Chapter 9.7) [O2 Proof Techniques]
Outline 1 Properties of Planar Graphs 5/4/2018.
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
5.9.2 Characterizations of Planar Graphs
Applied Combinatorics, 4th Ed. Alan Tucker
Graph theory Definitions Trees, cycles, directed graphs.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Graph.
Graphs Chapter 13.
Discrete Math II Howon Kim
Applied Combinatorics, 4th Ed. Alan Tucker
N(S) ={vV|uS,{u,v}E(G)}
Gaph Theory Planar Graphs
Discrete Math II Howon Kim
Discrete Math II Howon Kim
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Agenda Review Lecture Content: Shortest Path Algorithm
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Presentation transcript:

An Introduction to Graph Theory Chapter 11

Chapter 11 An Introduction to Graph Theory 11.1 Definitions and Examples Undirected graph Directed graph isolated vertex adjacent loop multiple edges simple graph: an undirected graph without loop or multiple edges degree of a vertex: number of edges connected (indegree, outdegree) G=(V,E)

Chapter 11 An Introduction to Graph Theory 11.1 Definitions and Examples xy path: no vertex can be repeated a-b-c-d-e trail: no edge can be repeat a-b-c-d-e-b-d walk: no restriction a-b-d-a-b-c closed if x=y closed trail: circuit (a-b-c-d-b-e-d-a, one draw without lifting pen) closed path: cycle (a-b-c-d-a) a b c d e length: number of edges in this (path,trail,walk)

Chapter 11 An Introduction to Graph Theory 11.1 Definitions and Examples axb remove any cycle on the repeated vertices Def 11.4 Let G=(V,E) be an undirected graph. We call G connected if there is a path between any two distinct vertices of G. a b c d e a b c d e disconnected with two components

Chapter 11 An Introduction to Graph Theory 11.1 Definitions and Examples Def multigraph of multiplicity 3 multigraphs

Chapter 11 An Introduction to Graph Theory 11.2 Subgraphs, Complements, and Graph Isomorphism a b c d e a b c d e b c d e a c d spanning subgraph V 1 =V induced subgraph include all edges of E in V 1

Chapter 11 An Introduction to Graph Theory 11.2 Subgraphs, Complements, and Graph Isomorphism Def complete graph: K n a b c d e K5K5 Def complement of a graph G a b c d e a b c d e

Chapter 11 An Introduction to Graph Theory 11.2 Subgraphs, Complements, and Graph Isomorphism Theorem: Any graph of six vertices contains a K 3 or K 3. (In a party of six, There exists 3 people who are either mutually acquainted or mutually inacquainted.) 5 is not enough. a b c d e For 6 people, let's look from the point of view of a: From the pigeonhole principle, there are 3 who know a or 3 who does not know a. a b c d a K 3 or K 3.

Chapter 11 An Introduction to Graph Theory 11.2 Subgraphs, Complements, and Graph Isomorphism Ex Instant Insanity, 4 cubes, each of the six faces on a cube is painted with one of the colors, red (R), white (W), blue (B), or Yellow (Y). The object is to place the cubes in a column of four such that all four colors appear on each of the four sides of the column. W R Y W Y B (1) B B W Y R Y (2) R B Y B R W (3) W R B Y W W (4) There are (3)(24)(24)(24)=41472 possibilities to consider. the bottom cube 6 faces with 4 rotations

Chapter 11 An Introduction to Graph Theory 11.2 Subgraphs, Complements, and Graph Isomorphism W R Y W Y B (1) B B W Y R Y (2) R B Y B R W (3) W R B Y W W (4) RW Y B Each edge corresponds to a pair of opposite faces. RW YB RW YB Y B RW B W BY W R YR R Y WB (1)(2)(3)(4) Consider the subgraph of opposite column.

Chapter 11 An Introduction to Graph Theory 11.2 Subgraphs, Complements, and Graph Isomorphism Graph Isomorphism a b c d w x y z

Chapter 11 An Introduction to Graph Theory 11.2 Subgraphs, Complements, and Graph Isomorphism Ex qr w z x y u t v a b c d e f g h i j a-q c-u e-r g-x i-z b-v d-y f-w h-t j-s, isomorphic Ex degree 2 vertices=2 degree 2 vertices=3 Can you think of an algorithm for testing isomorphism?

Chapter 11 An Introduction to Graph Theory 11.3 Vertex Degree: Euler Trails and Circuits degree 1 vertex: pendant vertex Theorem 11.2 Corollary 11.1 The number of vertices of odd degree must be even. Ex a regular graph: each vertex has the same degree Is it possible to have a 4-regular graph with 10 edges? 2|E|=4|V|=20, |V|=5 possible (K 5 ) with 15 edges? 2|E|=4|V|=30 not possible

11.3 Vertex Degree: Euler Trails and Circuits Chapter 11 An Introduction to Graph Theory Ex The Seven Bridge of Konigsberg area a area barea d area c a b c d Find a way to walk about the city so as to cross each bridge exactly once and then return to the starting point.

11.3 Vertex Degree: Euler Trails and Circuits Chapter 11 An Introduction to Graph Theory Def Let G=(V,E) be an undirected graph or multigraph with no isolated vertices. Then G is said to have an Euler circuit if there is a circuit in G that traverses every edge of the graph exactly once. If there is an open trail from a to b in G and this trail traverses each edge in G exactly once, the trail is called an Euler trail. Theorem 11.3 Let G=(V,E) be an undirected graph or multigraph with no isolated vertices. Then G has an Euler circuit if and only if G is connected and every vertex in G has even degree. a b c d All degrees are odd. Hence no Euler circuit for the Konigsberg bridges problem.

11.3 Vertex Degree: Euler Trails and Circuits Chapter 11 An Introduction to Graph Theory proof of Euler circuit theorem: Euler circult connected and even degree v for other vertices sfor starting vertex obvious connected and even degree Euler circuit by induction on the number of edges. e=1 or 2 e=ne=nfind any circuit containing s s

11.3 Vertex Degree: Euler Trails and Circuits Chapter 11 An Introduction to Graph Theory Corollary 11.2 An Euler trail exists in G if and only if G is connected and has exactly two vertices of odd degree. two odd degree vertices a b add an edge Theorem 11.4 A directed Euler circuit exists in G if and only if G is connected and in-degree(v)=out-degree(v) for all vertices v. one in, one out Can you think of an algorithm to construct an Euler circuit?

11.3 Vertex Degree: Euler Trails and Circuits Chapter 11 An Introduction to Graph Theory Ex Complete Cycles (DeBruijn Sequences) If n is a positive integer and N=2 n, a cycle of length N of 0's and 1's is called a complete cycle if all possible subsequences of 0's and 1's of length n appear in this cycle. n=1 01, n=2 0011, n= , n=4 16 complete cycles In general For n=3: vertex set={00,01,10,11} a directed edge from x 1 x 2 to x 2 x 3 a b c d e f g h Find an Euler circuit: abgfcdeh abcdefgh

Chapter 11 An Introduction to Graph Theory 11.4 Planar Graphs Def A graph (or multigraph) G is called planar if G can be drawn in the plane with its edges intersecting only at vertices of G. Such a drawing of G is called an embedding of G in the plane. Ex ,11.15 K 1,K 2,K 3,K 4 are planar, K n for n>4 are nonplanar. K4K4 K5K5 applications: VLSI routing, plumbing,...

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory Def bipartite graph and complete bipartite graphs (K m,n ) K 4,4 K 3,3 is not planar. Therefore, any graph containing K 5 or K 4,4 is nonplanar.

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory Def elementary subdivision (homeomorphic operation) uwuvw G 1 and G 2 are called homeomorphic if they are isomorphic or if they can both be obtained from the same loop-free undirected graph H by a sequence of elementary subdivisions. ab c de ab c de ab c de ab c de Two homeomorphic graphs are simultaneously planar or nonplanar.

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory Theorem 11.5 (Kuratowski's Theorem) A graph is planar if and only if it contains a subgraph that is homeomorphic to either K 5 or K 3,3. Ex Petersen graph a b c d e f g h i j a subgraph homeomorphic to K 3,3 j a d ef b g h c i Petersen graph is nonplanar.

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory K4K4 R1 R2 R3 R4 A planar graph divides the plane into several regions (faces), one of them is the infinite region. Theorem 11.6 (Euler's planar graph theorem) For a connected planar graph or multigraph: v-e+r=2 number of vertices number of edges number of regions v=4,e=6,r=4, v-e+r=2

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory proof: The proof is by induction on e. e=0 or 1 v=1 r=1 e=0 v=1 r=2 e=1 v=2 r=1 e=1 v-e+r=2 Assume that the result is true for any connected planar graph or multigraph with e edges, where Now for G=(V,E) with |E|=k+1 edges, let H=G-(a,b) for a,b in V. Since H has k edges, And, Now consider the situation about regions.

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory case 1: H is connected a(=b) a b a b

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory case 2: H is disconnected a b a b a b H1H1 H2H2 a b H1H1 H2H2

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory degree of a region (deg(R)): the number of edges traversed in a shortest closed walk about the boundary of R. R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 R7R7 R8R8 two different embeddings deg(R 1 )=5,deg(R 2 )=3 deg(R 3 )=3,deg(R 4 )=7 deg(R 5 )=4,deg(R 6 )=3 deg(R 7 )=5,deg(R 8 )=6 abghgfda a b c df gh

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory Only a necessary condition, not sufficient.

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory Ex For K 5, e=10,v=5, 3v-6=9<10=e. Therefore, by Corollary 11.3, K 5 is nonplanar. Ex For K 3,3, each region has at least 4 edges, hence 4r 2e. If K 3,3 is planar, r=e-v+2=9-6+2=5. So 20=4r 2e=18, a contradiction.

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory A dual graph of a planar graph ab c d e f g An edge in G corresponds with an edge in G d. It is possible to have isomorphic graphs with respective duals that are not isomorphic.

11.4 Planar Graphs Chapter 11 An Introduction to Graph Theory Def cut-set: a subset of edges whose removal increase the number of components Ex a b c d e f g h cut-sets: {(a,b),(a,c)}, {(b,d),(c,d)},{(d,f)},... a bridge For planar graphs, cycles in one graph correspond to cut-sets in a dual graphs and vice versa.

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles a path or cycle that contain every vertex Unlike Euler circuit, there is no known necessary and sufficient condition for a graph to be Hamiltonian. Ex ab c d e f g h i There is a Hamilton path, but no Hamilton cycle. an NP-complete problem

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles Ex x yy y y xx x y y start labeling from here 4x's and 6y's, since x and y must interleave in a Hamilton path (or cycle), the graph is not Hamiltonian The method works only for bipartite graphs. The Hamilton path problem is still NP-complete when restricted to bipartite graphs.

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles Ex students sit at a circular table, how many sittings are there such that one has two different neighbors each time? Consider K 17, a Hamilton cycle in K 17 corresponds to a seating arrangements. Each cycle has 17 edges, so we can have (1/17)17(17-1)/2=8 different sittings ,2,3,4,5,6,...,17, ,3,5,2,7,4,...,17,14,16, ,5,7,3,9,2,...,16,12,14,1 14

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles case 1.v v 1 v 2...v m case 2. v 1 v 2...v k v v k+1...v m case 3. v 1 v 2...v m v

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles Ex In a round-robin tournament each player plays every other player exactly once. We want to somehow rank the players according to the result of the tournament. not always possible to have a ranking where a player in a certain position has beaten all of the opponents in later positions a b c but by Theorem 11.7, it is possible to list the players such that each has beaten the next player on the list

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles Proof: First prove that G is connected. If not, xy n 1 vertices n 2 vertices a contradiction

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles Assume a path p m with m verticesv 1 v 2 v 3... v m case 1. either v v 1 or v m v case 2. v 1,v 2,...,v m construct a cycle either v 1 v 2 v 3... v m or v 1 v 2 v 3...v t-1 v t... v m otherwise assume deg(v 1 )=k, then deg(v m )<m-k. deg(v 1 )+deg(v m )<m<n-1, a contradiction Therefore, v can be added to the cycle. v

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles Proof: Assume G does not contain a Hamilton cycle. We add edges to G until we arrive a subgraph H of K n where H has no Hamilton cycle, but for any edge e not in H, H+e has a Hamilton cycle. For vertices a,b wher (a,b) is not an edge of H. H+(a,b) has a Hamilton cycle and (a,b) is part of it.

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles a(=v 1 ) b(=v 2 ) v 3... v n If (b,v i ) is in H, then (a,v i-1 ) cannot be in H. Otherwise, b v i v n a v i-1 v i-2 v 3 is a Hamilton cycle in H.

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles A related problem: the traveling salesman problem a b c d e Find a Hamilton cycle of shortest total distance. 2 graph problem vs. Euclidean plane problem (computational geometry) Certain geometry properties (for example, the triangle inequality) sometimes (but not always) make it simpler. For example, a-b-e-c-d-a with total cost= =12.

Chapter 11 An Introduction to Graph Theory 11.5 Hamilton Paths and Cycles Two famous computational geometry problems. 1. closest pair problem: which two points are nearest 2. convex hull problem the convex hull

Chapter 11 An Introduction to Graph Theory 11.6 Graph Coloring and Chromatic Polynomials Def If G=(V,E) is an undirected graph, a proper coloring of G occurs when we color the vertices of G so that if (a,b) is an edge in G, then a and b are colored with different colors. The minimum number of colors needed to properly color G is called the chromatic number of G and is written  (G). b c d e a 3 colors are needed. a: Red b: Green c: Red d: Blue e: Red In general, it's a very difficult problem (NP-complete).  (K n )=n  (bipartite graph)=2

Chapter 11 An Introduction to Graph Theory 11.6 Graph Coloring and Chromatic Polynomials A related problem: color the map where two regions are colored with different colors if they have same boundaries. G R e B B R Y Four colors are enough for any map. Remain a mystery for a century. Proved with the aid of computer analysis in a b c d f a b c d e f

Chapter 11 An Introduction to Graph Theory 11.6 Graph Coloring and Chromatic Polynomials P(G, ): the chromatic polynomial of G=the number of ways to color G with colors. Ex (a) G=n isolated points, P(G, )= n. (b) G=K n, P(G, )= ( -1)( -2)...( -n+1)= (n) (c) G=a path of n vertices, P(G, )= ( -1) n-1. (d) If G is made up of components G 1, G 2,..., G k, then P(G, )=P(G 1, )P(G 2, )...P(G k, ). Ex e G e G e G' coalescing the vertices

Chapter 11 An Introduction to Graph Theory 11.6 Graph Coloring and Chromatic Polynomials Theorem Decomposition Theorem for Chromatic Polynomials. If G=(V,E) is a connected graph and e is an edge, then P(G e, )=P(G, )+P(G' e, ). e G e G e G' coalescing the vertices a b In a proper coloring of G e : case 1. a and b have the same color: a proper coloring of G' e case 2. a and b have different colors: a proper coloring of G. Hence, P(G e, )=P(G, )+P(G' e, ).

Chapter 11 An Introduction to Graph Theory 11.6 Graph Coloring and Chromatic Polynomials Ex e=- P(G e, )P(G, ) P(G' e, ) P(G, )= ( -1) 3 - ( -1)( -2)= Since P(G,1)=0 while P(G,2)=2>0, we know that  (G)=2. Ex =-=-2 ee P(G, )= (4) -2 (4) = ( -1)( -2) 2 ( -3)  (G)=4