The S-Hamiltonian Cycle Problem
Abstract
Determining if an input undirected graph is Hamiltonian, i.e., if it has a cycle that visits every vertex exactly once, is one of the most famous NP-complete problems. We consider the following generalization of Hamiltonian cycles: for a fixed set of natural numbers, we want to visit each vertex of a graph exactly once and ensure that any two consecutive vertices can be joined in hops for some choice of . Formally, an -Hamiltonian cycle is a permutation of the vertices of such that, for , there exists a walk between and whose length is in . (We do not impose any constraints on how many times vertices can be visited as intermediate vertices of walks.) Of course Hamiltonian cycles in the standard sense correspond to . We study the -Hamiltonian cycle problem of deciding whether an input graph has an -Hamiltonian cycle. Our goal is to determine the complexity of this problem depending on the fixed set . It is already known that the problem remains NP-complete for , whereas it is trivial for because any connected graph contains a -Hamiltonian cycle. Our work classifies the complexity of this problem for most kinds of sets , with the key new results being the following: we have NP-completeness for and for , but tractability for , for , for any superset of these two tractable cases, and for the infinite set of all odd integers. The remaining open cases are the non-singleton finite sets of odd integers, in particular . Beyond cycles, we also discuss the complexity of finding -Hamiltonian paths, and show that our problems are all tractable on graphs of bounded cliquewidth.
Cite
@article{arxiv.2602.16532,
title = {The S-Hamiltonian Cycle Problem},
author = {Antoine Amarilli and Arthur Lombardo and Mikaël Monet},
journal= {arXiv preprint arXiv:2602.16532},
year = {2026}
}