Showing posts with label wolf and duck. Show all posts
Showing posts with label wolf and duck. Show all posts

Duck In A Wolf

Seems like its time to solve the advanced Wolf and Duck problem now. First, we should set up some coordinates (because I don't want to go through the trouble of making pictures on blogger). We will set up polar coordinates in the pond, with R going from 0 to 1 (1 being the edge of the pond), and θ going from 0 to 2π. We know the duck can manage to get to a radius 1/v and be on the opposite side of the pond from the wolf (using previous strategies). Let us set up coordinates so the puzzle starts with the duck at θ=0, R=1/v and the wolf is at θ=π at R=1, of course.

Now, the duck will travel a small distance epsilon out to the edge of the pond, and the wolf must choose to go in the direction of increasing θ or decreasing θ. Let us assume the wolf goes in the direction of increasing θ. The duck will now head for the point of escape (assuming there is one) at R=1, θ=φ. There is little point in the wolf changing directions now, as the duck will have gained a small distance epsilon toward the edge again before the wolf just gets back to its original location. There is also little point in the duck taking any path more complicated than a straight line, as wherever the escape point is, the duck might as well go straight there.

The wolf must get to the position φ before the duck can. The wolf must travel a distance φ+π. The duck must travel the distance D, given by the cosine law as:
D2 = 1+1/v2-2/v cos(φ)

Now, let f(φ) be the function representing the amount of time between when the duck gets to the escape point and the wolf gets to the escape point. Specifically, f(φ) = D-φ+π)/v. Maximizing f(φ) gives one:
sin(φ) = D

So this means that the duck will travel tangental to the circle of radius 1/v. When sin(φ)=D we know cos(φ)=1/v, if this isn't obvious, you should probably be drawing a picture to follow along, I certainly needed to.

The value of f(φ) when sin(φ)=D (and thus cos(φ)=1/v) can be given as sin(φ)-(φ+π)cos(φ). If we set that to zero (to find the situation when the duck no longer beats the wolf to the edge) we find that:
tan(φ)= φ+π

Which has a solution at φ≈1.35 . Thus, v=1/cos(φ)≈4.6 is when this strategy will fail for the duck.

As far as I can tell, when the wolf speed is greater than this value, the duck can do nothing to escape, but I have found no proof of this.

Wolf Near A Pond

Alright, the comments section seems to imply that at least one person has solved my Wolf and Duck problem, so I suppose I'll post the solution now:
The duck moves out to a circle 1/4 the radius of the full pond. At this radius, the duck has a faster angular velocity of the wolf, so the duck can go in a circle until the wolf is on the far side of the pond from the duck. At the point, the duck goes straight to the edge, as the duck can traverse the distance of 3/4 before the wolf can traverse the distance π .

Just a note because we don't all use the same browsers, π is supposed to render as pi. In Safari it looks really weird.

Alright, what is the maximum wolf speed for which this works? In general, if the wolf has speed v, the duck can go out the a distance 1/v and still have a greater angular velocity. The duck must then travel a distance 1-1/v before the wolf can travel a distance π . So, the duck requires that:
1-1/v < π/ v v < π+1

Thus, this strategy works until the wolf has speed π+1.

Next question:
Suppose we increase the speed of the wolf to 4.3 times the ducks speed, can the duck do any better? What is the maximum wolf speed for this new strategy?

I'll concede this isn't really a new question, but really it feels like one. The better strategy is alot harder to find and requires some more complicated math to prove it works and is optimal. However, I still promise that all shapes involved are simple geometrical shapes, lines and arcs of circles basically.

Duck In A Pond

Alright, been a full two weeks since I posted. I seem to be on the "new puzzle" part of my cycle, so I suppose I'll do one of those. This one looks a bit less mathy than my usual puzzles, but it really isn't. I first learned this one from Bart:
A duck is at the center of a circular pond with radius 1. A wolf is at the edge of the pond and is able to move around the circumference. The duck wins if it is able to get to the edge of the pond with no wolf there. Find a strategy that can guarantee the duck can escape to the circumference assuming that the wolf moves 3.5 times as fast as the duck.

For clarity, you can assume the duck is pointlike and the wolf has a small size epsilon (the wolfs size is needed to dodge weird solutions involving the duck touching an irrational point on the circumference and the wolf cannot access him). To qualify as a solution, it must work for some epsilon greater than zero. I will say that the proper solution involves no weird spirals or things, all shapes are simple geometrical objects that you can calculate lengths of easily.

There are a few follow-up questions to this one, I'll post one of them later, but for now:
What is the maximum speed of the wolf for which this strategy still works?