Yin-Yang Puzzles are NP-complete

Erik D. Demaine, Jayson Lynch, Mikhail Rudoy, Yushi Uno
6/29/2021
8 citations
cs.CCcs.CG

Official code: edemaine/svgtiler (72 stars, CoffeeScript, MIT, last commit 2026-09-12). 1 more implementation below.

Abstract

We prove NP-completeness of Yin-Yang / Shiromaru-Kuromaru pencil-and-paper puzzles. Viewed as a graph partitioning problem, we prove NP-completeness of partitioning a rectangular grid graph into two induced trees (normal Yin-Yang), or into two induced connected subgraphs (Yin-Yang without $2 \times 2$ rule), subject to some vertices being pre-assigned to a specific tree/subgraph.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
edemaine/svgtilerOfficial72CoffeeScriptMIT2026-09-12
edemaine/yin-yang-svgtilerOfficial2AGS ScriptMIT2021-06-27
edemaine/svgtilerOfficial100%
MIT

Tool for drawing diagrams on a grid, combining grids of SVGs into a big SVG figure

728CoffeeScript, JavaScriptNov 21, 20162 months agoMIT
MIT

Yin-Yang puzzles and hardness figures via SVG Tiler

20AGS Script, CoffeeScriptJun 27, 20215 years agoMIT

Similar Papers

Cite this paper

@article{demaine2021yinyang,
  title  = {Yin-Yang Puzzles are NP-complete},
  author = {Erik D. Demaine and Jayson Lynch and Mikhail Rudoy and Yushi Uno},
  year   = {2021},
  eprint = {2106.15585},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.15585}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.15585.svg)](https://codeofpaper.com/paper/2106.15585)

Discussion