Deterministic “Snakes and Ladders” Heuristic for the Hamiltonian cycle problem
- 298 Downloads
We present a polynomial complexity, deterministic, heuristic for solving the Hamiltonian cycle problem (HCP) in an undirected graph of order \(n\). Although finding a Hamiltonian cycle is not theoretically guaranteed, we have observed that the heuristic is successful even in cases where such cycles are extremely rare, and it also performs very well on all HCP instances of large graphs listed on the TSPLIB web page. The heuristic owes its name to a visualisation of its iterations. All vertices of the graph are placed on a given circle in some order. The graph’s edges are classified as either snakes or ladders, with snakes forming arcs of the circle and ladders forming its chords. The heuristic strives to place exactly \(n\) snakes on the circle, thereby forming a Hamiltonian cycle. The Snakes and Ladders Heuristic uses transformations inspired by \(k\)-opt algorithms such as the, now classical, Lin–Kernighan heuristic to reorder the vertices on the circle in order to transform some ladders into snakes and vice versa. The use of a suitable stopping criterion ensures the heuristic terminates in polynomial time if no improvement is made in \(n^3\) major iterations.
KeywordsHamiltonian cycle problem Lin–Kernighan Heuristic Polynomial time Connected graph
Mathematics Subject Classification05C85 05C45 68R10
The authors gratefully acknowledge useful comments from the anonymous referees which improved the exposition, and useful discussions with Brendan McKay and Gordon Royle that helped us to find suitable test instances. The editor, William Cook, also contributed significantly by suggesting further testing and changes of inaccurate statements. The research presented in this manuscript was supported by the ARC Discovery Grant DP120100532.
- 1.Applegate, D.L., Bixby, R.B., Chavátal, V., Cook, W.J.: Concorde TSP Solver. http://www.tsp.gatech.edu/concorde/index.html (2003)
- 2.Applegate, D.L., Bixby, R.B., Chavátal, V., Cook, W.J.: The Traveling Salesman Problem: A Computational Study. Princeton University Press, Princeton (2006)Google Scholar
- 3.Baniasadi, P., Clancy, K., Ejov, V., Filar, J.A., Haythorpe, M., Rossomakhine, S.: Snakes and Ladders Heuristic-Web Interface. http://fhcp.edu.au/slhweb/ (2012)
- 5.Eppstein, D.: The traveling salesman problem for cubic graphs. In: Dehne, F., Sack, J.R., Smid, M. (eds.) Algorithms and Data Structures. Lecture Notes in Computer Science, vol. 2748. pp. 307–318. Springer, Berlin (2003)Google Scholar
- 7.Gutin, G., Punnen, A.P.: Traveling Salesman Problem and Its Variations. Kluwer Academic Publishers, Boston (2002)Google Scholar
- 10.Lawler, E.L., Lenstra, J.K., Rinooy Kan, A.H.G., Shmoys, D.B.: The Traveling Salesman Problem: A Guided Tour of Combinatorial Optimization. Wiley, New York (1985)Google Scholar
- 13.Royle, G., Conder, M., McKay, B., Dobscanyi, P.: Cubic symmetric graphs (The Foster Census): http://school.maths.uwa.edu.au/~gordon/remote/foster (2001)
- 15.TSPLIB. Hamiltonian cycle problem (HCP). http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95 (2008)
- 16.Weisstein, E.W.: Generalized Petersen Graph (From MathWorld-A Wolfram Web Resource). http://mathworld.wolfram.com/generalizedpetersengraph.html
- 17.Wormald, N.: Models of random regular graphs. In: Surveys in Combinatorics, pp. 239–298. Cambridge University press, Cambridge (1999)Google Scholar