Finding Hamiltonian Cycles

L. Adleman has proposed and demonstrated a highly novel approach using DNA and the tools of molecular biology to solve the famous Hamiltonian cycle problem (HCP) of computer science: Given a directed graph on N vertices ( N cities and a set of R ≤ N 2 one-way roads connecting the cities), does there exist a subset of the roads in which a tour of the cities can be made beginning and ending at the same city and stopping at each city exactly once (a Hamiltonian cycle)? The HCP has applications in operations research, cryptography, and other fields. Because the HCP is very hard computationally—indeed, the HCP belongs to the NP-complete class of problems which have no known general polynomial time deterministic solution algorithm—novel approaches to the HCP are important to consider. In theory, because Adleman's method exploits the parallelism inherent in solutions containing DNA to check all possible tours, it solves the HCP for any graph. However, it has recently been noted that practical considerations may limit the use of Adleman's method to graphs with less than 30 cities ([1][1]). Given this finding, we were curious to see what size HCPs could be done on conventional computers. The difficult range for finding Hamiltonian cycles seems to be in the range where R ∼ N *lnN ([1][1]). We have found that the method of simulated annealing (SA) ([2][2]) can be modified ([3][3]) to effectively find Hamiltonian cycles in graphs with up to at least 100 cities in only minutes or seconds on a conventional computer (Table [1][4]). As Adleman states, improvements in enzyme and other technologies will make his method more useful practically. Until then, SA is a good alternative for the HCP which can be run quickly and cheaply on a conventional computer. Our results using SA for the HCP set a standard for Adleman's method. Also, because a near infinite number of HCPs of increasing size containing at least one Hamiltonian cycle can easily be constructed, the success of SA for the HCP establishes the HCP as an excellent problem with which to benchmark optimization methods. With an effective method (SA) for finding Hamiltonian cycles in hand, further study of the complexity of the HCP, and of the power of SA, should now be possible. View this table: Table 1. Number of trials out of 100 in which simulated annealing found a Hamiltonian cycle in a graph into which one had been inserted. 1. 1.[↵][5] 1. M. Linial, 2. N. Linial , Science 268, 481 (1995). [OpenUrl][6][FREE Full Text][7] 2. 2.[↵][8] 1. S. Kirpatrick, 2. C. D. Gelatt Jr., 3. M. P. Vecchi , ibid. 220, 671 (1983). [OpenUrl][9] 3. 3.[↵][10] As for the traveling salesperson problem (TSP) (2, 4), for the HCP we took a tour as a permutation of the numbers 1, 2, 3, …, N . We took the distance between two cities to be 0 if there exists a road between the cities, and 1 if not. A tour of length 0 thus corresponds to a Hamiltonian cycle. Instead of the Lin-Kernighan reversal move, we substituted a “swap” move in which two randomly chosen cities switch places on the tour. We tried to minimize the length of the tour. As we expected numerous tours to have the same length, we augmented the length of a trial tour by a small additive constant δ > 0 to bias the algorithm to seek shorter paths. We annealed according to the schedule T = T 0 (T 1 ) M , with T 0 = 0.5 and T 1 = 0.9 ( M an Integer). We used δ = 0.2. We used 125 N 2 tours at each temperature, lowering the temperature if 12.5 N 2 successful moves had been accepted at a given temperature. Most of the tours appeared to be needed for the HCP near T = 0 to find the last few roads. N 2 paths are needed at each temperature for the HCP, but only N paths at each temperature for the TSP. A 100-city HCP was beginning to be difficult for SA, while a 100-city TSP was easy. These may reflect the increased complexity introduced by the “distance” function for the HCP over the 2-D Euclidean distance function of the TSP. 4. 4. 1. W. H. Press, 2. S. A. Teukolsky, 3. W. T. Vetterling, 4. B. P. Flannery , Numerical Recipes (Cambridge Univ. Press, Cambridge, UK, 1992). 5. 5. Work at Lawrence Livermore National Laboratory was performed under U.S. Department of Energy contract W-7405-Eng-48. [1]: #ref-1 [2]: #ref-2 [3]: #ref-3 [4]: #T1 [5]: #xref-ref-1-1 "View reference 1. in text" [6]: {openurl}?query=rft.jtitle%253DScience%26rft.stitle%253DScience%26rft.issn%253D0036-8075%26rft.aulast%253DLinial%26rft.auinit1%253DM%26rft.volume%253D268%26rft.issue%253D5210%26rft.spage%253D481%26rft.epage%253D482%26rft.atitle%253DOn%2Bthe%2Bpotential%2Bof%2Bmolecular%2Bcomputing%26rft_id%253Dinfo%253Adoi%252F10.1126%252Fscience.7725085%26rft_id%253Dinfo%253Apmid%252F7725085%26rft.genre%253Darticle%26rft_val_fmt%253Dinfo%253Aofi%252Ffmt%253Akev%253Amtx%253Ajournal%26ctx_ver%253DZ39.88-2004%26url_ver%253DZ39.88-2004%26url_ctx_fmt%253Dinfo%253Aofi%252Ffmt%253Akev%253Amtx%253Actx [7]: /lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6MzoiUERGIjtzOjExOiJqb3VybmFsQ29kZSI7czozOiJzY2kiO3M6NToicmVzaWQiO3M6MTQ6IjI2OC81MjEwLzQ4MS1hIjtzOjQ6ImF0b20iO3M6MjQ6Ii9zY2kvMjczLzUyNzQvNDEzLjMuYXRvbSI7fXM6ODoiZnJhZ21lbnQiO3M6MDoiIjt9 [8]: #xref-ref-2-1 "View reference 2. in text" [9]: {openurl}?query=rft.jtitle%253Dibid.%26rft.volume%253D220%26rft.spage%253D671%26rft.atitle%253DIBID%26rft.genre%253Darticle%26rft_val_fmt%253Dinfo%253Aofi%252Ffmt%253Akev%253Amtx%253Ajournal%26ctx_ver%253DZ39.88-2004%26url_ver%253DZ39.88-2004%26url_ctx_fmt%253Dinfo%253Aofi%252Ffmt%253Akev%253Amtx%253Actx [10]: #xref-ref-3-1 "View reference 3. in text"