• No results found

Graph theory

N/A
N/A
Protected

Academic year: 2022

Share "Graph theory"

Copied!
62
0
0

Loading.... (view fulltext now)

Full text

(1)

CS 207m 2018: Discrete Structures (Minor)

Graph theory

Basic terminology, Eulerian walks

Lecture 14 Mar 07 2018

(2)

Topic 3: Graph theory

Topics covered in the last three lectures

I Pigeon-Hole Principle and its extensions.

I A glimpse of Ramsey theory

2

(3)

Topic 3: Graph theory

Topics covered in the last three lectures

I Pigeon-Hole Principle and its extensions.

I A glimpse of Ramsey theory

I Ramsey numbers R(k, `): Existence ofregular sub-structures in large enoughgeneral structures.

(4)

Topic 3: Graph theory

Topics covered in the last three lectures

I Pigeon-Hole Principle and its extensions.

I A glimpse of Ramsey theory

I Ramsey numbers R(k, `): Existence ofregular sub-structures in large enoughgeneral structures.

I Structures = Graphs,

2

(5)

Topic 3: Graph theory

Topics covered in the last three lectures

I Pigeon-Hole Principle and its extensions.

I A glimpse of Ramsey theory

I Ramsey numbers R(k, `): Existence ofregular sub-structures in large enoughgeneral structures.

I Structures = Graphs,regular= monochromatic/complete

(6)

Topic 3: Graph theory

Topics covered in the last three lectures

I Pigeon-Hole Principle and its extensions.

I A glimpse of Ramsey theory

I Ramsey numbers R(k, `): Existence ofregular sub-structures in large enoughgeneral structures.

I Structures = Graphs,regular= monochromatic/complete

Next topic

Graphs and their properties!

2

(7)

Topic 3: Graph theory

Textbook Reference

I Introduction to Graph Theory, 2nd Ed., by Douglas West.

I Low cost Indian edition available, published by PHI Learning Private Ltd.

Topics covered in the next two lectures:

I What is a Graph?

I Paths, cycles, walks and trails; connected graphs.

I Eulerian graphs and a characterization in terms of degrees of vertices.

I Bipartite graphs and a characterization in terms of odd length cycles.

Reference: Section 1.1, 1.2 of Chapter 1 fromDouglas West.

(8)

Topic 3: Graph theory

Textbook Reference

I Introduction to Graph Theory, 2nd Ed., by Douglas West.

I Low cost Indian edition available, published by PHI Learning Private Ltd.

Topics covered in the next two lectures:

I What is a Graph?

I Paths, cycles, walks and trails; connected graphs.

I Eulerian graphs and a characterization in terms of degrees of vertices.

I Bipartite graphs and a characterization in terms of odd length cycles.

Reference: Section 1.1, 1.2 of Chapter 1 fromDouglas West.

3

(9)

What are graphs

Recall:

Definition

A simple graphGis a pair (V, E) of a set of vertices/nodesV and edgesE between unordered pairs of vertices called end-points: e=vu means thateis an edge between v and u (u6=v).

I What about loops?

I What about directed edges?

I What about multiple edges? General Definition

A graphGis a triple V, E, R whereV is a set of vertices,E is a set of edges andR⊆E×V ×V is a relation that associates each edge with two vertices called its end-points.

We will consideronly finite graphs (i.e., |V|,|E|are finite) and oftendeal with simple graphs.

(10)

What are graphs

Recall:

Definition

A simple graphGis a pair (V, E) of a set of vertices/nodesV and edgesE between unordered pairs of vertices called end-points: e=vu means thateis an edge between v and u (u6=v).

I What about loops?

I What about directed edges?

I What about multiple edges?

General Definition

A graphGis a triple V, E, R whereV is a set of vertices,E is a set of edges andR⊆E×V ×V is a relation that associates each edge with two vertices called its end-points.

We will consideronly finite graphs (i.e., |V|,|E|are finite) and oftendeal with simple graphs.

