License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.FUN.2021.1
URN: urn:nbn:de:0030-drops-127624
Go to the corresponding LIPIcs Volume Portal

Adler, Aviv ; Bosboom, Jeffrey ; Demaine, Erik D. ; Demaine, Martin L. ; Liu, Quanquan C. ; Lynch, Jayson

Tatamibari Is NP-Complete

LIPIcs-FUN-2021-1.pdf (1 MB)


In the Nikoli pencil-and-paper game Tatamibari, a puzzle consists of an m x n grid of cells, where each cell possibly contains a clue among ⊞, ⊟, ◫. The goal is to partition the grid into disjoint rectangles, where every rectangle contains exactly one clue, rectangles containing ⊞ are square, rectangles containing ⊟ are strictly longer horizontally than vertically, rectangles containing ◫ are strictly longer vertically than horizontally, and no four rectangles share a corner. We prove this puzzle NP-complete, establishing a Nikoli gap of 16 years. Along the way, we introduce a gadget framework for proving hardness of similar puzzles involving area coverage, and show that it applies to an existing NP-hardness proof for Spiral Galaxies. We also present a mathematical puzzle font for Tatamibari.

BibTeX - Entry

  author =	{Aviv Adler and Jeffrey Bosboom and Erik D. Demaine and Martin L. Demaine and Quanquan C. Liu and Jayson Lynch},
  title =	{{Tatamibari Is NP-Complete}},
  booktitle =	{10th International Conference on Fun with Algorithms (FUN 2021)},
  pages =	{1:1--1:24},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-145-0},
  ISSN =	{1868-8969},
  year =	{2020},
  volume =	{157},
  editor =	{Martin Farach-Colton and Giuseppe Prencipe and Ryuhei Uehara},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{},
  URN =		{urn:nbn:de:0030-drops-127624},
  doi =		{10.4230/LIPIcs.FUN.2021.1},
  annote =	{Keywords: Nikoli puzzles, NP-hardness, rectangle covering}

Keywords: Nikoli puzzles, NP-hardness, rectangle covering
Collection: 10th International Conference on Fun with Algorithms (FUN 2021)
Issue Date: 2020
Date of publication: 16.09.2020
Supplementary Material: The Z3-based Tatamibari solver and figures from Tatamibari NP-hardness paper are available at

DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI