discrete mathematics and its applicationsdase.ecnu.edu.cn/...2020_spring/slides/7_graph_75.pdf ·...

57
Discrete Mathematics and Its Applications Lecture 7: Graphs: Euler, Hamilton and Coloring MING GAO DaSE@ECNU (for course related communications) [email protected] Jun. 25, 2020

Upload: others

Post on 06-Aug-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Discrete Mathematics and Its ApplicationsLecture 7: Graphs: Euler, Hamilton and Coloring

MING GAO

DaSE@ECNU(for course related communications)

[email protected]

Jun. 25, 2020

Page 2: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Outline

1 Euler Paths and Circuits

2 Hamilton Paths and Circuits

3 Planar GraphsEuler’s FormulaHomeomorphic

4 Graph Coloring

5 Take-aways

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 2 / 23

Page 3: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Euler circuit and euler path

The town of Konigsberg, Prussia (now called Kaliningrad and part of theRussian republic), was divided into four sections by the branches of thePregel River.

People wondered whether itwas possible to start at somelocation in the town, travelacross all the bridges oncewithout crossing any bridgetwice, and return to thestarting point.

Definition

An Euler circuit in a graph G is a simple circuit containing everyedge of G . An Euler path in G is a simple path containing everyedge of G .

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 3 / 23

Page 4: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Euler circuit and euler path

The town of Konigsberg, Prussia (now called Kaliningrad and part of theRussian republic), was divided into four sections by the branches of thePregel River.

People wondered whether itwas possible to start at somelocation in the town, travelacross all the bridges oncewithout crossing any bridgetwice, and return to thestarting point.

Definition

An Euler circuit in a graph G is a simple circuit containing everyedge of G . An Euler path in G is a simple path containing everyedge of G .

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 3 / 23

Page 5: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Example

Question: Which of the directed graphs infigure have an Euler circuit? Of those that donot, which have an Euler path?

Solution:The graph H2 has an Euler circuit, for example,a, g , c, b, g , e, d , f , a.Neither H1 nor H3 has an Euler circuit.H3 has an Euler path, namely, c , a, b, c , d , b,but H1 does not.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 4 / 23

Page 6: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Example

Question: Which of the directed graphs infigure have an Euler circuit? Of those that donot, which have an Euler path?

Solution:The graph H2 has an Euler circuit, for example,a, g , c, b, g , e, d , f , a.Neither H1 nor H3 has an Euler circuit.H3 has an Euler path, namely, c , a, b, c , d , b,but H1 does not.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 4 / 23

Page 7: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Example

Question: Which of the directed graphs infigure have an Euler circuit? Of those that donot, which have an Euler path?

Solution:The graph H2 has an Euler circuit, for example,a, g , c, b, g , e, d , f , a.

Neither H1 nor H3 has an Euler circuit.H3 has an Euler path, namely, c , a, b, c , d , b,but H1 does not.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 4 / 23

Page 8: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Example

Question: Which of the directed graphs infigure have an Euler circuit? Of those that donot, which have an Euler path?

Solution:The graph H2 has an Euler circuit, for example,a, g , c, b, g , e, d , f , a.Neither H1 nor H3 has an Euler circuit.

H3 has an Euler path, namely, c , a, b, c , d , b,but H1 does not.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 4 / 23

Page 9: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Example

Question: Which of the directed graphs infigure have an Euler circuit? Of those that donot, which have an Euler path?

Solution:The graph H2 has an Euler circuit, for example,a, g , c, b, g , e, d , f , a.Neither H1 nor H3 has an Euler circuit.H3 has an Euler path, namely, c , a, b, c , d , b,but H1 does not.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 4 / 23

Page 10: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Necessary and sufficient for Euler circuit

Theorem

A connected multigraph with at least two vertices has an Euler circuitif and only if each of its vertices has even degree.

Algorithm to find Euler circuit

Algorithm 1 provides anefficient algorithm forfinding Euler circuits in aconnected multigraph Gwith all vertices of evendegree.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 5 / 23

Page 11: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Necessary and sufficient for Euler circuit

Theorem

A connected multigraph with at least two vertices has an Euler circuitif and only if each of its vertices has even degree.

Algorithm to find Euler circuit

Algorithm 1 provides anefficient algorithm forfinding Euler circuits in aconnected multigraph Gwith all vertices of evendegree.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 5 / 23

Page 12: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Necessary and sufficient for Euler path

Theorem

A connected multigraph has an Euler path but not an Euler circuit ifand only if it has exactly two vertices of odd degree.

Algorithm to find Euler path

Which graphs shown in the figure have an Euler path?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 6 / 23

Page 13: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Euler Paths and Circuits

Necessary and sufficient for Euler path

Theorem

A connected multigraph has an Euler path but not an Euler circuit ifand only if it has exactly two vertices of odd degree.

Algorithm to find Euler path

Which graphs shown in the figure have an Euler path?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 6 / 23

Page 14: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Hamilton Paths and Circuits

Hamilton paths and circuits

Definition

A simple path in a graph G that passes through every vertex exactlyonce is called a Hamilton path, and a simple circuit in a graph Gthat passes through every vertex exactly once is called a Hamiltoncircuit.

Which graphs shown in the figure have an Hamilton path?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 7 / 23

Page 15: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Hamilton Paths and Circuits

Hamilton paths and circuits

Definition

A simple path in a graph G that passes through every vertex exactlyonce is called a Hamilton path, and a simple circuit in a graph Gthat passes through every vertex exactly once is called a Hamiltoncircuit.

Which graphs shown in the figure have an Hamilton path?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 7 / 23

Page 16: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Hamilton Paths and Circuits

Conditions for the existence of Hamilton circuit

Dirac’s theorem

If G is a simple graph with n vertices with n ≥ 3 such that the degreeof every vertex in G is at least n/2, then G has a Hamilton circuit.

Ore’s theorem

If G is a simple graph with n vertices with n ≥ 3 such that deg(u) +deg(v) ≥ n for every pair of nonadjacent vertices u and v in G , thenG has a Hamilton circuit.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 8 / 23

Page 17: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Hamilton Paths and Circuits

Conditions for the existence of Hamilton circuit

Dirac’s theorem

If G is a simple graph with n vertices with n ≥ 3 such that the degreeof every vertex in G is at least n/2, then G has a Hamilton circuit.

Ore’s theorem

If G is a simple graph with n vertices with n ≥ 3 such that deg(u) +deg(v) ≥ n for every pair of nonadjacent vertices u and v in G , thenG has a Hamilton circuit.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 8 / 23

Page 18: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs

Planar graph

Definition

A graph is called planar if it can be drawn in the plane without anyedges crossing (where a crossing of edges is the intersection of thelines or arcs representing them at a point other than their commonendpoint).

Are K4 and Q3 planar graphs?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 9 / 23

Page 19: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs

Planar graph

Definition

A graph is called planar if it can be drawn in the plane without anyedges crossing (where a crossing of edges is the intersection of thelines or arcs representing them at a point other than their commonendpoint).

Are K4 and Q3 planar graphs?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 9 / 23

Page 20: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs

Planar graph

Definition

A graph is called planar if it can be drawn in the plane without anyedges crossing (where a crossing of edges is the intersection of thelines or arcs representing them at a point other than their commonendpoint).

Are K4 and Q3 planar graphs?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 9 / 23

Page 21: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs

Example

Is K3,3 a planar graph?

Solution: In any planar representation of K3,3, v1 andv2 must be connected to both v4 and v5. These fouredges form a closed curve that splits the plane intotwo regions, R1 and R2, as shown in Figure (a). v3 isin either R1 or R2. When v3 is in R2, the inside of theclosed curve, the edges between v3 and v4 andbetween v3 and v5 separate R2 into two subregions,R21 and R22, as shown in Figure (b).Note that there is no way to place v6.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 10 / 23

Page 22: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs

Example

Is K3,3 a planar graph?

Solution: In any planar representation of K3,3, v1 andv2 must be connected to both v4 and v5. These fouredges form a closed curve that splits the plane intotwo regions, R1 and R2, as shown in Figure (a). v3 isin either R1 or R2. When v3 is in R2, the inside of theclosed curve, the edges between v3 and v4 andbetween v3 and v5 separate R2 into two subregions,R21 and R22, as shown in Figure (b).Note that there is no way to place v6.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 10 / 23

Page 23: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Outline

1 Euler Paths and Circuits

2 Hamilton Paths and Circuits

3 Planar GraphsEuler’s FormulaHomeomorphic

4 Graph Coloring

5 Take-aways

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 11 / 23

Page 24: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Euler’s formula

Theorem

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 . Thenr = e − v + 2.

Proof.

Basic step: The relationship r1 = e1 − v1 + 2 is true for G1,because e1 = 1, v1 = 2, and r1 = 1.Induction step: Now assume that rk = ek − vk + 2. Let{ak+1, bk+1} be the edge that is added to Gk to obtain Gk+1.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 12 / 23

Page 25: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Euler’s formula

Theorem

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 . Thenr = e − v + 2.

Proof.

Basic step: The relationship r1 = e1 − v1 + 2 is true for G1,because e1 = 1, v1 = 2, and r1 = 1.

Induction step: Now assume that rk = ek − vk + 2. Let{ak+1, bk+1} be the edge that is added to Gk to obtain Gk+1.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 12 / 23

Page 26: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Euler’s formula

Theorem

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 . Thenr = e − v + 2.

Proof.

Basic step: The relationship r1 = e1 − v1 + 2 is true for G1,because e1 = 1, v1 = 2, and r1 = 1.Induction step: Now assume that rk = ek − vk + 2. Let{ak+1, bk+1} be the edge that is added to Gk to obtain Gk+1.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 12 / 23

Page 27: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Euler’s formula

Theorem

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 . Thenr = e − v + 2.

Proof.

Basic step: The relationship r1 = e1 − v1 + 2 is true for G1,because e1 = 1, v1 = 2, and r1 = 1.Induction step: Now assume that rk = ek − vk + 2. Let{ak+1, bk+1} be the edge that is added to Gk to obtain Gk+1.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 12 / 23

Page 28: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Proof of Euler’s formula

Proof.

Case I: Both ak+1 and bk+1 are already in Gk .

These two verticesmust be on the boundary of a common region R, or else it would beimpossible to add the edge {ak+1, bk+1} to Gk without two edgescrossing (and Gk+1 is planar). The addition of this new edge splitsR into two regions. Consequently, in this case, rk+1 = rk + 1,ek+1 = ek + 1, and vk+1 = vk . Thus, rk+1 = ek+1 − vk+1 + 2.Case II: One of the two vertices of the new edge is not already inGk . Suppose that ak+1 is in Gk but that bk+1 is not. Adding thisnew edge does not produce any new regions, because bk+1 must bein a region that has ak+1 on its boundary. Consequently, rk+1 = rk ,ek+1 = ek + 1, and vk+1 = vk + 1. Thus, rk+1 = ek+1 − vk+1 + 2.We have completed the induction argument. Hence,rn = en − vn + 2 for all n.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 13 / 23

Page 29: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Proof of Euler’s formula

Proof.

Case I: Both ak+1 and bk+1 are already in Gk . These two verticesmust be on the boundary of a common region R, or else it would beimpossible to add the edge {ak+1, bk+1} to Gk without two edgescrossing (and Gk+1 is planar).

The addition of this new edge splitsR into two regions. Consequently, in this case, rk+1 = rk + 1,ek+1 = ek + 1, and vk+1 = vk . Thus, rk+1 = ek+1 − vk+1 + 2.Case II: One of the two vertices of the new edge is not already inGk . Suppose that ak+1 is in Gk but that bk+1 is not. Adding thisnew edge does not produce any new regions, because bk+1 must bein a region that has ak+1 on its boundary. Consequently, rk+1 = rk ,ek+1 = ek + 1, and vk+1 = vk + 1. Thus, rk+1 = ek+1 − vk+1 + 2.We have completed the induction argument. Hence,rn = en − vn + 2 for all n.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 13 / 23

Page 30: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Proof of Euler’s formula

Proof.

