I suspect this is basic but I don't know how to do it. Using the GAP system, how would I go about adding a relation to a given permutation group? For example, maybe I start with modeling a Rubik's cube as a subgroup of $S_{48}$ by the following:

\begin{align*} cube := Group( &( 1, 3, 8, 6)( 2, 5, 7, 4)( 9,33,25,17)(10,34,26,18)(11,35,27,19),\\ &( 9,11,16,14)(10,13,15,12)( 1,17,41,40)( 4,20,44,37)( 6,22,46,35),\\ &(17,19,24,22)(18,21,23,20)( 6,25,43,16)( 7,28,42,13)( 8,30,41,11),\\ &(25,27,32,30)(26,29,31,28)( 3,38,43,19)( 5,36,45,21)( 8,33,48,24),\\ &(33,35,40,38)(34,37,39,36)( 3, 9,46,32)( 2,12,47,29)( 1,14,48,27),\\ &(41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39)(16,24,32,40) ); \end{align*}

Where each of the $6$ generators corresponds to the action on the faces of turning one side. We could call these $L,R,F,B,U,D$ as is fairly customary.

But now suppose I want to consider a modification, where all the edge pieces have the same color, or one corner has three stickers of the same color. There is some homomorphism from $cube$ to this smaller group which I could define by some relations among moves (maybe I want $R^2 = 1$). However, I'm not sure how to implement this in GAP.

I've seen how to add relations to a free group, but describing a Rubik's cube as a free group seems extremely cumbersome and I'd rather work with it as a subgroup of the symmetric group. Any help is appreciated, thanks.

  • $\begingroup$ Side note: Not every new coloring (or "sticker mod") will generate a well defined group in the way you want. Consider a modified cube with just 3 colors, where opposite sides are the same color in the solved state. Turning the top face a half turn appears to do nothing to a solved cube. However, if you first turn the right side a quarter turn, then turning the top a half turn does change the look of the cube. I suspect the only colorings which will do what you want are, coloring the edges all one color, coloring the corners all one color, or both. $\endgroup$
    – Josh B.
    Commented Dec 28, 2019 at 23:49
  • $\begingroup$ Basically, you want to quotient your big group by the normal closure of the subgroup generated by your relation. I don't use GAP much, but according to the manual (gap-system.org/Manuals/doc/ref/chap39.html) it seems the syntax would be NormalClosure( G, U ). $\endgroup$
    – verret
    Commented Dec 29, 2019 at 1:09

1 Answer 1


You ask two separate questions. The second is how to factor out a relator from a permutation group in GAP. This can be done by forming the smalest normal subgroup containing the relator rel:


and then forming the factor group:


Note that in general the permutation group structure does not relate well to forming factor groups. GAP internally will sp[end quite some work to find a faithful (permutation or pc) representation for the factor, but there is, beyond the natural homomorphism) no easy way to relate group and factor group.

The first question is somewhat ill defined. Re-coloring faces (unless it corresponds to a block system) will not lead to an automorphism group that is a subgroup or a factor of your origional group, but the situation in general will be far more complicated, and the result will depend on the particular circumstances. You might want to ask (another) more specific question about what you want to do and whether there is any nice way how the automorphism group changes.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .