Math 116, Chapter 5 Notes Euler Circuits: Graph Theory: Is the geometry of location. Modern applications of graph theory span practically every area of science and technology-from chemistry, biology and computer science to psychology, sociology, and business management. The theme of chapter #5 is to question how to create "efficient routes" for the delivery of goods and services-such as mail delivery, garbage collection, police patrols, newspaper deliveries and late night pizza deliveries. These types of "management science problems are known as Euler Circuit Problems. Euler Circuit Problems: The exhaustion requirement-the requirement that the route must wind its way through everywhere. Thus in an Euler circuit problem, by definition every single one of the streets, bridges, lanes, or highways, within a defined area must be covered by the route. These types of routes are called exhaustive routes. Unicursal tracing: To trace a drawing without lifting the pencil or retracing any of the lines. Closed unicursal tracing: When we start and end at the same spot. Open unicursal tracing: When we start and end in different spots. Graphs: Is a picture consisting of dots called vertices, and lines called edges. The edges do not have to be straight lines but they always have to connect to vertices. An edge connecting a vertex back with itself is called a loop. A convenient way to describe the vertices and edges of a graph is by using the notation of sets. V A, B, C, D, E, F , the set of vertices. E AB, AD, BB, BC , BE , CD, CD, DE, the set of edges. Isolated vertex: Is a vertex like "f" where there is no connection to it by any edges. Please see page 166 figure 5-5. Multiple edges: Is like in CD and CD in figure 5-5 on page 166. Formal definition of Graph: A graph is a structure that defines pairwise relationships with a set of objects. The objects are the vertices, and the pairwise relationships are the edges. X is related to Y if and only if XY is an edge. Adjacent Vertices: Two vertices are said to be adjacent if there is an edge joining them. For example in figure 5-10 on page 168, B and E are adjacent vertices but C and D are not. Adjacent Edges: Two edges are adjacent if they share a common vertex. AB and AD are adjacent edges where AB and DE are not in figure 5-10 on page 168. Degree of a vertex: The number of edges at that vertex. When there is a loop at a vertex, the loop contributes twice toward the degree. Deg (V) to denote the degree of a vertex V. In fig. 5-10 the degree of the vertices are as follows: deg (A) = 3, deg (B) = 5, deg (C) = 3, deg (D) = 2, deg (E) = 4, deg (F) = 3, deg (G) = 1, deg (H) = 1. Odd and Even vertices: An odd vertex is a vertex with odd degree value. An even vertex is a vertex with even degree value. Path: A path is a sequence of vertices with the property that each vertex in the sequence is adjacent to the next one. Thus a path can also be thought of as describing a sequence of adjacent edges-a trip if you will along the edges of the graph. The key requirement in a path is that an edge can only be a part of a path only once - if you travel on an edge once you can not travel on it again! The number of edges in a path is called the length of the path. The graph in 5-10 on page 168 has many paths here is a few examples. A, B, E, D. Is the path from vertex A to vertex, D. Consisting of edges AB, BE, and ED. The length of this path is 3 because of the 3 edges. A, B, C, A, D, E. Is the path from vertex A to vertex E.? Consisting of edges AB, BC, CA, AD, and DE. This path is of length 4 from A to E. The path visits vertex A twice but no edge is repeated. Circuit: A circuit has the same definition as a path, but has the additional requirement that the trip starts and ends at the same vertex. Example in 5-10, pg 168. A, B, C, A. This is a circuit of length 3. Unlike a path a circuit has no specific starting point. We arbitrarily have to choose a starting point to describe the circuit on paper, but the circuit A, B, C, A can be also written as B, C, A, B or C, A, B, C. pg 168 figure 5-10. B, C, B. Is a circuit of length 2 and is the same circuit as C, B, C. E, E. Yes, loops are circuits of length 1. Connected graphs: A graph is connected if, given any two vertices, there is a path joining them. A graph that is not connected is said to be disconnected. A disconnected graph is made up of separate connected components. In figure 5-6 shows a disconnected graph with two components; figure 5-7 shows a disconnected graph with four components, since each isolated vertex is a separate component. Please see examples 5-6 and 5-7 on page 166. Bridges: Sometimes in a connected graph there is an edge such that if we were to erase it the graph would become disconnected. Not surprisingly, such an edge is called a bridge. The graph in fig 5-10 has 3 bridges-BF, FG, and FH. Euler Paths: An Euler Path is a path that passes through ever edge of a graph. Since it is a path, edges can only be traveled once. Thus, in an Euler path we travel along every edge of the graph once and only once. Note that the disconnected graph cannot have an Euler path. But also a graph that is connected doesn't necessarily mean that we have an Euler path. Euler Circuits: An Euler Circuit is a circuit that passes through every edge of a graph. Essentially, an Euler circuit is a closed unicursal tracing of the edges of the graph. For example in figure 5-11, pg. 169, L, A, R, D, A, R, D, L, A, L. The Seven Bridges of Konigsberg: Is it possible to cross each of the seven bridges once and only once? See graph model on page 170, figure 5-12 C. On page 173 example 5.14 There is no possible way anyone can calk across all of the bridges without having to recross some of them. Euler's Theorems: Euler's Sum of Degrees Theorem: 1. The sum of the degrees of all the vertices of a graph equals twice the number of edges (and therefore is an even number). 2. A graph always has an even number of odd vertices. Euler's Path Theorem: 1. If a graph is connected and has exactly two odd vertices, then it has an Euler path (at least one usually more). Any such path must start at one of the odd vertices and at the other one. 2. If a graph has more than two odd vertices, then it cannot have an Euler path. Euler Circuit Theorem: 1. If a graph is connected and every vertex is even, then it has an Euler Circuit (at least one maybe more). 2. If a graph has any odd vertices, then it does not have an Euler circuit. Note: If a graph isn't connected then it does not have an Euler Circuit! Table 5-1 on page 174... Is a summary of Euler's three theorems? Euler's Theorems help us answer the existence question for Euler circuits/paths; does a particular graph have an Euler circuit, path or neither? If it does have an Euler circuit or path what do we use to find it? 1. For small graphs Trial and Error. 2. For larger graphs Fleury's Theorem. Fleury's Theorem: 1. Preliminaries: Make sure that the graph is connected and either has no odd vertices (circuit) or has two odd vertices (path). 2. Start: Choose a starting vertex. In case with a circuit it doesn't matter where you begin. In the case of a path you must begin at one of the odd vertices. 3. Intermediate steps: At each step, if you have a choice, don't choose a bridge of the yetto-be-traveled part of the graph. However, if you have only one choice, take it. 4. End: When you can't travel any more, the circuit (path) is complete. In the case of the circuit you should be back at the beginning vertex. In the case of the path you should end up at the other odd vertex. Eulerizing Graphs: We are now going to see how the theory developed in the proceeding sections will help us design optimal exhaustive routes for graphs with many (more than two) odd vertices. The key idea is that we can turn odd vertices into even vertices by adding "duplicate" edges in strategic places. This process is called Eulerizing the graph. See pg. 180 example 5.18 a 4 by 4 street grid. An Optimal Eulerization of the original graph is when the fewest duplicated edges are added to all the odd vertices to create an Euler Circuit. A Semi-Eulerization of the original graph would require leaving two odd vertices and changing all the other odd vertices to even ones using the fewest "duplicated edges".