Case I: Both ak+1 and bk+1 are already in Gk . These two verticesmust be on the boundary of a common region R, or else it would beimpossible to add the edge {ak+1, bk+1} to Gk without two edgescrossing (and Gk+1 is planar). The addition of this new edge splitsR into two regions. Consequently, in this case, rk+1 = rk + 1,ek+1 = ek + 1, and vk+1 = vk . Thus, rk+1 = ek+1 − vk+1 + 2.

Case II: One of the two vertices of the new edge is not already inGk . Suppose that ak+1 is in Gk but that bk+1 is not. Adding thisnew edge does not produce any new regions, because bk+1 must bein a region that has ak+1 on its boundary. Consequently, rk+1 = rk ,ek+1 = ek + 1, and vk+1 = vk + 1. Thus, rk+1 = ek+1 − vk+1 + 2.We have completed the induction argument. Hence,rn = en − vn + 2 for all n.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 13 / 23

Page 31: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Proof of Euler’s formula

Proof.

Case I: Both ak+1 and bk+1 are already in Gk . These two verticesmust be on the boundary of a common region R, or else it would beimpossible to add the edge {ak+1, bk+1} to Gk without two edgescrossing (and Gk+1 is planar). The addition of this new edge splitsR into two regions. Consequently, in this case, rk+1 = rk + 1,ek+1 = ek + 1, and vk+1 = vk . Thus, rk+1 = ek+1 − vk+1 + 2.Case II: One of the two vertices of the new edge is not already inGk .

Suppose that ak+1 is in Gk but that bk+1 is not. Adding thisnew edge does not produce any new regions, because bk+1 must bein a region that has ak+1 on its boundary. Consequently, rk+1 = rk ,ek+1 = ek + 1, and vk+1 = vk + 1. Thus, rk+1 = ek+1 − vk+1 + 2.We have completed the induction argument. Hence,rn = en − vn + 2 for all n.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 13 / 23

Page 32: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Proof of Euler’s formula

Proof.

Case I: Both ak+1 and bk+1 are already in Gk . These two verticesmust be on the boundary of a common region R, or else it would beimpossible to add the edge {ak+1, bk+1} to Gk without two edgescrossing (and Gk+1 is planar). The addition of this new edge splitsR into two regions. Consequently, in this case, rk+1 = rk + 1,ek+1 = ek + 1, and vk+1 = vk . Thus, rk+1 = ek+1 − vk+1 + 2.Case II: One of the two vertices of the new edge is not already inGk . Suppose that ak+1 is in Gk but that bk+1 is not.

Adding thisnew edge does not produce any new regions, because bk+1 must bein a region that has ak+1 on its boundary. Consequently, rk+1 = rk ,ek+1 = ek + 1, and vk+1 = vk + 1. Thus, rk+1 = ek+1 − vk+1 + 2.We have completed the induction argument. Hence,rn = en − vn + 2 for all n.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 13 / 23

Page 33: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Proof of Euler’s formula

Proof.

Case I: Both ak+1 and bk+1 are already in Gk . These two verticesmust be on the boundary of a common region R, or else it would beimpossible to add the edge {ak+1, bk+1} to Gk without two edgescrossing (and Gk+1 is planar). The addition of this new edge splitsR into two regions. Consequently, in this case, rk+1 = rk + 1,ek+1 = ek + 1, and vk+1 = vk . Thus, rk+1 = ek+1 − vk+1 + 2.Case II: One of the two vertices of the new edge is not already inGk . Suppose that ak+1 is in Gk but that bk+1 is not. Adding thisnew edge does not produce any new regions, because bk+1 must bein a region that has ak+1 on its boundary. Consequently, rk+1 = rk ,ek+1 = ek + 1, and vk+1 = vk + 1. Thus, rk+1 = ek+1 − vk+1 + 2.

We have completed the induction argument. Hence,rn = en − vn + 2 for all n.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 13 / 23

Page 34: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Proof of Euler’s formula

Proof.

