Problem 2 · The ant on the Rubik's cube
Nine forced steps: ordering 3 moves in each direction.
Integer answer, at most 4 digitsA very small ant must go from point $A$ to point $B$ of a Rubik's cube. It can only move along the edges of the small cubes, not across the coloured stickers, and it may pass through the interior of the Rubik's cube along those edges. It wants to go without detours, along one of the shortest possible paths. How many different paths can it follow to reach its goal?

Reasoned solution
Key idea: $A$ and $B$ are opposite ends of the cube's space diagonal: the edge network (interior included) of the $3 \times 3 \times 3$ cube is a spatial grid.
To go from one end to the other without detours the ant must advance exactly $3$ units in each of the three directions: $9$ steps in total. A shortest path is therefore an ordering of the word $xxxyyyzzz$.