On the query complexity of Black-Peg AB-mastermind - Mourad El Ouali; Christian Glazik; Volkmar Sauerland; Anand Srivastav (Games, 2018)
Mastermind is a two players zero sum game of imperfect information. Starting with Erdos and Rényi (1963), its combinatorics have been studied to date by several authors, e.g., Knuth (1977), Chvátal (1983), Goodrich (2009). The first player, called 'codemaker', chooses a secret code and the second player, called 'codebreaker', tries to break the secret code by making as few guesses as possible, exploiting information that is given by the codemaker after each guess. For variants that allow color repetition, Doerr et al. (2016) showed optimal results. In this paper, we consider the so called Black-Peg variant of Mastermind, where the only information concerning a guess is the number of positions in which the guess coincides with the secret code. More precisely, we deal with a special version of the Black-Peg game with n holes and k=n k=n colors where no repetition of colors is allowed. We present upper and lower bounds on the number of guesses necessary to break the secret code. For the case k=n k=n , the secret code can be algorithmically identified within less than (n-3)log 2 n+52 n-1 (n-3)log2n+52n-1 queries. This result improves the result of Ker-I Ko and Shia-Chung Teng (1985) by almost a factor of 2. For the case k>n k>n , we prove an upper bound of (n-2)log 2 n+k+1 (n-2)logn?+k+1 . Furthermore, we prove a new lower bound of n for the case k=n k=n , which improves the recent n-loglog(n) n-loglog(n) bound of Berger et al. (2016). We then generalize this lower bound to k queries for the case k=n k=n .
Keywords: 330; Mastermind; combinatorial problem; permutation; algorithm; complexity