# Find the Number of Small Painted Cubes

### Problem Statement

A cube is painted with some colour on all faces. Now, we cut it into 1000 small cubes of equal size. How many small cubes are not painted?

### Approach 1

One basic approach is to count the number of painted small cubes and subtract it from the total number of small cubes. Note: While solving such questions, the most important part is to visualise the cube.

If we visualise the large cube, all smaller cubes will have at least one face facing inside. So none of the smaller cubes will have all faces painted. On the other side, the maximum number of faces of the larger cube that intersect at a point = 3 (at the corners). So, the smaller cubes can have a maximum of 3 faces painted. In other words, there are three types of painted small cubes.

#### Cubes painted on 3 sides

These smaller cubes are located at the corners of the large cube. The number of smaller cubes with 3 faces painted = The number of corners in the larger cube = 8.

#### Cubes painted on 2 sides

To find the number of smaller cubes with only 2 faces painted, we need to consider the cubes where 2 faces of the larger cube meet, i.e. the edges. So these smaller cubes are positioned on the edges of the large cube.

Remember, each edge includes the smaller cubes present at the corners as well, which are painted on 3 sides. So we need to remove those 2 cubes from the number of cubes on each edge. So the number of smaller cubes with 2 faces painted at each edge = n — 2 (Here n is the length of each side of the cube).

Overall, there will be 12 such edges on the larger cube. So the number of smaller cubes with 2 faces painted = 12*(n — 2) = 12 * 8 = 96. (Here n = 10).

#### Cubes painted on 1 side

These smaller cubes are located at the face of the larger cube, excluding the cubes at corners and edges. At each face, the number of such cubes = (n — 2) * (n — 2). There are 6 faces of larger cubes, so the total number of smaller cubes with one face painted = 6 * (n — 2) * (n — 2) = 6 * 8* 8 = 384.

From the above analysis, total number of painted cubes = 8 + 12*(n — 2) + 6 * (n — 2) * (n — 2) = 8 + 96 + 384 = 488. The number of cubes not painted = 1000 – 488 = 512.

### Approach 2

In n x n x n cube, if we remove the outer layer of all 1 x 1 x 1 painted small cubes, then the dimensions of the hidden cube (not painted) will be (n — 2) x (n — 2) x (n — 2). So number of small 1 x 1 x 1 cubes not painted = (n — 2)³ = 8³ = 512.

### Critical idea to think!

Suppose we have a cuboid of dimension a*b*c painted on all sides which is cut into smaller cubes of dimension 1*1*1. Then:

• Number of cubes with 0 sides painted = (a — 2) (b — 2) (c — 2)
• Number of cubes with 1 sides painted = 2[(a — 2) (b — 2) + (b — 2)(c — 2) + (a — 2)(c — 2) ]
• Number of cubes with 2 sides painted = 4(a + b + c — 6)
• Number of cubes with 3 sides painted = 8

Enjoy learning, Enjoy mathematics!

Share on social media:

© 2020 Code Algorithms Pvt. Ltd.