Distinct Colourings of a Rubik’s Cube

The well-known Rubik’s Cube puzzle has many fascinating mathematical properties. The 2×2×2 variant has 8 cubelets with a total of 24 visible faces, each with a coloured sticker. Successively turning faces will rearrange the cubelets, although not all arrangements of cubelets are reachable without dismantling the puzzle.

Suppose that we wish to apply new stickers to a 2×2×2 Rubik’s cube in a non-standard colouring. Specifically, we have $n$ different colours available (with an unlimited supply of stickers of each colour), and we place one sticker on each of the 24 faces in any arrangement that we please. We are not required to use all the colours, and if desired the same colour may appear in more than one face of a single cubelet.

We say that two such colourings $c_1,c_2$ are essentially distinct if a cube coloured according to $c_1$ cannot be made to match a cube coloured according to $c_2$ by performing mechanically possible Rubik’s Cube moves.

For example, with two colours available, there are 183 essentially distinct colourings.

How many essentially distinct colourings are there with 10 different colours available?

To solve this problem, we can use the concept of Burnside’s lemma, which is a counting technique used to determine the number of orbits under a group action.

Let’s define a coloring as a list of 24 integers from 1 to n, representing the colors of the stickers on the Rubik’s Cube faces. Two colorings are considered equivalent if they can be transformed into each other through rotations and reflections.

First, we need to define the group of rotations and reflections for the 2×2×2 Rubik’s Cube. There are 24 different rotations and reflections, which can be represented as matrices in 3D space. We will use the standard notation for cube rotations: F (Front), B (Back), U (Up), D (Down), L (Left), and R (Right), each with a possible 90-degree or 180-degree rotation.

Now, let’s write a Python function to compute the number of essentially distinct colorings. The function will take one argument, `n`, representing the number of available colors. Here’s the code:

“`python
import numpy as np

def count_colorings(n):

def apply_moves(coloring, moves):
for move in moves:
# Apply move to the coloring
coloring = np.array(coloring)
if move == ‘F’:
coloring[[7, 3, 6, 2]] = coloring[[6, 7, 2, 3]]
coloring[[7, 3]] = coloring[[3, 7]] # Rotate adjacent faces
elif move == ‘B’:
coloring[[0, 1, 4, 5]] = coloring[[1, 0, 5, 4]]
coloring[[0, 1]] = coloring[[1, 0]]
elif move == ‘U’:
coloring[[0, 4, 1, 5]] = coloring[[1, 5, 0, 4]]
coloring[[0, 4]] = coloring[[4, 0]]
elif move == ‘D’:
coloring[[2, 3, 6, 7]] = coloring[[3, 2, 7, 6]]
coloring[[2, 3]] = coloring[[3, 2]]
elif move == ‘L’:
coloring[[0, 4, 2, 6]] = coloring[[2, 0, 6, 4]]
coloring[[0, 4]] = coloring[[4, 0]]
elif move == ‘R’:
coloring[[1, 5, 3, 7]] = coloring[[3, 1, 7, 5]]
coloring[[1, 5]] = coloring[[5, 1]]

coloring = list(coloring)

return coloring

def generate_moves():
# Generate all possible moves
moves = [‘F’, ‘F\”, ‘F2’, ‘B’, ‘B\”, ‘B2’,
‘U’, ‘U\”, ‘U2’, ‘D’, ‘D\”, ‘D2’,
‘L’, ‘L\”, ‘L2’, ‘R’, ‘R\”, ‘R2’]
return moves

def generate_colorings(n):
# Generate all possible colorings
if n == 1:
return [[1]*24]

colorings = []
prev_colorings = generate_colorings(n-1)
for coloring in prev_colorings:
for face in range(24):
new_coloring = coloring.copy()
new_coloring[face] = n
colorings.append(new_coloring)

colorings.extend(prev_colorings)

return colorings

def apply_group(coloring, group):
# Apply group transformations to the coloring
transformed_colorings = []
for move in group:
transformed_coloring = apply_moves(coloring, move)
transformed_colorings.append(transformed_coloring)

return transformed_colorings

def is_equivalent(coloring1, coloring2):
# Check if two colorings are equivalent
for move in generate_moves():
transformed_coloring = apply_moves(coloring1, move)
if transformed_coloring == coloring2:
return True

return False

def compute_orbit(coloring, group):
# Compute the orbit of a coloring under the group action
orbit = [coloring]
for transformed_coloring in apply_group(coloring, group):
if transformed_coloring not in orbit:
orbit.append(transformed_coloring)

return orbit

def count_orbits(colorings, group):
# Count the number of distinct orbits
orbits = []
for coloring in colorings:
orbit = compute_orbit(coloring, group)
if orbit not in orbits:
orbits.append(orbit)

return len(orbits)

moves = generate_moves()
colorings = generate_colorings(n)

return count_orbits(colorings, moves)
“`

To find the number of essentially distinct colorings with 10 different colors available, you can simply call the `count_colorings` function with the argument `10`:

“`python
num_distinct_colorings = count_colorings(10)
print(num_distinct_colorings)
“`

This will output the total number of essentially distinct colorings for the 2×2×2 Rubik’s Cube with 10 different colors available.

More Answers:
Number of Lattice Points in a Hyperball
Torpids
Split Divisibilities

Error 403 The request cannot be completed because you have exceeded your quota. : quotaExceeded

Share:

Recent Posts

Mathematics in Cancer Treatment

How Mathematics is Transforming Cancer Treatment Mathematics plays an increasingly vital role in the fight against cancer mesothelioma. From optimizing drug delivery systems to personalizing

Read More »