The Dog and the Duck (repost)

One of my friends sent me this puzzle from fivethirtyeight.com and here is my solution to how the dog needs to catch the duck.

There are a few key assumptions here that we can make from the beginning:

  1. The duck is always travelling at its maximum speed: v
  2. The dog always runs in the same direction at a constant speed: xv, where x is a constant
  3. It gains nothing from changing directions
  4. The function giving the dogs position is P(t)
  5. So the dogs speed is given by d/dt(P(t))
  6. The function giving the ducks positon is Q(t)
  7. The pool has radius R
  8. The duck radial speed is always positive (it is always travelling towards the edge) and it never changes it’s rotational direction

For an excel version of the puzzle solution, look here

And some other notes about the solutions

I’ll be jumping between Cartesian coordinates (x,y) and polar coordinates (r,θ), probably using the notation

P= ar + bθ rather than brackets but I might change back

From here after a bit of thought we can see that the ducks path can be split into two parts

  1. The period where the duck can remain on the opposite side of the pond to the dog. This is the case until the duck has a radial distance of z.
    • E.g. if P(t)=ar+bθ  then Q(t)=cr+(b+π)θ
  2. After this the duck needs to travel radially towards the dogs antipoint when the duck has a radial distance of z.

So the task now becomes: Find z

For this we don’t need to know the ducks path in part (1), although I will calculate it after I’ve found the solution to the first problem.

The dogs position can be given by P(t)=Rr+kvtθ ,  focusing on the radial element, equating the different measures of the dog’s distance at time t (the angle at time t is ϕ)

R ϕ= kvt, let a=kvR.. ϕ=at

The radial distance of z is reached when the radial part of the duck’s velocity becomes 0 and we know it’s total speed is v. We also. So the ducks Cartesian position is given by

x=zcos.(ϕ+π)= zcos(at)and y=zsin.(ϕ+π)=z sin.(at)

(the ducks angular position of ϕ+π isn’t needed here but comes in useful later)

Differentiating these gives

dxdt..= azsin(at)cos.(at)drdt..,anddydt..= az cost(at)sin.(at)×drdt..  

We know that v2=(dxdt..)2+(dydt..)2 therefore

v2=a2z2+(drdt..)2, (drdt..)=0 v=az, a=kvR..z=Rk..

At this point the duck now takes the quickest route to the edge towards the point directly opposite the dog. This radial distance =Rz=R(k1)k.. at speed v. So it takes the time

time=R(k1)kv..

The dog needs to travel a half circumference Rπ at speed kv so it takes time

Rπkv..

Equating these gives

Rπkv..=R(k1)kv.. k=π+1

And that’s the solution to the problem π+1.

But I still want to know the ducks speediest path so I can plot it. The last bit is easy, the tricky bit is when the ducks radial distance is less than z=Rπ+1...

What do we know? The duck’s angular velocity is the same as the dogs, in both cases it is kvt and we also know that the ducks Cartesian speed is v. So for function f(t) the ducks position is given by

x=f(t)cos.(kvt+π)=f(t)cos.(kvt)  and y=f(t)sin.(kvt+π)=f(t)sin.(kvt) 

Differentiating gives

dxdt..= f(t)sin.(kvt)kvf(t)cos.(kvt)

dydt..=f(t)cos.(kvt)+kv f(t)sin.(kvt)

Squaring both and equating with v^2 gives the differential equation

f(t)2=v2(1k2f(t)2)

Solving this gives

f(t)=sin.(k(±v+c))k.. for some c

We know that at time t=0 that f’(t)=v and f(t)=0 which gives c=0 so

f(t)=sin.(kvt)k.. and f(t)=vsin(kvt)

Done

Leave a Comment

Your email address will not be published. Required fields are marked *