from theory to practice in k opt heuristic for travelling
play

From theory to practice in k-OPT heuristic for Travelling Salesman - PowerPoint PPT Presentation

From theory to practice in k-OPT heuristic for Travelling Salesman Problem Lukasz Kowalik la and Kamil (joint work with Marek Cygan, Arkadiusz Soca Zy la) Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP


  1. From theory to practice in k-OPT heuristic for Travelling Salesman Problem � Lukasz Kowalik la and Kamil ˙ (joint work with Marek Cygan, Arkadiusz Soca� Zy� la) � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  2. Traveling Salesman Problem (TSP) Input complete undirected graph G = ( V , E ) and a weight function w : E → N . Problem Find a tour (Hamiltonian cycle) of minimum weight. � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  3. Traveling Salesman Problem (TSP) Input complete undirected graph G = ( V , E ) and a weight function w : E → N . Problem Find a tour (Hamiltonian cycle) of minimum weight. � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  4. The shortest tour catching all San Francisco pokemons (from http://www.math.uwaterloo.ca/tsp/poke/ ) � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  5. Solving TSP ◮ Problem is NP-hard ◮ Best exact algorithm in time 2 n n O (1) . ◮ No approximation possible in general (unless P=NP) ◮ Some nice approximation algorithm under additional assumptions ◮ w is a metric: 1 . 5-approximation (Christofides 1976) ◮ Euclidean metric: a PTAS (Arora 1996) ◮ Graphic metric: 1 . 4-approximation (Sebo, Vygen, 2012) ◮ In practice: people use heuristics. � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  6. k -OPT local search heuristic 1. H 0 := arbitrary Hamiltonian cycle. 2. As long as possible, get a better cycle H i by means of the k -move operation. → → → · · · � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  7. k -move For a tour H , a k -move is defined by a pair ( E − , E + ) such that ◮ | E − | = | E + | = k and ◮ H ′ = H \ E − ∪ E + is a Hamiltonian cycle. Example for k = 3: k -move is improving when w ( H ′ ) < w ( H ). � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  8. k -move For a tour H , a k -move is defined by a pair ( E − , E + ) such that ◮ | E − | = | E + | = k and ◮ H ′ = H \ E − ∪ E + is a Hamiltonian cycle. Example for k = 3: k -move is improving when w ( H ′ ) < w ( H ). � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  9. k -move For a tour H , a k -move is defined by a pair ( E − , E + ) such that ◮ | E − | = | E + | = k and ◮ H ′ = H \ E − ∪ E + is a Hamiltonian cycle. Example for k = 3: k -move is improving when w ( H ′ ) < w ( H ). � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  10. k -move For a tour H , a k -move is defined by a pair ( E − , E + ) such that ◮ | E − | = | E + | = k and ◮ H ′ = H \ E − ∪ E + is a Hamiltonian cycle. Example for k = 3: k -move is improving when w ( H ′ ) < w ( H ). � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  11. k -move For a tour H , a k -move is defined by a pair ( E − , E + ) such that ◮ | E − | = | E + | = k and ◮ H ′ = H \ E − ∪ E + is a Hamiltonian cycle. Example for k = 3: k -move is improving when w ( H ′ ) < w ( H ). � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  12. k -OPT heuristic Practice An implementation of a variant, called Lin-Kernighan heuristic solves 80K-vertex instances optimally (Hellsgaun ’09). Theory Interesting results (lower, upper bounds) on ◮ quality of local optima (e.g. Chandra et al, SICOMP’99), ◮ number of steps needed to find local optimum (e.g., Johnson et al, JCSS’88), ◮ smoothed analysis of 2-opt (e.g. K¨ unnemann and B. Manthey, ICALP’15). � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  13. Today’s question How fast can we perform a single step , i.e., How fast can we find an improving k -move? � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  14. Today’s question k -opt Optimization Input: symmetric function w : V 2 → N , a Hamiltonian cycle H Output: a k -move that maximizes improvement over H . k -opt Detection Output: Is there a k -move improving over H ? Lower bounds ◮ W [1]-hard [Marx ’08] Upper bounds ◮ no n o ( k / log k ) algorithm under ◮ O ( n k ) exhaustive search, ETH [Guo et al. ’13] ◮ no o ( n 2 ) algorithm for k = 2 (folklore), � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  15. Today’s question k -opt Optimization Input: symmetric function w : V 2 → N , a Hamiltonian cycle H Output: a k -move that maximizes improvement over H . k -opt Detection Output: Is there a k -move improving over H ? Lower bounds ◮ W [1]-hard [Marx ’08] Upper bounds ◮ no n o ( k / log k ) algorithm under ◮ O ( n k ) exhaustive search, ETH [Guo et al. ’13] ◮ O ( n ⌊ 2 k / 3 ⌋ +1 ) time, O ( n ) ◮ no o ( n 2 ) algorithm for k = 2 additional space [de Berg, (folklore), Buchin, Jansen, Woeginger ◮ if o ( n 2 . 99 ) algorithm for k = 3, ’16] then APSP in time o ( n 2 . 99 ) [de Berg et al]. � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  16. Part I: Theory (joint work with Marek Cygan and Arkadiusz Soca� la) � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  17. Our results Theorem For every fixed integer k, k -opt Optimization can be solved in time O ( n (1 / 4+ ǫ k ) k ) and space O ( n (1 / 8+ ǫ k ) k ) , where lim k →∞ ǫ k = 0 . � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  18. Our results Theorem For every fixed integer k, k -opt Optimization can be solved in time O ( n (1 / 4+ ǫ k ) k ) and space O ( n (1 / 8+ ǫ k ) k ) , where lim k →∞ ǫ k = 0 . Values of ǫ k (computed by a program) k 3 4 5 6 7 8 de Berg et al. O ( n 3 ) O ( n 3 ) O ( n 4 ) O ( n 5 ) O ( n 5 ) O ( n 6 ) O ( n 3 . 4 ) O ( n 4 ) O ( n 4 . 25 ) O ( n 4 2 3 ) our algorithm � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  19. Our results Theorem For every fixed integer k, k -opt Optimization can be solved in time O ( n (1 / 4+ ǫ k ) k ) and space O ( n (1 / 8+ ǫ k ) k ) , where lim k →∞ ǫ k = 0 . Values of ǫ k (computed by a program) k 3 4 5 6 7 8 de Berg et al. O ( n 3 ) O ( n 3 ) O ( n 4 ) O ( n 5 ) O ( n 5 ) O ( n 6 ) O ( n 3 . 4 ) O ( n 4 ) O ( n 4 . 25 ) O ( n 4 2 3 ) our algorithm Theorem If there is ǫ > 0 such that 4 -opt Detection admits an algorithm in time O ( n 3 − ǫ · polylog( M )) , then there is δ > 0 such that All Pairs Shortest Paths admits an algorithm in time O ( n 3 − δ · polylog( M )) , assuming integer weights from {− M , . . . , M } . � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  20. An equivalent representation of k -move (The most intuitive) representation of k -move A pair ( E − , E + ), where E − ⊆ H , E + ⊆ E ( G ) � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  21. An equivalent representation of k -move (The most intuitive) representation of k -move A pair ( E − , E + ), where E − ⊆ H , E + ⊆ E ( G ) e e 1 2 e 3 e 10 e 9 e 4 e 8 e 5 e e 6 7 � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  22. An equivalent representation of k -move (The most intuitive) representation of k -move A pair ( E − , E + ), where E − ⊆ H , E + ⊆ E ( G ) e e 1 2 e 3 e 10 f (1) = 2 f (2) = 5 e 9 e 4 f (3) = 9 e 8 e 5 e e 6 7 A more useful representation: a pair ( f , ) ◮ an embedding f : { 1 , . . . , k } → { 1 , . . . , n } � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  23. An equivalent representation of k -move (The most intuitive) representation of k -move A pair ( E − , E + ), where E − ⊆ H , E + ⊆ E ( G ) 1 e e 1 2 2 e 3 e 10 f (1) = 2 6 f (2) = 5 M = { 13 , 25 , 46 } e 9 e 4 f (3) = 9 5 3 e 8 e 5 e e 6 7 4 A more useful representation: a pair ( f , M ) ◮ an embedding f : { 1 , . . . , k } → { 1 , . . . , n } ◮ connection pattern: a perfect matching M on { 1 , .., 2 k } � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  24. de Berg et al.’s idea 1 2 f (1) = 2 6 f (2) = 5 M = { 13 , 25 , 46 } f (3) = 9 5 3 4 Observation 1 Now we can specify a connection pattern M before specifying an embedding f . Observation 2 There are only O ((2 k )!) connection patterns, i.e., O (1) for fixed k . � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  25. de Berg et al.’s idea 1 2 6 f (1) = 2 f (2) = 5 M = { 13 , 25 , 46 } f (3) = 9 5 3 4 Idea ◮ For each of the O ((2 k )!) connection patterns M , find the embedding f M which maximizes weight improvement. ◮ Fixing M allows for exploiting the structure of the solution. From now on, assume M is fixed. � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

  26. Key notion: the dependence graph D M V ( D M ) = [ k ] . Vertex i corresponds to the i -th deleted edge from the Hamiltonian cycle e 1 e 2 · · · e n . E ( D M ) = O ∪ I M , where O = { 12 , 23 , . . . , ( k − 1) k } ◮ Edge j ( j + 1) ∈ O represents the property f ( j ) < f ( j + 1). ◮ I M is defined by M . Edge ij ∈ I M means that the cost of embedding i -the edge depends on f ( j ). � Lukasz Kowalik From theory to practice in k-OPT heuristic for TSP

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend