In the Traveling Salesman Problem (TSP) we are given set of nodes and metric m. Our goal is to find such permutation of nodes \((a_1, a_2, ... ,a_n)\) such that the sum \(m(a_1, a_2) + m(a_2, a_3) + ... + m(a_(n-1),a_n) + m(a_n, a_1)\) is minimized.
We solve this problem by local search, using well known 2-opt moves (see paal::local_search::two_local_search::TwoLocalSearchStep for more details).
example file is 2_local_search_example.cpp
Approximation ratio equals \(4\sqrt{n}\) and \(O(log(n)/log(log(n)))\) for euclidean instances in \(R^2\). Although the approximation ratio is weak, the algorithm works well in many practical instances.
The complexity of each round of the algorithm is \(O(n^2)\), where n is nuber of vertices in the space.
The algorithm is described in [19]. The approximation ratio is proved in [5].