Skip to main content

Capturing a pirate ship

Source: Puzzle collection of K. Rustan M. Leino, Microsoft Research

Problem: You're on a government ship, looking for a pirate ship.  You know that the pirate ship travels at a constant speed, and you know what that speed is.  Your ship can travel twice as fast as the pirate ship.  Moreover, you know that the pirate ship travels along a straight line, but you don't know what that line is.  It's very foggy, so foggy that you see nothing.  But then!  All of a sudden, and for just an instant, the fog clears enough to let you determine the exact position of the pirate ship.  Then, the fog closes in again and you remain (forever) in the thick fog.  Although you were able to determine the position of the pirate ship during that fog-free moment, you were not able to determine its direction.  How will you navigate your government ship so that you will capture the pirate ship?:)

Solution:Thanx to Suyash Roongta (First Year, IIT Delhi) for posting solution in comments!!


  1. let the speed of the pirate ship be s. Thus at any time t after the sighting of the pirate ship, its locus will be a circle of radius ts centered at its initial position. suppose at the time of the sighting, the pirate ship is at a distance d from the government ship. We have to make sure that after time t, the government ship is at a distance of ts from the initial position of the pirate ship. So, we go in 2/3 d towards the position of the pirate ship, and then start moving in a spiral such that the rate of increase in radius is s. Thus we will always be at a distance of ts from the initial position of the pirate ship, same as the pirate ship. and by the time we have completed one rotation, we should have captured the pirate ship, assuming it does not change directions.
    does this look good?
    ps: this is the iitd first year wala suyash

  2. hey , how to solve this .. i tried but cudnt solve ..
    are there any assumptions to be made ?

  3. @suyash.. Very good solution.. Thanx.. I and most of the people I talked to were not able to solve this problem. Thanx a lot. :)

  4. @pranav (sahaj kadhi)
    There are no assumptions to be made other than that the pirate ship is moving in a straight line.

  5. You will have to prove that one complete rotation is possible - this depends on the relative speeds of the ships.

  6. All we need is the speed of the government ship to be greater than the speed of the pirate ship, which is the case here.
    The government ship can then use its speed to move around the initial point of the pirate ship in a spiral, taking its own sweet time to complete a rotation (which is perfectly possible because only a part of the speed goes in increasing the radius of the spiral, allowing it to move along the circumference at the same time).

  7. OK. working from suyash's ide, suppose the pirate ship has a speed v and our ship has a speed 2v, then when we are at the point where we would have met the ship if it started heading towards us, we have to move to the next point that we can intercept the ship.

    Assume that we would reach that point at time dt later where dt is a vanishingly small number. Then using polar co-ordinates and a bit of Pythagoras, our vector length 2*v*dt is the hypotenuse of a right angle triangle with opposite side v*dt along the line from the original position of the pirate ship to its next potential point, and an adjacent side of v*t*da, where t is the time since we first saw the pirate ship and da is the vanishingly small change in the angle to the new potential point.

    So we have:

    (2*v*dt)^2 = (v*dt)^2 + (v*t*da)^2

    Dividing by v^2, simplifying and taking square roots we have

    sqrt(3)*dt = t*da

    or dt/da = t/sqrt(3)

    which inegrates to give

    t = exp(a/sqrt(3)) + constant

    The time taken is the time taken to go from a = 0 to a = 2*PI, which is exp(2*PI/sqrt(3))-1.

  8. Here's the "true" solution! ;-)

    Since the Earth is a sphere, just go to the point where the pirate ship was and wait. The pirate ship is traveling along a straight line (one of the great circles), so eventually it will come back around to the same point.

    The speed of the ships doesn't matter at all. :-P


Post a Comment

Popular posts from this blog

Asking a girl out

This is not a puzzle. So, for those of you who follow this puzzle blog, please bear with me for just one post. Interesting Math in this article though :P

Most of my friends already read an article that I wrote more than an year back - "Speak Up"

Here, inspired by the movie, The Beautiful Mind, I give a mathematical analysis of asking a girl out. Nice time it is. Feb 10. No plans for Feb 14 and I am sure this article makes me look even more geekier and all the more reason for me to believe that I will be alone, yet again. But what the hell, lets do it!

Note: This is not an independent analysis. There are many "mathematics sites" which does "similar" analysis.

@Consultants, correct me if I am wrong in my estimates. :P

Why is there a need to be selective?

From the age of 15, I guess there are approximately 3,600 girls I have liked (On average days, I don't see new girls. But going outside, I like about 30 girls. Saying that I go out once every week right …

Consecutive Heads

Let's say A keep tossing a fair coin, until he get 2 consecutive heads, define X to be the number of tosses for this process; B keep tossing another fair coin, until he get 3 consecutive heads, define Y to be the number of the tosses for this process.

1) Calculate P{X>Y}
2) What's the expected value of X
3) What's the expected value of Y

This is probably the hardest puzzle I have ever put on my blog. Hence, I will post its solution in the post directly rather than on comment.

(Solved by me finally after 13 months :))

Make a state diagram. Let the state be (a,b) where a is the number of consecutive heads streak "A" is on currently and b is the number of consecutive heads streak "B" is on currently.

So, (0,3) (1,3) are final accepted states and (2,0) (2,1) (2,2) (2,3) are failure states. If you get tails, your contribution to the state reaches to "0"

f(State) = P(X>Y | "State" configuration initially)

f(0,0) = 1/4[f(…

Fraction Brainteaser

Sent to me by Gaurav Sinha

Siddhant writes a Maths test and correctly answers 5 out of 6 Arithmetic questions and 20 out of 28 Geometry questions. In total, Siddhant scores 25 out of 34. 

Vaibhav writes another Maths test and correctly answers 20 out of 25 Arithmetic questions and 6 out of 9 Geometry questions. in total, Vaibhav scores 26 out of 34.

Note that
a) Vaibhav scores more than Siddhant
b) Siddhant score better than Vaibhav in both individual topics - 5/6 > 20/25 and 20/28 > 6/9

How is it possible?