Combinatorial Optimization - Lecture 14 - TSP EPFL

Similar documents
TSP! Find a tour (hamiltonian circuit) that visits! every city exactly once and is of minimal cost.!

Assignment 3b: The traveling salesman problem

CSE 417 Branch & Bound (pt 4) Branch & Bound

MVE165/MMG630, Applied Optimization Lecture 8 Integer linear programming algorithms. Ann-Brith Strömberg

Optimal tour along pubs in the UK

Vertex Cover Approximations

Combinatorial Optimization

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 14: Combinatorial Problems as Linear Programs I. Instructor: Shaddin Dughmi

DM515 Spring 2011 Weekly Note 7

Introduction to Approximation Algorithms

Travelling Salesman Problem. Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij

Algorithms and Experimental Study for the Traveling Salesman Problem of Second Order. Gerold Jäger

Theorem 2.9: nearest addition algorithm

Mathematical Tools for Engineering and Management

Kurt Mehlhorn, MPI für Informatik. Curve and Surface Reconstruction p.1/25

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang

Traveling Salesman Problem. Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

Repetition: Primal Dual for Set Cover

Approximation Algorithms

Simple Graph. General Graph

Mathematical and Algorithmic Foundations Linear Programming and Matchings

An O(log n/ log log n)-approximation Algorithm for the Asymmetric Traveling Salesman Problem

Lecture 14: Linear Programming II

Solutions to Assignment# 4

Methods and Models for Combinatorial Optimization Exact methods for the Traveling Salesman Problem

CMSC 451: Lecture 22 Approximation Algorithms: Vertex Cover and TSP Tuesday, Dec 5, 2017

Last topic: Summary; Heuristics and Approximation Algorithms Topics we studied so far:

Outline. CS38 Introduction to Algorithms. Approximation Algorithms. Optimization Problems. Set Cover. Set cover 5/29/2014. coping with intractibility

Algorithms for Euclidean TSP

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

Notes for Lecture 24

MVE165/MMG631 Linear and integer optimization with applications Lecture 9 Discrete optimization: theory and algorithms

(Refer Slide Time: 01:00)

A combination of clustering algorithms with Ant Colony Optimization for large clustered Euclidean Travelling Salesman Problem

A Steady-State Genetic Algorithm for Traveling Salesman Problem with Pickup and Delivery

12.1 Formulation of General Perfect Matching

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs

Integer Programming. Xi Chen. Department of Management Science and Engineering International Business School Beijing Foreign Studies University

Approximation Algorithms

CSE 417 Network Flows (pt 4) Min Cost Flows

Introduction to Mathematical Programming IE496. Final Review. Dr. Ted Ralphs

Lecture 8: The Traveling Salesman Problem

A Polynomial-Time Deterministic Approach to the Traveling Salesperson Problem

LECTURE 20: SWARM INTELLIGENCE 6 / ANT COLONY OPTIMIZATION 2

Copyright 2000, Kevin Wayne 1

Lecture 7. s.t. e = (u,v) E x u + x v 1 (2) v V x v 0 (3)

CMPSCI611: The Simplex Algorithm Lecture 24

Case Studies: Bin Packing & The Traveling Salesman Problem. TSP: Part II. David S. Johnson AT&T Labs Research

Module 6 NP-Complete Problems and Heuristics

Two approaches. Local Search TSP. Examples of algorithms using local search. Local search heuristics - To do list

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Linear Programming Duality and Algorithms

Algorithm Design and Analysis

Networks: Lecture 2. Outline

Design and Analysis of Algorithms (V)

Euler and Hamilton paths. Jorge A. Cobb The University of Texas at Dallas

The Subtour LP for the Traveling Salesman Problem

Minimum Weight Constrained Forest Problems. Problem Definition

Solving LP in polynomial time

Math 3012 Combinatorial Optimization Worksheet

Dynamic programming. Trivial problems are solved first More complex solutions are composed from the simpler solutions already computed

15-451/651: Design & Analysis of Algorithms November 4, 2015 Lecture #18 last changed: November 22, 2015

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 36

8 Matroid Intersection

Algorithms for Decision Support. Integer linear programming models

Polynomial Time Approximation Schemes for the Euclidean Traveling Salesman Problem

Travelling Salesman Problems

56:272 Integer Programming & Network Flows Final Exam -- December 16, 1997

1. Lecture notes on bipartite matching February 4th,

Finite Math A Chapter 6 Notes Hamilton Circuits

arxiv: v1 [cs.ai] 9 Oct 2013

Module 6 P, NP, NP-Complete Problems and Approximation Algorithms

Algorithms for the travelling salesman problem

