Skip to main content.

Solution to puzzle 151: Painted cubes

Skip restatement of puzzle.Twenty-seven identical white cubes are assembled into a single cube, the outside of which is painted black.  The cube is then disassembled and the smaller cubes thoroughly shuffled in a bag.  A blindfolded man (who cannot feel the paint) reassembles the pieces into a cube.  What is the probability that the outside of this cube is completely black?


This problem is a counting exercise.  We will count the number of cube orientations and arrangements such that the outside of the larger cube is black, and then divide this by the total number of possible orientations and arrangements to obtain the required probability.

We will count without any consideration of symmetry.  Other counting methods could be used, but as long as we are consistent we will obtain the correct probability.

Consider the four types of cubes upon disassembly:

  1. 8 cubes with three faces painted black;
  2. 12 cubes with two black faces;
  3. 6 cubes with one black face;
  4. 1 completely white cube.

Each cube of type (a) must be oriented in one of three ways, giving 38 possible orientations.  Next, each corner cube must be placed in one of eight corners, giving 8! possible arrangements.  Thus we have 38 · 8! possibilities in all.

Similarly, each cube of type (b) must be oriented in one of two ways, giving 212 possible orientations.  Then, each edge cube must go to one of 12 edges, giving 12! possible arrangements.  Thus we have 212 · 12! possibilities in all.

Also, each cube of type (c) has four possible orientations, and may be placed in one of six positions, yielding 46 · 6! possibilities.

Finally, the one white cube of type (d) may be oriented in 24 ways.  (Four ways for each face.)

Thus the total number of correct reassemblings is a = 38 · 8! · 212 · 12! · 46 · 6! · 24.

To find the total number of possible reassemblings, consider that each cube may be oriented in 24 ways, and there are 27! possible arrangements of the cubes, giving b = 2427 · 27! possibilities in all.

Therefore, the probability that the outside of the reassembled cube is completely black is
a/b = 1/(256 · 322 · 52 · 7 · 11 · 132 · 17 · 19 · 23) = 1/5465062811999459151238583897240371200 is approximately equal to 1.83 × 10−37.

Source: The IMO Compendium, by Dusan Djukic, Vladimir Jankovic, Ivan Matic, Nikola Petrovic. See section 3.22.2, problem 5.

Back to top