[Math] Moving on the surface of a cube

3dcombinatorics

A $3 \times 3$ cube is composed of $27$, $1 \times 1$ cubes. Moving along the surface of the larger cube, how many ways are there to get from the closer top-left vertex, to the further bottom-right vertex?

Constraints:

  • You may only move along the surface of the cube
  • You may only move right, down, and forward
  • You may only move on the edges of the smaller cubes

Best Answer

Name the faces of the $3\times3$ cube touching the start A, B, and C. Name the faces touching the finish vertex D, E, and F. Any valid path lies within just two of these faces - one of A, B, and C, and an adjacent one of D, E, and F.

The number of paths that lie entirely within faces A and D is $9\choose3$. (Unfold the two faces into a $3\times6$ rectangle.) Similarly, there are $9\choose3$ paths that lie entirely within faces A and E, if A and E are adjacent, etc. There are 3 ways to choose one of A, B, and C and for each choice, two of the faces D, E, and F are adjacent, so this method counts $6{9\choose3}$ paths.

Unfortunately, this counts paths twice if they begin or end (but not both) by traversing an entire edge of the larger cube, and it counts paths three times if they both begin and end by traversing an entire edge of the larger cube.

The number of paths counted exactly twice is $3\cdot({6\choose3}-2)+({6\choose3}-2)\cdot3=108$, and the number of paths counted exactly three times is 6.

All told, then, there are $6{9\choose3} - 108 - 2\cdot6 = 384$ paths.

Related Question