Skip to main content

Playing Several Variants of Mastermind with Constant-Size Memory is not Harder than with Unbounded Memory

  • Conference paper
  • First Online:
Combinatorial Algorithms (IWOCA 2014)

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

Included in the following conference series:

  • International Workshop on Combinatorial Algorithms

Abstract

We investigate a version of the Mastermind game, where the codebreaker may only store a constant number of questions and answers, called Constant-Size Memory Mastermind, which was recently introduced by Doerr and Winzen. We concentrate on the most difficult case, where the codebreaker may store only one question and one answer, called Size-One Memory Mastermind. We consider two variants of the game: the original one, where the answer is coded with white and black pegs, and the simplified one, where only black pegs are used in the answer. We show that for two pegs and an arbitrary number of colors, the number of questions needed by the codebreaker in an optimal strategy in the worst case for these games is equal to the corresponding number of questions in the games without a memory restriction. In other words, for these cases restricting the memory size does not make the game harder for the codebreaker. This is a continuation of a result of Doerr and Winzen, who showed that this holds asymptotically for a fixed number of colors and an arbitrary number of pegs. Furthermore, by computer search we determine additional pairs (pc), where again the numbers of questions in an optimal strategy in the worst case for Size-One Memory Mastermind and original Mastermind are equal.

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

Access this chapter

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

Institutional subscriptions

References

  1. Chen, S.T., Lin, S.S.: Optimal algorithms for \(2 \times n\) AB games–a graph-partition approach. J. Inform. Sci. Eng. 20(1), 105–126 (2004)

    Google Scholar 

  2. Chen, S.T., Lin, S.S.: Optimal algorithms for \(2 \times n\) Mastermind games–a graph-partition approach. Comput. J. 47(5), 602–611 (2004)

    Article  Google Scholar 

  3. Chvátal, V.: Mastermind. Combinatorica 3(3–4), 325–329 (1983)

    Article  MATH  MathSciNet  Google Scholar 

  4. Doerr, B., Spöhel, R., Thomas, H., Winzen, C.: Playing mastermind with many colors. In: Proceedings of the 24th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2013), SIAM, pp. 695–704 (2013)

    Google Scholar 

  5. Doerr, B., Winzen, C.: Memory-restricted black-box complexity of OneMax. Inform. Process. Lett. 112(1–2), 32–34 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  6. Doerr, B., Winzen, C.: Playing Mastermind with constant-size memory. In: Proceedings of 29th International Symposium on Theoretical Aspects of Computer Science (STACS 2012). Leibniz International Proceedings in Informatics (LIPIcs), vol. 14, pp. 441–452. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2012)

    Google Scholar 

  7. Doerr, B., Winzen, C.: Playing Mastermind with constant-size memory. Theory Comput. Syst. 55(4), 658–684 (2014)

    Article  MATH  MathSciNet  Google Scholar 

  8. Droste, S., Jansen, T., Wegener, I.: Upper and lower bounds for randomized search heuristics in black-box optimization. Theory Comput. Syst. 39(4), 525–544 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  9. Erdős, P., Rényi, A.: On two problems of information theory. Magyar Tud. Akad. Mat. Kutató Int. Közl. 8, 229–243 (1963)

    Google Scholar 

  10. Goddard, W.: Static Mastermind. J. Combin. Math. Combin. Comput. 47, 225–236 (2003)

    MATH  MathSciNet  Google Scholar 

  11. Goodrich, M.T.: On the algorithmic complexity of the Mastermind game with black-peg results. Inform. Process. Lett. 109(13), 675–678 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  12. Jäger, G., Peczarski, M.: The number of pessimistic guesses in Generalized Mastermind. Inform. Process. Lett. 109(12), 635–641 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  13. Jäger, G., Peczarski, M.: The number of pessimistic guesses in Generalized Black-peg Mastermind. Inform. Process. Lett. 111(19), 933–940 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  14. Jäger, G., Peczarski, M.: The worst case number of questions in Generalized AB game with and without white-peg answers. Discrete Appl. Math. 184, 20–31 (2015)

    Article  MathSciNet  Google Scholar 

  15. Knuth, D.E.: The computer as Mastermind. J. Recr. Math. 9(1), 1–6 (1976–1977)

    Google Scholar 

  16. Koyama, K., Lai, T.W.: An optimal Mastermind strategy. J. Recr. Math. 25(4), 251–256 (1993)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marcin Peczarski .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Jäger, G., Peczarski, M. (2015). Playing Several Variants of Mastermind with Constant-Size Memory is not Harder than with Unbounded Memory. In: Jan, K., Miller, M., Froncek, D. (eds) Combinatorial Algorithms. IWOCA 2014. Lecture Notes in Computer Science(), vol 8986. Springer, Cham. https://doi.org/10.1007/978-3-319-19315-1_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-19315-1_17

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-19314-4

  • Online ISBN: 978-3-319-19315-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics