The obvious answer is that the bug crawls straight down a
vertical edge (3 inches), and then travels the diagonal of the bottom
rectangular side. Pythagoras tells us this diagonal has length
(52 + 122)1/2 = 13 inches,
so the total travel distance of 16 inches. This analysis, however, is wrong
(and why the
puzzle is so devilishly clever). The actual path the bug should take may
be more easily seen by mentally taking off the top of the box, cutting
along the vertical edges, and folding the sides down onto the same
plane as the bottom. Then one can see a straight-line path from the
one corner to its opposite as the hypotenuse of a right triangle with
sides of 5 inches and 12+3=15 inches. This hypotenuse becomes the
optimal path for the bug after the sides are folded back up; its length
being (52 + 152)1/2 =
2501/2 ~= 15.8 inches.
Here is a variation on this puzzle that has an even