WorksMathematics
A classification of solvable spinning-switches puzzles
Abstract
Spinning-switches puzzles ask for a predetermined sequence of moves that works despite hidden permutations of the switches. Kagey formulated the problem using a finite group of switch states and a permutation group of positions, proved solvability when both groups are -groups for one prime , and classified the case of abelian switch groups. We prove the converse without an abelian hypothesis: for nontrivial finite groups and , with acting faithfully on a finite set , a surjective strategy for exists exactly when and are -groups for the same prime. This answers Kagey's Open Question 31. The necessity proof restricts the adversary to a prime-order element and tracks excluded configurations by cosets of prime-power subgroups. We also give a central-series proof of the known sufficient condition. The classification and its consequences for and are formalized in Lean. This work has not yet been reviewed by experts. The proofs, the Lean formalization and the text were produced by AI models, working under the author's direction.
Introduction
A player changes hidden switches while an adversary permutes their positions. The player must choose the moves in advance. Kagey’s model [1] assigns a group to each switch and lets a group act on the set of positions . Write for the configuration group, with pointwise multiplication, and put
A move is an arbitrary element of ; in particular, it may change several switches at once. For fixed moves and adversary choices , put and . Write . Following Definition 9 of [1 arXiv v1], the moves form a surjective strategy if, for every adversary sequence, . Equivalently, from every initial configuration , some equals 1. No observation of the spins is available.
Theorem 1. Let and be nontrivial finite groups, and let act faithfully on a finite set . There is a surjective strategy for if and only if there is a prime for which both and are -groups.
The action need not be transitive. A -group here means a finite group whose order is a power of . The nontriviality assumptions matter: trivial switches need no moves, and a trivial adversary permits a tour of any finite configuration group. If is the kernel of the action, each depends only on the images of the in , so has a surjective strategy if and only if does. Hence in general a surjective strategy exists if and only if , or acts trivially, or and are -groups for one prime .
All statement numbers below refer to arXiv:2210.09408v1, posted October 17, 2022, of Kagey’s 2023 paper [1]. Theorem 22 gives the sufficient condition in Theorem 1. Theorem 23 gives the equivalence when is abelian. Open Question 31 asks for the finite wreath products admitting a surjective strategy. Our contribution is necessity for arbitrary finite switch groups, including nonabelian groups; § 3 reproves the known sufficiency for a complete formal proof. Earlier rotating-table and blind-bartender puzzles were studied by Bar Yehuda, Etzion and Moran [3] and Ehrenborg and Skinner [4]; Rabinovich’s linear-action criterion [5], stated as Theorem 13 of [1 arXiv v1], says that a faithful linear action on a finite-field vector space of characteristic admits a strategy exactly when the acting group is a -group. That linear setting does not cover nonabelian switch groups; our coset invariant supplies necessity in this case.
Theorem 26 of that version asserts solvability for when is generated by involutions. This assertion was already corrected: ndkrempel reported on MathOverflow on December 7, 2025 that Theorem 26 fails, and Kagey acknowledged the error there on December 8, 2025, noting that Example 27 fails [2]. The classification, not that correction, is the claim of this paper. For example, it implies that , with interchanging two positions, is unsolvable, refuting Conjecture 32 (already implicit in the Theorem 26 correction). It refutes Conjecture 33 for every : on three cyclically permuted positions is unsolvable because is even; the case holds by Theorem 22. For a nontrivial -group acting faithfully, it settles Conjecture 34 exactly: a strategy exists precisely when is a -group; the trivial adversary case is always solvable, as above. The formalized negative instances are and , with group orders 6, 2 and 12, 3, respectively.
The prime-order obstruction
Fix a prime , an element of order , and a position that moves. Its orbit has elements. Restrict the adversary to . For and , define
For a move sequence, set and . These are configurations excluded from surviving play, expressed in the adversary’s moving coordinates.
Lemma 2. If , the moves are not a surjective strategy.
Proof. Choose . Recursively, (1) gives such that . Every is nonidentity. Set and . The multiplication in gives, inductively,
since . Thus for every prefix, so the base projections miss . □
Say that is -aligned on , for a subgroup , if for all . This means its values on lie in one left coset of .
Lemma 3. If every member of is -aligned on for a -subgroup , then there is a -subgroup such that every member of is -aligned on .
Proof. For with , rotate any to any in (1) and apply alignment at . This gives
Put
If , take . Otherwise (3) supplies . We have : indeed, exactly when . Also normalizes . To see this, write ; for ,
This proves , hence equality by finiteness. Multiplying shows , so .
The subgroup is a -group, being contained in a conjugate of . Consequently is a -group: is normal in and is cyclic of order dividing . Equation (3) puts every consecutive difference in . Multiplying consecutive differences around gives for all . The identity configuration satisfies the same conclusion. □
Necessity in Theorem 1. Suppose a surjective strategy exists. For any prime dividing , Cauchy’s theorem supplies an element of order ; faithfulness supplies a position it moves. Starting with the trivial subgroup and , Lemma 3 gives a -subgroup such that all of is -aligned on . Lemma 2 forces . For each , choose a configuration with value at and at . Alignment forces . Thus is a -group.
Choose a prime , possible since . Then is a -group. Because , it cannot also be a -group for a different prime . Every prime divisor of is therefore , and is a -group as well. □
Sufficiency and the formal theorem
Here is a self-contained proof of Kagey’s sufficient condition. For the full adversary, replace (1) by
Let be the result of applying these operations to along a sequence . If a play from never reaches , its moving configuration stays outside the corresponding excluded set: using (2) with in the universal condition gives , so induction excludes from . Hence implies that is surjective.
Lemma 4. Let be -invariant. Suppose a sequence of moves in satisfies . If commutes modulo with every element of , the same assertion holds for the strictly larger normal, -invariant subgroup .
Proof. The commutator hypothesis makes normal in and -invariant, and makes fix each coset . Form a sequence consisting of copies of separated by the move , where is the order of . After copies, the excluded set contains . This follows by induction. The separating move sends each guaranteed coset to in the recurrence. Each subsequent move in preserves these shifted cosets, because they are -invariant and closed under right multiplication by . Meanwhile the block restores : every excluded set contains , and the recurrence is monotone in . After copies all of is excluded. All moves used lie in .
Sufficiency in Theorem 1. If and are -groups, then is a finite -group and so is nilpotent. Begin with and the empty sequence. For , let be the upper central series, and choose the least with . Choose in this difference. Its commutators with lie in . Lemma 4 enlarges while preserving the sequence property. Finiteness makes this process reach , giving a sequence with , hence a surjective strategy.
The accompanying Lean project proves the full statement, in namespace SpinningSwitches, with the following parameters and type:
variable {G H Ω : Type*} [Group G] [Group H] [MulAction H Ω]
theorem classification [Finite G] [Finite H] [Finite Ω]
[FaithfulSMul H Ω] [Nontrivial G] [Nontrivial H] :
(∃ ks : List (Ω → G), IsSurjectiveStrategy H ks) ↔
∃ p : ℕ, p.Prime ∧ IsPGroup p G ∧ IsPGroup p H
Here IsSurjectiveStrategy quantifies over every equally long list of adversary moves and every base configuration, requiring a prefix index from zero through the list length whose base projection equals that configuration. It is exactly the definition in Section 1. For finite groups, Mathlib’s IsPGroup is equivalent to having prime-power order. The development also checks the two unsolvable examples stated above. It does not assert an optimal strategy length.
To reproduce the check, install elan, Git, and a C compiler, enter lean/ in the accompanying bundle, and run lake exe cache get, then lake build. The project pins Lean 4.34.0 and its Mathlib dependencies. The build checks the proof, its statement type, small examples, and axiom guards. The theorem uses only Lean’s standard axioms propext, Classical.choice, and Quot.sound; no compiled evaluation is used. This relies on Lean’s kernel and the stated formal definitions. The formalization uses Mathlib’s finite-group and nilpotency libraries [6]. A cached build takes several minutes.
References
- [1]P. Kagey, Spinning switches on a wreath product, Journal of Combinatorial Theory, Series A 200 (2023), 105795. doi:10.1016/j.jcta.2023.105795. Statement numbers refer to arXiv:2210.09408v1, October 17, 2022.DOI
- [2]ndkrempel and P. Kagey, comments of December 7 and December 8, 2025, on Kagey’s answer to Game on groups (generalization of spinning switches puzzle), MathOverflow, https://mathoverflow.net/a/423643.
- [3]R. Bar Yehuda, T. Etzion and S. Moran, Rotating-table games and derivatives of words, Theoretical Computer Science 108 (1993), 311–329. doi:10.1016/0304-3975(93)90196-Z.DOI
- [4]R. Ehrenborg and C. M. Skinner, The blind bartender’s problem, Journal of Combinatorial Theory, Series A 70 (1995), 249–266. doi:10.1016/0097-3165(95)90092-6.DOI
- [5]Y. Rabinovich, A generalization of the Blind Rotating Table game, Information Processing Letters 176 (2022), 106233. doi:10.1016/j.ipl.2021.106233.DOI
- [6]The mathlib Community, The Lean mathematical library, Proceedings of CPP 2020, 367–381. doi:10.1145/3372885.3373824.DOI