Creative Commons Attribution 4.0 International license
In the permutation Mastermind game, the goal is to uncover a secret permutation σ^⋆ : [n] → [n] by making a series of guesses π₁, …, π_T which must also be permutations of [n], and receiving as feedback after guess π_t the number of positions i for which σ^⋆(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: 𝓁_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 𝓁₃-local strategies, whereas in the 𝓁₂-local variant the problem admits a randomized polynomial-time algorithm.
@InProceedings{subercaseaux:LIPIcs.FUN.2026.39,
author = {Subercaseaux, Bernardo},
title = {{Price of Locality in Permutation Mastermind: Are TikTok Influencers Chaotic Enough?}},
booktitle = {13th International Conference on Fun with Algorithms (FUN 2026)},
pages = {39:1--39:21},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-417-8},
ISSN = {1868-8969},
year = {2026},
volume = {366},
editor = {Iacono, John},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.39},
URN = {urn:nbn:de:0030-drops-257585},
doi = {10.4230/LIPIcs.FUN.2026.39},
annote = {Keywords: Permutation Mastermind, Locality, NP-hard}
}