Presentation is loading. Please wait.

Presentation is loading. Please wait.

A path that uses every vertex of the graph exactly once.

Similar presentations


Presentation on theme: "A path that uses every vertex of the graph exactly once."— Presentation transcript:

1

2 A path that uses every vertex of the graph exactly once.
Hamiltonian Path A path that uses every vertex of the graph exactly once.

3 Hamiltonian Circuit A path that begins and ends at the same vertex and uses every vertex of the graph once.

4 Which graphs have Hamiltonian circuits?

5 Which graphs have Hamiltonian circuits?

6

7

8

9 Sorted Edges Algorithm
Sort the edges from lowest to highest. Add edges to your circuit, one at a time, in order of increasing cost. Skip edges that would cause you to have 3 edges at one single vertex or close the circuit without all the vertices.

10

11 First, sort the edges from lowest to highest

12 Then, add edges one at a time starting from the lowest.

13 Then, add edges one at a time starting from the lowest.

14

15

16

17

18

19

20

21

22

23

24

25 Nearest Neighbor Algorithm
Start at a vertex Travel to a vertex that you haven’t been to yet that has the smallest weight. Continue until you have travelled to all vertices. Travel back to your starting vertex.

26

27

28

29

30

31

32 Compare and contrast Euler circuits and Hamiltonian circuits
Compare and contrast Euler circuits and Hamiltonian circuits. Include an example of both. (At least 2 COMPLETE sentences)


Download ppt "A path that uses every vertex of the graph exactly once."

Similar presentations


Ads by Google