Here you can read the first draft of 'Twelve Towers' from beginning to end without the pagebreaks. So, if you don't like flipping around posts or don't want to lose track, this is an easier place to read it.
Exit Path is a 2D jump 'n' run game through perilous traps and platforms. Aim of the game is to reach the exit without dying. Push arrow keys to move, jump or crouch. Hold the arrow up longer to jump higher. Hit spacebar or shift to flow if available and follow the exit path. Avoid the traps from stopping you on your way to the exit. Exit Path, a free online Action game brought to you by Armor Games. Version 1.0.7 6/1/10 is the most current version, you may need to refresh or clear cache to update (see release notes below) Exit Path is a multiplayer and uniplayer guantlet-style racing game through perilous traps and platforms.
You sent in a large number of solutions to this problem but many of them only considered the spider moving horizontally or vertically but not diagonally across the sides of the room. I have included below a net of the room with the path of the spider as it takes the shortest route over the ceiling. I hope it helps you to see what was going on. However the spider could walkaround the walls to get to the fly or along the floor - risking a human foot!
Andrei of Tudor Vianu National College calculated the distance the spider must travel in the original problem and has worked out when it is best to go via the floor instead of the ceiling.
The shortest distance is $7.40355$ m, i.e. the first situation. This is because the dimension 'wide' is larger than the dimension 'high'and the spider starts from the middle of the wall.
Now I analyze the situation when the fly goes down the wall. In the first case, with the fly fixed, it was situated in the upper middle of the face, so it was better for the spider to go on the top of the box. When the fly arrives at the middle (height) of the box, it is the same for the spider to go over the top or over the bottom of the box. When the fly goes still further to the bottom, thespider should go on the bottom of the box.
However in some cases it is quicker to go via the side wall instead of either the floor or the ceiling. Gillian sent us in the following diagrams to help explain how she worked out when this is the case:
Exit Pathspiter Games On
My first diagram shows the measurements when the spider is crawling along the ceiling. She has to go along $(8.75 - h)$ metres and down $1.5$ metres, so the shortest distance she can travel is the square root of $(8.75-h)^2 + 1.5^2$. As the height, $h$, of the fly decreases, the distance increases.
If she crawls along the floor, the shortest distance she can travel is the square root of $(6.25+h)^2 + 1.5^2$. As h descreases, the distance decreases. These two results could be seen just by common sense.
My second diagram shows the measurements when the spider is crawling along the wall closest to the fly. This way, she goes along $7.5$ metres and up $(h - 1.25)$ metres. The shortest distance she can crawl is the square root of $7.5^2 + (h-1.25)^2$.
At $h = 1.25$ metres, it is quicker for her to crawl along the wall than either the floor or the ceiling. (Distance $= 7.5$m, as opposed to $7.65$m if she were going along the floor or ceiling.)
Exit Pathspiter Games Online
To see when it's quicker to go along the wall than the ceiling, I solved the inequality
$(8.75 - h)^2 + 1.5^2 geq 7.5^2 + (h - 1.25)^2$
$(8.75 - h)^2 - (h - 1.25)^2 geq 7.5^2 - 1.5^2$
$7.5times (10 - 2h) geq 54$
$h leq 1.4$
When the fly is less than $1.4$m from the ground, it is quicker to go by the wall than by the ceiling. Similarly, when it is higher than $1.1$m, it is quicker to go by the wall than the floor.