Abstract
Mastermind is a famous two-player game introduced by M. Meirowitz (1970). Its combinatorics has gained increased interest over the last years for different variants.
In this paper we consider a version known as the Black-Peg AB Game, where one player creates a secret code consisting of c colors on \(p \le c\) pegs, where each color is used at most once. The second player tries to guess the secret code with as few questions as possible. For each question he receives the number of correctly placed colors. In the static variant the second player doesn’t receive the answers one at a time, but all at once after asking the last question. There are several results both for the AB and the static version, but the combination of both versions has not been considered so far. The most prominent case is \(n:=p=c\), where the secret code and all questions are permutations. The main result of this paper is an upper bound of \(\mathcal {O}(n^{1.525})\) questions for this setting. With a slight modification of the arguments of Doerr et al. (2016) we also give a lower bound of \(\varOmega (n\log n)\). Furthermore, we complement the upper bound for \(p=c\) by an optimal \((\lceil 4c/3 \rceil -1)\)-strategy for the special case \(p=2\) and arbitrary \(c\ge 2\) and list optimal strategies for six additional pairs (p, c) .
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Asuncion, A.U., Goodrich, M.T.: Nonadaptive mastermind algorithms for string and vector databases, with case studies. IEEE Trans. Knowl. Data Eng. 25(1), 131–144 (2013)
Baker, R.C., Harman, G., Pintz, J.: The difference between consecutive primes II. Proc. Lond. Math. Soc. 83(3), 532–632 (2001)
Cáceres, J., Hernando, C., Mora, M., Pelayo, I.M., Puertas, M.L., Seara, C., Wood, D.R.: On the metric dimension of cartesian products of graphs. SIAM J. Discret. Math. 21(2), 423–441 (2007)
Doerr, B., Doerr, C., Spöhel, R., Thomas, H.: Playing Mastermind With Many Colors. J. ACM 63(5), 42:1–42:23 (2016). ACM
El Ouali, M., Glazik, C., Sauerland, V., Srivastav, A.: On the query complexity of black-peg AB-mastermind. CoRR, abs/1611.05907 2016) http://arxiv.org/abs/1611.05907
Focardi, R., Luccio, F.L.: Guessing bank PINs by winning a mastermind game. Theory Comput. Syst. 50(1), 52–71 (2012)
Fort, M.K., Hedlund, G.A.: Minimal coverings of pairs by triples. Pac. J. Math. 8(4), 709–719 (1958)
Jäger, G.: An optimal strategy for static black-peg mastermind with two pegs. In: Chan, T.-H.H., Li, M., Wang, L. (eds.) COCOA 2016. LNCS, vol. 10043, pp. 670–682. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-48749-6_48
Jäger, G., Peczarski, M.: The number of pessimistic guesses in generalized mastermind. Inf. Process. Lett. 109(12), 635–641 (2009)
Jäger, G., Peczarski, M.: The number of pessimistic guesses in generalized black-peg mastermind. Inf. Process. Lett. 111(19), 933–940 (2011)
Jäger, G., Peczarski, M.: The worst case number of questions in generalized AB game with and without white-peg answers. Discret. Appl. Math. 184, 20–31 (2015)
Riordan, J.: Introduction to Combinatorial Analysis. Dover Books on Mathematics. Dover Publications, New York (2002)
Schrijver, A.: Combinatorial Optimization: Polyhedra and Efficiency. Algorithms and Combinatorics, 1st edn. Springer, Heidelberg (2003)
Stuckman, J., Zhang, G.Q.: Mastermind is NP-complete. INFOCOMP J. Comput. Sci. 5(2), 25–28 (2006)
Source Code of the Computer Program of this Article. http://snovit.math.umu.se/~gerold/source_code_static_ab_game.tar.gz
Acknowledgments
The second author’s research was supported by the Kempe Foundation Grant No. SMK-1354 (Sweden).
Furthermore, we would like to thank the anonymous referees for their valuable comments which significantly helped to improve the paper.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Glazik, C., Jäger, G., Schiemann, J., Srivastav, A. (2017). Bounds for Static Black-Peg AB Mastermind. In: Gao, X., Du, H., Han, M. (eds) Combinatorial Optimization and Applications. COCOA 2017. Lecture Notes in Computer Science(), vol 10628. Springer, Cham. https://doi.org/10.1007/978-3-319-71147-8_28
Download citation
DOI: https://doi.org/10.1007/978-3-319-71147-8_28
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-71146-1
Online ISBN: 978-3-319-71147-8
eBook Packages: Computer ScienceComputer Science (R0)