Slant/Gokigen Naname is NP-complete, and Some Variations are in P
Jayson Lynch, Jack Spalding-Jamieson
TL;DR
This work proves that generalized Slant (Gokigen Naname) is NP-complete on $n\times m$ grids by a two-stage Hamiltonian-cycle reduction, while also developing polynomial-time algorithms for restricted variants and a matroid-intersection framework that clarifies when relaxations are tractable. It recasts Slant as an edge-partition problem between a grid and its dual, enabling a five-matroid formulation and highlighting fixed-parameter tractability in the number of vertex clues $k$. The paper also identifies a universal extendability property for partially filled boards without vertex constraints and provides detailed gadget-based reductions to enforce global connectivity constraints. Overall, it links a classic recreational puzzle to deep combinatorial structures and opens questions about constraint subsets, counting solutions, and broader graph-variant generalizations.
Abstract
In this paper we show that a generalized version of the Nikoli puzzle Slant is NP-complete. We also give polynomial time algorithms for versions of the puzzle where some constraints are omitted. These problems correspond to simultaneously satisfying connectivity and vertex degree constraints in a grid graph and its dual.
