[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1935.0. "SAVE THE POOR DUCK!" by TAVIS::SHIRAN () Sun Feb 12 1995 06:51

    a duck is in the center of a round pool.
    a fox is standing on the pool's perimeter.
    the fox wants to eat the duck.
    the fox cannot swim.
    the duck cannot fly from inside the pool.
    the fox's speed on the ground is four times the duck's speed
    in the water.
    
    how can the duck reach the perimeter before the fox and fly away ?
    
T.RTitleUserPersonal
Name
DateLines
1935.1AUSSIE::GARSONachtentachtig kacheltjesSun Feb 12 1995 21:3013
    re .0
    
    Assuming a unit radius pool, the duck should proceed (at whatever
    speed) to a distance of 1-pi/4 from the centre of the pool. At this
    radius the duck should proceed in a circle around the centre of the
    pool until it is diametrically opposite the fox i.e. the centre of the
    pool lies between the fox and duck, on the line joining them. (Note
    that at this radius the duck has greater angular speed than the fox
    when both are at top linear speed.) Once opposite, the duck should head
    directly for the edge of the pool. In the configuration described, it
    will be a dead heat (but not a dead duck). [If that is considered
    unacceptable then the duck needs to position initially to 1-pi/4+epsilon
    from the centre of the pool.]
1935.2bloodyminded foxAUSSIE::GARSONachtentachtig kacheltjesSun Feb 12 1995 21:4810
    Followup question...
    
    Supposing the highly intelligent duck and fox both have reasoned that
    the duck is going to get away and therefore the fox will merely try to
    keep the duck in the pool for as long as possible, what strategies
    should be used by duck and fox?
    
    Examples only: Should the duck not move radially in its initial
    positioning and to what radius within the range 1-pi/4..1/4 should it
    move. Or is some completely different strategy better?
1935.3And is the 4:1 ratio the best possible?WRKSYS::ROTHGeometry is the real life!Mon Feb 13 1995 16:215
   How about the path that gives the shortest escape time?  Can
   you set up a differential equation (or variational problem)
   for the problem?

   - Jim
1935.4SSAG::LARYLaughter & hope & a sock in the eyeMon Feb 13 1995 22:4524
>    Assuming a unit radius pool, the duck should proceed (at whatever
>    speed) to a distance of 1-pi/4 from the centre of the pool...

This is the "skin of its nose" solution - the duck and fox arrive at the
perimeter at the same time. Notice that the duck can perform the positioning
maneuver which is the key to this solution as far as 1/4 out from the center;
therefore, by picking a radius between 1-pi/4 and 1/4 the duck can get a few
milliseconds of takeoff time (actually (pi-3)/4*c seconds, where c is the
time for the duck to swim from the center to the perimeter).

Now - it seems that once the duck and fox make their move, the duck has the
opportunity to get more of a lead by angling slightly away from the direction
the fox chose to run. If the duck starts 1/4 unit from the center, and if
it runs at a small angle e away from the arc that the fox is running, then
the duck runs 3*sec(e)/4 and the fox must run pi + 3*sin(e)/4.

The duck's lead at the end is c*((pi + 3*sin(e)/4)/4 - 3*sec(e)/4)
= c*(pi-3)/4 + 3*c*(sin(e)/4 - (sec(e)-1))/4

The second term appears positive, since sec(e)-1 is about e^2/2 and
sin(e) is about e, and e/4 > e^2/2 for e < 1/2.

So - what is the maximum lead the duck can achieve?

1935.5outfoxedHERON::BUCHANANEt tout sera bien etWed Feb 15 1995 06:265
	Another question is: what happens if we speed up the fox? It's clear
that Derek the Duck in .1 has to think of a new strategy when the fox/duck
speed ratio is >= 1+pi.

Andrew
1935.66.742767092HERON::BUCHANANEt tout sera bien etWed Feb 15 1995 12:0784
	Here is a hand-waving solution: please check it. The duck has unit 
speed, and the pond is a unit circle. The duck location is D, the fox location 
F. Let's say that the duck begins in the centre of the pond, O. 

	Use polar co-ordinates and say that a location (r,h) is *accessible*
if the duck can get to radius r from the centre of the circle, while the
angle DOF is h.

	Let K = K(r) be the least upper bound of {h: (r,h) is accessible}.
K(r) is defined for r in (0,1]. Some remarks about K...

	* Iff K(1) > 0, then the duck can escape.

	* For r < 1/a, K(r) = pi, since (r,pi) is accessible.

	* K(1/a) = pi, although (1/a,pi) is not accessible, (1/a,pi-epsilon) is
accessible for all epsilon in (0,pi].

	Now we want to compute K for r > 1/a. The complexity comes from the
fact that at any moment, the duck can choose to go in any direction. We can
say that:

(dt)^2 = (dr)^2 + r^2*(dh^2)

	And there is another angular component from the movement of the fox:

dh' = a*dt

	We can say that these are equalities, rather than inequalities, as
long as K lies strictly in (0,pi). ie: we use the heuristic that it is always
in the interest of the duck & fox to go as fast as possible, unless they have
achieved a boundary angle for a given radius.

	Then:

K(r) = l.u.b. {K(r-dr) + dh - dh'}

	Loosely this is saying that K is determined by whatever K was for other
radii, with modifications for the duck and the fox moving angularly. Let's write

dr = x*dt

	where x is a variable lying in [0,1]. Why are we ignoring negative x?
We say that the duck cannot gain anything by moving *towards* the centre, if he
is on or arbitrarily close to K(r), since the fox will just track backwards
and the best that the duck can do is to access some (s,h) already achieved
earlier.

	This allows us to re-arrange to get:

(K(r)-K(r-dr))/dr = l.u.b. { (_/(1-x^2)-ar)/xr }

	We can differentiate the right hand side with respect to x to find the
maximum value. It turns out that this is attained at the turning point, rather
than at 0 or 1, and is found at:

x = _/(1-1/(a^2*r^2))

	Now by letting dr tend to zero, we have a differential equation in K,
which is:

dK/dr = -_/(a^2*r^2 - 1)

	This can be integrated by using the hyperbolic substitution

a*r = cosh(b)

	yielding:

K(r) = pi - r*_/(a^2*r^2-1)/2 + arccosh(a*r)/(2*a)

	Setting r = 1, and K = 0, we get a transcendental equation in a:

2*pi - _/(a^2-1) + arccosh(a)/a = 0

	The solution to this equation is the critical speed ratio, determining
whether the duck can flee the fox. Maple tells us that the critical value is

a = 6.742767092...

telling us that the canny duck can get a lot of extra mileage from diagonal
motion, as suggested by reply .4.

Andrew
1935.7reducktion to 4.603338849...HERON::BUCHANANEt tout sera bien etFri Feb 17 1995 13:0092
	Here's a different approach, which gives the same answer for the
tricky bits of .6, giving me more confidence. I also uncovered an error in
the expression given for dK/dr, so .6 is incorrect from that point onwards.

	As before, let r be the distance of the duck from the centre, and
let h be the angle DOF. h lies in [0,pi]. a is the fox/duck speed ratio. Then, 
in vector notation:

	.   . ^       . ^
	r = r r  +  r h h
	-     -         -
where
        .       . 
	r� + r�(h+a)� = 1

	Let the duck begin from r = 1/a, h = pi (or arbitrarily close to it), 
and move outwards towards the edge. There is now a race on between the duck and
the fox, as the duck attempts to reach r = 0, while the fox attempts to force 
h = 0. The fox will have greater angular velocity than the duck, and so h will 
be monotonically decreasing. Thus it is never in the interest of the duck
to "duck back" from r to r' > 1/a, say, because h will be smaller at r' than
it was the first time the duck was at r'. So r is monotonically increasing.
So the fox can do no better than to sprint round the pond, trying to reduce
h as fast as possible, while the duck can choose, at each point r, the value of:

	.
	r = x(r), where x lies in [0,1]

Simple calculus states:

			  .
	/ H       / 1     h
	|    dh = |     ----- dr
	/ pi      / 1/a   .
                          r
				      .     .
Solving the lhs, and substituting out h and r:

		 / 1   _/(1-x�) - ar
	H = pi + |     ------------- dr
                 / 1/a       xr

	Now, the duck wishes to maximize H. He can pick x at each r 
independently to do this. Thus it is legitimate for the duck to differentiate
under the integral sign to find the optimal x(r).

	_/(1-x�) - ar
	-------------
	      xr

	This is exactly the same value that we had to maximize in .6 for x.
It turns out that this is maximized at the turning point, rather than at 0 or 1,
and is found at:

	x = _/(1-1/(a�r�))

	[At this point in .6, there is an error in the expression given for
dK/dr. A factor of 1/r was omitted.]

		 / 1 
	H = pi - |     _/(a�-1/r�) dr
                 / 1/a      
		 
	H = pi - _/(a�-1) + arcsec(a)
		 
	The value of a when H = 0 gives as before, A, the critical value of a.
Maple yields:

	A = 4.603338849...

	This is a bit more plausible than the earlier answer. It is greater
than 1+pi, but not too much greater. Another check is to set a = 4, and to
compare with the values suggested in .4. H = 0.586725380..., which is about a 
factor of 10 greater than .4 offers. Plausible. A third check is to look at how 
x changes with r. Initially, x is nearly 0, suggesting the duck is moving almost
tangentially, to take advantage of the relatively small difference in angular
velocity. As r increases, the duck goes for broke, by increasing the 
radial component.

	Another test is to find out how far the fox moves.

	    / 1    1
	T = |     --- dr = _/(a�-1)/a
	    / 1/a  x

	So the fox moves _/(a�-1) in that time, which for a=A gives
4.493409458. Simultaneously, the duck is moving from a point 0.2172336291 from 
the centre, along a curved line 0.9761196395 in length. Draw a picture and it 
looks about right.


Andrew
1935.8simplerHERON::BUCHANANEt tout sera bien etMon Feb 20 1995 11:094
	I realized as I drove home on Friday, that the solution described in the
previous reply is actually a straight line!

Andrew.