## Painted Faces

#### Problem

Twenty-seven small red cubes are connected together to make a larger cube that measures 3 x 3 x 3. All of its external faces are painted white and the cube is dismantled.

How many of the small cubes will have exactly two faces painted white?

#### Solution

The large cube will have:

- One cube with no faces painted (in the centre of the cube).
- Six cubes with one face painted (in the centre of each face).
- Eight cubes with three faces painted (on the corners of the cube).

As 1 + 6 + 8 = 15, there must be 27 15 = 12 cubes with two faces painted.

Alternatively we can consider the number of edges on the cube, 12, and realise that there is one cube on each edge that has two faces painted.

If the same exercise was performed on a 5 x 5 x 5 cube, how many cubes would have exactly two faces painted?

What about an `n` x `n` x `n` cube?

Problem ID: 129 (Nov 2003) Difficulty: 1 Star