1 / 35

§ 6.1-6.2 Hamiltonian Circuits and Paths; Complete Graphs

§ 6.1-6.2 Hamiltonian Circuits and Paths; Complete Graphs. A sample-return mission sent to discover signs of microbial life on Mars is scheduled to be launched in 2014. Once the un-manned rover arrives, it will be dispatched to several sites to collect samples and run experiments.

Download Presentation

§ 6.1-6.2 Hamiltonian Circuits and Paths; Complete Graphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. § 6.1-6.2 Hamiltonian Circuits and Paths; Complete Graphs • A sample-return mission sent to discover signs of microbial life on Mars is scheduled to be launched in 2014. • Once the un-manned rover arrives, it will be dispatched to several sites to collect samples and run experiments. • The rover will then return to its landing site where a return rocket will bring the samples to Earth.

  2. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? A B G E C D F

  3. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? A B G E C D F

  4. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? A B G E C D F

  5. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? A B G E C D F

  6. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? A B G E C D F

  7. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? A B G E C D F

  8. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? A B G E C D F

  9. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? • This is just one of hundreds of possible routes the rover could take--the question we will be concerned with is: Which route is the best or most efficient? A B G E C D F

  10. Suppose that the seven sites marked below have been chosen as the most likely to bear evidence of life. • Assuming that the rover lands at A how might we route it? • This is just one of hundreds of possible routes the rover could take--the question we will be concerned with is: Which route is the best or most efficient? • This is an example of what is called a “Traveling-Salesman Problem” (or TSP). A B G E C D F

  11. Hamilton vs. Euler(Round 1: Fight!) • When dealing with Euler circuits or paths we were concerned with traversing each edge of a graph exactly one time. • A circuit or path in which we visit each vertex once (and only once) is called a Hamiltonian circuit or path.

  12. Example 1: (Exercise 3, pg 248) List all possible Hamiltonian circuits in the following graph: Example 2: (Exercise 5, pg 248) A D E F G A B C D B C (a) Find a Hamiltonian path that begins at A and ends at E. G F E (b) Find a Hamiltonian circuit that starts at A and ends with the pair of vertices E, A. (c) Find a Hamiltonian path that begins at F and ends at G.

  13. Example 1: (Exercise 3, pg 248) List all possible Hamiltonian circuits in the following graph: Example 2: (Exercise 5, pg 248) A D E F G A B C D B C (a) Find a Hamiltonian path that begins at A and ends at E. G F E What about the Hamiltonian circuits that start at B, C, D, etc.? Well, since such a circuit must pass through all of the vertices it doesn’t matter which vertex we start with. (b) Find a Hamiltonian circuit that starts at A and ends with the pair of vertices E, A. (c) Find a Hamiltonian path that begins at F and ends at G.

  14. Hamilton vs. Euler(Round 2: Fight!) • Just because a graph has an Euler circuit or path does not necessarily mean that it has a Hamiltoniancircuit or path.

  15. Hamilton vs. Euler(Round 2: Fight!) • Just because a graph has an Euler circuit or path does not necessarily mean that it has a Hamiltoniancircuit or path. • For instance, the following graph has an Euler circuit:

  16. Hamilton vs. Euler(Round 2: Fight!) • Just because a graph has an Euler circuit or path does not necessarily mean that it has a Hamiltoniancircuit or path. • For instance, the following graph has an Euler circuit: • However, it has no Hamiltonian circuit since you would have to travel through the middle vertex twice to return to your starting point.

  17. Hamilton vs. Euler(Round 3: Fatality) • How can we tell whether or not a graph has a Hamiltonian circuit or path? • Unfortunately, there is no easy criteria like there are for Euler circuits or paths. • There are, however, some graphs such that every sequence of vertices gives us a Hamiltonian circuit.

  18. Example 3: (Exercise 9, pg 249) The following graph has no Hamiltonian circuits or paths--why not? F G B A E D C I H

  19. Complete Graphs • A graph in which every pair of vertices is joined by exactly one edge is called a complete graph. • If a complete graph has N vertices then we will name it KN. • Complete graphs have tons of Hamiltonian circuits; we can write the vertices in any order, repeat the first vertex at the end and we will have a Hamiltonian circuit.

  20. Complete Graphs K3

  21. Complete Graphs K3 K4

  22. Complete Graphs K3 K4 K5

  23. Example 4: • How many edges does K4 have? • What is the degree of each vertex? • How many Hamiltonian circuits does it have? A B C D K4

  24. Example 4: • How many edges does K4 have? Ans.: 6 = 12/2 = [(4)(3)]/2 • What is the degree of each vertex? Ans.: 3 = 4 - 1 • How many Hamiltonian circuits does it have? A B C D K4

  25. Example 4: • How many edges does K4 have? Ans.: 6 = 12/2 = [(4)(3)]/2 • What is the degree of each vertex? Ans.: 3 = 4 - 1 • How many Hamiltonian circuits does it have? A B C D K4

  26. Example 4: • How many edges does K4 have? Ans.: 6 = 12/2 = [(4)(3)]/2 • What is the degree of each vertex? Ans.: 3 = 4 - 1 • How many Hamiltonian circuits does it have? A B C D K4

  27. Example 4: • How many edges does K4 have? Ans.: 6 = 12/2 = [(4)(3)]/2 • What is the degree of each vertex? Ans.: 3 = 4 - 1 • How many Hamiltonian circuits does it have? A B C D K4

  28. Example 4: • How many edges does K4 have? Ans.: 6 = 12/2 = [(4)(3)]/2 • What is the degree of each vertex? Ans.: 3 = 4 - 1 • How many Hamiltonian circuits does it have? A B C D K4

  29. Example 4: • How many edges does K4 have? Ans.: 6 = 12/2 = [(4)(3)]/2 • What is the degree of each vertex? Ans.: 3 = 4 - 1 • How many Hamiltonian circuits does it have? Ans.: 6 = (3)(2)(1) = (4 - 1)(4 - 2)(4 - 3) A B C D K4

  30. If we were to answer the same questions for K5 we would find the following:

  31. If we were to answer the same questions for K5 we would find the following: • Each vertex would have a degree of 5 - 1 = 4.

  32. If we were to answer the same questions for K5 we would find the following: • Each vertex would have a degree of 5 - 1 = 4. • The graph would have [(5)(5 - 1)]/2 = [(5)(4)]/2 = 20 / 2 = 10 edges.

  33. If we were to answer the same questions for K5 we would find the following: • Each vertex would have a degree of 5 - 1 = 4. • The graph would have [(5)(5 - 1)]/2 = [(5)(4)]/2 = 20 / 2 = 10 edges. • There are (5 - 1) (5 - 2) ( 5 - 3) (5 - 4) = (4)(3)(2)(1) = 24distinct Hamiltonian circuits.

  34. Properties of KN • The degree of each vertex in the complete graph with N vertices isN-1. • The total number of edges is N(N-1)/2. • The total number of distinct Hamiltonian circuits is(N - 1)! = (N - 1) x (N - 2) x (N - 3) x . . . x 3 x 2 x 1.

  35. Example 5: (a) If KN has 720 distinct Hamiltonian circuits then what is N?(b) If KN has 55 edges then what is N? Example 6:(a) Given that 8! = 40,320 find 7! And 9!(b) How many distinct Hamiltonian circuits are there in K10?

More Related