370 research outputs found

    Mastermind is NP-Complete

    Full text link
    In this paper we show that the Mastermind Satisfiability Problem (MSP) is NP-complete. The Mastermind is a popular game which can be turned into a logical puzzle called Mastermind Satisfiability Problem in a similar spirit to the Minesweeper puzzle. By proving that MSP is NP-complete, we reveal its intrinsic computational property that makes it challenging and interesting. This serves as an addition to our knowledge about a host of other puzzles, such as Minesweeper, Mah-Jongg, and the 15-puzzle

    Conformant plans and beyond: Principles and complexity

    Get PDF
    AbstractConformant planning is used to refer to planning for unobservable problems whose solutions, like classical planning, are linear sequences of operators called linear plans. The term ‘conformant’ is automatically associated with both the unobservable planning model and with linear plans, mainly because the only possible solutions for unobservable problems are linear plans. In this paper we show that linear plans are not only meaningful for unobservable problems but also for partially-observable problems. In such case, the execution of a linear plan generates observations from the environment which must be collected by the agent during the execution of the plan and used at the end in order to determine whether the goal had been achieved or not; this is the typical case in problems of diagnosis in which all the actions are knowledge-gathering actions.Thus, there are substantial differences about linear plans for the case of unobservable or fully-observable problems, and for the case of partially-observable problems: while linear plans for the former model must conform with properties in state space, linear plans for partially-observable problems must conform with properties in belief space. This differences surface when the problems are allowed to express epistemic goals and conditions using modal logic, and place the plan-existence decision problem in different complexity classes.Linear plans is one extreme point in a discrete spectrum of solution forms for planning problems. The other extreme point is contingent plans in which there is a branch point for every possible observation at each time step, and thus the number of branch points is not bounded a priori. In the middle of the spectrum, there are plans with a bounded number of branch points. Thus, linear plans are plans with zero branch points and contingent plans are plans with unbounded number of branch points.In this work, we lay down foundations and principles for the general treatment of linear plans and plans of bounded branching, and provide exact complexity results for novel decision problems. We also show that linear plans for partially-observable problems are not only of theoretical interest since some challenging real-life problems can be dealt with them

    Wordle is NP-hard

    Get PDF
    Wordle is a single player word-guessing game where the goal is to discover a secret word ww that has been chosen from a dictionary DD. In order to discover ww, the player can make at most â„“\ell guesses, which must also be words from DD, all words in DD having the same length kk. After each guess, the player is notified of the positions in which their guess matches the secret word, as well as letters in the guess that appear in the secret word in a different position. We study the game of Wordle from a complexity perspective, proving NP-hardness of its natural formalization: to decide given a dictionary DD and an integer â„“\ell if the player can guarantee to discover the secret word within â„“\ell guesses. Moreover, we prove that hardness holds even over instances where words have length k=5k = 5, and that even in this case it is NP-hard to approximate the minimum number of guesses required to guarantee discovering the secret word (beyond a certain constant). We also present results regarding its parameterized complexity and offer some related open problems.Comment: Accepted at FUN202

    Improved Approximation Algorithm for the Number of Queries Necessary to Identify a Permutation

    Full text link
    In the past three decades, deductive games have become interesting from the algorithmic point of view. Deductive games are two players zero sum games of imperfect information. The first player, called "codemaker", chooses a secret code and the second player, called "codebreaker", tries to break the secret code by making as few guesses as possible, exploiting information that is given by the codemaker after each guess. A well known deductive game is the famous Mastermind game. In this paper, we consider the so called Black-Peg variant of Mastermind, where the only information concerning a guess is the number of positions in which the guess coincides with the secret code. More precisely, we deal with a special version of the Black-Peg game with n holes and k >= n colors where no repetition of colors is allowed. We present a strategy that identifies the secret code in O(n log n) queries. Our algorithm improves the previous result of Ker-I Ko and Shia-Chung Teng (1985) by almost a factor of 2 for the case k = n. To our knowledge there is no previous work dealing with the case k > n. Keywords: Mastermind; combinatorial problems; permutations; algorithm
    • …
    corecore