4

(11)

What are graphs

Recall:

Definition

A simple graphGis a pair (V, E) of a set of vertices/nodesV and edgesE between unordered pairs of vertices called end-points: e=vu means thateis an edge between v and u (u6=v).

I What about loops?

I What about directed edges?

I What about multiple edges?

General Definition

A graphGis a triple V, E, R whereV is a set of vertices,E is a set of edges andR⊆E×V ×V is a relation that associates each edge with two vertices called its end-points.

We will consideronly finite graphs (i.e., |V|,|E|are finite) and

(12)

K¨ onigsberg Bridge problem

I In 18th century Prussia, the city on river Pregel...

I Question was to find a walk from home, crossing every bridge exactly once and returning home.

I Leonard Euler showed in 1735 that this is impossible.

I Thus, he “gave birth” to the area of graph theory.

5

(13)

K¨ onigsberg Bridge problem

I In 18th century Prussia, the city on river Pregel...

I Question was to find a walk from home, crossing every bridge exactly once and returning home.

I Leonard Euler showed in 1735 that this is impossible.

I Thus, he “gave birth” to the area of graph theory.

(14)

K¨ onigsberg Bridge problem

I In 18th century Prussia, the city on river Pregel...

I Question was to find a walk from home, crossing every bridge exactly once and returning home.

I Leonard Euler showed in 1735 that this is impossible.

I Thus, he “gave birth” to the area of graph theory.

5

(15)

K¨ onigsberg Bridge problem

I Qn: Find a walk from home, which crosses every bridge exactly once and returns home.

I Leonard Euler showed in 1735 that this is impossible. The argument is as follows:

I Each time you enter or leave a vertex, you use an edge.

I So each vertex must be connected to an even no. of vertices.

I Which is not the case here, hence it is impossible.

I Clearly, this is a sufficient condition, but is it necessary?

I If every vertex is connected to an even no. of vertices in a graph, is there such a walk? This is called Eulerian walk.

(16)

K¨ onigsberg Bridge problem

I Qn: Find a walk from home, which crosses every bridge exactly once and returns home.

I Leonard Euler showed in 1735 that this is impossible. The argument is as follows:

I Each time you enter or leave a vertex, you use an edge.

I So each vertex must be connected to an even no. of vertices.

I Which is not the case here, hence it is impossible.

I Clearly, this is a sufficient condition, but is it necessary?

I If every vertex is connected to an even no. of vertices in a graph, is there such a walk? This is called Eulerian walk.

6

(17)

K¨ onigsberg Bridge problem

I Qn: Find a walk from home, which crosses every bridge exactly once and returns home.

I Leonard Euler showed in 1735 that this is impossible. The argument is as follows:

I Each time you enter or leave a vertex, you use an edge.

I So each vertex must be connected to an even no. of vertices.

I Which is not the case here, hence it is impossible.

I Clearly, this is a sufficient condition, but is it necessary?

I If every vertex is connected to an even no. of vertices in a graph, is there such a walk? This is called Eulerian walk.

(18)

K¨ onigsberg Bridge problem

I Qn: Find a walk from home, which crosses every bridge exactly once and returns home.

I Leonard Euler showed in 1735 that this is impossible. The argument is as follows:

I Each time you enter or leave a vertex, you use an edge.

I So each vertex must be connected to an even no. of vertices.

I Which is not the case here, hence it is impossible.

I Clearly, this is a sufficient condition, but is it necessary?

I If every vertex is connected to an even no. of vertices in a graph, is there such a walk? This is called Eulerian walk.

6

(19)

K¨ onigsberg Bridge problem

I Qn: Find a walk from home, which crosses every bridge exactly once and returns home.

I Leonard Euler showed in 1735 that this is impossible. The argument is as follows:

I Each time you enter or leave a vertex, you use an edge.

I So each vertex must be connected to an even no. of vertices.

