Hello, MATNTRNG1
$\displaystyle \text{Given a river with parallel banks }m\text{ and }n\text{, and two villages, }A\text{ and }B,$
$\displaystyle \text{where should a bridge }CD\text{, perpendicular to the banks, be constructed}$
$\displaystyle \text{in order to minimize the total distance }AC + CD + DB\,?$Code:A o | * | * C m - + - - + - - - - - ♥ - - - - - - - - - : | | * w: o | * Q : P * | o : * | | n - + - - - - - - - - ♥ - - - - - + - - - D * | * | o B
We can determine $\displaystyle \,w$, the width of the river.
From $\displaystyle \,A$ construct segment $\displaystyle AP$ so that: .$\displaystyle AP \perp m\,\text{ and }\,|AP| = w.$
Frim $\displaystyle \,B$ construct segment $\displaystyle BQ$ so that: .$\displaystyle BQ \perp n \,\text{ and }\,|BQ| = w.$
Draw $\displaystyle AQ$ intersecting $\displaystyle \,m$ at $\displaystyle \,C.$
Draw $\displaystyle PB$ intersecting $\displaystyle \,n$ at $\displaystyle \,D.$
$\displaystyle CD$ is the location of the bridge.
Hello, MATNTRNG1
This is my original diagram.
Code:A o | * | * C m - + - - + - - - - - ♥ - - - - - - - - - : | | * w: o | * Q : P * | o : * | | n - + - - - - - - - - ♥ - - - - - + - - - D * | * | o B
Now reduce the river to a line (it has width 0).
Code:A o | * | * C m - - - - + - - - - - ♥ - - - - - - - - - D * | * | o B
Got it?
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
emarakov has a truly elegant solution!
Code:A o * * C m - - - - - - - - - - ♥ - - - - - - - - - | | | | n - - - - - - - - - - ♥ - - - - - - - - - D * * o B
The width of the river is constant.
We want to minimize the total diagonal distance: .$\displaystyle AC + DB.$
Switch $\displaystyle CD$ and $\displaystyle DB.$
Code:A o * * D m - - - - - - - - - - ♥ - - - - - - - - - * * B o C | n - - - - - - - - - - - - - - - + - - - | | o D
The total diagonal distance in a minimum when $\displaystyle AB$ is a straight line.
See?