As promised, here is the solution to the spider and the fly problem.
[ image courtesy of Futility Closet ]
Here’s Greg’s solution:
Imagine the room to be a cardboard box. Then the box may be cut in various different ways so that the cardboard may be laid flat on the table. I show four of these ways and indicate in every case the relative positions of the spider and the fly and the straightened course which the spider must take, without going off the cardboard. These are the four most favourable cases, and it will be found that the shortest route is in No. 4, for it is only 40 feet in length (add the square of 32 to the square of 24 and extract the square root).
It will be seen that the spider actually passes along five of the six sides of the room! Having marked the route, fold the box up (removing the side the spider does not use), and the appearance of the shortest course is rather surprising. If the spider had taken what most persons will consider the obviously shortest route (that shown in No. 1), he would have gone 42 feet! Route No. 2 is 43.174 feet in length and route No. 3 is 40.718 feet. I will leave the reader to discover which are the shortest routes when the spider and fly are 2, 3, 4, 5, and 6 feet from the ceiling and floor respectively.
Greg classified this problem as “tricky”. The “tricky” part is to find out in how many different ways can the rectangular “box” be “cut and laid flat”. Once that is done, it’s (almost) just a matter of computing the shortest distance path between two given endpoints in . One needs to be careful when “flatting” the box because the “flattened” box is not a convex set in , and thus a line segment connecting the two given points will not necessarily be in that non-convex set.
However, I don’t like this solution all that much. It sure works, but if points A and B were displaced from their original places, one would have to draw the 4 different “flattened” boxes once again, and then compute the distances for each case. That is not very elegant. There has got to be a nicer, more general way of solving this problem. I am still thinking of it. It’s not easy (at least for me).
Even nicer would be to devise a method to compute the shortest distance between two given points on the surface of a polyhedron, subject to the constraint that the shortest distance path must lie on the polyhedron’s surface. This is probably hard, so one could make it a bit easier by saying that the polyhedron is regular and convex, for example. Please note that I am rambling here. I will be back to this topic in a future post, when my ideas are clearer.
Comments are welcome!