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难度。在此过程中,我们还证明了若干简单形式的树残基顶点断裂问题的ASP完备性,包括含度为6的可断裂顶点的平面多重图,或含度为4的可断裂顶点与度为1的不可断裂顶点的平面多重图。