Table of Contents
Fetching ...

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.

Slant/Gokigen Naname is NP-complete, and Some Variations are in P

TL;DR

This work proves that generalized Slant (Gokigen Naname) is NP-complete on 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 . 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.

Paper Structure

This paper contains 11 sections, 7 theorems, 12 figures.

Key Result

Theorem 1

Given a partially-filled Slant board with no vertex constraints, whose filled-in diagonals do not already form a cycle, there always exists a valid solution extending the partially-filled in diagonals.

Figures (12)

  • Figure 1: A simple example of a Slant puzzle, and its (unique) solution.
  • Figure 2: An example of each class of constraint violation denoted in red (the cycle constraint (left) and a vertex constraint (right)).
  • Figure 3: Two examples of partially-filled boards (left, middle). The leftmost board has no valid extension, but the middle board has a unique one, shown on the right.
  • Figure 4: An example of how the Slant puzzle from \ref{['fig:basic-example-board-and-solution']} can be rotated $45^\circ$ so that all its potential edges come from two complementary grid graphs.
  • Figure 5: An example of a partial solution with no cycles or constraints, and a valid extension.
  • ...and 7 more figures

Theorems & Definitions (7)

  • Theorem 1
  • Corollary 2
  • Theorem 3
  • Corollary 4
  • Theorem 5
  • Theorem 6
  • Theorem 7