Effective Tour Searching for Large TSP Instances. Gerold Jäger

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Linear Programming. Linear Programming. Linear Programming. Example: Profit Maximization (1/4) Iris Hui-Ru Jiang Fall Linear programming

Stanford University CS261: Optimization Handout 1 Luca Trevisan January 4, 2011

College of Computer & Information Science Fall 2007 Northeastern University 14 September 2007

What Can We Do? CS125 Lecture 20 Fall 2014

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0).

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14

Autumn Minimum Spanning Tree Disjoint Union / Find Traveling Salesman Problem

Research Interests Optimization:

6 ROUTING PROBLEMS VEHICLE ROUTING PROBLEMS. Vehicle Routing Problem, VRP:

4 Integer Linear Programming (ILP)

Traveling Salesman Problem (TSP) Input: undirected graph G=(V,E), c: E R + Goal: find a tour (Hamiltonian cycle) of minimum cost

Linear Programming and Integer Linear Programming

Polynomial time approximation algorithms

The Traveling Salesman Problem: State of the Art

Approximation Algorithms

February 19, Integer programming. Outline. Problem formulation. Branch-andbound

Discrete (and Continuous) Optimization WI4 131

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

THEORY OF LINEAR AND INTEGER PROGRAMMING

Practice Final Exam 1

1 The Traveling Salesperson Problem (TSP)

Solving the Traveling Salesman Problem using Reinforced Ant Colony Optimization techniques

The metric travelling salesman problem: pareto-optimal heuristic algorithms

Transcription:

Combinatorial Optimization - Lecture 14 - TSP EPFL 2012

Plan Simple heuristics Alternative approaches Best heuristics: local search Lower bounds from LP Moats

Simple Heuristics Nearest Neighbor (NN) Greedy Nearest Insertion (NI) Farthest Insertion (FI) From ConcordeTSP app

Nearest Neighbor Starting from a random vertex, repeatedly add an edge to its nearest neighbor, unless it creates a non-hamilton cycle. The last edge can be forced to be arbitrarily bad, so cannot be a k-approximation for any k. Average performance: κ = 1.25 Advantage: Salesman makes it up as he goes along.

Greedy Repeatedly add the shortest edge, unless it creates a degree-3 vertex or a non-hamilton cycle Also no k-approximation. Average performance: κ = 1.14

Nearest Insertion Start with a 3-cycle, take the vertex nearest to the cycle, and insert this in the cheapest way.

Nearest Insertion 2-approximation algorithm κ = 1.20

Farthest Insertion Start with a 3-cycle, take the vertex farthest from the cycle, and insert this in the cheapest way. Not known if it is a k-apx... But κ = 1.10!

Comparison k apx κ speed Nearest Neighbor no 1.25 fast Greedy no 1.14 fast Nearest Insertion 2 1.20 fast Farthest Insertion? 1.10 fast Christofides 1.5 1.09 slow The averages are from two survey papers. They are obtained by testing the heuristics many times on standard libraries with examples of different sizes, mostly random Euclidean instances.

Alternative/silly approaches DNA Bacteria Amoeba Bees, pigeons, chimps... Humans Ants (I, for one, welcome our new insect overlords) Genetic Algorithms Neural Networks

Ant Colony Optimization Ants find shortest paths from Nest to Food by leaving pheromone on any path that led them to the Food. At intersections they prefer the branch with more pheromone.

Ant Colony Optimization Something similar can be done for TSP. Each will remember which vertices it has already visited, and not visit those again. When it finishes a cycle, it deposits pheromone in inverse proportion to the length. Reasonably effective, though not as good as the heuristics we saw. But interesting to study for other reasons.

Ant Colony Optimization Something similar can be done for TSP. Each will remember which vertices it has already visited, and not visit those again. When it finishes a cycle, it deposits pheromone in inverse proportion to the length. Reasonably effective, though not as good as the heuristics we saw. But interesting to study for other reasons.

Genetic Algorithms (letting solutions evolve) For instance, the blue and red tours mate by taking an alternating cycle in their union, then taking the symmetric difference with that alternating cycle, and making sure the result is a tour. This is repeated over many generations. Effective; a version like this holds several records for huge examples.

Local Search Starting from any Hamilton cycle, make iterative improvements. 2-opt 3-opt 4-opt, 5-opt,... Lin-Kernighan (variable k-opt) No approximation bounds; may get stuck in local optimum.

2-opt In a 2-opt move we remove 2 non-adjacent edges from the Hamilton cycle, then replace them by the 2 edges that give you another Hamilton cycle.

2-opt

3-opt Remove 3 non-adjacent edges from the Hamilton cycle, then replace them by the cheapest 3 edges that give you another Hamilton cycle.

3-opt

