# The lifeguard problem

- Author:
- Luca Moroni

## The lifeguard problem

## Notes

From: https://stuff.mit.edu/afs/athena/course/2/2.710/Fall06/hws710-1.pdf
...The lifeguard must get to the swimmer as quickly as possible in order to prevent him/her from drowning. The lifeguard has different speeds running on the sand and swimming in the water. We seek to find the

*(i.e. the direction and distance that the lifeguard must travel on sand and water) that minimizes the time required to reach the swimmer. Similarly,***optimal path***tells us that a photon seeks to minimize the time of travel between two points. For the simple case of light traveling from one medium to another, the problem is exactly the same as the lifeguard problem. We are interested in the conditions that describe the path that minimizes the time of travel and not surprisingly, we find the condition to be***Fermat’s principle***...***Snell’s law**## Using the applet

You can drag the starting points A and B and/or select a custom alternative route (beside the optimal one and the direct line) by moving the point Pc along the shoreline