I Which is not the case here, hence it is impossible.

I Clearly, this is a sufficient condition, but is it necessary?

I If every vertex is connected to an even no. of vertices in a graph, is there such a walk? This is called Eulerian walk.

(20)

K¨ onigsberg Bridge problem

I Qn: Find a walk from home, which crosses every bridge exactly once and returns home.

I Leonard Euler showed in 1735 that this is impossible. The argument is as follows:

I Each time you enter or leave a vertex, you use an edge.

I So each vertex must be connected to an even no. of vertices.

I Which is not the case here, hence it is impossible.

I Clearly, this is a sufficient condition, but is it necessary?

I If every vertex is connected to an even no. of vertices in a graph, is there such a walk?

This is calledEulerian walk.

6

(21)

K¨ onigsberg Bridge problem

I Qn: Find a walk from home, which crosses every bridge exactly once and returns home.

I Leonard Euler showed in 1735 that this is impossible. The argument is as follows:

I Each time you enter or leave a vertex, you use an edge.

I So each vertex must be connected to an even no. of vertices.

I Which is not the case here, hence it is impossible.

I Clearly, this is a sufficient condition, but is it necessary?

I If every vertex is connected to an even no. of vertices in a

(22)

Basic terminology

Thedegree d(v) of a vertexv (in an undirected loopless graph) is the number of edges incident to it, i.e.,|{vw∈E|w∈V}|.

A vertex of degree 0 is called anisolated vertex.

I A walkis a sequence of vertices v1, . . . vk such that

∀i∈ {1, . . . k−1}, (vi, vi+1)∈E. The verticesv1 andvk are called theend-pointsand others are calledinternal vertices.

I A pathis a walk in which no vertex is repeated. Its length is the number of edges in it.

I A walk is called closedif it starts and ends with the same vertex, i.e., its endpoints are the same.

I A closed walk is called a cycleif its internal vertices are all distinct from each other and from the end-point.

A graph is calledconnectedif there is a path (or walk) between any two of its vertices.

7

(23)

Basic terminology

Thedegree d(v) of a vertexv (in an undirected loopless graph) is the number of edges incident to it, i.e.,|{vw∈E|w∈V}|.

A vertex of degree 0 is called anisolated vertex.

I A walkis a sequence of vertices v1, . . . vk such that

∀i∈ {1, . . . k−1}, (vi, vi+1)∈E. The verticesv1 andvk are called theend-pointsand others are calledinternal vertices.

I A pathis a walk in which no vertex is repeated. Its length is the number of edges in it.

I A walk is called closedif it starts and ends with the same vertex, i.e., its endpoints are the same.

I A closed walk is called a cycleif its internal vertices are all distinct from each other and from the end-point.

A graph is calledconnectedif there is a path (or walk) between any two of its vertices.

(24)

Basic terminology

Thedegree d(v) of a vertexv (in an undirected loopless graph) is the number of edges incident to it, i.e.,|{vw∈E|w∈V}|.

A vertex of degree 0 is called anisolated vertex.

I A walkis a sequence of vertices v1, . . . vk such that

∀i∈ {1, . . . k−1}, (vi, vi+1)∈E. The verticesv1 andvk are called theend-pointsand others are calledinternal vertices.

I A pathis a walk in which no vertex is repeated. Its length is the number of edges in it.

I A walk is called closedif it starts and ends with the same vertex, i.e., its endpoints are the same.

I A closed walk is called a cycleif its internal vertices are all distinct from each other and from the end-point.

A graph is calledconnectedif there is a path (or walk) between any two of its vertices.

7

(25)

Basic terminology

Thedegree d(v) of a vertexv (in an undirected loopless graph) is the number of edges incident to it, i.e.,|{vw∈E|w∈V}|.

A vertex of degree 0 is called anisolated vertex.

I A walkis a sequence of vertices v1, . . . vk such that

