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 $S$ of natural numbers, we want to visit each vertex of a graph $G$ exactly once and ensure that any two consecutive vertices can be joined in $k$ hops for some choice of $k \in S$. Formally, an $S$-Hamiltonian cycle is a permutation $(v_0,\ldots,v_{n-1})$ of the vertices of $G$ such that, for $0 \leq i \leq n-1$, there exists a walk between $v_i$ and $v_{i+1 \bmod n}$ whose length is in $S$. (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 $S=\{1\}$. We study the $S$-Hamiltonian cycle problem of deciding whether an input graph $G$ has an $S$-Hamiltonian cycle. Our goal is to determine the complexity of this problem depending on the fixed set $S$. It is already known that the problem remains NP-complete for $S=\{1,2\}$, whereas it is trivial for $S=\{1,2,3\}$ because any connected graph contains a $\{1,2,3\}$-Hamiltonian cycle. Our work classifies the complexity of this problem for most kinds of sets $S$, with the key new results being the following: we have NP-completeness for $S = \{2\}$ and for $S = \{2, 4\}$, but tractability for $S = \{1, 2, 4\}$, for $S = \{2, 4, 6\}$, for any superset of these two tractable cases, and for $S$ the infinite set of all odd integers. The remaining open cases are the non-singleton finite sets of odd integers, in particular $S = \{1, 3\}$. Beyond cycles, we also discuss the complexity of finding $S$-Hamiltonian paths, and show that our problems are all tractable on graphs of bounded cliquewidth.
翻译:判定一个给定的无向图是否为哈密顿图(即是否存在一个环恰好访问每个顶点一次)是最著名的 NP 完全问题之一。我们考虑哈密顿环的以下推广:对于一个固定的自然数集合 $S$,我们希望访问图 $G$ 的每个顶点恰好一次,并确保任意两个连续顶点可以通过 $k$ 跳连接,其中 $k \in S$。形式化地,一个 $S$-哈密顿环是图 $G$ 顶点的一个排列 $(v_0,\ldots,v_{n-1})$,使得对于 $0 \leq i \leq n-1$,在 $v_i$ 与 $v_{i+1 \bmod n}$ 之间存在一条长度属于 $S$ 的行走。(我们不对顶点作为行走中间顶点被访问的次数施加任何约束。)当然,标准意义上的哈密顿环对应于 $S=\{1\}$。我们研究判定输入图 $G$ 是否具有 $S$-哈密顿环的 $S$-哈密顿环问题。我们的目标是确定该问题的复杂度如何依赖于固定的集合 $S$。已知对于 $S=\{1,2\}$ 该问题仍然是 NP 完全的,而对于 $S=\{1,2,3\}$ 则是平凡的,因为任何连通图都包含一个 $\{1,2,3\}$-哈密顿环。我们的工作对大多数类型的集合 $S$ 分类了该问题的复杂度,关键的新结果如下:对于 $S = \{2\}$ 和 $S = \{2, 4\}$ 是 NP 完全的,但对于 $S = \{1, 2, 4\}$、$S = \{2, 4, 6\}$、这两个可处理情况的任何超集,以及 $S$ 为所有奇数组成的无限集时是可处理的。剩余未解决的情况是非单元素的有限奇数集,特别是 $S = \{1, 3\}$。除了环之外,我们还讨论了寻找 $S$-哈密顿路径的复杂度,并证明了我们的问题在团宽度有界的图上都是可处理的。