Live data from Hacker News

Interesting math puzzle - harder than it sounds

maxschireson.com

11–20 of 21 posts

Re: Interesting math puzzle - harder than it sounds

#12
post #6

31 feet. Ant jumps off the wall and onto the floor (no walking necessary, and easily survivable), walk straight across the 30 foot floor and 1 foot up the wall.

Less than 31 feet since, in the presence of gravity, the honey is moving towards the floor as well.

Re: Interesting math puzzle - harder than it sounds

#13
post #5
post #2

40 feet?

I'm pretty sure this is the correct answer too. Visualization tip: Consider the possible nets of the rectangular prism that makes up the room, and find what the shortest path on one of them would look like.

Its the best I've found.

Another way of thinking about the visualization is to make a model of the surface that can fold up to form it. The shortest path (which will be a diagonal if not a straight line) on any of those is the answer.

Re: Interesting math puzzle - harder than it sounds

#14
post #2

40 feet?

Nicely done. Take the diagonal!

You're going to have to explain your math here, because I don't believe the diagonal is going to give you 40 (unless I'm visualizing the problem incorrectly). In fact, I believe the diagonal is longer than the naive solution.

Re: Interesting math puzzle - harder than it sounds

#15

Earlier quoted context omitted.

Nicely done. Take the diagonal!

You're going to have to explain your math here, because I don't believe the diagonal is going to give you 40 (unless I'm visualizing the problem incorrectly). In fact, I believe the diagonal is longer than the naive solution.

It depends which diagonal. I'll explain in more detail later but don't want to completely spoil it :)

Stay tuned!

Re: Interesting math puzzle - harder than it sounds

#18

Earlier quoted context omitted.

Nicely done. Take the diagonal!

You're going to have to explain your math here, because I don't believe the diagonal is going to give you 40 (unless I'm visualizing the problem incorrectly). In fact, I believe the diagonal is longer than the naive solution.

The "obvious" solution is down 11 feet to the floor, 30 feet across the floor, and 1 foot up to the honey, for a total of 42 feet. Instead picture the room "unfolded" into a series of squares and rectangles and laid flat. Then use the pythagorean theorem to find the length of the diagonal that connects the ant and the honey while staying on a surface the whole way. You'll get (6+12+6)^2 + (1+30+1)^2 = c^2 or c = 40.

Re: Interesting math puzzle - harder than it sounds

#19
post #17

The answer, with a diagram, can be found here: http://mathworld.wolfram.com/SpiderandFlyProblem.html

Ha, well that was a lot easier than I made it.

I ended up with the right answer by finding the minimum of the equation

    f(x,y) = 2(sqrt(1+x^2) + sqrt((6-x)^2 + y^2) + sqrt((15-y)^2 + 36))
which is the length of the path taken if the ant goes up to the ceiling at a point x to the East of straight up, and from there goes to the side wall at a point y to the south, and then goes from there to the center of that wall. (And then it's mirrored).

I should have thought to unravel the room! Errr.

Re: Interesting math puzzle - harder than it sounds

#20
post #17

The answer, with a diagram, can be found here: http://mathworld.wolfram.com/SpiderandFlyProblem.html

Ha, well that was a lot easier than I made it. I ended up with the right answer by finding the minimum of the equation f(x,y) = 2(sqrt(1+x^2) + sqrt((6-x)^2 + y^2) + sqrt((15-y)^2 + 36)) which is the length of the path taken if the ant goes up to the ceiling at a point x to the East of straight up, and from there goes to the side wall at a point y to the south, and then goes from there to the center of that wall. (An…

for the unraveled room:

  sqrt(1+x^2) + sqrt((6-x)^2+y^2)+sqrt(12^2+z^2)+
  sqrt((30-z-y)^2+u^2)+sqrt((6-u)^2+1)

  40 at {x -> 0.75, y -> 7, z -> 16, u -> 5.25}
http://www.wolframalpha.com/input/?i=minimize%5B%7Bsqrt%281%...

your equation: http://www.wolframalpha.com/input/?i=minimize+2%28sqrt%281%2...

Post reply on HN