traveling salesman problem
play

Traveling Salesman Problem Math 482, Lecture 35 Misha Lavrov May - PowerPoint PPT Presentation

The problem Subtour elimination constraints Timing constraints Traveling Salesman Problem Math 482, Lecture 35 Misha Lavrov May 1, 2020 The problem Subtour elimination constraints Timing constraints The traveling salesman problem We are


  1. The problem Subtour elimination constraints Timing constraints Traveling Salesman Problem Math 482, Lecture 35 Misha Lavrov May 1, 2020

  2. The problem Subtour elimination constraints Timing constraints The traveling salesman problem We are given: 1 Cities numbered 1 , 2 , . . . , n (vertices).

  3. The problem Subtour elimination constraints Timing constraints The traveling salesman problem We are given: 1 Cities numbered 1 , 2 , . . . , n (vertices). 2 A cost c ij to travel from city i to city j .

  4. The problem Subtour elimination constraints Timing constraints The traveling salesman problem We are given: 1 Cities numbered 1 , 2 , . . . , n (vertices). 2 A cost c ij to travel from city i to city j . Goal: find a tour of all n cities, starting and ending at city 1, with the cheapest cost.

  5. The problem Subtour elimination constraints Timing constraints The traveling salesman problem We are given: 1 Cities numbered 1 , 2 , . . . , n (vertices). 2 A cost c ij to travel from city i to city j . Goal: find a tour of all n cities, starting and ending at city 1, with the cheapest cost. Common assumptions: 1 c ij = c ji : costs are symmetric and direction of the tour doesn’t matter.

  6. The problem Subtour elimination constraints Timing constraints The traveling salesman problem We are given: 1 Cities numbered 1 , 2 , . . . , n (vertices). 2 A cost c ij to travel from city i to city j . Goal: find a tour of all n cities, starting and ending at city 1, with the cheapest cost. Common assumptions: 1 c ij = c ji : costs are symmetric and direction of the tour doesn’t matter. 2 c ij + c jk ≥ c ik : triangle inequality.

  7. The problem Subtour elimination constraints Timing constraints The traveling salesman problem We are given: 1 Cities numbered 1 , 2 , . . . , n (vertices). 2 A cost c ij to travel from city i to city j . Goal: find a tour of all n cities, starting and ending at city 1, with the cheapest cost. Common assumptions: 1 c ij = c ji : costs are symmetric and direction of the tour doesn’t matter. 2 c ij + c jk ≥ c ik : triangle inequality. Important special case: cities are points in the plane, and c ij is the distance from i to j .

  8. The problem Subtour elimination constraints Timing constraints An incomplete ILP formulation: “local constraints” Describe a tour by variables x ij ∈ { 0 , 1 } : x ij = 1 if tour goes from i to j , x ij = 0 otherwise.

  9. The problem Subtour elimination constraints Timing constraints An incomplete ILP formulation: “local constraints” Describe a tour by variables x ij ∈ { 0 , 1 } : x ij = 1 if tour goes from i to j , x ij = 0 otherwise. Minimize the total cost of the tour: n n � � minimize c ij x ij . i =1 j =1

  10. The problem Subtour elimination constraints Timing constraints An incomplete ILP formulation: “local constraints” Describe a tour by variables x ij ∈ { 0 , 1 } : x ij = 1 if tour goes from i to j , x ij = 0 otherwise. Minimize the total cost of the tour: n n � � minimize c ij x ij . i =1 j =1 Enter each city exactly once: � x ij = 1 for each j = 1 , 2 , . . . , n . 1 ≤ i ≤ n i � = j

  11. The problem Subtour elimination constraints Timing constraints An incomplete ILP formulation: “local constraints” Describe a tour by variables x ij ∈ { 0 , 1 } : x ij = 1 if tour goes from i to j , x ij = 0 otherwise. Minimize the total cost of the tour: n n � � minimize c ij x ij . i =1 j =1 Enter each city exactly once: � x ij = 1 for each j = 1 , 2 , . . . , n . 1 ≤ i ≤ n i � = j Leave each city exactly once: � x jk = 1 for each j = 1 , 2 , . . . , n . 1 ≤ k ≤ n k � = j

  12. The problem Subtour elimination constraints Timing constraints Subtours The local constraints do not guarantee that we actually find a tour of all n cities!

  13. The problem Subtour elimination constraints Timing constraints Subtours The local constraints do not guarantee that we actually find a tour of all n cities! Here is a TSP instance with 9 cities; assume that cost is Euclidean distance.

  14. The problem Subtour elimination constraints Timing constraints Subtours The local constraints do not guarantee that we actually find a tour of all n cities! Here is a TSP instance with 9 cities; assume that cost is Euclidean distance. The optimal tour is shown in red.

  15. The problem Subtour elimination constraints Timing constraints Subtours The local constraints do not guarantee that we actually find a tour of all n cities! Here is a TSP instance with 9 cities; assume that cost is Euclidean distance. The optimal tour is shown in red. The optimal solution to the local constraints is in blue. It has three subtours that are not connected to each other.

  16. The problem Subtour elimination constraints Timing constraints Subtour elimination constraints Problem: the local constraints allow for subtours that don’t visit all n cities.

  17. The problem Subtour elimination constraints Timing constraints Subtour elimination constraints Problem: the local constraints allow for subtours that don’t visit all n cities. Solution #1 (Dantzig, Fulkerson, Johnson, 1954): for every set S of cities, add a constraint saying that the tour leaves S at least once.

  18. The problem Subtour elimination constraints Timing constraints Subtour elimination constraints Problem: the local constraints allow for subtours that don’t visit all n cities. Solution #1 (Dantzig, Fulkerson, Johnson, 1954): for every set S of cities, add a constraint saying that the tour leaves S at least once. For every S ⊆ { 1 , 2 , . . . , n } with 1 ≤ | S | ≤ n − 1: � � x ij ≥ 1 . i ∈ S j / ∈ S

  19. The problem Subtour elimination constraints Timing constraints Subtour elimination constraints Problem: the local constraints allow for subtours that don’t visit all n cities. Solution #1 (Dantzig, Fulkerson, Johnson, 1954): for every set S of cities, add a constraint saying that the tour leaves S at least once. For every S ⊆ { 1 , 2 , . . . , n } with 1 ≤ | S | ≤ n − 1: � � x ij ≥ 1 . i ∈ S j / ∈ S This will happen for any tour: eventually, we must go from a city in S to a city not in S .

  20. The problem Subtour elimination constraints Timing constraints Subtour elimination constraints Problem: the local constraints allow for subtours that don’t visit all n cities. Solution #1 (Dantzig, Fulkerson, Johnson, 1954): for every set S of cities, add a constraint saying that the tour leaves S at least once. For every S ⊆ { 1 , 2 , . . . , n } with 1 ≤ | S | ≤ n − 1: � � x ij ≥ 1 . i ∈ S j / ∈ S This will happen for any tour: eventually, we must go from a city in S to a city not in S . In a solution to the local constraints with subtours, this is violated if we take S to be the set of cities in a subtour.

  21. The problem Subtour elimination constraints Timing constraints Huge formulations Good news: the local constraints, together with the subtour elimination constraints, describe TSP.

  22. The problem Subtour elimination constraints Timing constraints Huge formulations Good news: the local constraints, together with the subtour elimination constraints, describe TSP. Bad news: for n cities, there are 2 n − 2 subtour elimination constraints! (2 n − 1 − 1 if we assume 1 ∈ S .)

  23. The problem Subtour elimination constraints Timing constraints Huge formulations Good news: the local constraints, together with the subtour elimination constraints, describe TSP. Bad news: for n cities, there are 2 n − 2 subtour elimination constraints! (2 n − 1 − 1 if we assume 1 ∈ S .) Slightly encouraging news: given a solution to the local constraints with subtours, we can quickly find a subtour elimination constraint it violates. For example, let S be the set of all cities visited by the tour, starting at city 1.

  24. The problem Subtour elimination constraints Timing constraints Huge formulations Good news: the local constraints, together with the subtour elimination constraints, describe TSP. Bad news: for n cities, there are 2 n − 2 subtour elimination constraints! (2 n − 1 − 1 if we assume 1 ∈ S .) Slightly encouraging news: given a solution to the local constraints with subtours, we can quickly find a subtour elimination constraint it violates. For example, let S be the set of all cities visited by the tour, starting at city 1. If S = { 1 , 2 , . . . , n } , we actually do have a tour. Otherwise, the constraint saying we must leave S at least once is violated.

  25. The problem Subtour elimination constraints Timing constraints Branch-and-cut for TSP We can use this idea to get a branch-and-cut algorithm for solving TSP problems. Begin by just solving the LP relaxation of the local constraints.

  26. The problem Subtour elimination constraints Timing constraints Branch-and-cut for TSP We can use this idea to get a branch-and-cut algorithm for solving TSP problems. Begin by just solving the LP relaxation of the local constraints. Whenever we get an LP solution that has a lower cost than the best tour found so far:

  27. The problem Subtour elimination constraints Timing constraints Branch-and-cut for TSP We can use this idea to get a branch-and-cut algorithm for solving TSP problems. Begin by just solving the LP relaxation of the local constraints. Whenever we get an LP solution that has a lower cost than the best tour found so far: 1 If there is some x ij / ∈ Z , branch on x ij = 0 and x ij = 1.

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