∀i∈ {1, . . . k−1}, (vi, vi+1)∈E. The verticesv1 andvk are called theend-pointsand others are calledinternal vertices.

I A pathis a walk in which no vertex is repeated. Its length is the number of edges in it.

I A walk is called closedif it starts and ends with the same vertex, i.e., its endpoints are the same.

I A closed walk is called a cycleif its internal vertices are all distinct from each other and from the end-point.

A graph is calledconnectedif there is a path (or walk) between any two of its vertices.

(26)

Basic terminology

Thedegree d(v) of a vertexv (in an undirected loopless graph) is the number of edges incident to it, i.e.,|{vw∈E|w∈V}|.

A vertex of degree 0 is called anisolated vertex.

I A walkis a sequence of vertices v1, . . . vk such that

∀i∈ {1, . . . k−1}, (vi, vi+1)∈E. The verticesv1 andvk are called theend-pointsand others are calledinternal vertices.

I A pathis a walk in which no vertex is repeated. Its length is the number of edges in it.

I A walk is called closedif it starts and ends with the same vertex, i.e., its endpoints are the same.

I A closed walk is called a cycleif its internal vertices are all distinct from each other and from the end-point.

A graph is calledconnectedif there is a path (or walk) between any two of its vertices.

7

(27)

Basic terminology

Thedegree d(v) of a vertexv (in an undirected loopless graph) is the number of edges incident to it, i.e.,|{vw∈E|w∈V}|.

A vertex of degree 0 is called anisolated vertex.

I A walkis a sequence of vertices v1, . . . vk such that

∀i∈ {1, . . . k−1}, (vi, vi+1)∈E. The verticesv1 andvk are called theend-pointsand others are calledinternal vertices.

I A pathis a walk in which no vertex is repeated. Its length is the number of edges in it.

I A walk is called closedif it starts and ends with the same vertex, i.e., its endpoints are the same.

I A closed walk is called a cycleif its internal vertices are all distinct from each other and from the end-point.

A graph is calledconnected if there is a path (or walk) between any two of its vertices.

(28)

Basic terminology: some exercises

v1 v2 v3

v4 v5 v6

v7 v8

1. Give examples each of the following in the above graph:

1.1 All vertices of degree 3 1.2 A walk of length 5 1.3 A path of length 5 1.4 A closed walk of length 6 1.5 A cycle of length 6

2. True or False: (a) If a graph is not connected, it must have an isolated vertex.

(b) A graph is connected iff some vertex is connected to every other vertex.

8

(29)

Basic terminology: some exercises

v1 v2 v3

v4 v5 v6

v7 v8

1. Give examples each of the following in the above graph:

1.1 All vertices of degree 3 1.2 A walk of length 5 1.3 A path of length 5 1.4 A closed walk of length 6 1.5 A cycle of length 6

2. True or False: (a) If a graph is not connected, it must have an isolated vertex.

(b) A graph is connected iff some vertex is connected to every other vertex.

(30)

Eulerian graphs

Definition

A graph is calledEulerian if it has a closed walk that contains all edges, and each edge occurs exactly once. Such a walk is called anEulerian walk.

I If Gis Eulerian, each vertex must have an even degree.

I This is a necessary condition, but is it sufficient? Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof: ( =⇒)

I SupposeG is Eulerian: every vertex has even degree.

I each passage through a vertex uses two edges (in and out).

I at the first vertex first edge is paired with last.

I Any two edges are in the same walk implies graph is connected (unless it has isolated vertices).

9

(31)

Eulerian graphs

Definition

A graph is calledEulerian if it has a closed walk that contains all edges, and each edge occurs exactly once. Such a walk is called anEulerian walk.

I If Gis Eulerian, each vertex must have an even degree.

I This is a necessary condition, but is it sufficient?

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof: ( =⇒)

I SupposeG is Eulerian: every vertex has even degree.

I each passage through a vertex uses two edges (in and out).

I at the first vertex first edge is paired with last.

