Presentation is loading. Please wait.

Presentation is loading. Please wait.

Eulerizing Graph Ch 5.

Similar presentations


Presentation on theme: "Eulerizing Graph Ch 5."— Presentation transcript:

1 Eulerizing Graph Ch 5

2 Euler Circuit and Euler path
When a graph has no vertices of odd degree, then it has at least one Euler circuit. When a graph has exactly two vertices of odd degree, then it has at least one Euler path. When a graph has more than two vertices of odd degree, then There is no Euler circuit or Euler path There is no possible way that we can travel along all the edges of the graph without having to recross some of them.

3 Euler circuit & Euler path
How we will find a route that covers all the edges of the graph while revisiting the least possible number of edges (deadhead travel)? In real-world problems, The cost is proportional to the amount of travel. Total cost of a route = cost of traveling original edges in the graph + cost of deadhead travel

4 Graph 1: No Euler circuit, No Euler path
B C D E F G H I J K L Original graph Represents vertex of odd degree The graph has total 8 vertices of odd degree => The graph has no Euler circuit or Euler path

5 An eulerized version of the graph
B C D E F G H I J K L By adding a duplicate copy of edges BC, EF, HI, and KL to the previous graph, we get the above graph. The graph has all vertices of even degree => The graph has Euler circuits

6 An eulerized version of the graph
B C D E F G H I J K L 10 11 28 1 2 9 3 12 18 19 20 27 17 8 13 21 4 16 15 14 26 7 5 22 6 25 23 24 The graph has all vertices of even degree The graph has Euler circuits Travel as numbered, you will get one such Euler circuit.

7 Trip along the edges of our original graph
B C D E F G H I J K L 2, 10 11 28 1 9 3 12 18 19 20 27, 17 8 13, 21 4 16 15 14 26 7 5 22 25 6, 24 23 In this trip we are traveling along all of the edges of the graph, but we are retracing four of them: BC, EF, HI, and KL. This is not an Euler circuit for the original graph, it is a circuit describing the most efficient trip – an optimal circuit.

8 Eulerizing a graph We have started with a graph
Modifying it by adding extra edges in such a way that the odd vertices become even vertices. The process of changing a graph by adding additional edges so that odd vertices are eliminated is called eulerizing the graph. Note: The edges that we add must be duplicates of edges that already exist. The idea is to cover the edges of the original graph in the best possible way without creating any new.

9 Graph 2: Another Example
B C D E F G H I J K L M N O P Original graph Represents vertex of odd degree The graph has total 12 vertices of odd degree => The graph has no Euler circuit or Euler path

10 Illegal eularization of the graph
B C D E F G H I J K L M N O P Edges DF and NL were not part of the original graph

11 Inefficient eularization of the graph
B C D E F G H I J K L M N O P

12 Optimal eularization of the graph
B C D E F G H I J K L M N O P

13 Semi- eularization of the graph
We are not required to start and end at the same vertex. We duplicate as many edges as needed to eliminate all odd vertices except for two, which we allow to remain odd. We then use one of the odd vertices as the starting point and we will end up to the other odd vertex.

14 Semi- eularization of the graph
B C D E F G H I J K L M N O P Original graph Represents vertex of odd degree The graph has total 12 vertices of odd degree => The graph has no Euler circuit or Euler path

15 Semi- eularization of the graph
B C D E F G H I J K L M N O P Vertices D and F remain odd All other vertices are now even that were originally odd: B, C, G, H, J, K, L, N, O, and P

16 Semi-eularization of the graph
Semi-eularization tells us that is possible to travel all the edges of the graph by starting at D and ending at F (or vice versa) and duplicating only six of the edges: BC, GH, JK, LM, MN, and OP There are many other ways to accomplish this, but none of them can do with fewer than 6 duplicate edges.


Download ppt "Eulerizing Graph Ch 5."

Similar presentations


Ads by Google