We have 27 unit cubes with $1 \mathrm{~cm}$ edges.

a) Can we paint the faces of these cubes purple, white, and yellow so that from the set, a $3 \times 3 \times 3$ cube with purple, white, and yellow faces can also be assembled?

b) What is the minimum number of faces that must be painted purple to ensure that a $3 \mathrm{~cm}$ edge cube with a purple surface can be assembled from the unit cubes?
a) A $3 \times 3$ cube has a surface area of $54 \mathrm{~cm}^{2}$, so we need to paint exactly 54 faces with each of the three colors. Divide the 27 small cubes into three groups. The first group consists of 3 cubes, each of which is painted with two colors such that 3 faces meeting at a corner are the same color, and each color appears on 2 cubes. The second group consists of $3 \times 6$ small cubes. The first 6 cubes in this group have three faces meeting at a corner painted purple, two additional faces painted white, and the sixth face painted yellow. For the second and third sets of 6 cubes, three faces meeting at a corner are painted white and yellow, respectively, with two additional faces painted yellow and purple, and the sixth face painted purple and white, respectively. This ensures that each color appears on an equal number of faces in the second group. Finally, the third group of 6 small cubes each has two adjacent faces painted purple, yellow, and white.

If we want to build a large purple cube, we select all 8 small cubes from the first and second groups that have 3 purple faces. These cubes will be placed at the corners of the large cube. The second group has 6 cubes with 2 purple faces, and the third group has 6 cubes, which together will be placed at the midpoints of the 12 edges of the large cube. The remaining 6 cubes from the second group, each with one purple face, will be placed at the centers of the 6 faces of the large cube, with their purple faces outward. Finally, the remaining cube from the first group, which has no purple faces, will be placed at the center of the large cube.

The same can be done for the other colors, as the coloring is such that the roles of the colors can be interchanged.

b) If we paint 12 faces of two small cubes white, we cannot definitely build a large purple cube, because in the large cube, only one small cube (the central one) has no visible faces. Therefore, painting $6 \cdot 27 - 12 = 150$ faces purple is not enough. However, if we paint 151 faces purple, we can definitely build a large purple cube. In this case, at least 16 cubes will be entirely purple (otherwise, the number of purple faces would be at most $15 \cdot 6 + 12 \cdot 5 = 150$), and at least 6 of the remaining 11 cubes will have more than 4 purple faces (because $16 \cdot 6 + 5 \cdot 6 + 6 \cdot 4 = 150$). From these 22 small cubes, each with at least 5 purple faces, we can place 8 at the corners and 12 at the midpoints of the edges of the large cube. Among the remaining cubes, at most one will have no purple faces, and this one will be placed at the center of the large cube, while the others will be placed at the centers of the large faces.

Based on the work of Gergely Ambrus (Szeged, Radnóti M. Gymnasium, 12th grade)

![](https://cdn.mathpix.com/cropped/2024_05_02_49256e97716be70cbea7g-1.jpg?height=345&width=371&top_left_y=1237&top_left_x=866)