Friday, June 13, 2014

Fox and Duck

Problem

A duck, pursued by a fox, escapes to the center of a perfectly circular pond. The fox cannot swim, and the duck cannot take flight from the water. The fox is four times faster than the duck. Assuming the fox and duck pursue optimum strategies, is it possible for the duck to reach the edge of the pond and fly away without being eaten? If so, how?

Solution

This is not a simple mathematical puzzle to solve like normal common problems. Fox in this puzzle is too fast and clever for any normal and simple strategy.

From the speed of the fox it is obvious that duck cannot simply swim to the opposite side of the fox to escape. Pi*R/4 < R.

Let V be the speed of Duck and 4V speed of fox. Lets d is distance for duck to reach the edge and assume the fox is on exactly opposite side on the circle.

For duck to reach safely at edge d/v <= pi*R/4v
that is d <= (pi/4)*R
(as fox has to cover pi*R)

Now we need to find out the position from where duck can swim to the shore in time less then Pi*R/4V. Pi = 3.14.


If duck starts circling in the pond exactly at distance d1
then 2*pi*d1/v <= 2*R/4v
therefore the duck should start circling at d1 radius = R/4.

To keep things simple we will take the distance from center for the duck to escape when the fox is on the exact opposite side of the pond to be R/4.
So duck can swim in 3R/4V which is less than Pi*R/4V.

Now the next challenge is how we can make sure the clever fox will be on the opposite side. Here is the tricky part.

Let the duck rotate around the pond in a circle of radius R/4. Now fox and duck will take exact same time to make a full circle. Now reduce the radius the duck is circling by a very small amount (Delta). Now the Fox will lag behind, he cannot stay at a position as well. Now in due time duck will get to a position we wanted, 3/4*R distance away from shore where fox is on the exact opposite side of the pond. From there duck can swim safely to shore and fly away.

References
http://classic-puzzles.blogspot.in/2011/11/fox-and-duck-interview-puzzle.html

1 comment:

  1. It is not possible. If the duck and fox are at the most optimal position, that would mean the duck is in the center of the circular pond. And the fox can be anywhere on the edge, and that distance would be the same, which is one radius which equals .5 diameter (.5d). If the duck travels to the edge of the pond (.5diameter) and takes x amount of time, the fox can cover a distance of .5 diameter x 4 in the same amount of time. In an optimal situation, the duck travels to the opposite side that the fox is waiting on. The fox will have to travel half way around the circle, which is half the circumference. The circumference of a circle is pi x diameter(d), and since we are traveling half the circle, it would be 3.14 x .5d which is 1.57d. The fox travels a distance of 1.57d where the duck travels a distance of .5d, since it is in the center of the pond and travels straight to a point. The fox is 4 times faster, but traveling a distance of roughly 3 times more. Hence the duck would be eaten even with an optimal strategy. - E.Money

    ReplyDelete