English

The Query Complexity of a Permutation-Based Variant of Mastermind

Data Structures and Algorithms 2018-12-21 v1 Neural and Evolutionary Computing

Abstract

We study the query complexity of a permutation-based variant of the guessing game Mastermind. In this variant, the secret is a pair (z,π)(z,\pi) which consists of a binary string z{0,1}nz \in \{0,1\}^n and a permutation π\pi of [n][n]. The secret must be unveiled by asking queries of the form x{0,1}nx \in \{0,1\}^n. For each such query, we are returned the score fz,π(x):=max{i[0..n]ji:zπ(j)=xπ(j)}; f_{z,\pi}(x):= \max \{ i \in [0..n]\mid \forall j \leq i: z_{\pi(j)} = x_{\pi(j)}\}\,; i.e., the score of xx is the length of the longest common prefix of xx and zz with respect to the order imposed by π\pi. The goal is to minimize the number of queries needed to identify (z,π)(z,\pi). This problem originates from the study of black-box optimization heuristics, where it is known as the \textsc{LeadingOnes} problem. In this work, we prove matching upper and lower bounds for the deterministic and randomized query complexity of this game, which are Θ(nlogn)\Theta(n \log n) and Θ(nloglogn)\Theta(n \log \log n), respectively.

Keywords

Cite

@article{arxiv.1812.08480,
  title  = {The Query Complexity of a Permutation-Based Variant of Mastermind},
  author = {Peyman Afshani and Manindra Agrawal and Benjamin Doerr and Carola Doerr and Kasper Green Larsen and Kurt Mehlhorn},
  journal= {arXiv preprint arXiv:1812.08480},
  year   = {2018}
}

Comments

Full version of a result previously announced in 2013. Accepted subject to minor revision at Discrete Applied Mathematics

R2 v1 2026-06-23T06:51:00.330Z