Or search by topic
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 walk around 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, the spider should go on the bottom of the box.
Can you work out the dimensions of the three cubes?
Can you use small coloured cubes to make a 3 by 3 by 3 cube so that each face of the bigger cube contains one of each colour?
How many winning lines can you make in a three-dimensional version of noughts and crosses?