I Any two edges are in the same walk implies graph is connected (unless it has isolated vertices).

(32)

Eulerian graphs

Definition

A graph is calledEulerian if it has a closed walk that contains all edges, and each edge occurs exactly once. Such a walk is called anEulerian walk.

I If Gis Eulerian, each vertex must have an even degree.

I This is a necessary condition, but is it sufficient?

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof: ( =⇒)

I SupposeG is Eulerian: every vertex has even degree.

I each passage through a vertex uses two edges (in and out).

I at the first vertex first edge is paired with last.

I Any two edges are in the same walk implies graph is connected (unless it has isolated vertices).

9

(33)

Eulerian graphs

Definition

A graph is calledEulerian if it has a closed walk that contains all edges, and each edge occurs exactly once. Such a walk is called anEulerian walk.

I If Gis Eulerian, each vertex must have an even degree.

I This is a necessary condition, but is it sufficient?

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof:

( =⇒)

I SupposeG is Eulerian: every vertex has even degree.

I each passage through a vertex uses two edges (in and out).

I at the first vertex first edge is paired with last.

I Any two edges are in the same walk implies graph is connected (unless it has isolated vertices).

(34)

Eulerian graphs

Definition

A graph is calledEulerian if it has a closed walk that contains all edges, and each edge occurs exactly once. Such a walk is called anEulerian walk.

I If Gis Eulerian, each vertex must have an even degree.

I This is a necessary condition, but is it sufficient?

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof: ( =⇒)

I SupposeG is Eulerian: every vertex has even degree.

I each passage through a vertex uses two edges (in and out).

I at the first vertex first edge is paired with last.

I Any two edges are in the same walk implies graph is connected (unless it has isolated vertices).

9

(35)

Eulerian graphs

Definition

A graph is calledEulerian if it has a closed walk that contains all edges, and each edge occurs exactly once. Such a walk is called anEulerian walk.

I If Gis Eulerian, each vertex must have an even degree.

I This is a necessary condition, but is it sufficient?

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof: ( =⇒)

I SupposeG is Eulerian: every vertex has even degree.

I each passage through a vertex uses two edges (in and out).

I at the first vertex first edge is paired with last.

I Any two edges are in the same walk implies graph is

(36)

Maximal paths

I A path P is said to be maximal inGif it is not contained in any longer path.

I If a graph is finite, no path can extend forever, so maximal (non-extendible) paths exist.

I A maximumpath is a path of maximum length among all paths in the graph.Is every maximal path maximum?

v1 v2

v3 v4

I List all the maximal and maximum paths in the above graph.

10

(37)

Maximal paths

I A path P is said to be maximal inGif it is not contained in any longer path.

I If a graph is finite, no path can extend forever, so maximal (non-extendible) paths exist.

I A maximumpath is a path of maximum length among all paths in the graph.

Is every maximal path maximum?

v1 v2

v3 v4

I List all the maximal and maximum paths in the above graph.

(38)

Maximal paths

I A path P is said to be maximal inGif it is not contained in any longer path.

I If a graph is finite, no path can extend forever, so maximal (non-extendible) paths exist.

I A maximumpath is a path of maximum length among all paths in the graph.Is every maximal path maximum?

v1 v2

v3 v4

I List all the maximal and maximum paths in the above graph.

10

(39)

Maximal paths

I A path P is said to be maximal inGif it is not contained in any longer path.

I If a graph is finite, no path can extend forever, so maximal (non-extendible) paths exist.

I A maximumpath is a path of maximum length among all paths in the graph.Is every maximal path maximum?

v1 v2

v3 v4

I List all the maximal and maximum paths in the above graph.

(40)

Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

11

(41)

Eulerian graphs

A pathP is said to bemaximal inGif it is not contained in any longer path. In a finite graph maximal paths exist.

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

(42)

Eulerian graphs

