On the algorithmic complexity of the Mastermind game with black-peg results

  • Authors:
  • Michael T. Goodrich

  • Affiliations:
  • Dept. of Computer Science and Secure Computing and Networking Center, University of California, Irvine, CA, USA

  • Venue:
  • Information Processing Letters
  • Year:
  • 2009

Quantified Score

Hi-index 0.89

Visualization

Abstract

In this paper, we study the algorithmic complexity of the Mastermind game, where results are single-color black pegs. This differs from the usual dual-color version of the game, but better corresponds to applications in genetics. We show that it is NP-complete to determine if a sequence of single-color Mastermind results have a satisfying vector. We also show how to devise efficient algorithms for discovering a hidden vector through single-color queries. Indeed, our algorithm improves a previous method of Chvatal by almost a factor of 2.