English

Mastermind with a Linear Number of Queries

Combinatorics 2023-09-20 v3 Data Structures and Algorithms

Abstract

Since the 1960s Mastermind has been studied for the combinatorial and information theoretical interest the game has to offer. Many results have been discovered starting with Erd\H{o}s and R\'enyi determining the optimal number of queries needed for two colors. For kk colors and nn positions, Chv\'atal found asymptotically optimal bounds when kn1ϵk \le n^{1-\epsilon}. Following a sequence of gradual improvements for knk \geq n colors, the central open question is to resolve the gap between Ω(n)\Omega(n) and O(nloglogn)\mathcal{O}(n\log \log n) for k=nk=n. In this paper, we resolve this gap by presenting the first algorithm for solving k=nk=n Mastermind with a linear number of queries. As a consequence, we are able to determine the query complexity of Mastermind for any parameters kk and nn.

Keywords

Cite

@article{arxiv.2011.05921,
  title  = {Mastermind with a Linear Number of Queries},
  author = {Anders Martinsson and Pascal Su},
  journal= {arXiv preprint arXiv:2011.05921},
  year   = {2023}
}
R2 v1 2026-06-23T20:06:01.298Z