Goal: Paint 27 cubes using three colors (for example, red, yellow, and blue), so that you can form a 3x3x3 cube with all surfaces in red (for example), a 3x3x3 cube all in yellow, and a 3x3x3 cube all in blue by rearranging the painted cubes, not repainting them.
My answer is to
Paint the small cubes with the colors red, blue, and yellow as follows, so that on each cube, the faces with the same color are all mutually adjacent.
- One cube with three red faces and three blue faces
- One cube with three red faces and three yellow faces
- One cube with three blue faces and three yellow faces
- Three cubes each with three red faces, two blue faces, and one yellow face
- Three cubes each with three red faces, two yellow faces, and one blue face
- Three cubes each with three blue faces, two red faces, and one yellow face
- Three cubes each with three blue faces, two yellow faces, and one red face
- Three cubes each with three yellow faces, two red faces, and one blue face
- Three cubes each with three yellow faces, two blue faces, and one red face
- Six cubes with two faces of each color
Then you have exactly the correct number of corner, edge, face-center, and center pieces for each cube.
Here is a simple painting procedure that leads to a solution for any size of cube.
- Start with $27$ (or $64$, or $n^3$) unpainted cubes assembled into a large cube.
- Paint the outside faces one colour.
- Rearrange the cubes by removing the bottom layer and placing it on top. >! Similarly take the left-most slice and place it against the right hand side. Finally take the rear slice and place that against the front face. This puts unpainted surfaces on the outside of the cube.
- Repeat steps 2 and 3 using different colours of paint until all cubes are fully painted.
This method works for any size of cube. Note also that in the finished product, every pair of adjacent cubes has touching faces that share the same colour.
If we use colours R, G and B, then we can write:
which expands into
$$R^3G^3+G^3B^3+B^3R^3+3(R^2G^3B+G^2B^3R+B^2R^3G+R^3G^2B+R^2GB^3+RG^3B^2)+6R^2G^2B^2$$ If we let, w.l.o.g., $R=x, G=B=1$, then we have: $$(2x+1)^3=8x^3+12x^2+6x+1$$ This describes the number of corner pieces, edge pieces and centre pieces, and the coefficients total $27$. To explain a motive, we can see that each colour needs $54$ faces, and this fits exactly into the $27\times6$ faces we have available. Therefore the non-visible central cube cannot have any of the colours of the visible colour chose. Therefore there must be three of these, and also as we cannot waste space, they must consist of $2$ sets of $3$ colours. We now need to find six more corners for each colour - these cannot be on the same cube for the same reasons as above, and so we have partially coloured $3\times6=18$ more cubes, leaving $6$. These six must have $2$ of each colour, again for the same reasons. The last pieces then fall into place. Now we can attempt a $4\times4\times4$ colouring. The 'characteristic polynomial' we are looking for is: $$8x^3+24x^2+24x+8=(2x+2)^3$$ so we need $4$ (symmetric) elements of two each.
This sounds very similar to...
this puzzle featured in a video by TED-ED. I'll try and make a picture when I get home.