Further reflections on the Rubik's Cube

Visual metaphor and pun Since my previous post I've been thinking a bit more about Rubik's Cubes. I have been wondering what is the simplest way to represent their state mathematically, and by extension programatically. Configurations of the cube clearly form a group, so I set myself the goal of creating objects in python which would represent individual configurations and which could be multiplied together to form new objects. For example, I would represent an unscrambled cube, L a cube obtained from I by moving the left face clockwise, U a cube obtained from I by moving the upper face clockwise and L*U the cube obtained by rotating the left face first and then the upper face. The question is: what is the most elegant representation for each of these objects? I was initially drawn by the idea of labelling the stickers (other than the centre face ones) 1 to 48 and representing each object as a different permutation. This makes multiplica...