Search code examples
pythontraveling-salesmansimulated-annealing

simulated annealing applied on TSP


I have done a brief work on solving TSP using Simulated annealing, and also by brute force. As we know TSP by brute force will take O(n!) steps by checking all possible paths, What I want to ask is that if we allow these many steps using the simulated annealing algorithm, will it get to a correct solution. (It is guaranteed that it will yield a sub-optimal solution with lesser no. of iterations, but my quesiton is that can we get the optimal solution if we run it for n! times, where n is the number of cities)


Solution

  • No; simulated annealing will probably find a close-to-optimal solution very quickly, but there is no guarantee it will ever find the exact optimal solution.