Travelling Salesman Problem Fabio Furini November 10th, 2014 Travelling Salesman Problem 1
Outline 1 Traveling Salesman Problem Separation Travelling Salesman Problem 2
(Asymmetric) Traveling Salesman Problem - ATSP Given n cities and the distance d ij between any pair (i, j) of them, find the shortest tour which goes trough all cities and back to the starting city. Formally, given a directed, complete graph G = (V, A) and a positive distance d ij for each arc a = (i, j) A, find the shortest circuit of G which visits each vertex i V exactly once. We use binary variables x a, a A, taking value 1 when arc a is selected and 0 otherwise. Is that enough? min a A d a x a a δ (i) a δ + (i) x a = 1, x a = 1, x a {0, 1}, i V i V a A Travelling Salesman Problem 3
(Asymmetric) Traveling Salesman Problem - ATSP In order to forbid solutions with subtours, we can impose the following condition: for any subset S of vertices, there must be at least one arc leaving the subset. Equivalently, there can be at most S 1 arcs within the subset. Subtour Eliminations Constrains, in exponential number, read: a A(S) x a S 1, S V, 1 < S < V 1 Travelling Salesman Problem 4
Strong formulations for ILP We have seen that different ILP formulations provide different continuous relaxations, with a strong impact on the practical solvability of the problem. Theorem - For any ILP, it exists an LP formulation whose optimal solution is integer (thus feasible and optimal for the ILP). Unfortunately, this ideal formulation has in general exponentially many inequalities, and it is NP-complete to generate one of these inequalities. However, producing some strong inequalities which improve the LB provided by the continuous relaxation can be very useful for the solution of generic ILPs. Modern ILP solvers are all based on a Branch-and-Cut framework: at each node of the B&B, the solver generates some inequalities (cuts) to improve the LB associated with the node. Travelling Salesman Problem 5
LP Models with too many constraints Solving an ILP with exponentially many constraints (like the TSP model) asks to solve an LP with the same constraints (and then apply B&B). Consider the generic LP: min c x Ax b x 0 where A is too large to be explicitly given to an LP solver. Key observation: not all the constraints are active at an optimal solution. Thus, consider a subset of them which are enough. Travelling Salesman Problem 6
Separation Algorithm Branch and Cut 1 Initialize Ã, b with a subset of the constrains defined by A and b 2 Solve the corresponding LP and get x : min c x Ãx b x 0 3 If x satisfies all the constraints Ax b then it is optimal for the complete problem, otherwise add the violated constrains and go to 2) The crucial point is checking the condition (3) (separation). Theorem - (Grötschel, Lovász, Schrijver, 1981) - If (3) can be solved in polynomial time, the whole procedure converges in polynomial time. Observation If we stop the Separation Algorithm before convergence, we have a lower bound on the optimal solution value of the LP. Travelling Salesman Problem 7
ATSP - Separation of the Subtour Elimination Constraints Given x, we are looking for a violated constraint of the form: x a S 1, S V, 1 < S < V 1 a A(S) That is, given x we want to find, if it exists, a subset S V such that: xa > S 1 a A(S ) 1 < S < V 1 If such a subset does not exist, x is feasible (i.e., there are no subtours in the solution). Travelling Salesman Problem 8
ATSP - Separation of the Subtour Elimination Constraints To find S, we solve an associated ILP, where binary variables y i take value 1 if vertex i is in S ; and binary variables z a take value 1 if arc a is in A(S ) (here x is a parameter). S exists if and only if there is a solution to the system: xa z a > y i 1 a A i V z a=(i,j) = 1 y i = y j = 1, 1 < y i < V 1 i V y i, z a {0, 1}, (i, j) A i V, a A If such a subset does not exist, x is feasible (i.e., there are no subtours in the solution). Travelling Salesman Problem 9
ATSP - Separation of the Subtour Elimination Constraints We can look for the set S, corresponding to the most violated constraint by solving: min i V y i a A x a z a z a=(i,j) = 1 y i = y j = 1, 1 < y i < V 1 i V y i, z a {0, 1}, (i, j) A i V, a A If the optimal solution has value 1 then x satisfies all subtour elimination constrains (i.e., there are no subtours in the solution), otherwise S = {i V : ȳ = 1} defines the most violated constraint by x. Travelling Salesman Problem 10
ATSP - Separation of the Subtour Elimination Constraints The logical condition z a=(i,j) = 1 y i = y j = 1, (i, j) A can be expressed by: z i,j y i, (i, j) A z i,j y j, (i, j) A z i,j y i + y j 1, (i, j) A Travelling Salesman Problem 11
fabio.furini@dauphine.fr Travelling Salesman Problem 12