210 likes | 363 Views
Lecture 9 Tours. Sometimes a tree is just too unreliable to be a good network design. Tours are far more reliable yet only have 1 additional link. In graph theory, a tour refers to a possible solution of the traveling salesman problem (TSP). Tours (cont’d). Definition 3.24 page 75
E N D
Lecture 9 Tours • Sometimes a tree is just too unreliable to be a good network design. • Tours are far more reliable yet only have 1 additional link. • In graph theory, a tour refers to a possible solution of the traveling salesman problem (TSP).
Tours (cont’d) • Definition 3.24 page 75 • Given a set of vertices, a tour T is a set of n edges E such that each vertex has degree 2 and the graph is connected.
Tours (cont’d) • The number of tours is [(n-1)!]/2 • Represent the tour as a permutation: • There are n! such permutations, but the reverse permutation also gives the same tour.
Tours With 4 Cities 1 ABCD 2 ABDC 3 ACBD 4 ACDB 5 ADBC 6 ADCB 7 BACD 8 BADC 9 BCAD 10 BCDA 11 BDAC 12 BDCA 13 CABD 14 CADB 15 CBAD 16 CBDA 17 CDAB 18 CDBA 19 DABC 20 DACB 21 DBAC 22 DBCA 23 DCAB 24 DCBA But 1 ABCD, 10 BCDA, 17 CDAB, & 19 DABC are the same tour.
A A A B B B C C C Unique Tours 3!/2 = 3 D D D
Definition 3.25 Given a set of vertices and a distance function for every pair of vertices, the traveling salesman problem is to find the minimum length tour. There are many well-known heuristics that can be used to find tours.
Example C 5 4 3 2 1 0 D E A B 0 1 2 3 4 5
Nearest Neighbor Heuristic Begin at A go to E From E go to B From B go to D From D go to C From C return to A
Nearest Neighbor C 5 4 3 2 1 0 Total Length = 18.87 Not Too Good D E A B 0 1 2 3 4 5
Sweep Example C 5 4 3 2 1 0 Total Length = 17.80 Better D E A B 0 1 2 3 4 5
Use Integer Programming On C 5 4 3 2 1 0 D E A B 0 1 2 3 4 5
TSP1 Example C 5 4 3 2 1 0 Total Length = 16.94 Better D E A B 0 1 2 3 4 5
TSP2 Example C 5 4 3 2 1 0 Subtour Problem! D F E A G B 0 1 2 3 4 5
Subtour Elimination Constraintx[A,B]+x[A,C]+x[A,D]+x[A,E]+x[B,F]+x[C,F]+x[D,F]+x[E,F]+x[B,G]+x[C,G]+x[D,G]+x[E,G]> 1will eliminate these subtours!
TSP3 Example C 5 4 3 2 1 0 Subtour Eliminated D F E A G B 0 1 2 3 4 5