Imagine two points in $ℝ^2$ at $(-1, 0)$ and $(1, 0)$. You would like to walk from one point to the next in the shortest distance possible. However, there is a line segment coming from the origin to a point $(0, S)$ and $(0,-S)$. In this instance, $S$ is a continuous uniform random variable picked between $0$ and $1$. You will not be able to how far the line goes up until coming into contact with it.
What follows is my work thus far on a solution. Let's say we walk the hypotenuse path to the center with a height $y$. Then, there are two scenarios when we get to the center: We have either walked under or over the center line.
In the case that we walked over the line, the optimal solution back from our point will simply be to walk in a straight line from $(0,y)$ to $(1, 0)$. Therefore, we will walk exactly $2\sqrt{1+y^2}$ meters.
In our second case, we have walked under the line. Now we will have to travel the remaining distance up the center line, and then walk on the hypotenuse from $(0,S)$ to $(1,0)$. Therefore, we will walk exactly $S-y+\sqrt{1+y^2}+\sqrt{1+S^2}$.
Since $S$ is a uniform continuous variable on the interval $[0, 1]$, we can write the probability that each of these events occur in terms of the value of $y$ that we choose.
- Specifically, $P(y>S)=y$ and $P(y<S)=1-y$.
Therefore, depending on our choice of $y$, the expected distance for us to travel can be modeled by:
$$y(S-y+\sqrt{1+y^2}+\sqrt{1+S^2})+(1-y)(2\sqrt{1+y^2})$$
And we need to minimize this function for $y\in 0\le y \le 1$. However, I have noticed that the second derivative of our expected distance is always negative for $y,S \in [0, 1]$. From this can I deduce that the best strategy will to always be to either go up to $(0, 1)$ or move in a horizontal line? This does not make sense to me.
Another possible error that I have found is that when I plug in a specific case for $S$, the expected distance walked does not make sense. For example, let's assume that $S=0$. In that case, the expected distance can be modeled by $$y(1-y+\sqrt{1+y^2})+(1-y)(2\sqrt{1+y^2})$$ For a chosen $y$ of $0$ meters, we get the expected value of $2$ expected meters. This makes sense. However, with a value of $y=1$, somehow the expected distance decreases to $\sqrt{2}$. This is obviously impossible.
I am sure that I have made a mistake somewhere in my logic. I am looking for any hints or different approaches to solve the problem. Thank you all for your time in reading this very long question!