# Coordinates and Symmetry

Cordinates represent cosets, each coset usually consists of many permutations.

If you move the whole cube and recolor it or you do a conjugation with a symmetry S(i) as explained two chapters ago , the coordinates usually change.

You must be careful if you want to map a coordinate by a symmetry conjugation to another coordinate. If you have two different permutations P and Q in a coset, S(i)-1*P*S(i) and S(i)-1*Q*S(i) always have to be in the same coset, else you cannot do this mapping nor can you define equivalent cosets.

This restricts the symmetries which are appliable here. It is not difficult to show that exactly those symmetries S(i) are appliable, for which the subgroup H which defines the cosets has the property S(i)-1*H*S(i) = H.

The following table shows, which symmetries are appliable to which coordinates and where this is used.

coordinate
full symmetry group with 48 elements
subgroup generated by S_F2, S_U4 and S_LR2 with 16 elements
used in
corner orientation (twist)
no
yes
phase 1, optimal solvers
edge orientation (flip)
no*
no*
-------
UDSlice
no
yes
-------
FlipUDSlice
no
yes
phase 1, optimal solver, 64430 equivalence classes
corner permutation
yes**
yes
phase 2, 2768 equivalence classes
phase 2 edge permutation
no
yes
phase 2
UDSliceSorted coordinate
no
yes
huge optimal solver, 788 equivalence classes

*It is possible to give another definition for the edge-orientations, so that the full symmetry group can be used with the edge orientation coordinate. But we prefer the usual definition which is better suited for the two-phase algorithm.
**Not used in Cube Explorer

For the FlipUDSlice coordinate, the corner permutation coordinate and the UDSliceSorted coordinate, the number of equivalence classes is given in the table.

Take for example theFlipUDSlice coordinate. The range of this coordinate x is 0..495*2048-1. But by symmetry comjugation these 1.013.760 coordinates are "reduced" to 64430 equivalence classes.

Up to 16 coordinates belong to each equivalence class - 16 and not 48 because we only use symmetries which preserve the UD-axis. For each equivalence class we store the smallest coordinate as the representant of this class in an integer array of size 64430. In general we call this array the ClassIndexToRepresentantArray.

The old integer coordinate x is then substituted by a new coordinate 16*y + i, where y is the index of the equivalence class it belongs to (0..64429) and i is the index of a symmetry (0..15) which transforms the coordinate of the representant to x. To distinguish the old and new coordinate in the text, we will call the old coodinate a raw-coordinate and the new coordinate a sym-coordinate in the following text.

This sym-coordinate has 64430*16 = 1.030.880 different values, which is more than 495*2048=1.013.760. The reason is, that for some cubes with symmetries there belong less than 16 original coordinates to one equivalence class and the replacement by the sym-coordinate is not unique because 16*y + i1 and 16*y + i2 describe the same raw-coordinate x for some i1 and i2..