Minimum Distance to Road

1.2k Views Asked by At

You are standing in the middle of a completely dark forest (so you have no vision). You know there is an infinitely long road exactly one mile away from your current location, i.e. the shortest distance from your current location to any point on the road is 1 mile). What is the minimum distance you must walk in order to reach the road?

My approach for this problem so far was to imagine a unit circle and to try to inscribe this circle in a square, which may lead to some optimizations beyond the upper bound $1+2\pi$. However, I'm not sure how to achieve a better upper bound, or to calculate the exact answer (in some form).

3

There are 3 best solutions below

3
On

To find the minimum maximum distance you need walk then walk a distance $r$ in a straight line at an angle $\theta$ to the perpendicular to the road so that you just miss the road. Then $\cos(\theta)=1/r$. After that walk in a circle away from the road. The distance walked is then $W=r+ 2r(\pi-\theta)$. Differentiate this w.r.t. $r$ gives $W'=1+2(\pi-\theta)-2\cos(\theta)/\sin(\theta)=0$.

Solving numerically gives $\theta=0.29$, $r=1.044$ leading to a walk of 6.995 compared to 7.28 for walking in a circle of radius one.

A slightly more difficult question would be what is the expected distance walked assuming some randomly chosen starting direction. The radius of the circle will be different as there is some chance of hitting the road without needing to walk the circle.

0
On

I see a shorter path:

enter image description here

You walk 1 mile and then start walking the circle. But after completing $\frac{3}{4}$ of the circle, you walk along the tangent for 1 mile. This tangent will cross all possible roads (tangents) in the last quarter.

Total length: $$L = 2 + \frac{3 \pi}{2} \approx 6.712$$

1
On

I can show that we need at least $3\pi/2 \approx 4.71$ miles. Posting it because it also involves $3\pi/2$ as in the Jens's answer, (but without 2 of course).

Suppose we have a curve $z = (x, y) : [0, 1] \to \mathbb{R}^2$ on a plane which intersects every tangent to a unit circle. Take any $\phi\in [0, 2\pi]$. There are two parallel tangents to a unit circle which are perpendicular to $(\cos\phi, \sin\phi)$. Namely, their equations are $x\cos\phi + y\sin\phi = \pm 1$. Our curve should intesect both of these lines. This means that in projection to a ray generated by a vector $(\cos \phi, \sin \phi)$ our curve should walk at least 3 miles. Namely, it should visit one of the lines and then go back to the other. On the language of integrals: $$\int\limits_0^1 |x^\prime(t) \cos \phi + y^\prime(t) \sin \phi| dt \ge 3.$$ By integrating this inequality from $\phi = 0$ to $\phi = 2\pi$ we get \begin{align*} \int_0^{2\pi} d\phi \int_0^1 |x^\prime(t) \cos \phi + y^\prime(t) \sin \phi| dt &= \int_0^1 dt \int_0^{2\pi} |x^\prime(t) \cos \phi + y^\prime(t) \sin \phi | d\phi \\ &\ge 6\pi. \end{align*}

I claim that for every $u, v$ it holds that $\int\limits_0^{2\pi} |u \cos \phi + v \sin \phi| d\phi = 4 \sqrt{u^2 + v^2}.$ To see that this is true, chose $\theta$ in such a way that $(u, v) = \sqrt{u^2 + v^2}(\cos \theta, \sin\theta)$ and the use the formula $\cos \theta \cos \phi + \sin\theta \sin \phi = cos(\phi - \theta)$. Having this claim, we get: $$\int_0^1 dt \int_0^{2\pi} |x^\prime(t) \cos \phi + y^\prime(t) \sin \phi | d\phi = 4 \int_0^1 \sqrt{ (x^\prime(t))^2 + (y^\prime(t))^2} \ge 6\pi, $$ from where we get our lower bound $3\pi/2$ (the last integral is the length of our curve).

Update 1: improved upper bound: $\sqrt{2} + 1 + \pi + 1 \approx 6.56 $

enter image description here

Update 2 : I have noticed how to improve the lower bound to $5\pi/3 \approx 5.23$. Consider a point at which our curve ends. By rotating the whole picture we may assume that this point belongs to the $x$-axis, that is, its coordinates are $(r, 0)$. Further, we may assume that $r\ge 1$ (otherwise we could make our curve shorter).

As before, take any $\phi\in [0, 2\pi]$ and consider two parallel tangents to a unit circle which are perpendicular to $(\cos\phi, \sin\phi)$. Once again, their equations are $x\cos \phi + y \sin\phi = \pm 1$. A point $(r, 0)$ is $|1 - r\cos\phi|$-far from the first line and $|1 + r\cos\phi|$-far from the second line. Our curve at first visits one line, then goes back to the other line and then goes to $(r, 0)$. This means in projection to a ray generated by $(\cos\phi, \sin\phi)$ our curve walks at least $3 + \min\{|1 - r\cos\phi|,|1 + r\cos\phi|\}$ miles. This means $$\int\limits_0^1 |x^\prime(t) \cos \phi + y^\prime(t) \sin \phi| dt \ge 3 + \min\{|1 - r\cos\phi|,|1 + r\cos\phi|\}.$$ By integrating this inequality as above from $\phi = 0$ to $\phi = 2\pi$ we get $$4l \ge 6\pi + \int_0^{2\pi} \min\{|1 - r\cos\phi|,|1 + r\cos\phi|\} d\phi,$$ where $l$ s the length of our curve. It can be shown that $$ \min\limits_{r\ge 1} \int_0^{2\pi} \min\{|1 - r\cos\phi|,|1 + r\cos\phi|\} d\phi = 2\pi/3, $$ from where we get $4l \ge 6\pi + 2\pi/3$, or $l \ge 5\pi/3$. Let me explain how to obtain the minimum above. Omitting some simple details, we obtain \begin{align*} \int_0^{2\pi} \min\{|1 - r\cos\phi|,|1 + r\cos\phi|\} d\phi &= 2 \int_{-\pi/2}^{\pi/2} |1 - r\cos\phi| d\phi \\ &= 2\pi - 4r - 8 \arccos(1/r) + 8\sqrt{r^2 - 1}. \end{align*}

Differentiating the last expression we get: $8\sqrt{r^2 - 1} - 4r$. It is easy to see that this derivative has zero at $r = 2/\sqrt{3}$; moreover, before $r = 2/\sqrt{3}$ it is negative and after $r = 2/\sqrt{3}$ it is positive. Thus the minimum is attained at $r = 2/\sqrt{3}$; the minimal value turns out to be $2\pi/3$.

Update 3: One more improvement of the upper bound: $2/\sqrt{3} + 1/\sqrt{3} + \pi/6 + \pi + 1 \approx 6.4$ enter image description here

The summary: ($\approx 5.23$ lower bound) vs ($\approx 6.4$ upper bound)