33
16

The Query Complexity of a Permutation-Based Variant of Mastermind

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 \[ 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.

View on arXiv
Comments on this paper