Solves the traveling salesman problem