Backtracking (the) Algorithms on the Hamiltonian Cycle Problem

Joeri Sleegers,Daan van den Berg
2023-06-29
Abstract:Even though the Hamiltonian cycle problem is NP-complete, many of its problem instances aren't. In fact, almost all the hard instances reside in one area: near the Komlós-Szemerédi bound, of $\frac{1}{2}\ v\cdot ln(v) + \frac{1}{2}\ v\cdot ln( ln(v))$ edges, where randomly generated graphs have an approximate 50\% chance of being Hamiltonian. If the number of edges is either much higher or much lower, the problem is not hard -- most backtracking algorithms decide such instances in (near) polynomial time. Recently however, targeted search efforts have identified very hard Hamiltonian cycle problem instances very far away from the Komlós-Szemerédi bound. In that study, the used backtracking algorithm was Vandegriend-Culberson's, which was supposedly the most efficient of all Hamiltonian backtracking algorithms. In this paper, we make a unified large scale quantitative comparison for the best known backtracking algorithms described between 1877 and 2016. We confirm the suspicion that the Komlós-Szemerédi bound is a hard area for all backtracking algorithms, but also that Vandegriend-Culberson is indeed the most efficient algorithm, when expressed in consumed computing time. When measured in recursive effectiveness however, the algorithm by Frank Rubin, almost half a century old, performs best. In a more general algorithmic assessment, we conjecture that edge pruning and non-Hamiltonicity checks might be largely responsible for these recursive savings. When expressed in system time however, denser problem instances require much more time per recursion. This is most likely due to the costliness of the extra search pruning procedures, which are relatively elaborate. We supply large amounts of experimental data, and a unified single-program implementation for all six algorithms. All data and algorithmic source code is made public for further use by our colleagues.
Data Structures and Algorithms,Computational Complexity,Information Theory
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the performance differences of different backtracking algorithms in the face of instances with different difficulties in the Hamiltonian cycle problem. Specifically, the paper focuses on: 1. **Confirming the influence of the Komlós - Szemerédi boundary on all known backtracking algorithms**: The Komlós - Szemerédi boundary refers to a region where a randomly generated graph has approximately a 50% probability of being a Hamiltonian graph. The paper attempts to verify whether this boundary is a difficult region for all known backtracking algorithms. 2. **Evaluating the efficiency of the Vandegriend - Culberson algorithm**: The Vandegriend - Culberson algorithm is considered to be the most efficient backtracking algorithm for Hamiltonian cycles at present. The paper verifies this statement through a large amount of experimental data and compares it with other algorithms. 3. **Exploring very difficult instances**: Recent research has discovered some very difficult Hamiltonian cycle instances far from the Komlós - Szemerédi boundary. The paper attempts to understand why these instances are so difficult to solve and explores whether they are difficult to solve for all backtracking algorithms. 4. **Constructing a comprehensive comparison of algorithm performance**: The paper conducts a large - scale quantitative comparison of all the best - known backtracking algorithms described between 1877 and 2016 to evaluate their performance on instances with different difficulties. 5. **Proposing a theoretical explanation**: The paper attempts to theoretically explain why some Hamiltonian cycle instances are more difficult to solve than others and explores the relationship between these instances and the Komlós - Szemerédi boundary. Through these studies, the paper aims to provide an in - depth understanding of the Hamiltonian cycle problem and its algorithm performance, and provide references for future algorithm design and optimization.