Table of Contents
Fetching ...

Price of Locality in Permutation Mastermind: Are TikTok influencers Chaotic Enough?

Bernardo Subercaseaux

TL;DR

This work investigates the cost of locality in permutation Mastermind by quantifying how restricting consecutive guesses to be locally similar affects the ability to identify the secret permutation $\sigma^*$. Using a Cayley-graph formulation, the authors derive adaptive and static lower bounds under $\ell_k$-locality and analyze window locality via diameter arguments, then convert these into upper bounds by simulating non-local strategies within the restricted graphs. They establish a clear complexity separation: $\ell_3$-local satisfiability is NP-hard, while $2$-local PM-SAT is solvable in randomized polynomial time via parity-constrained perfect matchings, revealing a sharp computational divide across locality regimes. Across the board, locality can force a transition from $O(n \log n)$ to $\Theta(n^2)$ performance, delineating the algorithmic limits of human-like, locally constrained strategies for this combinatorial game.

Abstract

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.

Price of Locality in Permutation Mastermind: Are TikTok influencers Chaotic Enough?

TL;DR

This work investigates the cost of locality in permutation Mastermind by quantifying how restricting consecutive guesses to be locally similar affects the ability to identify the secret permutation . Using a Cayley-graph formulation, the authors derive adaptive and static lower bounds under -locality and analyze window locality via diameter arguments, then convert these into upper bounds by simulating non-local strategies within the restricted graphs. They establish a clear complexity separation: -local satisfiability is NP-hard, while -local PM-SAT is solvable in randomized polynomial time via parity-constrained perfect matchings, revealing a sharp computational divide across locality regimes. Across the board, locality can force a transition from to performance, delineating the algorithmic limits of human-like, locally constrained strategies for this combinatorial game.

Abstract

In the permutation Mastermind game, the goal is to uncover a secret permutation by making a series of guesses which must also be permutations of , and receiving as feedback after guess the number of positions for which . While the existing literature on permutation Mastermind suggests strategies in which and 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: -local strategies, in which any two consecutive guesses differ in at most positions, and the even more restrictive class of -local strategies, in which consecutive guesses differ in a window of length at most . We show that, in broad terms, the optimal number of guesses for local strategies is quadratic, and thus much worse than the 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 algorithm.
Paper Structure (10 sections, 19 theorems, 59 equations, 5 figures, 2 tables, 2 algorithms)

This paper contains 10 sections, 19 theorems, 59 equations, 5 figures, 2 tables, 2 algorithms.

Key Result

Theorem 1

For the $\ell_k$-local setting, we have $\frac{n^2 - 3n}{2k} \leqslant A_\ell(n, k) \leqslant \frac{n^2 \lg n}{k}(1+o(1)).$

Figures (5)

  • Figure 1: Illustration of a game of permutation Mastermind for $n = 6$ from TikTok TikTokMake. Guesses are labeled by treating the secret permutation as the identity $\sigma^\star := (1 \, 2 \, 3\, 4 \, 5 \, 6)$.
  • Figure 2: Optimal adaptive strategy for the $\ell_2$-local setting, with $n = 4$. We have $A_{\ell}(4, 2) = 7$. The edges represent the black-peg score obtained.
  • Figure 3: Illustration of the proof for \ref{['obs:unique']}. Edges of the original matching $M$ are colored red, and edges in $E(C) \setminus M$ are dashed blue. Gray edges are not part of the matchings, and the resulting matching $M'$ is colored green.
  • Figure 4: The half graph $H_5$, with $\binom{6}{2} = 15$ edges. Its only perfect matching is highlighted in orange.
  • Figure 5: Illustration of the obstacle introduced by a $K_{2,2}$ for uniquely determining $\sigma^\star$. On the left, tested edges are colored light gray, while untested edges are colored black, except for those forming a $K_{2,2}$ which are highlighted.

Theorems & Definitions (47)

  • Theorem 1
  • Theorem 2
  • Theorem 3
  • Theorem 4
  • Definition 1: Graph of possible secrets
  • proof
  • Lemma 1
  • proof
  • Lemma 2
  • proof
  • ...and 37 more