Hacker News new | past | comments | ask | show | jobs | submit login
Solving xkcd's raptor problem (pgraycode.wordpress.com)
66 points by dons on May 29, 2010 | hide | past | favorite | 18 comments



This looks like a variant of the "Lion and Man" problem which is also described as a "bounded pursuit" problem in the operations research journals:

http://www.google.com/search?q=lion+and+man+problem+&ie=...

-and-

http://mathworld.wolfram.com/PursuitCurve.html

-and-

http://books.google.com/books?id=HeESjfM2geUC (good!)

This problem may have had relevance in World War II all the way to the present: dogfights between airplanes, battleships trying to sink each other, etc.


Wolfram is frightening in its completeness... I should really look into their setup some time.

Anyone have any suggestions for starting it? From what I've gathered, it's a bit different than other math texts / different conceptual basis.


What about problem #3 of http://xkcd.com/135/ ? Will xkcd ever publish the floor plan from the next page where you escape from the raptors?


About that, has anyone noticed the test isn't very consistent? In the first exercise the speed of a raptor is 25 m/s, in the second exercise the wounded raptor runs at 10 m/s. So far, so good. But in the third exercise the raptors run at 10 m/s. Why, are they wounded? And of course, can the raptors chew through walls?


in the third exercise the raptors run at 10 m/s. Why, are they wounded?

The third exercise is inside a building, where obstructions and narrow paths slow them down.


Remember, they do not know fear


I've created a quick graph [1] of the survival time running in a single fixed direction. While this doesn't take acceleration into account, the results agree with the article and common sense. No matter which direction you run, one of the 25 m/s raptors will catch you, so your best bet is to run directly toward the weakened one. The code's available here: http://gist.github.com/418783

[1] http://chart.apis.google.com/chart?cht=s&chd=t:0.0,1.111...


I created an interactive version of the graph, so you can enter values and see how long you would last: http://news.ycombinator.com/item?id=1390136


Interesting. Haven't had time to fully create my own solution; I'll have to work on it tonight. If anyone wants what I've got so far (ruby): http://codepad.org/qggAcIKy


An analytical solution would be nice in addition to the simulation one. Even better if the number of sides of the polygon could be parametrized :)


The optimal solution, i.e. the human's trajectory, is a function and therefore has to be found through variational calculus. Not sure there is an analytical one, but the optimum should be quite easy to find numerically.


My guess would be that there is a relatively simple analytical solution iff the raptors are allowed to accelerate infinitely, but the capped speed probably makes it a bit more difficult.


Apparently, from the plot seems that if you are faster than the slow raptor, your best direction is not straight at it, but nearby. This makes some sense because if you you are close to the slow one and far of the fast ones you can outrun go around the slow one.


i had to take an intro calc class recently, my professor put this problem on the final exam.


Why use we instead of I? There is just one author and the we convention used for papers with multiple authors is inappropriate and misleading.

Just a small quibble... the article was otherwise fine if you like that sort of thing.


A polite expression of opinion here has been downvoted, and a comment elsewhere that just informs that this question appeared in someone's exam has been upvoted _twice_!


I think the we is used so the user takes part in the thinking process.


We = the author and the reader.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: