Mutual Fund Mastery puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 29
- Topics
- 13
- Hard
- 30
039Give an equation for the surface area of an n by n by n Rubik's cube, counted in small unit squares. Then give an equation for how many of the small cubes show at least one face.T. Rowe PriceBaltimore · 2020
Try it first
For a standard 3 by 3 by 3 cube, how many small cubes show at least one face?
Show the worked solution
The surface is 6n² unit squares, and n³ minus (n minus 2)³ cubes show at least one face. Six faces each carry n by n squares. For the cubes, count what is hidden: peeling one layer off every side leaves an (n minus 2) cube inside, so the visible ones are n³ minus (n minus 2)³, which expands to 6n² minus 12n plus 8. For a 3 by 3 by 3 cube that is 54 squares and 26 cubes.
Why are there two different counts here?
A house with a corner room has windows on two walls of that room, but it is still one room. Counting windows and counting rooms give different numbers. The surface counts squares, and a corner cube carries three squares and an edge cube two, so the square count is always larger than the number of cubes that show. Keeping the two counts apart is half the problem; candidates who blur them give 54 for both.
The surface is the easy part. Each of six faces is an n by n grid, so the area is 6n² unit squares: 54 for a standard cube. A quick check is to rebuild it from the cube types: 8 corners showing 3 squares, 12(n minus 2) edge cubes showing 2, and 6(n minus 2)² centre cubes showing 1. For n of 3 that is 24 plus 24 plus 6, which is 54 again.
On a 4 by 4 by 4 cube the skin carries 96 squares, but only 56 cubes show, because each corner cube shows three squares and each edge cube two; the dashed 2 by 2 by 2 core of 8 cubes is hidden, and 64 minus 8 is 56. Why count the hidden cubes instead of the visible ones?
The hidden cubes form one clean block, (n minus 2) on every side, so counting them and subtracting from n³ avoids every double count. Counting the visible cubes directly means adding corners, edges and faces while remembering that each edge already lost its corners. Both routes give the same answer, and the second makes a good check.
The relationshipn small cubes along one edge (n-2)^3 the hidden core after peeling one layer from every side V(n) cubes showing at least one face What it says in wordsVisible cubes are all the cubes minus the core you cannot see; expanded, it is the surface area less a correction for corners and edges.The expanded form is worth a sentence because it links the two answers. 6n² is the square count; the minus 12n plus 8 removes the extra squares that edge and corner cubes contribute. Say the edge case too: the formula needs n of at least 2. For n of 1 it gives 2, but a single cube is one cube.
Where candidates lose it
The trap is giving 6n² as the answer to both questions. The interviewer is checking whether you notice that one cube can show up to three squares. Name the two counts before you write anything.
The second loss is trying to count visible cubes from the surface and getting tangled in double counts at the edges. Go to the hidden core first, then offer the corner, edge and face breakdown as the check.
What the interviewer asks next
- How many small cubes show exactly two faces, as a formula in n?
- For which n is the hidden core larger than the visible shell?
- How would the counts change for a 4 by 5 by 6 box?
Asked at T. Rowe Price, Equities, Baltimore, 2020 (Wall Street Oasis):
Give an equation that yields the surface area of an n by n by n Rubic's cube based on number of blocks per side
