Abstract

Mastermind is a two players zero sum game of imperfect information. Starting with Erdős and Rényi (1963), its combinatorics have been studied to date by several authors, e.g., Knuth (1977), Chvátal (1983), Goodrich (2009). 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. For variants that allow color repetition, Doerr et al. (2016) showed optimal results. 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 upper and lower bounds on the number of guesses necessary to break the secret code. For the case k = n , the secret code can be algorithmically identified within less than ( n − 3 ) ⌈ log 2 n ⌉ + 5 2 n − 1 queries. This result improves the result of Ker-I Ko and Shia-Chung Teng (1985) by almost a factor of 2. For the case k > n , we prove an upper bound of ( n − 2 ) ⌈ log 2 n ⌉ + k + 1 . Furthermore, we prove a new lower bound of n for the case k = n , which improves the recent n − log log ( n ) bound of Berger et al. (2016). We then generalize this lower bound to k queries for the case k ≥ n .

Highlights

  • We deal with Mastermind, which is a popular board game that in the past three decades has become interesting from an algorithmic point of view

  • We present deterministic algorithms for the identification of a secret code in “Black-Peg

  • Mastermind variant is that no color repetition is allowed for a query while most strategies for other

Read more

Summary

Introduction

We deal with Mastermind, which is a popular board game that in the past three decades has become interesting from an algorithmic point of view. One of the earliest analyses of this game after its commercialization dealing with the case of four pegs and six colors was done by Knuth [3] He presented a strategy that identifies the secret code in at most five guesses. Concerning the combination of both variants, Black-Peg game and AB game, for almost three decades, the work due to Ker-I Ko and Shia-Chung Teng [20] was the only contribution that provides an upper bound for the case k = n. They presented a strategy that identifies the secret permutation in at most. Both lower bounds even hold if the codebreaker is allowed to use repeated colors in his guesses

Upper Bounds on the Number of Queries
More Colors Than Positions
Discussion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.