I was bored during lockdown, so I decided to start a blog about my random thoughts about math. It contains some solutions to math problems, and some 'simple' applications of math.
Saturday, 28 November 2020
Velociraptor pursuit
Today, we are going to solve the second question of this xkcd: https://xkcd.com/135/
You’re at the centre of a 20m equilateral triangle with a raptor at each corner. The top raptor has a wounded leg and is limited to a top speed of 10 m/s.
The raptors will run toward you. At what angle should you run to maximize the time you stay alive?
(It is assumed that you have a speed of 6m/s and the unwounded velociraptor has a top speed of 25 m/s, from the first question). We are also removing the fact that the velociraptors and you have to speed up, and assume they are going at full speed at the start.
Pursuit curve
First, we are going to take a look at the following problem:
Assume a velociraptor starts running in your direction with a speed of k times you speed, while you start at point (Ax,Ay) running in the y direction, what is the distance you can run?
According to wikipedia, the y coordinate of the capture point is x→Axlimy(x)=21⎝⎛1−VdVtAy+Ax2+Ay2+1+VdVtAy−Ax2+Ay2⎠⎞
Thus the distance ran is d=21⎝⎛1−VdVtAy+Ax2+Ay2+1+VdVtAy−Ax2+Ay2⎠⎞−Ay
If we swap VdVt by k and Ax by Rcos(α) and Ay by Rsin(α) we get:
The time you can stay alive is relative to the distance you can run, as you can run at constant speed. If the angle you run at is θ, the time you stay alive in total is the minimal time you stay alive considering each individual raptor.
So the minimal of these three expressions: Rk(1−k21−kcos(α+2π/3)) Rk(1−k21−kcos(α+4π/3)) Rκ(1−κ21−κcos(α))
Where κ is your speed over the speed of the wounded velociraptor 6/10 and k is the speed of a healthy velociraptor over your speed 6/25. Plotting the survival time for each velociraptor gives us the following figure.
We get a rather surprising result. The bottom velociraptors can catch up with us before the top one, independent of the angle, so we can ignore it. This also means that the optimal strategy is running towards the wounded velociraptor.