Hint: Try to find first the probability that the corner cubes are put into the corners, the face cubes into the faces and the edge cubes into the edges. Then the probability that they have the correct orientation.
First, number the small cubes to make them distinguishable.
Without taking into account the orientation of the smaller cubes, there are 27! possible ways to reassemble them into a big cube.
- There is 1 way to place the center cube correctly
- There are 6! ways to place the face cubes correctly
- There are 8! ways to place the corner cubes correctly
- There are 12! ways to place the edge cubes correctly
So there are 6!8!12! correct cubes (without taking into account the orientation).
Now take such a cube.
- The center cube has probability 1 of being in the correct orientation.
- Each face cube has probability 1/6 of being in the correct orientation.
- Each corner cube has probability 1/8 of being in the correct orientation.
- Each edge cube has probability 1/12 of being in the correct orientation.
This means that the probability of getting a red cube must be