On the Query Complexity of Black-Peg AB-Mastermind
Abstract
:1. Introduction
2. Upper Bounds on the Number of Queries
2.1. Black-Peg AB-Mastermind, Case
Algorithm 1: Routine findFirst |
Algorithm 2: Routine findNext |
Algorithm 3: Algorithm for Permutations |
2.2. More Colors Than Positions
Algorithm 4: Routine findNext for |
3. Lower Bounds on the Number of Queries
3.1. Black-Peg AB-Mastermind, Case
Algorithm 5: Secret code adaption, |
3.2. More Colors Than Positions
Algorithm 6: Secret code adaption, |
4. Discussion
Acknowledgments
Author Contributions
Conflicts of Interest
References
- Doerr, B.; Doerr, C.; Spöhel, R.; Thomas, H. Playing Mastermind with Many Colors. J. ACM 2016, 63, 1–23. [Google Scholar] [CrossRef]
- Erdős, P.; Rényi, C. On Two Problems in Information Theory. Publ. Math. Inst. Hung. Acad. Sci. 1963, 8, 229–242. [Google Scholar]
- Knuth, D.E. The computer as a master mind. J. Recreat. Math. 1977, 9, 1–5. [Google Scholar]
- Francis, J. Strategies for playing MOO, or “Bulls and Cows”. 2010. Available online: https://pdfs.semanticscholar.org/d839/f794cccd174790b0cde695d3626f00caf7e1.pdf (accessed on 21 December 2017).
- Stuckman, J.; Zhang, G. Mastermind is NP-Complete. INFOCOMP J. Comput. Sci. 2006, 5, 25–28. [Google Scholar]
- Bergmann, L.; Goossens, D.; Leus, R. Efficient solutions for Mastermind using genetic algorithms. Comput. Op. Res. 2009, 36, 1880–1885. [Google Scholar] [CrossRef]
- Chen, Z.; Cunha, C.; Homer, S. Finding a Hidden Code by Asking Questions. In Proceedings of the 2nd Conference on Computing and Combinatorics (COCOON 1996), Hong Kong, China, 17–19 June 1996; pp. 50–56. [Google Scholar]
- Chvátal, V. Mastermind. Combinatorica 1983, 3, 325–329. [Google Scholar] [CrossRef]
- Doerr, B.; Winzen, C. Playing Mastermind with Constant-Size Memory. In Proceedings of the 29th Symposium on Theoretical Aspects of Computer Science (STACS 2012), Paris, France, 29 February–3 March 2012; pp. 441–452. [Google Scholar]
- Focardi, R.; Luccio, F.L. Cracking Bank PINs by Playing Mastermind. In Proceedings of the 5th International Conference on Fun with Algorithms (FUN 2010), Ischia, Italy, 2–4 June 2010; pp. 202–213. [Google Scholar]
- Guervós, J.J.M.; Cotta, C.; Gacia, A.M. Improving and Scaling Evolutionary Approaches to the Mastermind Problem. Proceedings of Applications of Evolutionary Computation (EvoApplications 2011), Torino, Italy, 27–29 April 2011; pp. 103–112. [Google Scholar]
- Guervós, J.J.M.; Mora, A.M.; Cotta, C. Optimizing worst-case scenario in evolutionary solutions to the Mastermind puzzle. In Proceedings of the IEEE Congress on Evolutionary Computation (CEC 2011), New Orleans, LA, USA, 5–8 June 2011; pp. 2669–2676. [Google Scholar]
- Goodrich, M.T. The Mastermind Attack on Genomic Data. In Proceedings of the 30th IEEE Symposium on Security and Privacy (SP 2009), Oakland, CA, USA, 17–20 May 2009; pp. 204–218. [Google Scholar]
- Jäger, G.; Peczarski, M. The number of pessimistic guesses in Generalized Mastermind. Inf. Process. Lett. 2009, 109, 635–641. [Google Scholar] [CrossRef]
- Kalisker, T.; Camens, D. Solving Mastermind Using Genetic Algorithms. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO 2003), Chicago, IL, USA, 12–16 July 2003; pp. 1590–1591. [Google Scholar]
- Koyama, K.; Lai, T.W. An optimal Mastermind strategy. J. Recreat. Math. 1993, 25, 251–256. [Google Scholar]
- Goodrich, M.T. On the algorithmic complexity of the Mastermind game with black-peg results. Inf. Process. Lett. 2009, 109, 675–678. [Google Scholar] [CrossRef]
- Jäger, G.; Peczarski, M. The number of pessimistic guesses in Generalized Black-peg Mastermind. Inf. Process. Lett. 2011, 111, 933–940. [Google Scholar] [CrossRef]
- Jäger, G.; Peczarski, M. The worst case number of questions in Generalized AB game with and without white-peg answers. Discret. Appl. Math. 2015, 184, 20–31. [Google Scholar] [CrossRef]
- Ko, K.; Teng, S. On the Number of Queries Necessary to Identify a Permutation. J. Algorithms 1986, 7, 449–462. [Google Scholar] [CrossRef]
- El Ouali, M.; Sauerland, V. Improved Approximation Algorithm for the Number of Queries Necessary to Identify a Permutation. In Proceedings of the 24th International Workshop on Combinatorial Algorithms (IWOCA 2013), Rouen, France, 10–12 July 2013; pp. 443–447. [Google Scholar]
- Berger, A.; Chute, C.; Stone, M. Query Complexity of Mastermind Variants. arXiv, 2016; arXiv:1607.04597. [Google Scholar]
© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
El Ouali, M.; Glazik, C.; Sauerland, V.; Srivastav, A. On the Query Complexity of Black-Peg AB-Mastermind. Games 2018, 9, 2. https://doi.org/10.3390/g9010002
El Ouali M, Glazik C, Sauerland V, Srivastav A. On the Query Complexity of Black-Peg AB-Mastermind. Games. 2018; 9(1):2. https://doi.org/10.3390/g9010002
Chicago/Turabian StyleEl Ouali, Mourad, Christian Glazik, Volkmar Sauerland, and Anand Srivastav. 2018. "On the Query Complexity of Black-Peg AB-Mastermind" Games 9, no. 1: 2. https://doi.org/10.3390/g9010002
APA StyleEl Ouali, M., Glazik, C., Sauerland, V., & Srivastav, A. (2018). On the Query Complexity of Black-Peg AB-Mastermind. Games, 9(1), 2. https://doi.org/10.3390/g9010002