# Structure of the Brainball group

This is a Brainball:

It consists of $$13$$ numbered pieces arranged in a ring and a core; each piece has one side white and one side yellow. Part of the core, the blue caps in the picture above, can flip two groups of $$3$$ and $$4$$ pieces at once like pancakes, on opposite sides of the ring; the solved position has the white faces of $$1$$ to $$13$$ running clockwise on the same side.

Scherphuis's website gives the number of positions as $$2^{12}\cdot12!$$ by noting a parity restriction (parity of piece permutation equals parity of number of yellow tiles you see) and treating positions differing by a ring twist as equal. We can effectively "quotient out" both restrictions by fixing piece $$13$$ and not turning the whole puzzle over (only twist the ring and the blue caps). The form of the puzzle and the form of the number of positions strongly suggests that the structure of the group $$G$$ of Brainball positions after quotienting out is the wreath product $$C_2\wr S_{12}$$ – my question here is on how to prove (or disprove) this.

$$G$$ has $$13$$ generators corresponding to the positions of piece $$13$$ relative to the blue caps when doing a flip. Interpret Brainball positions as permutations on $$24$$ elements, where piece $$n$$'s white side ($$1\le n\le12$$) is associated with permuted element $$n$$ and the same piece's yellow side is associated with permuted element $$12+n$$. I wrote a little Python script to print the $$13$$ generating permutations:

#!/usr/bin/env python3
import numpy as np

def flip(n):
A = np.roll(np.arange(13), n)
A[:3] = -A[2::-1]
A[6:10] = -A[9:5:-1]
k = (A == 0).nonzero()[0][0]
return np.roll(A, -k)

for n in range(13):
B = flip(n)
A = [0] * 25
for i in range(1, 13):
j = B[i]
if j < 0:
j = -j
A[j] = 12+i
A[12+j] = i
else:
A[j] = i
A[12+j] = 12+i
print(f"p{n} := PermList({A[1:]});")
print("G := Group([p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12]);")


This produces the following output:

p0 := PermList([24, 23, 1, 2, 3, 19, 18, 17, 16, 8, 9, 10, 12, 11, 13, 14, 15, 7, 6, 5, 4, 20, 21, 22]);
p1 := PermList([24, 2, 3, 4, 20, 19, 18, 17, 9, 10, 11, 13, 12, 14, 15, 16, 8, 7, 6, 5, 21, 22, 23, 1]);
p2 := PermList([3, 4, 5, 21, 20, 19, 18, 10, 11, 12, 14, 13, 15, 16, 17, 9, 8, 7, 6, 22, 23, 24, 2, 1]);
p3 := PermList([1, 2, 18, 17, 16, 15, 7, 8, 9, 24, 23, 22, 13, 14, 6, 5, 4, 3, 19, 20, 21, 12, 11, 10]);
p4 := PermList([1, 17, 16, 15, 14, 6, 7, 8, 23, 22, 21, 12, 13, 5, 4, 3, 2, 18, 19, 20, 11, 10, 9, 24]);
p5 := PermList([16, 15, 14, 13, 5, 6, 7, 22, 21, 20, 11, 12, 4, 3, 2, 1, 17, 18, 19, 10, 9, 8, 23, 24]);
p6 := PermList([24, 23, 22, 1, 2, 3, 18, 17, 16, 7, 8, 9, 12, 11, 10, 13, 14, 15, 6, 5, 4, 19, 20, 21]);
p7 := PermList([24, 23, 2, 3, 4, 19, 18, 17, 8, 9, 10, 13, 12, 11, 14, 15, 16, 7, 6, 5, 20, 21, 22, 1]);
p8 := PermList([24, 3, 4, 5, 20, 19, 18, 9, 10, 11, 14, 13, 12, 15, 16, 17, 8, 7, 6, 21, 22, 23, 2, 1]);
p9 := PermList([4, 5, 6, 21, 20, 19, 10, 11, 12, 15, 14, 13, 16, 17, 18, 9, 8, 7, 22, 23, 24, 3, 2, 1]);
p10 := PermList([1, 2, 17, 16, 15, 6, 7, 8, 24, 23, 22, 21, 13, 14, 5, 4, 3, 18, 19, 20, 12, 11, 10, 9]);
p11 := PermList([1, 16, 15, 14, 5, 6, 7, 23, 22, 21, 20, 12, 13, 4, 3, 2, 17, 18, 19, 11, 10, 9, 8, 24]);
p12 := PermList([15, 14, 13, 4, 5, 6, 22, 21, 20, 19, 11, 12, 3, 2, 1, 16, 17, 18, 10, 9, 8, 7, 23, 24]);
G := Group([p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12]);


It turns out that $$p_0$$ and $$p_3$$ can generate all of $$G$$, so set G := Group([p0, p3]). Trying to show isomorphism by H := WreathProduct(Group([(1,2)]), SymmetricGroup(12)); IsomorphismGroups(G,H); takes too long, however, so I tried the following.

gap> N := First(NormalSubgroups(G), x -> Order(x) = 4096);
<permutation group of size 4096 with 12 generators>
gap> MinimalGeneratingSet(N);
[ (11,23), (12,24), (1,13), (2,14), (3,15), (4,16), (5,17), (6,18), (7,19), (8,20), (9,21), (10,22) ]
gap> H := FactorGroup(G, N);
Group([ (1,12,10,8,5,3)(2,11,9,4)(6,7), (3,6)(4,5)(10,12) ])
gap> StructureDescription(H);
"S12"


$$N\cong C_2^{12}$$ is the only normal subgroup of order $$2^{12}$$ in $$G$$; the above commands show that the quotient $$H$$ is isomorphic to $$S_{12}$$. Combined with a comparison between the normal subgroup orders and conjugacy class counts ($$1165$$) of $$G$$ and $$C_2\wr S_{12}$$, this seems like very strong evidence for $$G\cong C_2\wr S_{12}$$, but I'm not convinced.

Are the above computations enough to show $$G\cong C_2\wr S_{12}$$? If not, what else do I need to do?

I'm not sure whether your computations are enough or not, so I'll refrain from answering that.

Instead, here's an alternative approach to show your group $$G$$ is isomorphic to the wreath product $$W := C_2 \wr S_{12}$$: they are both subgroups of $$S_{24}$$. It is sufficient to show that they are conjugate in $$S_{24}$$.

gap> G := Group([p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12]);;
gap> W := WreathProduct( Group( [ (1,2) ] ), SymmetricGroup( 12 ) );;
gap> S := SymmetricGroup( 24 );;
gap> IsConjugate( S, G, W );
true


You can also easily construct an isomorphism between $$G$$ and $$W$$:

gap> s := RepresentativeAction( S, G, W );;
gap> iso := ConjugatorIsomorphism( G, s );;
gap> Image( iso, G ) = W;
true


Of course, this approach doesn't tell you anything if the two groups are not conjugate in the common overgroup - they might still be isomorphic. But it can be a good place to start, especially because the computation times are much smaller than that of IsomorphismGroups.

Let's deal with space rotations of the puzzle by fixing the piece 13 in space. Then the symmetry group acts faithfully on the remaining 2*12=24 pieces. It is easily seen that this action is transitive.

The numbers on a physical piece (white/yellow) form a partition that is invariant under the symmetry group. Thus the group is subgroup of a wreath product $$2\wr S_{12}$$.

On the other hand, your calculations show that the group has the order of $$2\wr S_{12}$$ and thus it is the full wreath product.