Calculating the Permutations of 4D Magic Cubes
by Eric Balandraud

This paper details the process of coounting the exact number of unique positions that 4D magic cubes of varying edge lengths are reachable from their pristine positions.

There are four types of hyper-cubies: those with 1, 2, 3, or 4 hyper-stickers. We'll refer them here as 1-colored, 2-colored, etc.

3x3x3x3 - i.e. the normal 4D cube with 3 stickers along each edge

For the 3x3x3x3, we can count
  • 16 4-colored,
  • 32 3-colored, and
  • 24 2-colored
  • the 8 1-colored elements are immobile and will allow us to locate the position of every other element.

    There are two steps to this process. The first one consists of counting the possible positions the cube can be constructed with regardless of positions that are unreachable from the pristine cube. The second step factors out the unreachable positions. Not all the permutations of the 24 2-colored and the 32 3-colored are possible. Only the permutations that have the same parity on the 2-colored and the 3-colored. To check that, it is enough to consider the basic moves of one face. So the number of positions reachable by just the 2-colored pieces is

    All the even permutations of the 4-colored, and the odd ones are impossible, It can be checked on the basic moves, so we count The second step, now that the maximum number of positions are determined, notice that the 2-colored pieces can have two positions on one place, but the
    position of the last one is fully determined by the positions of the 23 others, giving Every 3-colored can have 3! positions on one place, except for the last one, which can only have 3 positions, giving Finally, the 4-colored, can have 4!/2 positions on one place, except for the last one, which can have only 4 position giving All these counts, are independant of each other so the positions of the 3x3x3x3 is the product of all thiese numbers. Therefore the number of reachable positions for the 3x3x3x3 is exactly whose decimal expansion is or aproximately, 1.7 x 10^120.


    The 5x5x5x5 has there different families of 1-colored, 2-colored and 3-colored: for a grand total of whose decimal expansion is or 8.2 x 10^700 Quite a number!

    Return to Magic Cube 4D
    Return to the Superliminal home page