Download Travelling Salesperson Problem: Understanding the Shortest Tour with LP and DP Approaches and more Slides Operational Research in PDF only on Docsity!
Travelling Salesperson Problem
(TSP)
- Very famous problem
- Many practical applications
- Very easy to describe
- Very difficult to solve (Curse of Dimensionality)
- We shall consider the dynamic programming (DP) approach
Problem Formulation
- There are many ways to describe this problem.
- We shall consider the following:
- English version
- Linear Programming oriented version
- Linear Programming Free version
- Dynamic programming version
Maths versions
- We shall consider two Maths Version
- The first is LP-based
- The second is LP-free
- The first version dominates the OR literature
TSP Version 1 (LP)
- Decision variable: A boolean matrix x interpreted as follows: x(i,j):= 1, iff we go from city i to city j. x(i,j) := 0, otherwise
Objective function
- d(i,j) = (direct) distance between city i and city j.
z = x ( i , j ) d ( i , j ) j = 1
n
i = 1
n
Constraints
- Each city must be “exited” exactly once
- Each city must be “entered” exactly once
x ( i , j ) j = 1
n
∑ =^ 1 ,^ i^ =^ 1,2,..., n
x ( i , j ) i = 1
n
∑ =^ 1 ,^ j^ =^ 1,2,..., n
No!
- The first two constraints allow sub-tours
- Thus, we have to add a constraint that will prevent sub-tours
Explanation: sub-tours
- Two subtour: (1,2,1) and (3,4,3)
- This solution is not feasible for the TSP
x =
Subtour elimination constraint
- S = subset of cities
- |S| = cardinality of S (# of elements in S)
- There are 2 n^ such sets !!!!!!!
x ( i , j ) ≤ S i , j ∈ S
∑ −^ 1,^ ∀^ S^ ⊂^ {1, 2,..., n }
Example
x =
x ( i , j ) = 2 i , j ∈ S
- Hence the sub-tour elimination constraint is not satisfied.
- Indeed, thee are two subtours in this solution
LP-Free Version
- Decision variables: x (^) j := j-th city on the tour, j=1,2,…,n
- Example:
- x=(1,3,2,4,1)
- We start at city 1, then go to city 3, then go to city 2 then go to city 4 then return to city 1.
ASSUMPTION
- Assume that 0 is the home city, and that there are n other cities
Constraints
- The constraint basically says that x is a permutation of the cities (1,2,3,…,n)
- Make sure that you appreciate the role of { } in this formulation.
{^ x 1 ,...,^ xn } =^ {1, 2,3,..., n }
LP-Free Formulation
- There are n! feasible solutions
{^ x 1 ,...,^ xn } =^ {1, 2,3,..., n }
min x d (0, x 1 ) + d ( x (^) j j = 1
n − 1
∑ , x^ j + 1 )^ +^ d ( x^ n ,0)