FUNDAMENTAL CONCEPTS Graph Theory Fundamental Concept 1 Graph Theory.
7.1 Introduction to Graph Theory
description
Transcript of 7.1 Introduction to Graph Theory
![Page 1: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/1.jpg)
7.1 Introduction to Graph Theory
MAT 225 Discrete Math
![Page 2: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/2.jpg)
The Seven Bridges of Köninsberg
![Page 3: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/3.jpg)
Graph
vertices
vertex
edges
![Page 4: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/4.jpg)
Definitions
A walk is in a graph is an alternating sequence of vertices and edges which begins and ends with a vertex, and each edge in the sequence is between its endpoints.
A trail is a walk with no repeated edges. A circuit is a trail starting and ending at the same vertex.
A trail (or circuit) that uses every edge in a graph is called Eulerian.
![Page 5: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/5.jpg)
Questions
Does the graph representing the seven bridges of Köninsberg have a Eulerian trail?
In general, how do we determine if a graph has a Eulerian circuit or Eulerian trail?
![Page 6: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/6.jpg)
When does a graph have an Eulerian circuit?
This graph does not have a Eulerian circuit.
This graph does have an Eulerian circuit.
![Page 7: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/7.jpg)
When does a graph have a Eulerian circuit?
This graph does have an Eulerian circuit.
How could I convinceyou that this graphhas an Eulerian circuit?
I can show it to you!
![Page 8: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/8.jpg)
Finding the Eulerian Circuit
![Page 9: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/9.jpg)
Finding the Eulerian Circuit
![Page 10: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/10.jpg)
Finding the Eulerian Circuit
![Page 11: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/11.jpg)
Finding the Eulerian Circuit
![Page 12: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/12.jpg)
Finding the Eulerian Circuit
![Page 13: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/13.jpg)
Finding the Eulerian Circuit
![Page 14: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/14.jpg)
Finding the Eulerian Circuit
![Page 15: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/15.jpg)
Finding the Eulerian Circuit
![Page 16: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/16.jpg)
Finding the Eulerian Circuit
![Page 17: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/17.jpg)
Finding the Eulerian Circuit
![Page 18: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/18.jpg)
Finding the Eulerian Circuit
![Page 19: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/19.jpg)
Finding the Eulerian Circuit
![Page 20: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/20.jpg)
Why does a graph have a Eulerian circuit (or not)?
Why does this graph not have a Eulerian circuit?
Why does this graph have a Eulerian circuit?
![Page 21: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/21.jpg)
Degree
The degree of a vertex is the number of edges that meet at that vertex
![Page 22: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/22.jpg)
Degree
The degree of a vertex is the number of edges that meet at that vertex
![Page 23: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/23.jpg)
Degree
The degree of a vertex is the number of edges that meet at that vertex
For example, in thisgraph, the degree ofC is 4 because thereare four edges (to B,to F, to G, and to H)that meet there
![Page 24: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/24.jpg)
What does degree have to do with Eulerian circuits?
You might be able to tell right away that this graph can’t possibly have an Eulerian circuit
Why not?
![Page 25: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/25.jpg)
What does degree have to do with Eulerian circuits?
If a graph has a vertex with degree 1, the graph cannot have an Eulerian circuit If we start at E, we will
never be able to return to E without retracing
If we don’t start at E, when we go there we cannot leave without retracing.
![Page 26: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/26.jpg)
What does degree have to do with Eulerian circuits?
The problem isn’t just degree 1
This graph also doesn’t have an Eulerian circuit
The problem is that some of the degrees are odd numbers
![Page 27: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/27.jpg)
What does degree have to do with Eulerian circuits?
Let’s focus on vertex D, which has degree 5
Suppose we start elsewhere in the graph
![Page 28: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/28.jpg)
What does degree have to do with Eulerian circuits?
Since we want to cover all edges, we’ll have to visit D eventually
![Page 29: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/29.jpg)
What does degree have to do with Eulerian circuits?
We have several unused edges, so we need to follow one of them and leave D
![Page 30: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/30.jpg)
What does degree have to do with Eulerian circuits?
In fact, every time we visit a vertex, we will “use up” two of the edges that meet at that vertex
![Page 31: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/31.jpg)
What does degree have to do with Eulerian circuits?
We have unused edges, so we need to visit D again at some point…
![Page 32: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/32.jpg)
What does degree have to do with Eulerian circuits?
…and then leave again…
![Page 33: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/33.jpg)
What does degree have to do with Eulerian circuits?
…and then come back again. But now we’re stuck, since we can’t leave D
without retracing, but D wasn’t our starting point.
![Page 34: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/34.jpg)
What does degree have to do with Eulerian circuits?
What if we had started at D?
![Page 35: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/35.jpg)
What does degree have to do with Eulerian circuits?
First, we need to leave D…
![Page 36: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/36.jpg)
What does degree have to do with Eulerian circuits?
… then sometime later, we have to come back to D…
![Page 37: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/37.jpg)
What does degree have to do with Eulerian circuits?
… and then leave again …
![Page 38: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/38.jpg)
What does degree have to do with Eulerian circuits?
… and then come back again …
![Page 39: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/39.jpg)
What does degree have to do with Eulerian circuits?
… and then leave again.
But D was our starting point, and we have run out of edges to use to come back to D!
![Page 40: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/40.jpg)
No Eulerian Circuits With Odd Degrees
If a graph has any vertex with an odd degree, then the graph does not have an Eulerian circuit
The reverse is true as well
![Page 41: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/41.jpg)
Theorem 2 (in section 7.1)
A graph G has a Eulerian circuit if and only if every vertex has an even degree.
![Page 42: 7.1 Introduction to Graph Theory](https://reader036.fdocuments.in/reader036/viewer/2022081507/568161cf550346895dd1c331/html5/thumbnails/42.jpg)
Theorem 5 (in section 7.1)
A graph G has a Eulerian trail if and only if G has exactly two vertices with odd degree. Moreover, the trail must begin and end at these two vertices.