1 / 20

Math 566 (Fall 2008)

Math 566 (Fall 2008). Heuristics for the Traveling Salesman Problem (TSP). From the chapter by D.S. Johnson and C.H. Papadimitriou in the book “The Traveling Salesman Problem”. A. A. 3. 2. 4. 2. 1. 1. B. C. B. C. D. 3. D. 3. 1. 1. E. 1. E. 1. 2. 4. 2. 2. 2. 2.

heulwen
Download Presentation

Math 566 (Fall 2008)

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. Math 566 (Fall 2008) Heuristics for the Traveling Salesman Problem (TSP) From the chapter by D.S. Johnson and C.H. Papadimitriou in the book “The Traveling Salesman Problem”

  2. A A 3 2 4 2 1 1 B C B C D 3 D 3 1 1 E 1 E 1 2 4 2 2 2 2 4 F G F G 2 3 H 3 H 4 6 3 3 1 1 I I The Traveling Salesman Problem(TSP) - definition Given : A finite set of points(cities) V and the costs(distances) Cij between each pair of points i,j \in V A tour : A circuit which passes exactly once through each point in V TSP : Find a tour of minimum cost (distance)

  3. The tour which we’re going to take TSP (definition) Conclusions NP-hardness of TSP Christofides’ Algorithm Heuristics:performance guarantees Insertion algorithms Approximation schemes Nearest merger algorithm MST algorithm

  4. Two classes of optimization problems : P and NP-hard P - set of problems which could be solved in polynomial time (“easy to solve”) NP-hard - A set of problems not known to be solvable in polynomial time (“hard to solve”) TSP is NP -hard Heuristics - Algorithms not guaranteed to find the optimal solution, but find a solution “reasonably close” to the optimal solution in reasonable amount of time

  5. Performance Guarantees - provable bounds on how far the constructed tour can be from the optimal tour , in the worst case Every tour is at least as good as ( or better than ) the bound Approximation Schemes for TSP A is an ε-approximation scheme for the TSP if, for each instance I of the problem, and for an error bound ε > 0, A gives a tour S of length l(S) such that l(S) ≤ (1+ ε) opt(I) where opt(I) - length of the minimal TSP tour Polynomial ε-approximation scheme : ε-approximation scheme that runs in polynomial time

  6. Result: TSP has no polynomial ε-approximation scheme for anyε > 0 Assumptions ==> costs(distances) are symmetric { Cij = Cji } ==> costs(distances) satisfy the triangle inequality Cik≤ Cij + Cjk for any i,j and k Shortest distance between two points(cities) is a straight line (direct route) Which of the solution methods for the TSP produce polynomial ε-approximation schemes, and for what ε ?

  7. Minimum Spanning Tree algorithm Spanning tree : Set of n-1 edges which join the n veritces(cities) into a single connected component Minimum spanning tree : A spanning tree with the minimum cost Deletion of a single edge from a traveling salesman tour gives a spanning tree opt(TSP) ≥ MST (lower bound)

  8. A A 1 B C D E B C D E 1 2 2 2 F G 2 F G 3 H H 1 I I Upper Bound on the Optimal Traveling Salesman tour Depth-first traversal of the minimum spanning tree minimum spanning tree depth first traversal tour This visits all cities Length of tour = 2(MST) ≤ 2 opt(TSP) Not a Traveling salesman tour as some of the cities might be visited more than once!

  9. 2 1 1 2 4 2 A B 2 E C 6 D 1 F H G I Convert this tour to a traveling salesman tour using shortcuts Instead of going back to the predecessor node, jump to the next as yet unvisited node Skip already visited nodes By triangle inequality, MST tour ≤ depth first traversal tour MST tour ≤ 2 opt(TSP) MST tour MST algorithm is 1-approximate for the TSP

  10. i k T T’ j l Other 1-approximate algorithms Nearest merger algorithm Start with n partial tours (each consisting of a single city) Merge tours successively until a single tour containing all the cities is obtained If there are more than one partial tour, the tours T and T’ to be merged are chosen such that min{Cij : i € T, j € T’} is as small as possible Rule for merging two partial tours T and T’ (i,j) - edge in T (k,l) - edge in T’ min {Cik + Cjl - Cij - Ckl } add (i,k) and (j,l) delete (i,j) and (k,l)

  11. Nearest merger algorithm in action Length of nearest merger tour = opt(TSP) = 18

  12. j T k i Insertion Algorithms step 1) start with a single city (arbitrarily chosen) step 2) If all cities are not included in the current partial tour T, select a city k \not\in T to be inserted into the partial tour step 3)Delete (i,j), and insert (i,k) and (k,j) Cost of inserting k into the tour = Cik + Ckj - Cij

  13. j T k i 1) Nearest Addition algorithm step 1) start with a single city (arbitrarily chosen) step 2) If all cities are not included in the current partial tour T, find cities j and k, j \in T, k \not\in T, such that Ckj is minimized step 3)Delete (i,j), where i is the neighbor(one of the two nodes immediately near j in the tour) and insert (i,k) and (k,j)

  14. Nearest addition algorithm in action Length of nearest addition tour = opt(TSP) = 18

  15. 2) Nearest insertion algorithm Chooses k (city to be inserted) as in the nearest addition algorithm. But k is inserted between i’ and j’ such thatCi’k + Ckj’ - Ci’j’is minimized 3) Cheapest insertion algorithm The new city k to be inserted(in step 2 of the nearest addition algorithm)is chosen such thatCik + Ckj - Cij is minimised and inserted accordingly The proofs for the upper bound for the nearest merger and insertion algorithms are variants of the proof for the MST algorithm All the above algorithms are 1-approximate for the TSP

  16. Christofides’ Algorithm Eulerian graph : Contains a tour which passes through every edge exactly once ( Eulerian tour) All vertices have even degree in an Eulerian graph Idea : start with the MST, find an Eulerian graph containing the MST, convert the Eulerian tour to a TSP tour using shortcuts Step 1) Find a minimum spanning tree(T) for the given set of vertices(cities) Step 2) Take the vertices with odd degree alone Step 3) Find a minimum weighted matching (M) for these vertices Step 4) Add M to T. This gives an Eulerian graph that has minimum length among those that contain T Step 5) Convert the Eulerian tour of the above graph into a traveling salesman tour using shortcuts

  17. 1 B C A D 4 E B E 1 C 1 2 D 2 2 F G 2 F H G 3 H 1 1 I I A A B E B E C C D D F H G F H G I I Minimum matching (M) MST (T) Eulerian Traveling salesman tour Eulerian Tour

  18. Opt. tour M M’ Odd degree vertex Upper Bound provided by Christofides’ algorithm The TSP tour determines two matchings M and M’ by triangle inequality min(M,M’) ≤ (1/2) opt(TSP) length(M) + length(M’) ≤ Opt(TSP) length(MST) ≤ opt(TSP) min weighted matching ≤ (1/2)opt(TSP) Eulerian traveling salesman tour ≤ (3/2) opt(TSP) Christofides’ algorithm is (1/2)-approximate for the TSP

  19. Conclusions TSP is NP- hard No ε-approximation schemes for the general TSP With costs(distances) being symmetric and satisfying the triangle inequality MST algorithm(s) Nearest merger algorithm 2-optimal (upper bound) Insertion algorithms Christofides’ algorithm - (3/2) - optimal (best bound)

  20. A 3 A 2 4 1 1 C D 3 1 1 E B C D B E 1 2 1 2 4 2 2 2 2 F G 4 2 3 H F G 2 3 1 H 4 I 6 3 1 I Minimum spanning tree Optimal tour

More Related