Enter your email address:

June 19, 2011

Painted Cubes

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 are 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?


Pierce said...

1: 1.08888695 × 10^28

Anonymous said...

Pierce... I hate to sound like a 6th grade math teacher, but Please Show Your Math!!!

=D said...

he was taking 1 divided by permutation of (n=27 and r=27) which i think wasn't right. since the there are 8 equal corner pieces, 12 equal edge pieces, 6 equal center pieces, 1 unique piece right in the center. Hence, we should take (6x8x12x1)/27P27. Hence my answer will be 5.28980536154623E-26. However, I am not 100% sure of this answer. Do correct me if i am wrong

=D said...

i'm sorry, i think it should be (6!x8!x12!x1!)/27! my mistake

Secret Squïrrel said...

I'll show my working out.

The easiest way to calculate this is to count the total number of ways of stacking the 27 cubes and then count the number of ways that will give you an entirely black external surface.

The cubes are not just abstract markers but 3 dimensional objects so we must consider their orientation as well as position. It's simpler to consider position first.

Total positions
There are 27 different cubes that could be put in the "first" position (say, one of the bottom corners). Once that is chosen, there are 26 available for the "second" position; ie there 27 * 26 ways to fill the first two positions.

Doing this for all 27 positions gives 27 * 26 * ... * 2 * 1 possible choices. This is written as 27! and equals 10,888,869,450,418,352,160,768,000,000 or 1.0888869450418352160768000000 * 10^28

Total orientations
Each individual cube can have 6 different faces facing up and, for each one of those 6 up-faces, there are 4 ways to orient the cube within the larger cube, so there are 24 different ways to orient each cube in space. There are 27 cubes so the total number of orientations is 24^27 or 1.8437563379178327736384102280592 * 10^37.

Multiplying this by the total posn's gives 2.0076422061968705346977670589773 * 10^65 possible ways to rebuild the cube.

How many of those will produce an all-black exterior? Again, it's clearer to calculate position and orientation separately.

Potential all-black positions
It's fairly obvious that a face-centre piece can only go in the middle of a face as it only has one black surface. Similarly with the edge pieces, which means that the corner pieces have only the corners left in which to be put.

There are 8 corner positions and there are 8 cubes that can go in the "first" corner, 7 in the "second", etc. So 8! possible placements for the 8 corners. Similarly there are 12! possible positions for the the 12 edge pieces, and 6! for the 6 face-centres. Altogether there are 8! * 12! * 6! potential all-black positions.

All-black orientations
Of the potential positions for each individual cube, only some will have all-black exterior faces.

The corner cubes can be oriented in 3 different ways such that all three outward-facing surfaces are black. There are 8 of those, so 3^8 orientations. Similarly, the 12 edge pieces can be oriented only 2 ways for a total of 2^12 orientations, and the 6 face-centre cubes can be oriented in 4 different ways - total of 4^6 ways.

Multiplying this out gives 8! * 12! * 6! * 3^8 * 2^12 * 4^6 = 1,530,664,174,762,362,289,520,640,000 = 1.530664174762362289520640000 * 10^27 ways to build an all-black cube.

So the probability is 7.6241880651729259940550741608997 * 10^-39 or 1/1.3116150748798701962972601353377 * 10^38

John said...

secret squirrel. In calculating your all-black, I didn't see any consideration of the 24 ways to orient the center, all white block.

"Multiplying this out gives 8! * 12! * 6! * 3^8 * 2^12 * 4^6 = 1,530,664,174,762,362,289,520,640,000 = 1.530664174762362289520640000 * 10^27 ways to build an all-black cube."