A pathP is said to bemaximal inGif it is not contained in any longer path. In a finite graph maximal paths exist.

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Proof:

u v

I Let P be a maximal path inG. It starts from some u.

11

(43)

Eulerian graphs

A pathP is said to bemaximal inGif it is not contained in any longer path. In a finite graph maximal paths exist.

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Proof:

u v

I Let P be a maximal path inG. It starts from some u.

I Since P cannot be extended, every nbr of uis already inP.

(44)

Eulerian graphs

A pathP is said to bemaximal inGif it is not contained in any longer path. In a finite graph maximal paths exist.

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Proof:

u v

I Let P be a maximal path inG. It starts from some u.

I Since P cannot be extended, every nbr of uis already inP.

I Asd(u)≥2,∃v inP such thatuv6∈P.

I Thus we have the cycle u . . . vu.

11

(45)

Eulerian graphs

A pathP is said to bemaximal inGif it is not contained in any longer path. In a finite graph maximal paths exist.

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Proof:

u v

I Let P be a maximal path inG. It starts from some u.

I Since P cannot be extended, every nbr of uis already inP.

I Asd(u)≥2,∃v inP such thatuv6∈P.

I Thus we have the cycle u . . . vu.

Is this true ifGwere infinite?

No! ConsiderV =Z,E ={ij :|i−j|= 1}.

2 1 0 1 2 3

· · ·

· · ·

(46)

Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Proof:

u v

I Let P be a maximal path inG. It starts from some u.

I Since P cannot be extended, every nbr of uis already inP.

I Asd(u)≥2,∃v inP such thatuv6∈P.

I Thus we have the cycle u . . . vu.

Is this true ifGwere infinite?

No! ConsiderV =Z,E ={ij :|i−j|= 1}.

2 1 0 1 2 3

· · ·

· · ·

11

(47)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

(48)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof (⇐=): By induction on number of edgesm.

I Base case: m= 1.

12

(49)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof (⇐=): By induction on number of edgesm.

I Induction step: m >1. By LemmaGhas a cycleC.

(50)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof (⇐=): By induction on number of edgesm.

I Induction step: m >1. By LemmaGhas a cycleC.

I Delete all edges in cycleC and (new) isolated vertices.

12

(51)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof (⇐=): By induction on number of edgesm.

I Induction step: m >1. By LemmaGhas a cycleC.

I Delete all edges in cycleC and (new) isolated vertices.

I GetG1, . . . , Gk. EachGi is

I connected

I has< medges.

I all its vertices have even degree (why? )

(52)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof (⇐=): By induction on number of edgesm.

I Induction step: m >1. By LemmaGhas a cycleC.

I Delete all edges in cycleC and (new) isolated vertices.

I GetG1, . . . , Gk. EachGi is

I connected

I has< medges.

I all its vertices have even degree (why? – degree of any vertex was even and removingC, reduces each vertex degree by 0 or 2.)

12

(53)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof (⇐=): By induction on number of edgesm.

I Induction step: m >1. By LemmaGhas a cycleC.

I Delete all edges in cycleC and (new) isolated vertices.

I By indn hyp, eachGi is Eulerian, has a Eulerian walk.

(54)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof (⇐=): By induction on number of edgesm.

I Induction step: m >1. By LemmaGhas a cycleC.

I Delete all edges in cycleC and (new) isolated vertices.

I By indn hyp, eachGi is Eulerian, has a Eulerian walk.

I Combine the cycleC and the Eulerian walk ofG1, . . . , Gk to produce an Eulerian walk ofG(how?).

12

(55)

Proof of theorem on Eulerian graphs

Lemma

If every vertex of a graphG has degree at least 2, then G contains a cycle.

Theorem

A graphGwith no isolated vertices is Eulerian iff it is connected and all its vertices have even degree.

Proof (⇐=): By induction on number of edgesm.

I Induction step: m >1. By LemmaGhas a cycleC.

I Delete all edges in cycleC and (new) isolated vertices.