2-Opt and 3-Opt are started on a Nearest Neighbor cycle, then repeated until they can improve the cycle no more. Lin-Kernighan is more complicated, but basically looks for a k-opt that makes the biggest improvement. Chained Lin-Kernighan adds kicks, random k-opts to get away from local minima. Comparison k apx κ Nearest Neighbor no 1.25 Nearest Insertion 2 1.20 Greedy no 1.14 Farthest Insertion? 1.10 Christofides 1.5 1.09 2-Opt no 1.05 3-Opt no 1.03 Lin-Kernighan no 1.02 Chained Lin-Kernighan no 1.01

Integer Program minimize (degrees) (subtours) IP for TSP w e x e with 0 x 1, x Z, e E(G) e δ(v) e δ(s) x e = 2 for v V, x e 2 for S V (G) (S, V (G)). The minimum integral solutions are exactly the minimum Hamilton cycles. But the number of constraints is exponential: There are roughly 2 V (G) of the subtour constraints.

LP relaxation Subtour LP Relaxation minimize w e x e with 0 x 1, x Z, (degrees) (subtours) e E(G) e δ(v) e δ(s) x e = 2 for v V, x e 2 for S V (G) (S, V (G)). The relaxation can nevertheless be solved in polynomial time, but its polytope is not integral, and the solution is usually fractional (but only with 1/2 s). But the solution does give a lower bound for the length of the minimum Hamilton cycle. It is at least 2/3 of the optimum, and typically within 1% (for Euclidean TSP).

Cutting Planes To do better than the subtour bound, more inequalities must be added. Geometrically, this amounts to finding planes that cut off fractional solutions. There is a whole catalog of increasingly complicated structures that can give cutting planes.

Cutting Planes One example of a cutting plane is a comb inequality: e δ(s 1 ) x e + e δ(s 2 ) x e + e δ(s 3 ) x e + e δ(s 4 ) x e 10 It is like a sum of 4 subtour constraints, but stronger because it has 10 instead of 8 on the right. (Each tooth of the comb has 2 edges going out, and the handle has 4.)

Example Here is a fractional solution to the Degree LP Relaxation (with the degree constraints, but no subtour constraints), with edges with x e = 1/2 in red: (It s a map of 42 cities in the US, used as one of the first TSP challenges in the 50s.)

Example Here we introduce subtour constraints until we have a solution of the subtour LP relaxation. The yellow sets are the S. For instance, an island violates a subtour constraint, so adding that constraint to the LP excludes the current solution, and should give a better solution.

Example After adding only 7 subtour constraints we obtained a solution that satisfies all subtour constraints. But it s fractional. To get closer to a real cycle, we find (somehow) four sets in a comb configuration that violate the comb inequality: The handle has 3 outgoing edges, giving 9 total.

Example Adding the last comb inequality and solving the LP gives the following solution. It again has four sets violating a comb inequality (with one oversized handle): On the right is a solution of the resulting LP; it is a cycle, hence it is a minimum Hamilton cycle. So LP can sometimes find a solution, but more often it is used to get a lower bound.

Concorde On the right is a part of the log of the Concorde app as it exactly solves an instance with 500 vertices. It starts by doing Chained Lin-Kernighan 10 times. This gives a cycle of length 59491. Then it looks for lower bounds with LP. From 57446 it goes to 58966, and continues like this until it finds the lower bound 59491, so the cycle found was optimal. (Other times it improves it by LP.) You can see that some of the inequalities it adds are subtours, some are combs, among other things. It took 112 seconds.

Dual of the degree LP The degree LP is the LP relaxation without the subtour constraints; we ll consider its dual program. The dual constraints are r u + r v w uv for uv E(G). We can interpret each r v as the width of a circle around v. Then the constraint says that the circles may not overlap.

Zones If we re lucky, the solution of this LP will look like the first one on the right, where there is a Hamilton cycle that stays within the circles. By the duality theorem, that means it is minimum. But in the second one, we see that this does not always happen.

Zones Here are some examples. These have approximation factors 1.42, 1.23, and 1.26. But there is no guaranteed approximation factor.

Dual of the degree LP with subtour constraints added Now suppose that in the primal degree LP, we add a subtour constraint for some set S V (G). That will change some of the dual constraints. Specifically, those for e = uv with e δ(s) become r u + r v + y S w e. This amounts to putting a moat around the zones of the vertices in S, i.e. a strip of a fixed width placed around those circles.

Moats Here we ve added a subtour constraint for S being three vertices. Here you see that two moats solve the problem we saw earlier.

Moats Here are some lovely examples. These have approximation factors 1.00, 1.003, and 1.006. Sadly, the dual solution only gives the zones and moats, but not the path (in the pictures Concorde computed that separately). So this only gives an upper bound for the minimum Hamilton cycle.