[Paper Review] Yin-Yang Puzzles are NP-complete
This paper proves that Yin-Yang puzzles are NP-complete by reducing the planar 4-regular Tree-Residue Vertex Breaking (TRVB) problem to a grid graph partitioning problem. It establishes NP-completeness for both the standard Yin-Yang puzzle (with the 2×2 rule) and its variant without the rule, showing that deciding whether a solution exists is computationally intractable even with pre-colored cells.
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 imes 2$ rule), subject to some vertices being pre-assigned to a specific tree/subgraph.
Motivation & Objective
- To determine the computational complexity of solving Yin-Yang pencil-and-paper puzzles.
- To prove NP-completeness of the standard Yin-Yang puzzle, which includes the 2×2 rule forbidding monochromatic 2×2 squares.
- To extend the proof to the variant without the 2×2 constraint, showing NP-completeness for partitioning a grid graph into two connected induced subgraphs with pre-assigned vertices.
- To further prove NP-completeness for the special case where the two color classes must form induced trees, corresponding to a stricter version of the puzzle.
- To establish the hardness of the problem even when only a small number of cells are pre-colored, suggesting the problem remains difficult under sparse clue sets.
Proposed method
- Reduction from the NP-hard Planar 4-Regular Tree-Residue Vertex Breaking (TRVB) problem to the Yin-Yang puzzle decision problem.
- Construction of vertex and edge gadgets in the grid graph that simulate the behavior of vertices and edges in the TRVB instance.
- Use of 'important' and 'unimportant' black circles to model connectivity and acyclicity: important circles represent the core structure of the TRVB solution, while unimportant ones are attached via tendrils that preserve connectivity and acyclicity.
- Demonstration that the black circles form a connected, acyclic subgraph if and only if the TRVB instance has a solution, with unimportant circles not affecting the global structure.
- Proof that the entire black subgraph is connected and acyclic iff the important black circles are, by tracing connections through top-row and downward tendrils.
- Use of a parsimonious reduction that preserves the number of solutions, implying potential hardness for counting and another-solution problems.
Experimental results
Research questions
- RQ1Is the decision problem for Yin-Yang puzzles, with or without the 2×2 rule, computationally hard?
- RQ2Can the standard Yin-Yang puzzle be reduced to a graph partitioning problem on grid graphs with pre-colored vertices?
- RQ3Is the problem still NP-complete when the two color classes must form induced trees rather than just connected subgraphs?
- RQ4Does the NP-completeness hold under sparse clue sets, such as only O(n) pre-colored cells?
- RQ5Can similar techniques be applied to generalize Yin-Yang puzzles to more than two colors or to other grid types like triangular or hexagonal grids?
Key findings
- The standard Yin-Yang puzzle, including the 2×2 rule, is NP-complete, even when some cells are pre-colored.
- The variant without the 2×2 rule is also NP-complete, corresponding to partitioning a grid graph into two connected induced subgraphs with pre-assigned vertices.
- The special case where both color classes must form induced trees is also NP-complete, proving hardness for a stricter structural constraint.
- The reduction from TRVB is parsimonious, meaning the number of solutions is preserved, so counting and another-solution problems for Yin-Yang puzzles are likely #P- and NP-hard, respectively.
- The proof technique suggests that the problem remains hard even with sparse pre-colored clues, though achieving o(n) clues would require new encoding strategies.
- Generalizations to three or more colors, or to triangular and hexagonal grids, are likely NP-hard, with similar proof techniques expected to apply.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.