Math Fun - Spider and Fly Problem

kool problem… maybe I should start a math problem sticky!

Excellent approach James. There is a shorter path.

That would be over 42 ft. It would be shorter to just go straight down over and back up (42 ft). :sunglasses:

48.5…

It kind of makes me wonder what a common spider would actually do.

I actually agree with James’ solution.

There are three obvious paths:

Other than those three paths, I don’t think there is anything even a-priori considerable as a possible fastest path – of all possible unfoldings of the cube, those are the only 3 straight lines (well, there are other straight lines, but they’re just the inverse of the lines drawn so they’re necessarily equal in length and need not be considered separately).

This is what I think, of course, but I could be wrong.

So, let’s start with the most obvious path, path red. Here is what it looks like with the cube unfolded, measurements provided:

Next most obvious path to me was the green one, this is the one I tried first. Here is what it looks like unfolded, measurements provided (imagine, instead of folding the two ends down and keeping them connected to the bottom rectangle, you’re folding them towards yourself and keeping them connected to the side rectangle):

We don’t even have to do the math on this one – if you know any geometry, you know that the hypotenuse of a triangle must be greater than the triangle’s greatest side – this triangle’s greatest side is already 42, so the entire green path is by necessity longer than the red path above (the actual green path length is 43.1741 in case you’re wondering).

So now for the final (in my estimation) possible path. With this unfolding, imagine unfolding the right end keeping it connected to the side closest to you, the viewer (as in the above example), and then unfolding the bottom side downward (ending up in the position of the bottom middle rectangle in the pic below), and unfolding the left end keeping it connected to the bottom rectangle:

I think we have a winner!

I actually thought the solution was what James thought on first impressions, his solution is intuitively what I thought would work although I am not sure why. There are actually a vast amount of solutions in 3D albeit a limited version of it, well done flannel, seems I got here too late. Although if there is a shorter solution I should probably think on. :slight_smile:

I think a shorter solution will come from traveling along the other wall, although this seems intuitively illogical. It might also be that contrary to what you would imagine using the ceiling is better. I think you have to remember that the actual solution will be an actual zigzag using many walls, although I don’t have time to work out all the possible solutions and what is shortest,.

Although keeping the relative angles at their minimum obviously seems a key to the problem.

There is one more option left out from FJ’s list, if you move the first blue corner down to the bottom and the last corner up onto the front edge, but it ends up to be about 47.5 in length. Through symmetry, I think that covers all possible options (assuming no teleport devices handy).

@james I also discovered that option a bit later, but didn’t edit my post to include it because it was actually quite a bit longer a path than the other ones.
We’ve covered all of the unfold-cube-make-straight-path options, I think, once we’ve considered that one. I’m very inclined to think that the answer is necessarily a straight path between the points on an unfolded cube.

the obvious answer is to wait until the fly comes closer

If that’s the answer I’m going to jump out of a window.

the 40ft one is the right answer

Answer for shortest distance:
[tab]The shortest path is 40 ft.[/tab]
Answer diagram:
[tab][attachment=1]SpiderandFly_600.gif[/attachment][/tab]
Comparison of solutions:
[tab][attachment=0]spider-and-the-fly-solution.jpg[/attachment][/tab]

of course
I was looking for a solution like that. I had unfolded it a number of different ways, idk why I didn’t think of that.

Aaaakkk… haha… using the top AND bottom… making a perfect spiral.
…got us… o well.

Btw, the way to resolve this sort of problem to KNOW that you have the best solution possible is to merely go through the entire truth table. Take the first side where the spider is from which you have 4 sides. Each of those sides leads to 3 other edges that lead to 3 more until you finally get to the fly. It is tedious, but it guarantees all possible solutions have been examined.

one other conceptual trick for this particular type of problem (unfolding cubes) is that you can ‘roll’ one unfolded side up or down the diagram. If you look at my last diagram, the difference between that unfolding and the solution unfolding is that the right edge was rolled (up and counter-clockwise) up one edge.

And it just occurred to me, maybe because of Christmas, that when I would wrap a present with a ribbon, I would instinctively wrap the ribbon in that spiral route and very vaguely remember someone mentioning that such was the way to save on ribbon.

That’s clever the shortest distance between two points is a “straight” line. :wink:

I have been wondering if this spider’s choices were in compliance with James’ AO - specifically with his PHT - “Perception of Hope and Threat”.

So the spider sees the fly - gets a positive perception to pursue - but how to get there?

I guess it isn’t impossible that the spider was born with a deep understanding of geometric maths - but would that be necessary?

The spider would see that he only had certain beginning options - the 4 surrounding walls - and precisely where to meet them at their edges. How would a small spider decide that?

The spider could see the straight distance to the fly - and could see that it wasn’t an option (no perception of hope) so he has to decide which wall and where to meet the wall.

The spider could see that the fly was lower than him - so “lower” should be perceived as more hopeful - and that leaves 3 choices - the floor or either side wall at a lower position.

The spider should see that the floor edge is farther away from his preferred straight path to the fly (direct line of sight). By heading to a side wall and a little lower - he could perceive a hope of getting a little closer faster (than the floor option). The walls are closer and he can get there sooner before having to make another choice. By proceeding slightly downward - he slightly alleviates the need downward. That one decision could be made without regard to any future path decisions.

Once at the edge of either wall he perceives the line of sight distance to the fly and has only 3 options. Why he chose which wall would have to be something related to the specifics of the spider itself - orientation - best eye vision - last thought - a sore toe - whatever might influence the decision of which of two identical paths to take.

The line of sight path would seem most closely duplicated by again - a slightly downward move while advancing along that wall. That gives him 2 options - far edge and bottom edge. Again he could perceive a shorter path toward the bottom while keeping the line of sight in focus. And again he could make this decision without considering what path to take next - only that it immediately seems closer to the objective and along the line of sight.

So now he is at the bottom edge about half way across the room. And at that point he can only see one edge to pursue - the edge just beneath the fly.

And again by keeping the sight he wouldn’t see the best option to proceed to the point directly under the fly - it is a longer distance to travel before the next decision and veers further from the direct line of sight (although not by much). So he proceeds - still following his perception - to a bottom edge point below the fly but closer to the edge he just left.

At that point his perception is a straight line of sight path - so he takes it.

Ok - so what this is telling me is that the spider’s line of sight (best perception of hope) is what is guiding his decisions - not his university maths professor. And that technique of following his best line of sight perception happens (in this case) to be the best mathematical choice as well.

Sometime the stupid are smart enough. :smiley:

An interesting experiment might be to make the ceiling angle slightly downward toward the fly’s location and see if spiders detect that and have the foresight to change their choices - are they looking ahead to the next step - or just making each choice based on the immediate surroundings.

Of course today he would probably just have Amazon deliver it into his little clutches. :confused: