arXiv Analytics

Sign in

arXiv:1207.0773 [cs.DS]AbstractReferencesReviewsResources

Playing Mastermind with Many Colors

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

Published 2012-07-03, updated 2013-01-17Version 2

We analyze the general version of the classic guessing game Mastermind with $n$ positions and $k$ colors. Since the case $k \le n^{1-\varepsilon}$, $\varepsilon>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\'atal (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 $\Omega(n)$ shows. Unlike for $k \le n^{1-\varepsilon}$, 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 $\Theta(n \log n)$ guesses.

Comments: Extended abstract appeared in SODA 2013. This full version has 22 pages and 1 picture
Categories: cs.DS, cs.DM
Related articles: Most relevant | Search more
arXiv:1303.5862 [cs.DS] (Published 2013-03-23, updated 2013-03-26)
Improved Approximation Algorithm for the Number of Queries Necessary to Identify a Permutation
arXiv:1110.3619 [cs.DS] (Published 2011-10-17)
Playing Mastermind With Constant-Size Memory
arXiv:1611.05907 [cs.DS] (Published 2016-11-17)
On the Query Complexity of Black-Peg AB-Mastermind