Theory of Computing Systems

, Volume 55, Issue 4, pp 658–684

Playing Mastermind with Constant-Size Memory

  • Benjamin Doerr
  • Carola Winzen

DOI: 10.1007/s00224-012-9438-8

Cite this article as:
Doerr, B. & Winzen, C. Theory Comput Syst (2014) 55: 658. doi:10.1007/s00224-012-9438-8


We analyze the classic board game of Mastermind with n holes and a constant number of colors. The classic result of Chvátal (Combinatorica 3:325–329, 1983) states that the codebreaker can find the secret code with Θ(n/logn) questions. We show that this bound remains valid if the codebreaker may only store a constant number of guesses and answers. In addition to an intrinsic interest in this question, our result also disproves a conjecture of Droste, Jansen, and Wegener (Theory Comput. Syst. 39:525–544, 2006) on the memory-restricted black-box complexity of the OneMax function class.


Mastermind Query complexity Memory-restricted algorithms 

Copyright information

© Springer Science+Business Media New York 2012

Authors and Affiliations

  • Benjamin Doerr
    • 1
  • Carola Winzen
    • 1
  1. 1.D1: Algorithms and ComplexityMax Planck Institute for InformaticsSaarbrückenGermany

Personalised recommendations