Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Excellent explanation of a fun problem!

Amazing that the optimal path to land creates a perfect "J". It's solutions like this that leave me in awe-- another felt connection to mathematical truth through an emotional reaction to simplicity. It's empowering to understand a piece of it, but humbling to know it's only part of a larger system that I can't fathom. I think that's the loop that beckons mathematicians.



I think the "perfect J" comes from the fact that we are solving the instance with the critical value K = 4.60333... If K were any greater than this, we couldn't escape.

If K were less though, an "open J" path (like Path #2) would also work.


You can recover the "perfect J" by phrasing the problem as "find the path that results in the monster having been waiting for you at the shore for the least time, or if he's too slow, that results in the maximum distance from the monster when you exit the lake". The best path is always the best path.

What really bothers me about the solution presented is that the (optimum) angle of escape is clearly exactly pi / 2, computed as the arcsine of 1. That's going to be exactly 1, but it's computed here as 4.603339 cos 1.351817, which is only approximate. There must be a solution that gives you the exact value; that's the one I want to see.


The 'exact' answer for the angle you need to row (alpha) is Sin(alpha)=KCos(Phi).

Yes, the 'exact' answer is the tangent. If you want the relationship between K and Phi, then:

K = Cos(Phi) + SQR( (pi+phi)^2 - sin^2(phi))

The derivation of both of these is contained in the article.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: