A student is swimming in a pool while a teacher runs around the perimeter trying to apprehend the student. The student's swimming speed is slower than the teacher's running speed by a factor of v....
Source syncApr 19, 2026
Problem#0761
LevelLevel 36
Solved By190
LanguagesC++, Python
Answer5.05505046
Length2,295 words
geometrygame_theoryanalytic_math
Problem statement
Problem Statement
This archive keeps the full statement, math, and original media on the page.
Two friends, a runner and a swimmer, are playing a sporting game: The swimmer is swimming within a circular pool while the runner moves along the pool edge. While the runner tries to catch the swimmer at the very moment that the swimmer leaves the pool, the swimmer tries to reach the edge before the runner arrives there. They start the game with the swimmer located in the middle of the pool, while the runner is located anywhere at the edge of the pool.
We assume that the swimmer can move with any velocity up to $1$ in any direction and the runner can move with any velocity up to $v$ in either direction around the edge of the pool. Moreover we assume that both players can react immediately to any change of movement of their opponent.
Assuming optimal strategy of both players, it can be shown that the swimmer can always win by escaping the pool at some point at the edge before the runner gets there, if $v$ is less than the critical speed $V_{Circle} \approx 4.60333885$ and can never win if $v>V_{Circle}$.
Now the two players play the game in a perfectly square pool. Again the swimmer starts in the middle of the pool, while the runner starts at the midpoint of one of the edges of the pool. It can be shown that the critical maximal speed of the runner below which the swimmer can always escape and above which the runner can always catch the swimmer when trying to leave the pool is $V_{Square} \approx 5.78859314$.
At last, both players decide to play the game in a pool in the form of regular hexagon. Giving the same conditions as above, with the swimmer starting in the middle of the pool and the runner at the midpoint of one of the edges of the pool, find the critical maximal speed $V_{Hexagon}$ of the runner, below which the swimmer can always escape and above which the runner can always catch the swimmer.
Give your answer rounded to $8$ digits after the decimal point.
Problem 761: Runner and Swimmer
Solution
Some Definitions
All angles are measured counterclockwise in the range (−π,π]. Thus if
a=(1,0),b=(0,1),o=(0,0),
then
∠aob=2π,∠boa=−2π.
Suppose the pool occupies a closed bounded convex set P with boundary ∂P and interior intP. Let its perimeter be p, and let λ>1.
Suppose Q is a closed convex proper subset of P. Let
πQ:XQ→P∖intQ
be the universal cover of P∖intQ, and let
σ:XQ→XQ
be a generator of the fundamental group, so that
πQ∘σ=πQ.
We lift the metric on P to a metric on XQ, and identify
πQ−1(∂P)
with R via an isometry so that
σ(x)=x+pfor x∈πQ−1(∂P).
Without loss of generality, as we traverse R in the positive direction, we traverse ∂P counterclockwise.
For x,y∈XQ, let
dQ(x,y)
be the length of the shortest path from x to y in XQ. Since both P and Q are convex, such a path is either a straight line or two straight lines joined by a section of
πQ−1(∂Q).
Now suppose the perimeter q of Q is at least p/λ. For
If y is sufficiently large, say y>y0, then the shortest path from x to y winds all the way around Q at least once. Removing one lap yields a shortest path from x to y−p, so
In particular, aQ−(x) is finite and the supremum is achieved. A symmetric argument applies to aQ+.
If x1,x2∈XQ, then for every
y∈πQ−1(∂P)
we have
∣dQ(x1,y)−dQ(x2,y)∣≤dQ(x1,x2),
so
∣aQ−(x1)−aQ−(x2)∣≤λdQ(x1,x2),
and similarly for aQ+. Thus both aQ− and aQ+ are continuous. Moreover, if p(t) is a path in XQ with speed at most 1, then both
aQ−(p(t))andaQ+(p(t))
have speed at most λ.
Finally define
δQ(x)=aQ+(x)−aQ−(x).
By symmetry,
aQ±(σx)=aQ±(x)+p,
so
δQ(σx)=δQ(x).
Thus δQ descends to a well-defined function on
P∖intQ.
A Criterion for Cutoff
Call x∈XQ a concave point if there exist
y±∈πQ−1(∂P)
achieving aQ±(x) such that
∠y+xy−∈[0,π],
and intQ is disjoint from the cone cast by that angle. In particular, the shortest paths from x to y± are straight lines.
Similarly, call x a convex point if there exist
y±∈πQ−1(∂P)
achieving aQ±(x) such that
∠y−xy+∈[0,π],
and intQ is contained in the cone cast by that angle.
Theorem 1
Theorem 1. Suppose Q is as above and satisfies:
every point of ∂Q is a concave point;
every point of ∂Q satisfies δQ(x)=p;
at least one point of ∂Q is a convex point.
Then:
for v<λ, the student can force an escape regardless of the initial positions;
for v>λ, the teacher can force a capture provided the student starts in Q.
Before proving Theorem 1, we need several lemmas.
Suppose
x∈intP,y,y′∈∂P.
By convexity, the angle ∠y′yx increases as y′→y from above, so the limit exists; similarly for the limit from below. Define
θ+=y′→y+lim∠y′yx,θ−=y′→y−lim∠xyy′.
We say the segment xy makes angles (θ+,θ−) with ∂P. Again by convexity,
θ++θ−≤π.
Lemma 1
Lemma 1. Let
α=arccos(λ1).
If the line segment xy achieves aQ−(x), then its angles with ∂P are
(π−α,α).
If it achieves aQ+(x), then its angles are
(α,π−α).
Proof. We prove the statement for aQ−(x); the statement for aQ+(x) follows by symmetry.
We may suppose that some neighborhood of the segment xy is disjoint from Q; otherwise we replace x by a point closer to y on the segment. Denote the angles made by xy with ∂P by (θ+,θ−).
First suppose y′>y. Since xy achieves aQ−(x),
y−λdQ(x,y)≥y′−λdQ(x,y′).
If y′ is sufficiently close to y, then the segment xy′ is disjoint from Q, so
dQ(x,y)=∣xy∣,dQ(x,y′)=∣xy′∣,
and also
y′−y≥∣yy′∣.
Thus
λ∣xy′∣−λ∣xy∣≥∣yy′∣.
Let
θ=∠y′yx,ϕ=∠yxy′.
By the sine rule, this inequality becomes
λsinθ−λsin(θ+ϕ)≥sinϕ.
Rearranging,
sinθtan(2ϕ)−cosθ≥cosα.
As y′→y+, we have θ→θ+ and ϕ→0, so
−cosθ+≥cosα.
Hence
θ+≥π−α.
Now suppose y′<y. Extend the ray xy′ to a point y′′ such that
∠xyy′′=θ−.
The segments yy′′ and y′′y′ lie outside P, so
y−y′≤∣yy′′∣+∣y′′y′∣.
Again for y′ sufficiently close to y,
λ∣xy∣−λ∣xy′∣≤y−y′≤∣yy′′∣+∣y′′y′∣.
Since λ>1 and
∣xy′∣+∣y′′y′∣=∣xy′′∣,
it follows that
λ∣xy∣≤∣yy′′∣+λ∣xy′′∣.
Let
ϕ=∠y′xy=∠y′′xy.
Again by the sine rule,
λsin(θ−+ϕ)≤sinϕ+λsinθ−.
Hence
cosθ−−sinθ−tan(2ϕ)≤cosα.
Letting y′→y− gives
cosθ−≤cosα,
so
θ−≥α.
Since also θ++θ−≤π, we conclude
(θ+,θ−)=(π−α,α).
This proves the lemma. □
Lemma 2
Lemma 2. Suppose y1,y2∈∂P and x1,x2∈intP are such that
∠y1x1x2+∠x1x2y2=π,
that is, the segments x1y1 and x2y2 are parallel. Let
θ=∠y1x1x2,
and let y2−y1 denote the counterclockwise arclength along ∂P from y1 to y2. Then:
(y2−y1)+λ∣x2y2∣−λ∣x1y1∣(y2−y1)+λ∣x2y2∣−λ∣x1y1∣(y2−y1)−λ∣x2y2∣+λ∣x1y1∣(y2−y1)−λ∣x2y2∣+λ∣x1y1∣≤−λ∣x1x2∣cosθ≥−λ∣x1x2∣cosθ≥λ∣x1x2∣cosθ≤λ∣x1x2∣cosθif x1y1 makes angles (α,π−α),if x2y2 makes angles (α,π−α),if x1y1 makes angles (π−α,α),if x2y2 makes angles (π−α,α).
We omit the proof, which is analogous to the proof of Lemma 1.
Lemma 3
Lemma 3. Suppose
δQ(x)>0for all x∈∂Q.
Then
δQ(x)>0for all x∈intP∖intQ.
Proof. Consider the function
f(y1,y2)=(y2−y1)−λdQ(y1,y2)
for
y1,y2∈πQ−1(∂P).
If
y2−y1≥2p,
then the shortest path from y1 to y2 traverses ∂Q at least once, so
f(y1,y2)≤f(y1,y2−p).
Also
f(y1+p,y2+p)=f(y1,y2).
Finally, if y2<y1, then
f(y1,y2)<0=f(y1,y1).
Therefore f is bounded above by its supremum on the compact set
{(y1,y2)∣0≤y1≤p,y1≤y2≤y1+2p}.
Hence f attains a maximum value.
Suppose f is maximal at (y1,y2). If y1=y2, then
f(y1,y2)=0.
So suppose y1<y2.
First suppose the shortest path from y1 to y2 intersects ∂Q at a point x. Then
Now suppose the shortest path from y1 to y2 is disjoint from ∂Q. Then it is a straight line. Moreover, y2 achieves aQ−(y1) and y1 achieves aQ+(y2), so by Lemma 1 the segment y1y2 makes angles
(α,π−α)
at y1 and
(π−α,α)
at y2.
Pick
y3,y4∈πQ−1(∂P)
so that the segment y3y4 touches ∂Q and is parallel to y1y2. Pick points x1 on y1y2 and x2 on y3y4. If
Lemma 4. If ∂Q contains a line segment x1x2, then δQ is concave down on x1x2.
Proof. Suppose x2 is counterclockwise from x1 on ∂Q. It suffices to show that for x on the segment x1x2,
∣x1x2∣δQ(x)≥∣x1x∣δQ(x2)+∣xx2∣δQ(x1).
Lift the segment x1x2 to a segment in XQ, still denoted x1x2, and let
y∈πQ−1(∂P)
achieve aQ+(x).
First suppose the shortest path from x to y is a straight line. Let the rays from x1 and x2 parallel to xy meet πQ−1(∂P) at y1 and y2 respectively. By Lemma 1, the segment xy makes angles (α,π−α) with the boundary, so Lemma 2 implies
Next suppose the shortest path from x to y contains a section of ∂Q. Then it passes through either x1 or x2; assume without loss of generality that it passes through x1. Then
The same argument applies to aQ−, and subtracting the two inequalities yields
∣x1x2∣δQ(x)≥∣x1x∣δQ(x2)+∣xx2∣δQ(x1).
Thus δQ is concave down on x1x2. □
Proof of Theorem 1
For
y∈πQ−1(∂P),
we have
aQ−(y)≥y≥aQ+(y).
On the other hand, by taking the limit of Lemma 3,
0≤δQ(y)=aQ+(y)−aQ−(y).
Hence
aQ+(y)=aQ−(y)=y.
First consider the runner’s strategy for v>λ. While the swimmer is inside Q, the runner does nothing. When the swimmer first touches ∂Q, lift the swimmer’s position to a point x∈XQ. By assumption,
p=δQ(x)=aQ+(x)−aQ−(x).
Therefore the runner can choose a lifted position
y∈πQ−1(∂P)
such that
aQ−(x)≤y≤aQ+(x).
As the swimmer moves through
intP∖intQ,
Lemma 3 gives
aQ−(x)<aQ+(x),
and both aQ−(x) and aQ+(x) move at speed at most λ. Since v>λ, the runner can continue moving so as to maintain the inequality
aQ−(x)≤y≤aQ+(x).
When the swimmer finally reaches ∂P, the runner is at the same boundary point.
Now consider the swimmer’s strategy for v<λ. If the perimeter of Q were exactly p/λ, then the swimmer could lap Q faster than the runner can lap P. Writing the swimmer’s and runner’s lifted positions as x and y, the swimmer could continue until
aQ−(x)+p=y=aQ+(x).
Then the swimmer could follow the path achieving aQ−(x) so as to increase aQ−(x) at speed λ, or the path achieving aQ+(x) so as to decrease aQ+(x) at speed λ, while keeping the runner trapped between the two barriers.
There are two complications:
if the perimeter of Q is greater than p/λ, we must replace Q by a smaller set;
if the runner changes direction repeatedly, the swimmer may keep retracing a path and never reach ∂P.
Choose ε>0 such that
v<(1−2ε)λ.
The first goal is to reach positions x,y satisfying
x∈πQ−1(∂Q),∣y−aQ+(x)∣<2pε.
Since there exists a convex point
x0∈πQ−1(∂Q),
there are points
y0±∈πQ−1(∂P)
achieving aQ±(x0) such that
∠y0−x0y0+∈[0,π]
and the cone C cast by this angle contains Q.
Pick
x1∈πQ−1(∂Q)
such that
u+C
is disjoint from intQ, where
u=πQ(x1)−πQ(x0).
For t∈(0,1), let
Qt=Q∩(tu+C).
Identify XQs with a subset of XQ whenever s<t, and let X be the union of all XQt with the induced map
π:X→P.
Let
xt=x0+tu.
Let the rays from xt parallel to x0y0± meet πQ−1(∂P) at yt± and πQ−1(∂Q) at zt±.
Then b is continuous on πQ−1(Q). Moreover, as x moves along πQ−1(∂Qt) from zt− to zt+ at speed 1, the function b(x) increases at speed
dQt(zt−,zt+)b(zt+)−b(zt−)≥λ.
Choose T∈(0,1) such that the perimeter of QT is at most p/λ. The swimmer first moves to ∂QT. Lift the swimmer’s and runner’s positions to x,y∈X such that
y>b(x).
If the swimmer laps QT once, then b(x) increases by p while the runner’s lifted position moves by at most
λpv<p.
Hence the swimmer can keep lapping until
y=b(x).
Now the swimmer follows the strategy below while π(x)∈intQ:
if y−b(x)∈(−pε,−pε/4), move along ∂Qt(x) toward zt(x)−;
if y−b(x)∈[−pε/4,pε/4], move in direction −u;
if y−b(x)∈(pε/4,pε/2), move along ∂Qt(x) toward zt(x)+.
This maintains
∣y−b(x)∣<2pε.
It remains to show that the swimmer eventually reaches ∂Q. Suppose not. Then the swimmer remains in one connected component of
πQ−1(Q∖QT).
While in the second case, t(x) decreases at speed
−∣u∣1,
so the total time spent there is less than T∣u∣. Going from the first case to the third case requires at least some fixed positive amount of time in the second case, so this can happen only finitely many times. Hence the swimmer eventually stops visiting one of the first or third cases; assume without loss of generality that the third case is eventually avoided.
Consider
dQt(x,zt−)−dQt(xt,zt−)+t∣u∣,
where t=t(x). This quantity decreases at speed 1 in both the first and second cases, yet is bounded below. Therefore the swimmer eventually reaches πQ−1(∂Q).
Now the swimmer is at some
x2∈πQ−1(∂Q),
and the runner is at a lifted position y with
∣aQ+(x2)−y∣<2pε.
Because x2 is concave, there exist
y2±∈πQ−1(∂P)
achieving aQ±(x2) such that
∠y2+x2y2−∈[0,π]
and the cone C2 cast by that angle is disjoint from intQ.
Let X2 be the connected component of
πQ−1(C2∩P)
containing x2. For x∈X2, define
b−(x)=y∈[y2+,y2−]sup(y−λ∣xy∣)+p,
and
b+(x)=y∈[y2+,y2−]inf(y+λ∣xy∣).
As before, Lemma 2 implies
b+(x)≤b−(x).
Now define
c±(x)=b±(x)±ε(b−(x)−b+(x)−2p).
Since 1−2ε>0,
c−(x)−c+(x)≥pε.
If x moves toward the point achieving b−(x) at speed 1, then b−(x) increases at speed λ while b+(x) changes at speed at most λ. Hence c−(x) increases at speed at least
λ(1−2ε)>v.
The same is true for c+(x).
Choose a vector w such that
π(x2)+w∈intC2.
The swimmer now follows this strategy:
if 0<y−c+(x)<pε/4, move toward the point achieving b+(x);
if c+(x)+pε/4≤y≤c−(x)−pε/4, move in direction w;
if −pε/4<y−c−(x)<0, move toward the point achieving b−(x).
Since δQ(x2)=p, we have
b±(x2)=aQ±(x2),
and therefore
c±(x2)=aQ±(x2)∓2pε.
Thus initially
c+(x)<y<c−(x),
and the strategy preserves this inequality.
As before, the swimmer eventually reaches some point
x∈[y2+,y2−].
At that point,
x≤b−(x)−p≤aQ−(x)=x=aQ+(x)≤b+(x)≤x,
so
x+2pε=c+(x)<y<c−(x)=x+p−2pε.
In particular,
π(y)=π(x).
Hence the swimmer escapes. This completes the proof of Theorem 1. □
Regular Polygon
Let
θ=nπ,
and let
pk=(cos(2kθ),sin(2kθ))(k∈Z).
Suppose P is the convex hull of the points pk. Let ρ denote counterclockwise rotation about the origin by angle 2θ. Then ρ is a symmetry of P and sends pk to pk+1.
As k ranges from 0 to n, the quantity
sin(kθ)−(k+n)tanθcos(kθ)
changes sign. Let K be the largest integer for which it is negative. Thus
sin(Kθ)−(K+n)tanθcos(Kθ)<0
and
0≤sin((K+1)θ)−(K+n+1)tanθcos((K+1)θ).
Rearranging,
cos((K+2)θ)≤(K+n)tanθ2sin(Kθ)−cos(Kθ)<cos(Kθ).
Hence we may define
α=21(Kθ+arccos((K+n)tanθ2sin(Kθ)−cos(Kθ))),
and then
Kθ<α≤(K+1)θ.
Theorem 2
Theorem 2. Let Q be obtained from P by rotating counterclockwise by angle Kθ and scaling by
s=cos(α−Kθ)cosα.
With
λ=cosα1,
the hypotheses of Theorem 1 hold.
Remark. For the square, one has
K=1,α≈1.397,λ≈5.789.
Remark. For large n, θ is small and ntanθ≈π, so α≈Kθ≈μ, where μ satisfies
μ+π=tanμ.
This agrees with the cutoff for a circular pool.
Proof. For k∈Z, let
qk=s(cos((2k+K)θ),sin((2k+K)θ)).
Then Q is the convex hull of the points qk. By similarity, the perimeters p and q of P and Q satisfy
q=sp,
so
pq=s=cos(α−Kθ)cosα>cosα=λ1.
We next determine δQ(q1). If the line segment q1y intersects Q, then the shortest path from q1 to y in XQ must pass through q0 or q2; assume without loss of generality that it passes through q0. By symmetry,
Thus we may restrict attention to segments from q1 to ∂P whose interiors are disjoint from Q.
By Lemma 1, it suffices to consider segments terminating in the interior of a side at angle α. Let yk be the unique point on the side pkpk+1 such that
Let a≤1 be maximal and b≥1 be minimal such that the segments q1pa and q1pb+1 intersect Q. Then it is enough to consider the points yk with
a≤k≤b.
We now verify the following five facts:
ϕk≤π/2−α for all k.
π/2−α=ϕ1≥ϕ2≥ϕ3≥⋯≥ϕb.
ϕ0>π/2−α−θ.
a=0.
The segments q1y0 and q1y1 do not intersect Q.
Assuming these, there is some b′ with
1≤b′≤b
such that
ϕk>2π−α−θ(0≤k≤b′),
and
ϕk≤2π−α−θ(b′<k≤b).
By (1), this means yk exists for 0≤k≤b′ and not for b′<k≤b. If b′=b and q1yb intersects Q, let b′′=b−1; otherwise let b′′=b′. By (5), the segments q1yk are disjoint from Q for 0≤k≤b′′, and not for b′′<k≤b′. Finally, by (1) and (2),
On the other hand, aQ+(q1) and aQ−(q1) are achieved by y1 and y0′ on the sides p1p2 and pK+1pK+2 respectively. Moreover,
∠y1q1y0′=2π−∠y1q1o−∠y0q1o=π+2α−2(K+1)θ<π.
By symmetry, aQ+(q2) and aQ−(q2) are achieved by ρ(y0) and ρ(y1′). Also q1y1 is parallel to q2ρ(y0), and q1y0′ is parallel to q2ρ(y1′). Interpolating along the side q1q2 shows that every point x on q1q2 is concave and satisfies
δQ(x)=p.
By rotational symmetry, the same is true on every side of Q. Therefore all hypotheses of Theorem 1 are satisfied. This proves Theorem 2. □
For a general convex pool, one may iteratively search for the cutoff speed as follows. Suppose Q is a convex subset of P with
δQ(x)≤pfor all x∈∂Q.
Pick a point q∈Q as far as possible from ∂Q. For each x∈∂Q, let ϕ(x) be the point on the segment xq whose distance from x is
3λp−δQ(x).
Let ϕ(Q) be the convex hull of ϕ(∂Q). Starting from Q=P, apply ϕ repeatedly. There are two possible outcomes:
the procedure terminates when the perimeter of Q drops below p/λ, in which case the swimmer wins for v=λ;
the procedure continues forever and converges to a convex set Q invariant under ϕ, in which case
δQ(x)=pfor all x∈∂Q.
Then for v=λ, the runner wins if the swimmer starts in Q, while the swimmer wins from suitable boundary-phase starting data outside that trapped region.
Algorithm
For the regular n-gon, the implementation is:
theta = pi / nfind the largest K with sin(K theta) - (K+n) tan(theta) cos(K theta) < 0alpha = 0.5 * (K theta + arccos(2 sin(K theta)/((K+n) tan(theta)) - cos(K theta)))return 1 / cos(alpha)
For Problem 761, set n = 6.
Complexity Analysis
Time:O(K).
Space:O(1).
Answer
5.05505046
Source code
Code
Each problem page includes the exact C++ and Python source files from the local archive.