MIT Hardness Group, Josh Brunner, Della Hendrickson, Lily Chung, Erik D. Demaine, Andy Tockman
{"title":"ASP-Completeness of Hamiltonicity in Grid Graphs, with Applications to Loop Puzzles","authors":"MIT Hardness Group, Josh Brunner, Della Hendrickson, Lily Chung, Erik D. Demaine, Andy Tockman","doi":"arxiv-2405.08377","DOIUrl":null,"url":null,"abstract":"We prove that Hamiltonicity in maximum-degree-3 grid graphs (directed or\nundirected) is ASP-complete, i.e., it has a parsimonious reduction from every\nNP search problem (including a polynomial-time bijection between solutions). As\na consequence, given k Hamiltonian cycles, it is NP-complete to find another;\nand counting Hamiltonian cycles is #P-complete. If we require the grid graph's\nvertices to form a full $m \\times n$ rectangle, then we show that Hamiltonicity\nremains ASP-complete if the edges are directed or if we allow removing some\nedges (whereas including all undirected edges is known to be easy). These\nresults enable us to develop a stronger \"T-metacell\" framework for proving\nASP-completeness of rectangular puzzles, which requires building just a single\ngadget representing a degree-3 grid-graph vertex. We apply this general theory\nto prove ASP-completeness of 38 pencil-and-paper puzzles where the goal is to\ndraw a loop subject to given constraints: Slalom, Onsen-meguri, Mejilink,\nDetour, Tapa-Like Loop, Kouchoku, Icelom; Masyu, Yajilin, Nagareru, Castle\nWall, Moon or Sun, Country Road, Geradeweg, Maxi Loop, Mid-loop, Balance Loop,\nSimple Loop, Haisu, Reflect Link, Linesweeper; Vertex/Touch Slitherlink,\nDotchi-Loop, Ovotovata, Building Walk, Rail Pool, Disorderly Loop, Ant Mill,\nKoburin, Mukkonn Enn, Rassi Silai, (Crossing) Ichimaga, Tapa, Canal View, Aqre,\nand Paintarea. The last 14 of these puzzles were not even known to be NP-hard.\nAlong the way, we prove ASP-completeness of some simple forms of Tree-Residue\nVertex-Breaking (TRVB), including planar multigraphs with degree-6 breakable\nvertices, or with degree-4 breakable and degree-1 unbreakable vertices.","PeriodicalId":501024,"journal":{"name":"arXiv - CS - Computational Complexity","volume":"37 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-05-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Computational Complexity","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2405.08377","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
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.