# Colored Cubes (Red, Blue and Green)

You have red, blue and green unit cubes. You will create a 2x2x2 cube by using 8 of these unit cubes. What is the maximum number of different cubes you can create?

Note: If a cube can be obtained by rotating another one, these two cubes are not considered to be different.

If the problem was asked for only red and blue unit cubes, the answer would be 23.

There are 24 orientations of the cube. From any orientation, the other 23 can be generated by rotations, which can be categorized as follows:

• 3 axes passing through opposite faces; for each axis, 90 degrees clockwise, 90 degrees counterclockwise, or 180 degrees. (9 total)
• 6 axes passing through opposite edges; for each axis, 180 degrees. (6 total)
• 4 axes passing through opposite vertices; for each axis, 120 degrees clockwise or 120 degrees counterclockwise. (8 total)

We start by building all possible cubes that use all three colors. The number of these is $3^8-3\cdot2^8+3=5796$. Then, if any two cubes can be converted to each other by a rotation, we put them in a set together. We want to find the number of sets.

If no rotation brings a cube to an identical one, then it is in a set of 24. However, if a cube is the same under some rotation, it is in a set of fewer than 24. We need to determine how many cubes are in smaller sets, and what the size of those sets is. Thankfully, no cube that has multiple rotational symmetries around different axes uses all three colors, so we can ignore the possibility of multiple rotational symmetries. Also, no cube that remains the same under a 90-degree rotation uses all three colors. We only need to consider the 180-degree rotations and the 120-degree rotations.

There are 9 possible 180-degree rotations. For each one, a cube that remains the same under that rotation is defined by the colors of four subcubes, so there are $3^4-3\cdot2^4+3=36$ for each of the nine rotations. This is a total of $324$ cubes, which are in sets of 12.

There are 8 possible 120-degree rotations, but they come in clockwise-counterclockwise pairs. For each pair, a cube that remains the same under those rotations is also defined by the colors of four subcubes, so there are $36$ for each of the four pairs. This makes $144$ cubes, which are in sets of 8.

The remaining $5796-324-144=5328$ cubes are in sets of 24. The total number of sets is $\frac{324}{12}+\frac{144}{8}+\frac{5328}{24}=267$. Then we add the $23\cdot3-3=66$ cubes using at most two colors for a total of $\boxed{333}$.

• I've only looked at this for a min so not positive but shouldn't it be -3, making 5790? – Quark Feb 26 '16 at 23:12
• @Quark No, the single-color cubes are being double-subtracted in the $3\cdot2^8$ term. – f'' Feb 26 '16 at 23:12
• @f'' well done sir! – Oray Feb 27 '16 at 9:23