In the permutation Mastermind game, the goal is to uncover a secret permutation $σ^\star \colon [n] \to [n]$ by making a series of guesses $π_1, \ldots, π_T$ which must also be permutations of $[n]$, and receiving as feedback after guess $π_t$ the number of positions $i$ for which $σ^\star(i) = π_t(i)$. While the existing literature on permutation Mastermind suggests strategies in which $π_t$ and $π_{t+1}$ might be widely different permutations, a resurgence in popularity of this game as a TikTok trend shows that humans (or at least TikTok influencers) use strategies in which consecutive guesses are very similar. For example, it is common to see players attempt one transposition at a time and slowly see their score increase. Motivated by these observations, we study the theoretical impact of two forms of "locality" in permutation Mastermind strategies: $\ell_k$-local strategies, in which any two consecutive guesses differ in at most $k$ positions, and the even more restrictive class of $w_k$-local strategies, in which consecutive guesses differ in a window of length at most $k$. We show that, in broad terms, the optimal number of guesses for local strategies is quadratic, and thus much worse than the $O(n \lg n)$ guesses that suffice for non-local strategies. We also show NP-hardness of the satisfiability version for $\ell_3$-local strategies, whereas in the $\ell_2$-local variant the problem admits a randomized polynomial algorithm.
翻译:在排列式猜谜游戏中,目标是通过一系列猜测 \(\pi_1, \ldots, \pi_T\)(这些猜测也必须是 \([n]\) 的排列),每次猜测 \(\pi_t\) 后接收反馈:满足 \(\sigma^\star(i) = \pi_t(i)\) 的位置 \(i\) 的数量,从而揭示出秘密排列 \(\sigma^\star \colon [n] \to [n]\)。尽管现有关于排列式猜谜游戏的文献表明其策略中 \(\pi_t\) 和 \(\pi_{t+1}\) 可能是差异极大的排列,但该游戏作为TikTok趋势重新流行后,人类(或至少是TikTok网红)使用的策略中连续猜测往往高度相似。例如,常见玩家每次尝试一对位置的交换,并逐步观察得分上升。受这些观察启发,我们研究了排列式猜谜策略中两种“局部性”形式对理论的影响:\(\ell_k\)-局部策略(任意连续两次猜测最多在 \(k\) 个位置上不同),以及更具限制性的 \(w_k\)-局部策略(连续猜测仅在长度不超过 \(k\) 的窗口内不同)。我们广义上证明,局部策略的最优猜测次数是二次量级,因此远逊于非局部策略所需的 \(O(n \lg n)\) 次猜测。我们还证明 \(\ell_3\)-局部策略的可满足性问题属于NP困难问题,而 \(\ell_2\)-局部变体则允许随机多项式算法。