I By indn hyp, eachGi is Eulerian, has a Eulerian walk.

I Combine the cycleC and the Eulerian walk ofG1, . . . , Gk

to produce an Eulerian walk ofG(how?).

I Traverse along cycleC inGand when someGiis entered for first time, detour along an Eulerian walk ofGi.

I This walk ends at vertex where we started detour.

I When we complete traversal ofC in this way, we have

(56)

Principle of extremality

Principle of extremality

I In proving the lemma we used a “new” important proof technique, called extremality.

I By considering some “extreme” structure, we got some additional information which we used in the proof.

I E.g., Above, since a maximal path could not be extended, we got that every neighbour of an endpoint of P is in P.

I (H.W) Can you show the theorem directly from extremality without using induction?

13

(57)

Principle of extremality

Principle of extremality

I In proving the lemma we used a “new” important proof technique, called extremality.

I By considering some “extreme” structure, we got some additional information which we used in the proof.

I E.g., Above, since a maximal path could not be extended, we got that every neighbour of an endpoint of P is in P.

I (H.W) Can you show the theorem directly from extremality without using induction?

(58)

Principle of extremality

Principle of extremality

I In proving the lemma we used a “new” important proof technique, called extremality.

I By considering some “extreme” structure, we got some additional information which we used in the proof.

I E.g., Above, since a maximal path could not be extended, we got that every neighbour of an endpoint of P is in P.

I (H.W) Can you show the theorem directly from extremality without using induction?

13

(59)

Principle of extremality

Principle of extremality

I In proving the lemma we used a “new” important proof technique, called extremality.

I By considering some “extreme” structure, we got some additional information which we used in the proof.

I E.g., Above, since a maximal path could not be extended, we got that every neighbour of an endpoint of P is in P.

I (H.W) Can you show the theorem directly from extremality without using induction?

(60)

Applications of Eulerian graphs

Corollary

Every graph with all vertices having even degree decomposes into cycles

Proof: (H.W) or read from Douglas West’s book!

An interesting application of Eulerian graphs

If we want to draw a given connected graphGon paper, how many times must we stop and move the pen? No segment should be drawn twice.

14

(61)

Applications of Eulerian graphs

Corollary

Every graph with all vertices having even degree decomposes into cycles

Proof: (H.W) or read from Douglas West’s book!

An interesting application of Eulerian graphs

If we want to draw a given connected graphGon paper, how many times must we stop and move the pen? No segment should be drawn twice.

(62)

Applications of Eulerian graphs

Corollary

Every graph with all vertices having even degree decomposes into cycles

Proof: (H.W) or read from Douglas West’s book!

An interesting application of Eulerian graphs

If we want to draw a given connected graphGon paper, how many times must we stop and move the pen? No segment should be drawn twice.

14

References

Related documents

For a connected graph with |V | &gt; 1 and exactly 2k odd vertices, the minimum number of trails that decompose it is max{k, 1}.... Application of

A cone is a surface generated by rotating a straight line such that it always keep contact with a closed curve called base, and contains a fixed point (apex) which does not lie in

A graph G=&lt;V, E&gt; is said to be a simple graph if it does not contain parallel edges. For the following graph determine the indegree, outdegree and

A graph representing the cumulative frequencies of a grouped frequency distribution against the corresponding lower / upper boundaries of respective class intervals is called

A cograph G is clique vertex irreducible if and only if it can be reduced to a trivial graph by recursively deleting vertices of full degree in each of the

[2] proposed an approach to generate test scenarios from UML sequence diagram, by converting sequence diagram into an directed graph called Sequence Diagram Graph (SDG), where a

It is called as a close loop communication because if local PC is used as controller and remote PC is used as a plant then they send information to each other so that it is form a

If the graph is Open Eulerian then pick any of the two odd degree vertices as start vertex and find Eulerian trail by applying the above mentioned algorithm.. If the graph is