We prove that Hamiltonicity in maximum-degree-3 grid graphs (directed or undirected) is ASP-complete, i.e., it has a parsimonious reduction from every NP search problem (including a polynomial-time bijection between solutions). As a consequence, given k Hamiltonian cycles, it is NP-complete to find another; and counting Hamiltonian cycles is #P-complete. If we require the grid graph's vertices to form a full $m \times n$ rectangle, then we show that Hamiltonicity remains ASP-complete if the edges are directed or if we allow removing some edges (whereas including all undirected edges is known to be easy). These results enable us to develop a stronger "T-metacell" framework for proving ASP-completeness of rectangular puzzles, which requires building just a single gadget representing a degree-3 grid-graph vertex. We apply this general theory to prove ASP-completeness of 38 pencil-and-paper puzzles where the goal is to draw a loop subject to given constraints: Slalom, Onsen-meguri, Mejilink, Detour, Tapa-Like Loop, Kouchoku, Icelom; Masyu, Yajilin, Nagareru, Castle Wall, Moon or Sun, Country Road, Geradeweg, Maxi Loop, Mid-loop, Balance Loop, Simple Loop, Haisu, Reflect Link, Linesweeper; Vertex/Touch Slitherlink, Dotchi-Loop, Ovotovata, Building Walk, Rail Pool, Disorderly Loop, Ant Mill, Koburin, Mukkonn Enn, Rassi Silai, (Crossing) Ichimaga, Tapa, Canal View, Aqre, and Paintarea. The last 14 of these puzzles were not even known to be NP-hard. Along the way, we prove ASP-completeness of some simple forms of Tree-Residue Vertex-Breaking (TRVB), including planar multigraphs with degree-6 breakable vertices, or with degree-4 breakable and degree-1 unbreakable vertices.
翻译:我们证明了最大度为3的网格图(有向或无向)中的哈密顿性问题是ASP完备的,即每个NP搜索问题(包括解之间的多项式时间双射)均可通过简约归约得到该问题。由此,给定k个哈密顿环,寻找另一个环是NP完全的;而计数哈密顿环的数量则是#P完全的。若要求网格图顶点构成完整的$m \times n$矩形,我们证明当边为有向或允许移除部分边时,哈密顿性仍为ASP完备(而包含所有无向边的情形已知是容易的)。这些结果使我们能够开发更强的“T-元胞”框架来证明矩形谜题的ASP完备性,该框架仅需构造一个代表度为3的网格图顶点的单一构件。我们应用这一通用理论证明了38种铅笔-纸张谜题的ASP完备性,这些谜题的目标是在给定约束下绘制一条回环:Slalom、Onsen-meguri、Mejilink、Detour、Tapa-Like Loop、Kouchoku、Icelom;Masyu、Yajilin、Nagareru、Castle Wall、Moon or Sun、Country Road、Geradeweg、Maxi Loop、Mid-loop、Balance Loop、Simple Loop、Haisu、Reflect Link、Linesweeper;Vertex/Touch Slitherlink、Dotchi-Loop、Ovotovata、Building Walk、Rail Pool、Disorderly Loop、Ant Mill、Koburin、Mukkonn Enn、Rassi Silai、(Crossing) Ichimaga、Tapa、Canal View、Aqre和Paintarea。其中最后14种谜题此前甚至未被证明是NP难的。在此过程中,我们还证明了某些简单形式的树残基顶点断裂问题(TRVB)的ASP完备性,包括包含度为6的可断裂顶点的平面多重图,或包含度为4的可断裂顶点与度为1的不可断裂顶点的情形。