Skip to main content

Thermodynamical approach to the traveling salesman problem: An efficient simulation algorithm


We present a Monte Carlo algorithm to find approximate solutions of the traveling salesman problem. The algorithm generates randomly the permutations of the stations of the traveling salesman trip, with probability depending on the length of the corresponding route. Reasoning by analogy with statistical thermodynamics, we use the probability given by the Boltzmann-Gibbs distribution. Surprisingly enough, using this simple algorithm, one can get very close to the optimal solution of the problem or even find the true optimum. We demonstrate this on several examples.

We conjecture that the analogy with thermodynamics can offer a new insight into optimization problems and can suggest efficient algorithms for solving them.

This is a preview of subscription content, access via your institution.


  1. Kittel, C.,Thermal Physics, John Wiley and Sons, New York, New York, 1969.

    Google Scholar 

  2. Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N., Teller, A. H., andTeller, E.,Equation of State Calculations by Fast Computing Machines, Journal of Chemical Physics, Vol. 21, pp. 1087–1092, 1953.

    Google Scholar 

Download references

Author information

Authors and Affiliations


Additional information

Communicated by S. E. Dreyfus

The author acknowledges stimulating discussions with J. Pišút concerning the main ideas of the present paper. The author is also indebted to P. Brunovský, J. Černý, M. Hamala, Š. Peško, Š. Znám, and R. Zajac for useful comments.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Černý, V. Thermodynamical approach to the traveling salesman problem: An efficient simulation algorithm. J Optim Theory Appl 45, 41–51 (1985).

Download citation

  • Issue Date:

  • DOI:

Key Words

  • Traveling salesman problem
  • Monte Carlo optimization
  • importance sampling