Optimal Rescue Path for a Lifeguard on a Flowing River

March 26, 2026

Problem

A lifeguard stands on one bank of a river flowing at 4 m/s. A person is drowning 50 m downstream from a point directly opposite the lifeguard. The lifeguard can run along the bank at 6 m/s and swim in still water at 3 m/s.

Explanation

We model a classic lifeguard rescue optimization problem in a flowing river and visualize the possible rescue paths.


Problem Setup

  • The river flows horizontally with speed vr=4m/sv_r = 4\,\text{m/s} (to the right).
  • A lifeguard stands on one bank at point LL.
  • A drowning person is located at point DD, which is 50 m downstream from the point directly across the river from LL.
  • The lifeguard can:
    • Run on the bank at vr(run)=6m/sv_r^{(run)} = 6\,\text{m/s}.
    • Swim in still water at vs=3m/sv_s = 3\,\text{m/s}.

Let’s define a coordinate system:

  • Put the lifeguard at the origin: L=(0,0)L = (0,0) on the near bank.
  • The river flows along the x-axis, to the right.
  • The opposite bank is at y=Wy = W, where WW is the river width.
  • The point directly opposite the lifeguard on the far bank is (0,W)(0, W).
  • The drowning person is at D=(50,W)D = (50, W).

The lifeguard chooses a landing point on the opposite bank at P=(x,W)P = (x, W). The strategy is:

  1. Run along the bank from (0,0)(0,0) to some point (x0,0)(x_0, 0) on the near bank.
  2. Swim across to reach point P=(x,W)P = (x, W), letting the current carry them.
  3. Reach the drowning person at D=(50,W)D = (50, W) (horizontal alignment on the far bank).

In many textbook variants, one simplifies this to: run along the near bank to some point, then swim directly toward the drowning person, or run to an optimal point on the near bank, then swim to the person.

In this visualization we:

  • Let you set the river width and downstream distance (50 m in the statement, but adjustable).
  • Let you adjust the lifeguard’s running speed, swimming speed, and river current.
  • Let you select a landing point on the far bank where the lifeguard aims to arrive when swimming.
  • Compute and show the effective velocity vector of the lifeguard while swimming (their swim direction plus the river’s current).
  • Compute and display an approximate total rescue time for a chosen strategy.

Mathematical Model (for the visualization)

Let:

  • River width: WW (meters).
  • Downstream offset of victim: dd (meters), default 5050.
  • Running speed: vrunv_{run}.
  • Swimming speed (in still water): vswimv_{swim}.
  • River current speed: vcurrentv_{current} (positive to the right).
  • Chosen target point on far bank: P=(xp,W)P = (x_p, W).

1. Running Phase

We assume the lifeguard runs along the near bank from (0,0)(0,0) to some chosen point (xr,0)(x_r, 0). In this visualization, for simplicity, we link running and swimming points so that they run to a near-bank point with the same x-coordinate as where they intend to land on the far bank:

  • Run distance:
srun=xps_{run} = |x_p|
  • Run time:
trun=xpvrunt_{run} = \frac{|x_p|}{v_{run}}

2. Swimming Phase

When the lifeguard enters the water at (xp,0)(x_p, 0), they aim their swimming direction at P=(xp,W)P = (x_p, W) relative to the water. Their velocity relative to water is a vector of magnitude vswimv_{swim} pointing straight upward (toward the opposite bank in our model).

  • Swimming velocity (relative to water):
vswim=(0,vswim)\vec{v}_{swim} = (0, v_{swim})
  • River velocity:
vcurrent=(vcurrent,0)\vec{v}_{current} = (v_{current}, 0)
  • Effective velocity (relative to ground):
veff=vswim+vcurrent=(vcurrent,vswim)\vec{v}_{eff} = \vec{v}_{swim} + \vec{v}_{current} = (v_{current}, v_{swim})

The vertical distance to cross is WW, so the swim time is

tswim=Wvswimt_{swim} = \frac{W}{v_{swim}}

During this swim, the lifeguard is carried horizontally by the current an amount

Δx=vcurrenttswim=vcurrentWvswim.\Delta x = v_{current} \cdot t_{swim} = v_{current} \cdot \frac{W}{v_{swim}}.

So if they start at xpx_p on the near bank, they will arrive at

xland=xp+Δx.x_{land} = x_p + \Delta x.

For the drowning person at x=dx = d, we want ideally

xlandd.x_{land} \approx d.

3. Total Rescue Time

In the simplified model where the lifeguard aims straight across (perpendicular to banks):

  • Run time: trun=xp/vrunt_{run} = |x_p|/v_{run}.
  • Swim time: tswim=W/vswimt_{swim} = W/v_{swim}.

Total time:

T(xp)=xpvrun+Wvswim.T(x_p) = \frac{|x_p|}{v_{run}} + \frac{W}{v_{swim}}.

With current, the main issue becomes choosing xpx_p so that the horizontal drift Δx\Delta x brings the lifeguard near the victim’s x-position dd. This visualization lets you tune xpx_p and see how well the landing location matches the drowning person.


What You Can Explore

With the widgets below, you can:

  • Change river width WW and downstream distance dd.
  • Adjust running speed, swimming speed, and current speed.
  • Drag the target x-position on the far bank and see:
    • The run path along the near bank.
    • The swim path across the river.
    • The river current vector and the effective motion of the lifeguard.
    • The landing point relative to the drowning person.
    • An estimate of total time and distance split between running and swimming.

Geometrically, this is closely related to Snell’s law in optics and the calculus of variations: finding paths that minimize total travel time when speeds differ in regions (running vs swimming) and when there’s a "drift" (river current).

Use the sliders to see how the optimal landing point shifts when:

  • The current gets stronger.
  • The lifeguard can run faster or swim faster.

This builds the intuition that: to save time, the lifeguard tends to run more along the bank (faster medium) when swimming is slow or current is strong, and tends to swim a more direct path when swimming is relatively fast.

Interactive Visualization

Parameters

60.00
50.00
6.00
3.00
4.00
0.00
Optimal Rescue Path for a Lifeguard on a Flowing River