1 / 12

Traveling-Salesman Problem

Traveling-Salesman Problem. Ch. 6. Hamilton Circuits. Euler circuit/path => Visit each edge once and only once Hamilton circuit => Visit each vertex once and only once (except at the end, where it returns to the starting vertex) Hamilton path => Visit each vertex once and only once

tuan
Télécharger la présentation

Traveling-Salesman Problem

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. Traveling-Salesman Problem Ch. 6

  2. Hamilton Circuits • Euler circuit/path => Visit each edge once and only once • Hamilton circuit => Visit each vertex once and only once (except at the end, where it returns to the starting vertex) • Hamilton path => Visit each vertex once and only once • Difference: Edge (Euler)  Vertex (Hamilton)

  3. A B E D C Examples of Hamilton circuits • Has many Hamilton circuits: • A, B, C, D, E, A • A, D, C, E, B, A • Has many Hamilton paths: • A, B, C, D, E • A, D, C, E, B • Has no Euler circuit, no Euler path => 4 vertices of odd degree Graph 1 Hamilton circuits can be shortened into a Hamilton path by removal of the last edge

  4. Examples of Hamilton circuits A B • Has no Hamilton circuits: • What ever the starting point, we are going to have to pass through vertex E more than once to close the circuit. • Has many Hamilton paths: • A, B, E, C, D • C, D, E, A, B • Has Euler circuit => each vertex has even degree E D C Graph 2

  5. Examples of Hamilton circuits F A B • Has many Hamilton circuits: • A, F, B, E, C, G, D, A • A, F, B, C, G, D, E, A • Has many Hamilton paths: • A, F, B, E, C, G, D • A, F, B, C, G, D, E • Has Euler circuit => Every vertex has even degree E D C G Graph 3

  6. Examples of Hamilton circuits G F Has no Hamilton circuits: Has no Hamilton paths: Has no Euler circuit Has no Euler path => more than 2 vertices of odd degree A B E D C I H Graph 4

  7. A B D C Complete graph • A graph with N vertices in which every pair of vertices is joined by exactly one edge is called the complete graph. • Total no. of edges = N(N-1)/2 In K4, each vertex has degree 3 and the number of edges = 4 (3)/2 = 6

  8. The six Hamilton circuits of K4 A B D C Rows => 6 Hamilton circuits Cols=> same Hamilton circuit with different reference points Graph Reference point A Reference point B Reference point C Reference point D

  9. Complete graph • The number of Hamilton circuits in a complete graph can be computed by using factorials. • N! (factorial of N) = 1x 2x3x4x … x(N-1)x N • The complete graph with N vertices has (N-1)! Hamilton circuits. • Example: The complete graph with 5 vertices has 4! = 1x2x3x4 = 24 Hamilton circuits

  10. Factorial Which of the following is true? n! = n! x (n-1)! n! = n! + (n-1)! n! = n x (n-1)! n! = n + (n-1)!

  11. No. of edges No of edges in K10 is • 10 • 10! • 90 • 45

  12. Complete graph In a complete graph with 14 vertices (A through N), the total number of Hamilton circuits (including mirror-image circuits) that start at vertex A is  • 14! • (14x13)/2 • 15! • 13!

More Related