Geometry / Cube Unfolding
Shortest wall path across a 10×10×10 cube
An ant starts at one corner and must reach the opposite corner while staying on the cube's surfaces. The trick is to unfold the walls so the surface path becomes a straight line.
Visualize the unfolding
Two adjacent faces become a 20×10 rectangle
Interview idea
Reduce 3D geometry to 2D
1
Don't restrict the ant to edges.
It may walk diagonally across faces.
2
Cut and unfold two neighboring faces.
They form a 20×10 rectangle.
3
Use Pythagoras.
The shortest route is the rectangle's diagonal.
Shortest distance
√(20² + 10²)
10√5 ≈ 22.36
Along edges
30
Across walls
22.36