Presentation is loading. Please wait.

Presentation is loading. Please wait.

Euler circuit Theorem 1 If a graph G has an Eulerian path, then it must have exactly two odd vertices. Theorem 2 If a graph G has an Eulerian circuit,

Similar presentations


Presentation on theme: "Euler circuit Theorem 1 If a graph G has an Eulerian path, then it must have exactly two odd vertices. Theorem 2 If a graph G has an Eulerian circuit,"— Presentation transcript:

1 Euler circuit Theorem 1 If a graph G has an Eulerian path, then it must have exactly two odd vertices. Theorem 2 If a graph G has an Eulerian circuit, then all of its vertices must be even vertices.

2 Euler circuit Hierholzer's algorithm: Create a circuit C 1 2 3 4 5 6 1
Delete edges from the graph Find a vertex v  C, v  C1 and create new circuit

3 Hamiltonian Circuit If there is a vertex of degree one in a graph then it is impossible for it to have a Hamiltonian circuit. Dirac’s Theorem- “If G is a simple graph with n vertices where n>==3 such that the degree of every vertex in G is at least n/2, then G has a Hamiltonian circuit.” Ore’s Theorem- “If G is a simple graph with n vertices with n>=3 such that the sum of degrees for every pair of non-adjacent vertices is greater than n, then G has a Hamiltonian circuit.”

4 Hamiltonian Circuit The Brute force algorithm:
1.     List all possible Hamiltonian circuits 2.     Find the length of each circuit by adding the edge weights 3.     Select the circuit with minimal total weight.

5 The Brute force algorithm
Example: Circuit Weight ABCDA = 26 ABDCA = 23 ACBDA = 25 13

6 Nearest Neighbor Algorithm (NNA)
1.     Select a starting point. 2.     Move to the nearest unvisited vertex (the edge with smallest weight). 3.     Repeat until the circuit is complete. 13 ADCBA with a total weight of =26

7 Sorted Edges algorithm
13

8 Sorted Edges algorithm
AD

9 Sorted Edges algorithm
AD AC

10 Sorted Edges algorithm
AD AC BD

11 Sorted Edges algorithm
AD AC BD BC


Download ppt "Euler circuit Theorem 1 If a graph G has an Eulerian path, then it must have exactly two odd vertices. Theorem 2 If a graph G has an Eulerian circuit,"

Similar presentations


Ads by Google