Download presentation

Presentation is loading. Please wait.

Published byHayden Vaughan Modified over 3 years ago

1
Erich Friedman Stetson University October 2, 2002 Spiral Galaxies Puzzles are NP-complete

2
Spiral Galaxies Puzzles puzzles consist of grid of squares and some circles. the object is to divide a puzzle into connected groups of squares that contain one circle, which must be a center of rotational symmetry.

3
P and NP P is the set of all yes/no problems which are decidable in polynomial time. NP is the set of all yes/no problems in which a proof for a yes answer can be checked in polynomial time. P is a subset of NP. The question whether P=NP is one of the most important open questions in computer science.

4
NP-Completeness A problem is NP-complete if: –it is in NP, and –the existence of a polynomial time algorithm to solve it implies the existence of a polynomial time algorithm for all problems in NP. NP-complete problems are: –easy enough to check in polynomial time –the hardest such problems

5
Examples of NP-Completeness Examples of NP-complete problems are: –3-Colorability: Can the vertices of a graph G be colored with 3 colors so that every pair of adjacent vertices has different colors? –Hamiltonicity: Does a graph G have a circuit that visits each vertex exactly once? –Bin Packing: Can we divide N numbers in K sets so that each set has sum less than S? –Satisfiability: Are there inputs to a Boolean circuit with AND/OR/NOT gates that make the outputs TRUE?

6
Spiral Galaxies Puzzles are NP-complete The Main Result of this talk is: The question of whether or not a given Spiral Galaxies puzzle has a solution is NP-complete. To prove this, we will build arbitrary Boolean circuits in the Spiral Galaxies universe. "wires" carry truth values "junctions" in wires simulate logical gates Since Satisfiability is NP-complete, Spiral Galaxies puzzles are also NP-complete.

7
The Construction We need: wires variables that can have either truth value way to end a wire that forces it to be TRUE NOT gate AND gate OR gate way to split the signal in a wire way to allow wires to cross

8
Wires and Signals wires are rectangles of height 2 with a circle every 3 units. a wire carries the value TRUE if the solution involves 3x2 rectangles and FALSE if the solution involves alternating 5x2 and 1x2 rectangles. A TRUE signala FALSE signal

9
Variables variables are configurations with two local solutions. A TRUE variablea FALSE variable

10
Ending Wires forcing a TRUE signalforcing a FALSE signal to force a TRUE or FALSE signal in a wire, we can end the wire at an appropriate point.

11
NOT Gate the NOT gate is a wire that contains a pair of circles that are only 2 units away.

12
AND Gate

13
OR Gate

14
Letting Wires Cross

15
Splitting a Signal

16
Moving Wires to shift a wire one unit left, we use three consecutive circles each a distance of 2.5 units from the previous one. to shift a wire one unit up, we use three consecutive circles each raised.5 units from the previous one.

17
Filling in the Holes to make the puzzle rectangular, we put a circle in every grid square that is not a part of the circuit.

18
Summary For any given circuit, we can find a Spiral Galaxies puzzle that can be solved if and only if there is a set of inputs to the circuit that make the output TRUE. This Satisfiability problem for circuits is known to be NP-complete. The mapping we gave is polynomial. Therefore whether or not a given Spiral Galaxies puzzle has a solution is also NP-complete.

19
References [1] T. C. Biedl, E. D. Demaine, M. L. Demaine, R. Fleischer, L. Jacobsen, and J. I. Munro, "The Complexity of Clickomania". preprint. [2] J. Culberson, "Sokoban is PSPACE complete." Proc. Internet Conf. Fun with Algorithms (1998), N. S. E. Lodi, L. Pagli, Ed., Carelton Scientific, [3] E. D. Demaine and M. Hoffman, "Pushing blocks is NP-complete for non-crossing solution paths". Proc. 13th Canad. Conf. Comput. Geom. (2001), [4] E. Friedman, "Corral Puzzles are NP-complete". preprint. [5] E. Friedman, "Cubic is NP-complete". Proc Fl. Sectional MAA meeting, David Kerr,Ed. [6] E. Friedman, Pearl Puzzles are NP-complete". preprint. [7] M.R. Garey and D.S. Johnson, Computers and Intractibility: A Guide to the Theory of NP- Completeness. W.H. Freeman, [8] R. Kaye, "Minesweeper is NP-complete". Mathematical Intelligencer, 22 (2000) [9] Nikoli, 91 (2000). [10] D. Ratner and M. Warmuth, "Finding a shortest solution for the n x n extension of the 15- puzzle is intractable". J. Symb. Comp. 10 (1990) [11] S. Takahiro, "The Complexities of Puzzles, Cross Sum, and Their ASPs". preprint. [12] Y. Takayuki, "On the NP-completeness of the Slither Link Puzzle". IPSJ SIGNotes Algorithms (2000). [13] N. Ueda and T. Nagao, "NP-completeness Results for Nonogram via Parsimonious Reductions". preprint.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google