The 2x2x2 Rubik's cube (also called Pocket cube) consists of $6 \cdot 4 = 24$ small squares. A rotation of one of the faces of the cube can therefore be described as an element of $S_{24}$ (giving every square a number and checking how they move when we do a rotation of one of the faces). In GAP we could define these rotations (that generate all possible manipulations) as
gap> U := (1,2,3,4)(5,17,13,9)(6,18,14,10);
gap> L := (5,6,7,8)(1,9,21,19)(4,12,24,18);
gap> R := (13,14,15,16)(2,20,22,10)(3,17,23,11);
gap> F := (9,10,11,12)(4,13,22,7)(3,16,21,6);
gap> B := (17,18,19,20)(1,8,23,14)(2,5,24,15);
gap> D := (21,22,23,24)(11,15,19,7)(12,16,20,8);
If we now define the pocket cube as the subgroup of $S_{24}$ that is generated by these elements we get a subgroup of size $88179840=2^7 \cdot 3^9 \cdot 5 \cdot 7$:
gap> fullCube := Group(U,L,R,F,B,D);
gap> Print(Size(fullCube));
88179840
It is, however, well known that the pocket cube only has $3674160=2^4 \cdot 3^8 \cdot 5 \cdot 7$ different positions. The thing that went wrong is that rotating the full cube yields (in our eyes) the same cube. However, in the group fullCube it would be a different position. Hence, the idea is to consider the subgroup generated by these "full rotations".
gap> x := (5,8,7,6)(1,19,21,9)(2,20,22,10)(3,17,23,11)(4,18,24,12)(13,14,15,16); # turn front to top
gap> y := (1,2,3,4)(5,17,13,9)(6,18,14,10)(7,19,15,11)(8,20,16,12)(21,24,23,22); # turn right to front
gap> z := (8,1,14,23)(5,2,15,24)(7,4,13,22)(6,3,16,21)(9,10,11,12)(17,20,19,18); # turn top to right
gap> rotations := Group(x,y,z);
gap> Print(Size(rotations));
24
This looks good as the subgroup of rotations has $24=2^3 \cdot 3$ elements. So, if we factor fullCube by rotations we should get exactly the group we are looking for with the $3674160=88179840/24$ elements. Two elements in the group fullCube would be considered equal if and only if they represent the same position (without regarding the rotation of the entire cube). Let's try this and first check whether rotations is really a normal subgroup of fullCube:
gap> Print(IsNormal(fullCube, rotations));
false
Surprise (at least for me...), this is not a normal subgroup. So, we cannot consider the quotient group...
This construction seems like the most natural approach for constructing the group. Why does this fail? Is there a way to fix it and still define the pocket cube group as a quotient group?
Note that a different way to define the group would be to consider one of the corner pieces fixed and therefore only consider certain face rotations which generated the group:
gap> cube := Group(U,L,B); # cube where bottom right cubie is fixed
gap> Print(Size(cube));
3674160
This does work and yields the right group. It is, however, to me, not as intuitive as the other approach.