Case I: Both ak+1 and bk+1 are already in Gk . These two verticesmust be on the boundary of a common region R, or else it would beimpossible to add the edge {ak+1, bk+1} to Gk without two edgescrossing (and Gk+1 is planar). The addition of this new edge splitsR into two regions. Consequently, in this case, rk+1 = rk + 1,ek+1 = ek + 1, and vk+1 = vk . Thus, rk+1 = ek+1 − vk+1 + 2.Case II: One of the two vertices of the new edge is not already inGk . Suppose that ak+1 is in Gk but that bk+1 is not. Adding thisnew edge does not produce any new regions, because bk+1 must bein a region that has ak+1 on its boundary. Consequently, rk+1 = rk ,ek+1 = ek + 1, and vk+1 = vk + 1. Thus, rk+1 = ek+1 − vk+1 + 2.We have completed the induction argument. Hence,rn = en − vn + 2 for all n.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 13 / 23

Page 35: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary I

If G is a connected planar simple graph with e edges and v vertices,where v ≥ 3, then e ≤ 3v − 6.

Proof.

A connected planar simple graph drawn in the plane divides theplane into regions, say r of them. The degree of each region is atleast three. Note that the sum of the degrees of the regions isexactly twice the number of edges in the graph, because each edgeoccurs on the boundary of a region exactly twice. It follows that

2e =∑

all regions R

deg(R) ≥ 3r .

Using Eulers formula, we obtain e − v + 2 = r ≤ (2/3)e.This shows that e ≤ 3v − 6.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 14 / 23

Page 36: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary I

If G is a connected planar simple graph with e edges and v vertices,where v ≥ 3, then e ≤ 3v − 6.

Proof.

A connected planar simple graph drawn in the plane divides theplane into regions, say r of them. The degree of each region is atleast three.

Note that the sum of the degrees of the regions isexactly twice the number of edges in the graph, because each edgeoccurs on the boundary of a region exactly twice. It follows that

2e =∑

all regions R

deg(R) ≥ 3r .

Using Eulers formula, we obtain e − v + 2 = r ≤ (2/3)e.This shows that e ≤ 3v − 6.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 14 / 23

Page 37: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary I

If G is a connected planar simple graph with e edges and v vertices,where v ≥ 3, then e ≤ 3v − 6.

Proof.

A connected planar simple graph drawn in the plane divides theplane into regions, say r of them. The degree of each region is atleast three. Note that the sum of the degrees of the regions isexactly twice the number of edges in the graph, because each edgeoccurs on the boundary of a region exactly twice. It follows that

2e =∑

all regions R

deg(R) ≥ 3r .

Using Eulers formula, we obtain e − v + 2 = r ≤ (2/3)e.This shows that e ≤ 3v − 6.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 14 / 23

Page 38: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary I

If G is a connected planar simple graph with e edges and v vertices,where v ≥ 3, then e ≤ 3v − 6.

Proof.

A connected planar simple graph drawn in the plane divides theplane into regions, say r of them. The degree of each region is atleast three. Note that the sum of the degrees of the regions isexactly twice the number of edges in the graph, because each edgeoccurs on the boundary of a region exactly twice. It follows that

2e =∑

all regions R

deg(R) ≥ 3r .

Using Eulers formula, we obtain e − v + 2 = r ≤ (2/3)e.This shows that e ≤ 3v − 6.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 14 / 23

Page 39: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary II

If G is a connected planar simple graph, then G has a vertex of degreenot exceeding five.

Proof.

If G has one or two vertices, the result is true. If G has at leastthree vertices, by Corollary 1 we know that e ≤ 3v − 6, so2e ≤ 6v − 12.If the degree of every vertex were at least six, then because2e =

∑v∈V deg(v) (by the handshaking theorem), we would have

2e ≥ 6v . But this contradicts the inequality 2e ≤ 6v − 12.It follows that there must be a vertex with degree no greater thanfive.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 15 / 23

Page 40: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary II

If G is a connected planar simple graph, then G has a vertex of degreenot exceeding five.

Proof.

If G has one or two vertices, the result is true. If G has at leastthree vertices, by Corollary 1 we know that e ≤ 3v − 6, so2e ≤ 6v − 12.

If the degree of every vertex were at least six, then because2e =

∑v∈V deg(v) (by the handshaking theorem), we would have

2e ≥ 6v . But this contradicts the inequality 2e ≤ 6v − 12.It follows that there must be a vertex with degree no greater thanfive.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 15 / 23

Page 41: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary II

If G is a connected planar simple graph, then G has a vertex of degreenot exceeding five.

Proof.

If G has one or two vertices, the result is true. If G has at leastthree vertices, by Corollary 1 we know that e ≤ 3v − 6, so2e ≤ 6v − 12.If the degree of every vertex were at least six, then because2e =

∑v∈V deg(v) (by the handshaking theorem), we would have

2e ≥ 6v . But this contradicts the inequality 2e ≤ 6v − 12.

It follows that there must be a vertex with degree no greater thanfive.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 15 / 23

Page 42: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary II

If G is a connected planar simple graph, then G has a vertex of degreenot exceeding five.

Proof.

If G has one or two vertices, the result is true. If G has at leastthree vertices, by Corollary 1 we know that e ≤ 3v − 6, so2e ≤ 6v − 12.If the degree of every vertex were at least six, then because2e =

∑v∈V deg(v) (by the handshaking theorem), we would have

2e ≥ 6v . But this contradicts the inequality 2e ≤ 6v − 12.It follows that there must be a vertex with degree no greater thanfive.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 15 / 23

Page 43: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary III

If a connected planar simple graph has e edges and v vertices withv ≥ 3 and no circuits of length three, then e ≤ 2v − 4.

Proof.

The proof of this corollary is similar to that of Corollary 1, exceptthat in this case the fact that there are no circuits of length threeimplies that the degree of a region must be at least four.

Example

Question: Determine whether K5 and K3,3 are planar graphs or not.Solution:For K5, we have e = 10 and 3v − 6 = 9. However, the inequalitye ≤ 3v − 6 is not satisfied. Therefore, K5 is not planar.Because K3,3 has no circuits of length three, we have e = 9 and2v − 4 = 8. Since Corollary 3 is not satisfied, K3,3 is nonplanar.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 16 / 23

Page 44: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary III

If a connected planar simple graph has e edges and v vertices withv ≥ 3 and no circuits of length three, then e ≤ 2v − 4.

Proof.

The proof of this corollary is similar to that of Corollary 1, exceptthat in this case the fact that there are no circuits of length threeimplies that the degree of a region must be at least four.

Example

Question: Determine whether K5 and K3,3 are planar graphs or not.

Solution:For K5, we have e = 10 and 3v − 6 = 9. However, the inequalitye ≤ 3v − 6 is not satisfied. Therefore, K5 is not planar.Because K3,3 has no circuits of length three, we have e = 9 and2v − 4 = 8. Since Corollary 3 is not satisfied, K3,3 is nonplanar.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 16 / 23

Page 45: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary III

If a connected planar simple graph has e edges and v vertices withv ≥ 3 and no circuits of length three, then e ≤ 2v − 4.

Proof.

The proof of this corollary is similar to that of Corollary 1, exceptthat in this case the fact that there are no circuits of length threeimplies that the degree of a region must be at least four.

Example

Question: Determine whether K5 and K3,3 are planar graphs or not.Solution:For K5, we have e = 10 and 3v − 6 = 9. However, the inequalitye ≤ 3v − 6 is not satisfied. Therefore, K5 is not planar.

Because K3,3 has no circuits of length three, we have e = 9 and2v − 4 = 8. Since Corollary 3 is not satisfied, K3,3 is nonplanar.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 16 / 23

Page 46: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Euler’s Formula

Corollary III

If a connected planar simple graph has e edges and v vertices withv ≥ 3 and no circuits of length three, then e ≤ 2v − 4.

Proof.

The proof of this corollary is similar to that of Corollary 1, exceptthat in this case the fact that there are no circuits of length threeimplies that the degree of a region must be at least four.

Example

Question: Determine whether K5 and K3,3 are planar graphs or not.Solution:For K5, we have e = 10 and 3v − 6 = 9. However, the inequalitye ≤ 3v − 6 is not satisfied. Therefore, K5 is not planar.Because K3,3 has no circuits of length three, we have e = 9 and2v − 4 = 8. Since Corollary 3 is not satisfied, K3,3 is nonplanar.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 16 / 23

