Skip to main content

Bounds for Static Black-Peg AB Mastermind

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10628))

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 (pc) .

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

References

  1. 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)

    Article  Google Scholar 

  2. Baker, R.C., Harman, G., Pintz, J.: The difference between consecutive primes II. Proc. Lond. Math. Soc. 83(3), 532–632 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  3. 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)

    Article  MATH  MathSciNet  Google Scholar 

  4. Doerr, B., Doerr, C., Spöhel, R., Thomas, H.: Playing Mastermind With Many Colors. J. ACM 63(5), 42:1–42:23 (2016). ACM

    Article  MathSciNet  Google Scholar 

  5. 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

  6. Focardi, R., Luccio, F.L.: Guessing bank PINs by winning a mastermind game. Theory Comput. Syst. 50(1), 52–71 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  7. Fort, M.K., Hedlund, G.A.: Minimal coverings of pairs by triples. Pac. J. Math. 8(4), 709–719 (1958)

    Article  MATH  MathSciNet  Google Scholar 

  8. 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

    Chapter  Google Scholar 

  9. Jäger, G., Peczarski, M.: The number of pessimistic guesses in generalized mastermind. Inf. Process. Lett. 109(12), 635–641 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  10. Jäger, G., Peczarski, M.: The number of pessimistic guesses in generalized black-peg mastermind. Inf. Process. Lett. 111(19), 933–940 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  11. 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)

    Article  MATH  MathSciNet  Google Scholar 

  12. Riordan, J.: Introduction to Combinatorial Analysis. Dover Books on Mathematics. Dover Publications, New York (2002)

    Google Scholar 

  13. Schrijver, A.: Combinatorial Optimization: Polyhedra and Efficiency. Algorithms and Combinatorics, 1st edn. Springer, Heidelberg (2003)

    MATH  Google Scholar 

  14. Stuckman, J., Zhang, G.Q.: Mastermind is NP-complete. INFOCOMP J. Comput. Sci. 5(2), 25–28 (2006)

    Google Scholar 

  15. Source Code of the Computer Program of this Article. http://snovit.math.umu.se/~gerold/source_code_static_ab_game.tar.gz

Download references

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

Authors

Corresponding author

Correspondence to Gerold Jäger .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics