# Duck and Fox ... and other Great Puzzles

**URL:** <https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546>\
**Category:** The Game Room\
**Created:** [September 21, 2010, 4:23pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546 "2010-09-21T16:23:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [September 21, 2010, 4:23pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/1 "2010-09-21T16:23:28Z")

</div>

One of my favorite math puzzles is Duck and Fox. I see it is also one of [Roger’s Favorite Puzzles](http://disco.ethz.ch/members/roger/puzzles/).

> [@](#):
>
> A duck swims in a perfectly circular pond. There is a fox at the shore, afraid of water, that plans to catch the duck when getting out. The land speed of the fox is four times as high as the water speed of the duck. However, once the duck reaches the shore without the fox in its immediate neighborhood, it can hide and escape. Can the duck reach the shore safely?

Better is to ask: What is the maximum speed advantage the Fox can have and still be unable to catch the Duck? (I’d also write that the Duck can fly away from land but not water, and that Duck is hungry and can’t outwait the Fox. Exact solution requires some math, so take full credit just for describing Duck’s strategy.)

Some of the other puzzles on that page are also great puzzles. Anyone want to offer more?

I wouldn’t consider Duck and Fox to be a “Two Minute Puzzle.” Moreover, the solution presented on that page _is not_ the solution to the more interesting question above.

---

<div class="post-metadata">

**Author:** ![The\_Hamster\_King](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@The\_Hamster\_King](https://boards.straightdope.com/u/The_Hamster_King)\
**Post date:** [September 21, 2010, 9:32pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/2 "2010-09-21T21:32:19Z")

</div>

[spoiler]The duck should start in the center and swim directly away from the fox. If the fox moves, the duck should adjust his position so that the center of the pool always lies directly between them.

The duck follows this strategy until he gets radius/4 away from the center. At that point the duck can just keep up with the fox as he changes position.

Now the duck makes his break for it, swimming straight for the edge of the pool. The fox has to cover half the circumference to reach him – 3.14159 \* radius. But the duck only has to go 3/4 of the radius. Since the duck is traveling 1/4 as fast as the fox he can reach the edge in 3 time units, while it takes the fox 3.14159 time units. The duck is free![/spoiler]

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [September 21, 2010, 10:48pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/3 "2010-09-21T22:48:54Z")

</div>

**The Hamster King** ’s solution does work for the problem as stated, but what if the Fox is faster? What if his speed is 4.6 times that of the Duck, not just 4 times?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [September 22, 2010, 2:44am UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/4 "2010-09-22T02:44:00Z")

</div>

OK, so solving for the marginal speed:

I’ll assume without loss of generality that the pond has radius 1, the duck has speed 1, and the fox has speed f (basically, this amounts to a definition of my length and time units). The duck swims out to a radius of 1/f. From there, the fox will take a time pi/f to reach the far shore, and we’re looking for the duck to get to the shore exactly at the same time as the fox, so the duck has to travel distance (f-1)/f in a time pi/f. The duck’s speed is 1, so that means that t = (f-1)/f = pi/f. It is straightforward to solve that f = pi+1

Of course, this is assuming that the strategy **The Hamster King** described is optimal. It’s conceivable that the duck can use some other strategy which is slightly better.

---

<div class="post-metadata">

**Author:** ![Snarky\_Kong](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Snarky\_Kong](https://boards.straightdope.com/u/Snarky_Kong)\
**Post date:** [September 22, 2010, 2:48am UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/5 "2010-09-22T02:48:31Z")

</div>

> [@Chronos](#):
>
> OK, so solving for the marginal speed:
> 
> I’ll assume without loss of generality that the pond has radius 1, the duck has speed 1, and the fox has speed f (basically, this amounts to a definition of my length and time units). The duck swims out to a radius of 1/f. From there, the fox will take a time pi/f to reach the far shore, and we’re looking for the duck to get to the shore exactly at the same time as the fox, so the duck has to travel distance (f-1)/f in a time pi/f. The duck’s speed is 1, so that means that t = (f-1)/f = pi/f. It is straightforward to solve that f = pi+1
> 
> Of course, this is assuming that the strategy **The Hamster King** described is optimal. It’s conceivable that the duck can use some other strategy which is slightly better.

I don’t think it’s optimal, but that might be beyond me at this moment. The duck can swim in an Archimedean spiral, starting from the center, and reach the edge at the same moment as the Fox. This leads me to think that a similar spiral from the limiting radius will produce a better result.

---

<div class="post-metadata">

**Author:** ![panamajack](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@panamajack](https://boards.straightdope.com/u/panamajack)\
**Post date:** [September 22, 2010, 5:48pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/6 "2010-09-22T17:48:50Z")

</div>

Here’s a proof for the minimum fox speed :

The time for the duck to reach a point e on the shore is

t(duck) = d(e) / s

where s is the speed of the duck, and d(e) is the distance to that point.

The time for the fox to reach that same point is:

t(fox) = | ang[sub]fe[/sub] | / (\*f\*\*s)

where ang[sub]fe[/sub] is the smallest angle between the fox’s current location and the exit point e. _f_ is how much faster the fox travels than the duck.

For the duck to escape, t(duck) must be less than t(fox). If the distance for the duck to travel is expressed in units of the radius, and angfe is likewise in radians, the distances can be compared directly and the duck’s speed s cancels out. (This is essentially the same set of simplifications Chronos made).  
There is a critical quantity

ang[sub]c[/sub] = \*f\*\*d(e’)

where e’ is the closest exit point to the duck.

If ang[sub]c[/sub] \>= pi, it is impossible for the duck to escape by making a break for the shore, since no matter where the fox starts out, it can reach the duck[sup]\*[/sup]. Note if ang[sub]c[/sub] \< pi, that doesn’t mean the duck can escape, only that it may be able to if the fox is out of position.

This means that if it is at all possible for the duck to escape, it must be able to reach a point where the distance dc to the shore is such that

dc \< pi/_f_

with the fox out of position (i.e. at pi radians from e, or opposite the center from the duck). Incidentally, _this_ is the point at which the duck can make a break for it in the original problem; it doesn’t have to go out to 3/4 of the radius.

The radius of the circle within which the duck can beat the fox is 1/_f_ (again, in units of the pond’s radius). The distance to the shore from any point on this circle is

ds = 1 - 1/_f_

This means that the duck can only escape if dc \> ds

pi/_f_ \> (1 - 1/_f_)

pi \> _f_ - 1

pi + 1 \> _f_

or more clearly, _f_ \< pi + 1. Which is exactly the same result **Chronos** calculated.  
[sup]\*[/sup] I also claim that at some point the duck must make a Euclidean straight line to the shore, however briefly. That means this shows the duck cannot ever reach the shore unless it can reach a critical distance like this. My phrasing is because when the duck is at the center, it is in such an ‘unescapable’ location, and yet it escapes. The rest of the proof demonstrates (somewhat loosely) that if _f_ \> 1, there will be a location where the duck can no longer keep the fox out of position.

---

<div class="post-metadata">

**Author:** ![smiling\_bandit](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@smiling\_bandit](https://boards.straightdope.com/u/smiling_bandit)\
**Post date:** [September 22, 2010, 5:59pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/7 "2010-09-22T17:59:45Z")

</div>

Er… wouldn’t it entirely depend on the _size of the pond_ (and the actual, specific, not relative) fox and duck speeds? Sorry, I hate puzzles, because they almost always take place in a ficitonal non-world with no constraints.

---

<div class="post-metadata">

**Author:** ![begbert2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/begbert2/32/3357_2.png) [@begbert2](https://boards.straightdope.com/u/begbert2)\
**Post date:** [September 22, 2010, 6:06pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/8 "2010-09-22T18:06:02Z")

</div>

> [@smiling\_bandit](#):
>
> Er… wouldn’t it entirely depend on the _size of the pond_ (and the actual, specific, not relative) fox and duck speeds? Sorry, I hate puzzles, because they almost always take place in a ficitonal non-world with no constraints.

Not really; all problems of different sizes or amounts are “scale models” of the generalized problem.

---

<div class="post-metadata">

**Author:** ![panamajack](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@panamajack](https://boards.straightdope.com/u/panamajack)\
**Post date:** [September 22, 2010, 6:32pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/9 "2010-09-22T18:32:25Z")

</div>

> [@smiling\_bandit](#):
>
> Er… wouldn’t it entirely depend on the _size of the pond_ (and the actual, specific, not relative) fox and duck speeds? Sorry, I hate puzzles, because they almost always take place in a ficitonal non-world with no constraints.

If you look at the first two equations of my post, they both work using the actual speed of the animals and size of the pond. Saying ‘the duck’s speed cancels out’ is a bit of a cheat on my part - but in any comparison expression t(duck) ? t(fox) the duck’s speed will drop out. You could keep including it, but it would keep dropping out.

The size of the pond is being accounted for, since everything is in units of the radius. I did this intentionally to use units of radians for angles, which are also in units of the radius.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [September 22, 2010, 9:05pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/10 "2010-09-22T21:05:53Z")

</div>

> [@panamajack](#):
>
> _f_ \< pi + 1. Which is exactly the same result **Chronos** calculated.

Or, f \< 4.1416.

As I mentioned earlier, f = 4.6 is doable. (And this would definitely _not_ be “one of my favorite math puzzles” if the straightforward answer already given were optimal. 😃 )

Finding duck’s optimal strategy for f ~= 4.6 can be done with _good intuition_. (Or perhaps by working backwards from the value “4.6” – so forget I’ve given that hint! :D).

_Proving_ that duck cannot improve on that strategy as _f_ increases is a much harder challenge.

---

<div class="post-metadata">

**Author:** ![borschevsky](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@borschevsky](https://boards.straightdope.com/u/borschevsky)\
**Post date:** [September 22, 2010, 11:01pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/11 "2010-09-22T23:01:57Z")

</div>

> [@septimus](#):
>
> As I mentioned earlier, f = 4.6 is doable. (And this would definitely _not_ be “one of my favorite math puzzles” if the straightforward answer already given were optimal. 😃 )

Possibly when the duck makes its break for it, the duck should not swim on the line directly away from the fox. When the duck makes its break, the fox has to pick a direction to run around the pond. Maybe the duck can improve its chances by adjusting its approach to shore, reaching the shore at a point that makes the fox have to run further.

So: say the fox is at due north, the duck is at a point due south of the centre of the pond at the point where he has to make a break for shore. The current solution says the duck should swim due south. But when the duck does this, the fox has to pick a direction. Say he heads east - then the duck has the option to head to a point on shore that is west of his original target, which means the fox will take more time to get there. It will take the duck a bit longer to reach the shore, but it will also take the fox longer to reach that point. Which “longer” is more?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [September 23, 2010, 1:27am UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/12 "2010-09-23T01:27:55Z")

</div>

I’m not up to doing the calculations right now, but what if the duck starts at the equal-angular-speed circle, but then always travels in a direction perpendicular to the fox’s current direction of motion?

---

<div class="post-metadata">

**Author:** ![borschevsky](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@borschevsky](https://boards.straightdope.com/u/borschevsky)\
**Post date:** [September 23, 2010, 4:47pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/13 "2010-09-23T16:47:09Z")

</div>

Ok, the idea I had works, I think. Take the duck’s speed as 1, the radius of the pond as 1, and the fox’s speed as 4.6. Make the centre of the pond the point (0,0).

The fox is at the north end of pond (0,1). The duck is on the “equal angular speed” circle, so at (0, -1/4.6). The duck makes its break for it, and the fox picks a direction to chase. It makes no difference which direction the fox chooses, so let’s say he heads east. The duck reacts by swimming **due west**.

…trigonometry…

The duck has to swim a distance of 0.976. To reach this point on the shore, the fox has to run 257.44 degrees around the pond, which is a distance of 4.493. 4.493 / 0.976 = 4.603. The duck barely escapes.

Compared to the strategy of the duck swimming due south, the duck has to swim an extra 0.19, but the fox has to go an extra 1.35. Also, if the fox ever tries to switch directions, he doesn’t gain anything, as the duck is further out than the “equal speed” circle and can just use this strategy again.

I will guess that this is optimal based on the fact that “due west” here is tangent to the “equal speed” circle (and the fact that **septimus** used 4.6 as the question).

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [September 23, 2010, 5:24pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/14 "2010-09-23T17:24:53Z")

</div>

> [@borschevsky](#):
>
> … let’s say [the fox] heads east. The duck reacts by swimming **due west**.

Yes. You got it. The duck lives!!

Two other solutions were proposed in the thread: Swim directly away from the fox (Too simple) and Swim on a spiral (Too complicated). The correct solution is simple, elegant, and just right (as Goldilocks likes things!).

Googling, I see the puzzle is almost always presented with _f = 4_ so the inferior solution is good enough. :mad:

And when the correct solution _is_ presented, many object with “But the fox will just double back!” (Ignoring that duck is looking over her shoulder and ready to react.)

I don’t know how many will find the correct solution _intuitively_ clear. Proving its optimality isn’t hard, if hardly trivial.

---

<div class="post-metadata">

**Author:** ![panamajack](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@panamajack](https://boards.straightdope.com/u/panamajack)\
**Post date:** [September 23, 2010, 11:31pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/15 "2010-09-23T23:31:27Z")

</div>

Could you explain what exactly happens once the fox changes direction? Because all I can see as a result is a stalemate.

What does the duck’s final path to the edge look like?

---

<div class="post-metadata">

**Author:** ![begbert2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/begbert2/32/3357_2.png) [@begbert2](https://boards.straightdope.com/u/begbert2)\
**Post date:** [September 23, 2010, 11:35pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/16 "2010-09-23T23:35:23Z")

</div>

> [@panamajack](#):
>
> Could you explain what exactly happens once the fox changes direction? Because all I can see as a result is a stalemate.
> 
> What does the duck’s final path to the edge look like?

If the fox _constantly_ changes direction, it’ll look like a zig-zaggy straight line - and the fox will get nowhere near the duck. Every time the fox changes direction it loses ground (I think).

---

<div class="post-metadata">

**Author:** ![Snarky\_Kong](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Snarky\_Kong](https://boards.straightdope.com/u/Snarky_Kong)\
**Post date:** [September 24, 2010, 12:07am UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/17 "2010-09-24T00:07:51Z")

</div>

> [@begbert2](#):
>
> > [@panamajack](#):
> >
> > Could you explain what exactly happens once the fox changes direction? Because all I can see as a result is a stalemate.
> > 
> > What does the duck’s final path to the edge look like?
> 
> If the fox _constantly_ changes direction, it’ll look like a zig-zaggy straight line - and the fox will get nowhere near the duck. Every time the fox changes direction it loses ground (I think).

No. This is only true if the duck is within the critical circle that’s been mentioned. I don’t know if I buy the 4.6 figure. A proof would also show that the fox doesn’t lag more than half a circle behind or else switching directions is optimal. This would be the case with the head tangent strategy?

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [September 24, 2010, 1:02am UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/18 "2010-09-24T01:02:53Z")

</div>

> [@panamajack](#):
>
> Could you explain what exactly happens once the fox changes direction? Because all I can see as a result is a stalemate.

Note that the fox will already be going his best direction, except for an immediate course-change, i.e. after a slight feint to get the duck to “commit.” But if he forces duck to change direction, duck is OK. The important thing to note is that **duck’s velocity always has a postive component away from the center**. In other words, if they’re zigzgging, fox will be making no progress, while duck gets closer and closer to opposite edge.

> [@panamajack](#):
>
> What does the duck’s final path to the edge look like?

It does fox no good to do the feint or zigzag variation. With fox playing in his best, straightforward way, the duck’s path (once he leaves the critical circle) will be … the shortest distance between 2 points! … a straight line!!

---

<div class="post-metadata">

**Author:** ![Snarky\_Kong](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Snarky\_Kong](https://boards.straightdope.com/u/Snarky_Kong)\
**Post date:** [September 24, 2010, 2:05am UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/19 "2010-09-24T02:05:22Z")

</div>

> [@septimus](#):
>
> Note that the fox will already be going his best direction, except for an immediate course-change, i.e. after a slight feint to get the duck to “commit.” But if he forces duck to change direction, duck is OK. The important thing to note is that **duck’s velocity always has a postive component away from the center**. In other words, if they’re zigzgging, fox will be making no progress, while duck gets closer and closer to opposite edge.

Why is it that you think the fox will be sitting in one spot, going back and forth if the duck’s moving? Whichever direction the duck picks, the fox will choose the same side and catch the duck. If the duck makes any movement that doesn’t go directly back to the safe spot on the critical circle, the duck has still picked a side and the fox catches it.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [September 24, 2010, 12:23pm UTC](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546/20 "2010-09-24T12:23:43Z")

</div>

By the way, when I do this puzzle, I choose  
R = Fox’s speed = radius of lake  
Now, the critical circle has radius 1. No big deal, but (1,R) is slightly less messy than (1/R,1).

Unless the Fox is very close to his unbeatable speed, R = 4.60334, there are many circles that can play the role of “critical circle”, for example the one with radius (1 - epsilon), where epsilon is sufficiently small.

The smallest such “critical circle” is the one where Duck CAN “commit”; the largest is the one where Duck MUST “commit.”

> [@Snarky\_Kong](#):
>
> Whichever direction the duck picks, the fox will choose the same side and catch the duck. If the duck makes any movement that doesn’t go directly back to the safe spot on the critical circle, the duck has still picked a side and the fox catches it.

Following, I think, is the simplest argument. I should have given it earlier.

You (the Duck) are on the North point of the critical circle (of radius 1 - epsilon) and Fox is due South. You don’t even look at Fox for a moment; you just continue North, by distance epsilon. _Now_ you look at Fox: if he went West, you go East and vice versa. (If he didn’t move you continue North.)

If he feints West and then switches back to East, you’re OK. That extra distance epsilon gives you margin for corrective action.

But, you may object, I’m trying to dazzle with smoke and mirrors; what’s with the TWO critical circles, switching the argument between them as convenient? :dubious: Well, you will no longer escape if the Fox’s speed is near 4.60334; You only escape from a Fox of speed 4.60334 - g(epsilon). (Nevermind details of g()!)

But, as usual, _ **you can make epsilon as small as needed!** _.

[Next page](https://boards.straightdope.com/t/duck-and-fox-and-other-great-puzzles/554546.md?page=2)
