## Wednesday, 11 November 2015

### Lecture 14

The re-edited proof of the PTAS for knapsack that in now on page 59 of the notes looks to me to be correct. We need to say that when we fill up after $K$ using the greedy algorithm we use only items with values no more than values in $K$. This ensures that when $K=H$, where $H$ is the $m$ most valuable items in $O$, we find the bound $v(O)\leq v(H\cup G)+v_j$ and we can be sure that $v_j\leq v(H)/m\leq v(O)/m$.

In the Euclidean case of the travelling salesman problem distances are symmetric and satisfy a metric (i.e. triangle inequality). This restriction of the problem is in APX (while the general problem is not). It is easy to find a 2-approximation algorithm in the Euclidean case (a question on Examples sheet 2.) This can be improved to a 3/2-approximation algorithm due to Christofides in 1976. An even better approximation algorithm was found in 2011. It is a 1.4999999999999999999999999999999999999999999999999996-approximation algorithm (compared to Christofides's 1.5). See Computer Scientists Find New Shortcuts for Infamous Traveling Salesman Problem.

An excellent web site with history of the TSP and many facts about it is The Traveling Salesman Problem at the University of Waterloo.

There is a very nice demo of simulated annealing applied to the travelling salesman problem by Schneider, The Traveling Salesman with Simulated Annealing, R, and Shiny. I showed this in today's lecture.

A Mathematica program running Nearest neighbour, 2OPT and Simulated annealing is here.

It is common to speak of simulated annealing as being a meta-heuristic, because it is readily applicable to a large variety of problems. Other meta-heuristics are genetic algorithms, ant colony optimization and particle swarm optimization. (Many heuristics try to draw on something that nature appears to do well.)