Trace:

travelling_salesman_problem

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision Next revision | Previous revision | ||

travelling_salesman_problem [2014/09/23 19:20] sertalpbilal |
travelling_salesman_problem [2018/10/01 13:29] (current) bsuresh old revision restored (2017/04/05 23:01) |
||
---|---|---|---|

Line 1: | Line 1: | ||

====== Travelling salesman problem ====== | ====== Travelling salesman problem ====== | ||

+ | |||

+ | <note>This is a playground page for new users. Feel free to edit here!</note> | ||

The travelling salesman problem (TSP) asks the following question: Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city? It is an NP-hard problem in combinatorial optimization, important in operations research and theoretical computer science. | The travelling salesman problem (TSP) asks the following question: Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city? It is an NP-hard problem in combinatorial optimization, important in operations research and theoretical computer science. | ||

Line 10: | Line 12: | ||

$$ | $$ | ||

For $i = 1, ..., n$, let $u_i$ be an artificial variable, and finally take $c_{ij}$ to be the distance from city $i$ to city $j$. Then TSP can be written as the following integer linear programming problem: | For $i = 1, ..., n$, let $u_i$ be an artificial variable, and finally take $c_{ij}$ to be the distance from city $i$ to city $j$. Then TSP can be written as the following integer linear programming problem: | ||

- | $$ | + | |

\begin{align} | \begin{align} | ||

\min &\sum_{i=0}^n \sum_{j\ne i,j=0}^nc_{ij}x_{ij} && \\ | \min &\sum_{i=0}^n \sum_{j\ne i,j=0}^nc_{ij}x_{ij} && \\ | ||

Line 19: | Line 21: | ||

&u_i-u_j +nx_{ij} \le n-1 && 1 \le i \ne j \le n | &u_i-u_j +nx_{ij} \le n-1 && 1 \le i \ne j \le n | ||

\end{align} | \end{align} | ||

- | $$ | + | |

The first set of equalities requires that each city be arrived at from exactly one other city, and the second set of equalities requires that from each city there is a departure to exactly one other city. The last constraints enforce that there is only a single tour covering all cities, and not two or more disjointed tours that only collectively cover all cities. To prove this, it is shown below (1) that every feasible solution contains only one closed sequence of cities, and (2) that for every single tour covering all cities, there are values for the dummy variables $u_i$ that satisfy the constraints. | The first set of equalities requires that each city be arrived at from exactly one other city, and the second set of equalities requires that from each city there is a departure to exactly one other city. The last constraints enforce that there is only a single tour covering all cities, and not two or more disjointed tours that only collectively cover all cities. To prove this, it is shown below (1) that every feasible solution contains only one closed sequence of cities, and (2) that for every single tour covering all cities, there are values for the dummy variables $u_i$ that satisfy the constraints. | ||

Line 47: | Line 49: | ||

If the distances are restricted to 1 and 2 (but still are a metric) the approximation ratio becomes 8/7. In the asymmetric, metric case, only logarithmic performance guarantees are known, the best current algorithm achieves performance ratio $0.814 log(n)$; it is an open question if a constant factor approximation exists. | If the distances are restricted to 1 and 2 (but still are a metric) the approximation ratio becomes 8/7. In the asymmetric, metric case, only logarithmic performance guarantees are known, the best current algorithm achieves performance ratio $0.814 log(n)$; it is an open question if a constant factor approximation exists. | ||

- | |||

- | |||

- | Xiaolong is awesome! |

travelling_salesman_problem.1411514442.txt.gz ยท Last modified: 1998/12/03 12:11 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International