Page 47: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Homeomorphic

Outline

1 Euler Paths and Circuits

2 Hamilton Paths and Circuits

3 Planar GraphsEuler’s FormulaHomeomorphic

4 Graph Coloring

5 Take-aways

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 17 / 23

Page 48: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Homeomorphic

Homeomorphic

Definition

If a graph is planar, so will be any graph obtained by removing anedge {u, v} and adding a new vertex w together with edges {u,w}and {w , v}. Such an operation is called an elementary subdivision.The graphs G1 = (V1,E1) and G2 = (V2,E2) are called homeomor-phic if they can be obtained from the same graph by a sequence ofelementary subdivisions.

Question: Determine whether the graphs G1,G2, and G3 are allhomeomorphic or not.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 18 / 23

Page 49: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Planar Graphs Homeomorphic

Homeomorphic application

Kuratowski’s theorem

A graph is nonplanar if and only if it contains a subgraph homeomor-phic to K3,3 or K5.

Question: Determine whether the graph G shown in the figure isplanar.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 19 / 23

Page 50: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Graph Coloring

Problem formulation

Motivation

Consider theproblem ofdetermining theleast number ofcolors that can beused to color a mapso that adjacentregions never havethe same color.

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 20 / 23

Page 51: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Graph Coloring

Definitions

Coloring

A coloring of a simple graph is the assignment of a color to eachvertex of the graph so that no two adjacent vertices are assigned thesame color.

Chromatic number

The chromatic number of a graph is the least number of colorsneeded for a coloring of this graph. The chromatic number of agraph G is denoted by χ(G ).

Question: What are the chromatic numbers of graphs G and H?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 21 / 23

Page 52: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Graph Coloring

Definitions

Coloring

A coloring of a simple graph is the assignment of a color to eachvertex of the graph so that no two adjacent vertices are assigned thesame color.

Chromatic number

The chromatic number of a graph is the least number of colorsneeded for a coloring of this graph. The chromatic number of agraph G is denoted by χ(G ).

Question: What are the chromatic numbers of graphs G and H?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 21 / 23

Page 53: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Graph Coloring

Definitions

Coloring

A coloring of a simple graph is the assignment of a color to eachvertex of the graph so that no two adjacent vertices are assigned thesame color.

Chromatic number

The chromatic number of a graph is the least number of colorsneeded for a coloring of this graph. The chromatic number of agraph G is denoted by χ(G ).

Question: What are the chromatic numbers of graphs G and H?MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 21 / 23

Page 54: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Graph Coloring

The four color theorem

Theorem

The chromatic number of a planar graph is no greater than four.

Remarks:

Note that the four color theorem applies only to planar graphs.

Nonplanar graphs can have arbitrarily large chromatic numbers.

Question: What are the chromatic numbers of graphs K5, K3,3, C5

and C6?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 22 / 23

Page 55: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Graph Coloring

The four color theorem

Theorem

The chromatic number of a planar graph is no greater than four.Remarks:

Note that the four color theorem applies only to planar graphs.

Nonplanar graphs can have arbitrarily large chromatic numbers.

Question: What are the chromatic numbers of graphs K5, K3,3, C5

and C6?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 22 / 23

Page 56: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Graph Coloring

The four color theorem

Theorem

The chromatic number of a planar graph is no greater than four.Remarks:

Note that the four color theorem applies only to planar graphs.

Nonplanar graphs can have arbitrarily large chromatic numbers.

Question: What are the chromatic numbers of graphs K5, K3,3, C5

and C6?

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 22 / 23

Page 57: Discrete Mathematics and Its Applicationsdase.ecnu.edu.cn/...2020_Spring/slides/7_graph_75.pdf · Outline 1 Euler Paths and Circuits 2 Hamilton Paths and Circuits 3 Planar Graphs

Take-aways

Take-aways

Conclusions

Euler Paths and Circuits

Hamilton Paths and Circuits

Planar Graphs

Euler’s FormulaHomeomorphic

Graph Coloring

MING GAO (DaSE@ECNU) Discrete Mathematics and Its Applications Jun. 25, 2020 23 / 23