47 research outputs found

    The Fewest Clues Problem

    Get PDF
    When analyzing the computational complexity of well-known puzzles, most papers consider the algorithmic challenge of solving a given instance of (a generalized form of) the puzzle. We take a different approach by analyzing the computational complexity of designing a "good" puzzle. We assume a puzzle maker designs part of an instance, but before publishing it, wants to ensure that the puzzle has a unique solution. Given a puzzle, we introduce the FCP (fewest clues problem) version of the problem: Given an instance to a puzzle, what is the minimum number of clues we must add in order to make the instance uniquely solvable? We analyze this question for the Nikoli puzzles Sudoku, Shakashaka, and Akari. Solving these puzzles is NP-complete, and we show their FCP versions are Sigma_2^P-complete. Along the way, we show that the FCP versions of 3SAT, 1-in-3SAT, Triangle Partition, Planar 3SAT, and Latin Square are all Sigma_2^P-complete. We show that even problems in P have difficult FCP versions, sometimes even Sigma_2^P-complete, though "closed under cluing" problems are in the (presumably) smaller class NP; for example, FCP 2SAT is NP-complete

    The Computational Complexity of Motion Planning

    Get PDF
    In this paper we show that a generalization of a popular motion planning puzzle called Lunar Lockout is computationally intractable. In particular, we show that the problem is PSPACE-complete. We begin with a review of NP-completeness and polynomial-time reductions, introduce the class PSPACE, and motivate the significance of PSPACE-complete problems. Afterwards, we prove that determining whether a given instance of a generalized Lunar Lockout puzzle is solvable is PSPACE-complete

    All Paths Lead to Rome

    Full text link
    All roads lead to Rome is the core idea of the puzzle game Roma. It is played on an n×nn \times n grid consisting of quadratic cells. Those cells are grouped into boxes of at most four neighboring cells and are either filled, or to be filled, with arrows pointing in cardinal directions. The goal of the game is to fill the empty cells with arrows such that each box contains at most one arrow of each direction and regardless where we start, if we follow the arrows in the cells, we will always end up in the special Roma-cell. In this work, we study the computational complexity of the puzzle game Roma and show that completing a Roma board according to the rules is an \NP-complete task, counting the number of valid completions is #Ptime-complete, and determining the number of preset arrows needed to make the instance \emph{uniquely} solvable is Σ2P\Sigma_2^P-complete. We further show that the problem of completing a given Roma instance on an n×nn\times n board cannot be solved in time O(2o(n))\mathcal{O}\left(2^{{o}(n)}\right) under ETH and give a matching dynamic programming algorithm based on the idea of Catalan structures

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

    Full text link
    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\Sigma_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.Comment: 72 pages, 59 figures. Revised proof of Lemma 3.5. A short version of this paper appeared at the 9th International Conference on Fun with Algorithms (FUN 2018

    Genetic Algorithms and the Satisfiability of Large-Scale Boolean Expressions.

    Get PDF
    The two new genetic methods overpopulation and bitwise expected value are introduced. In overpopulation a temporary population of size Mn (M 3˘e\u3e 1) is created using genetic operators and the n children with the highest estimated fitness values are selected as the next generation. The rest are discarded. Bitwise expected value (bev) is the fitness estimation function used. Overpopulation and bitwise expected value are applied to the NP-complete problem 3SAT (a special form of Satisfiability in which the boolean expression consists of the conjunction of an arbitrary number of clauses where each clause consists of the disjunction of 3 boolean variables) with excellent empirical results when compared to the performance of the standard genetic algorithm. Overpopulation increases the cost of producing each generation due to the overhead required to maintain the larger temporary population but results in many fewer generations to solution. Using bitwise expected value as a fitness estimator causes the algorithm to take slightly more generations to solution but is much faster to calculate than the fitness function, leading to a decrease in wall-clock time to solution. Theoretical justification for the success of overpopulation is seen as a result of the generalization of the schema growth equation. Bitwise expected value is viewed as an analogy to the Building Block Hypothesis. Empirical evidence of high correlation between bev and the fitness function is presented. We also introduce the target problem concept, in which a difficult problem is transformed into a well-known problem for which a good genetic method of solution is known. As an example of the target problem concept a transformation from the Traveling Salesman Problem to Satisfiability is demonstrated. Overpopulation and bitwise expected value are applied to the resulting boolean expression, with good results. An interesting convergence property is observed

    Games, puzzles, and computation

    Get PDF
    Thesis (Ph. D.)--Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 2006.Includes bibliographical references (p. 147-153).There is a fundamental connection between the notions of game and of computation. At its most basic level, this is implied by any game complexity result, but the connection is deeper than this. One example is the concept of alternating nondeterminism, which is intimately connected with two-player games. In the first half of this thesis, I develop the idea of game as computation to a greater degree than has been done previously. I present a general family of games, called Constraint Logic, which is both mathematically simple and ideally suited for reductions to many actual board games. A deterministic version of Constraint Logic corresponds to a novel kind of logic circuit which is monotone and reversible. At the other end of the spectrum, I show that a multiplayer version of Constraint Logic is undecidable. That there are undecidable games using finite physical resources is philosophically important, and raises issues related to the Church-Turing thesis. In the second half of this thesis, I apply the Constraint Logic formalism to many actual games and puzzles, providing new hardness proofs. These applications include sliding-block puzzles, sliding-coin puzzles, plank puzzles, hinged polygon dissections, Amazons, Kohane, Cross Purposes, Tip over, and others.(cont.) Some of these have been well-known open problems for some time. For other games, including Minesweeper, the Warehouseman's Problem, Sokoban, and Rush Hour, I either strengthen existing results, or provide new, simpler hardness proofs than the original proofs.by Robert Aubrey Hearn.Ph.D

    The Computational Complexity of Some Games and Puzzles With Theoretical Applications

    Full text link
    The subject of this thesis is the algorithmic properties of one- and two-player games people enjoy playing, such as Sudoku or Chess. Questions asked about puzzles and games in this context are of the following type: can we design efficient computer programs that play optimally given any opponent (for a two-player game), or solve any instance of the puzzle in question? We examine four games and puzzles and show algorithmic as well as intractability results. First, we study the wolf-goat-cabbage puzzle, where a man wants to transport a wolf, a goat, and a cabbage across a river by using a boat that can carry only one item at a time, making sure that no incompatible items are left alone together. We study generalizations of this puzzle, showing a close connection with the Vertex Cover problem that implies NP-hardness as well as inapproximability results. Second, we study the SET game, a card game where the objective is to form sets of cards that match in a certain sense using cards from a special deck. We study single- and multi-round variations of this game and establish interesting con- nections with other classical computational problems, such as Perfect Multi- Dimensional Matching, Set Packing, Independent Edge Dominating Set, and Arc Kayles. We prove algorithmic and hardness results in the classical and the parameterized sense. Third, we study the UNO game, a game of colored numbered cards where players take turns discarding cards that match either in color or in number. We extend results by Demaine et. al. (2010 and 2014) that connected one- and two-player generaliza- tions of the game to Edge Hamiltonian Path and Generalized Geography, proving that a solitaire version parameterized by the number of colors is fixed param- eter tractable and that a k-player generalization for k greater or equal to 3 is PSPACE-hard. Finally, we study the Scrabble game, a word game where players are trying to form words in a crossword fashion by placing letter tiles on a grid board. We prove that a generalized version of Scrabble is PSPACE-hard, answering a question posed by Demaine and Hearn in 2008
    corecore