Location of Repository

Playing Mastermind with Many Colors

By Benjamin Doerr, Carola Doerr and Reto Spöhel Henning Thomas


We analyze the general version of the classic guessing game Mastermind with n positions and k colors. Since the case k ≤ n 1−ε, ε> 0 a constant, is well understood, we concentrate on larger numbers of colors. For the most prominent case k = n, our results imply that Codebreaker can find the secret code with O(n log log n) guesses. This bound is valid also when only black answer-pegs are used. It improves the O(n log n) bound first proven by Chvátal (Combinatorica 3 (1983), 325–329). We also show that if both black and white answer-pegs are used, then the O(n log log n) bound holds for up to n 2 log log n colors. These bounds are almost tight as the known lower bound of Ω(n) shows. Unlike for k ≤ n 1−ε, simply guessing at random until the secret code is determined is not sufficient. In fact, we show that an optimal non-adaptive strategy (deterministic or randomized) needs Θ(n log n) guesses

Topics: Category, F.2.2 [Analysis of Algorithms and Problem Complexity, Nonnumerical Algorithms and Problems Keywords, Combinatorial games, Mastermind, query complexity, randomized algorithms
Year: 2013
OAI identifier: oai:CiteSeerX.psu:
Provided by: CiteSeerX
Download PDF:
Sorry, we are unable to provide the full text but you may find it at the following location(s):
  • http://citeseerx.ist.psu.edu/v... (external link)
  • http://www.mpi-inf.mpg.de/~rsp... (external link)
  • Suggested articles

    To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.