Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.

Similar presentations


Presentation on theme: "© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory."— Presentation transcript:

1 © 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory

2 © 2010 Pearson Prentice Hall. All rights reserved. 2 15.2 Euler Paths and Euler Circuits

3 © 2010 Pearson Prentice Hall. All rights reserved. 3 Objectives 1.Understand the definition of an Euler path. 2.Understand the definition of an Euler circuit. 3.Use Euler’s Theorem. 4.Solve problems using Euler’s Theorem. 5.Use Fleury’s Algorithm to find possible Euler paths and Euler circuits.

4 © 2010 Pearson Prentice Hall. All rights reserved. 4 Euler Paths An Euler path is a path that travels through every edge of a graph once and only once. Each edge must be traveled and no edge can be retraced. Use the numbers consecutively to trace the path with your pencil.

5 © 2010 Pearson Prentice Hall. All rights reserved. 5 Euler Circuits An Euler circuit is a circuit that travels through every edge of a graph once and only once. Like all circuits, an Euler circuit must begin and end at the same vertex. Use the numbers consecutively to trace the path with your pencil.

6 © 2010 Pearson Prentice Hall. All rights reserved. 6 Euler’s Theorem The following statements are true for connected graphs: 1.If a graph has exactly two odd vertices, then it has at least one Euler path, but no Euler circuit. Each Euler path must start at one of the odd vertices and end at the other one. 2.If a graph has no odd vertices (all even vertices), it has at least one Euler circuit (which, by definition, is also an Euler path). An Euler circuit can start and end at any vertex. 3.If a graph has more than two odd vertices, then it has no Euler paths and no Euler circuits.

7 © 2010 Pearson Prentice Hall. All rights reserved. 7 a.Explain why the graph in the figure has at least one Euler path. a.Use trial and error to find one such path. Solution: a. We count the number of edges at each vertex to determine if the vertex is odd or even. We see from the figure on the left that there are exactly two odd vertices, D and E. Example 1: Using Euler’s Theorem

8 © 2010 Pearson Prentice Hall. All rights reserved. 8 a.(cont.) Thus, by the first statement in Euler’s theorem, the graph has at least one Euler path, but no Euler circuit. b.Euler’s Theorem says that a possible Euler path must start at one of the odd vertices and end at the other one. To do this, we use trial and error. Use the numbers consecutively to trace the path with your pencil to verify these results. Example 1: Using Euler’s Theorem

9 © 2010 Pearson Prentice Hall. All rights reserved. 9 Applications of Euler’s Theorem Solving Problems Using Euler’s Theorem We can use Euler’s Theorem to solve problems involving situations modeled by graphs. Example: Recall the graph that models the layout of Königsberg. Count the number of odd vertices; there are four odd vertices. Because the graph has more than two odd vertices, it has no Euler paths. Thus, there is no possible way anyone in Königsberg can walk across all of the bridges without having to recross some of them.

10 © 2010 Pearson Prentice Hall. All rights reserved. 10 Fluery’s Algorithm Finding Possible Euler Paths and Euler Circuits If Euler’s Theorem indicates the existence of an Euler path or Euler circuit, one can be found using this procedure: 1.If the graph has exactly two odd vertices, choose one of the two odd vertices as the starting point. If the graph has no odd vertices, choose any vertex as the starting point. 2.Number the edges as you trace through the graph according to the following rules: After you have traveled over an edge, erase it. Show the erased edge as a dashed line. When faced with a choice of edges to trace, first choose any edge that is not a bridge. [A bridge is an edge whose removal would make the graph disconnected.] Travel over a bridge only if there is no alternative.

11 © 2010 Pearson Prentice Hall. All rights reserved. 11 The figure has at least one Euler circuit. Find one by Fleury’s Algorithm. Example 4: Using Fluery’s Algorithm Notice, the figure has at least one Euler circuit because the graph has no odd vertices. (2 nd statement of Euler’s Theorem)

12 © 2010 Pearson Prentice Hall. All rights reserved. 12 Solution: The graph has no odd vertices, so we can begin at any vertex. We choose vertex A as the starting point and proceed as follows. Example 4: Using Fluery’s Algorithm

13 © 2010 Pearson Prentice Hall. All rights reserved. 13 Thus, the Euler circuit is Example 4: Using Fluery’s Algorithm


Download ppt "© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory."

Similar presentations


Ads by Google