Who witnesses The Witness? Finding witnesses in The Witness is hard and sometimes impossible

Abstract We analyze the computational complexity of the many types of pencil-and-paper-style puzzles featured in the 2016 puzzle video game The Witness. In all puzzles, the goal is to draw a simple path in a rectangular grid graph from a start vertex to a destination vertex. The different puzzle types place different constraints on the path: preventing some edges from being visited (broken edges); forcing some edges or vertices to be visited (hexagons); forcing some cells to have certain numbers of incident path edges (triangles); or forcing the regions formed by the path to be partially monochromatic (squares), have exactly two special cells (stars), or be singly covered by given shapes (polyominoes) and/or negatively counting shapes (antipolyominoes). We show that any one of these clue types (except the first) is enough to make path finding NP-complete (“witnesses exist but are hard to find”), even for rectangular boards. Furthermore, we show that a final clue type (antibody), which necessarily “cancels” the effect of another clue in the same region, makes path finding Σ 2 -complete (“witnesses do not exist”), even with a single antibody (combined with many anti/polyominoes), and the problem gets no harder with many antibodies. On the positive side, we give a polynomial-time algorithm for monomino clues, by reducing to hexagon clues on the boundary of the puzzle, even in the presence of broken edges, and solving “subset Hamiltonian path” for terminals on the boundary of an embedded planar graph in polynomial time.

[1]  Erik D. Demaine,et al.  Classic Nintendo games are (computationally) hard , 2015, Theor. Comput. Sci..

[2]  Erik D. Demaine,et al.  Fun with fonts: Algorithmic typography , 2015, Theor. Comput. Sci..

[3]  Justin Kopinsky,et al.  Who witnesses The Witness? Finding witnesses in The Witness is hard and sometimes impossible , 2018, FUN.

[4]  Maarten Löffler,et al.  The hardness of Witness puzzles , 2018 .

[5]  Raimund Seidel,et al.  Constructing Arrangements of Lines and Hyperplanes with Applications , 1986, SIAM J. Comput..

[6]  L. Goldschlager The monotone and planar circuit value problems are log space complete for P , 1977, SIGA.

[7]  Carsten Witt,et al.  Edge-matching Problems with Rotations , 2011, FCT.

[8]  Clyde L. Monma,et al.  Send-and-Split Method for Minimum-Concave-Cost Network Flows , 1987, Math. Oper. Res..

[9]  David S. Johnson,et al.  The Rectilinear Steiner Tree Problem is NP Complete , 1977, SIAM Journal of Applied Mathematics.

[10]  Jayme Luiz Szwarcfiter,et al.  Hamilton Paths in Grid Graphs , 1982, SIAM J. Comput..

[11]  Erik D. Demaine,et al.  Jigsaw Puzzles, Edge Matching, and Polyomino Packing: Connections and Complexity , 2007, Graphs Comb..

[12]  Markus W. Schäffter,et al.  Drawing Graphs on Rectangular Grids , 1995, Discret. Appl. Math..

[13]  Donald E. Knuth,et al.  The Problem of Compatible Representatives , 1992, SIAM J. Discret. Math..

[14]  M. Schaefer,et al.  Completeness in the Polynomial-Time Hierarchy A Compendium ∗ , 2008 .

[15]  Walker Anderson,et al.  3. Spiral Galaxies Font , 2019 .

[16]  Ioannis G. Tollis,et al.  Improved Algorithms and Bounds for Orthogonal Drawings , 1994, Graph Drawing.

[17]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[18]  Philip N. Klein,et al.  A polynomial-time approximation scheme for Steiner tree in planar graphs , 2007, SODA '07.

[19]  Bruno Durand,et al.  On the Complexity of Deadlock Detection in Families of Planar Nets , 1999, Theor. Comput. Sci..

[20]  Robert L. Berger The undecidability of the domino problem , 1966 .

[21]  Erik D. Demaine,et al.  Tree-Residue Vertex-Breaking: a new tool for proving hardness , 2018, SWAT.

[22]  Takayuki Yato,et al.  On the NP-completeness of the Slither Link Puzzle , 2003 .

[23]  Harry B. Hunt,et al.  The Complexity of Planar Counting Problems , 1998, SIAM J. Comput..

[24]  M. Hanan,et al.  On Steiner’s Problem with Rectilinear Distance , 1966 .

[25]  Linus Hamilton Braid is undecidable , 2014, ArXiv.

[26]  Lane A. Hemaspaandra,et al.  SIGACT news complexity theory comun 37 , 2002, SIGA.