Let $M$ be a smooth, finite-dimensional manifold. Suppose $M$ is also a metric space, with a given distance function $d: M \times M \rightarrow \mathbb{R}_{+}$, which is compatible with the original (manifold) topology on $M$.

Question: is there a Riemannian metric $g$ on $M$ such that the distance
$$d_g(p, q) = \inf_{\gamma \in \Omega(p, q)} L_g(\gamma)$$
coincides with $d$?

I believe that this setting is very standard, but for the sake of completeness:
$L_g$ denotes the Riemannian length of the curve $\gamma$, and $\Omega(p, q)$ the set of all piecewise smooth curves $\gamma : [a, b] \rightarrow M$ s.t. $\gamma(a) = p$ and $\gamma(b) = q$.
Thanks in advance.

I believe the answer is no in general.

Consider the taxicab metric on $\mathbb{R}^2$.  That is $d((x_1,y_1),(x_2,y_2)) = |x_1 - x_2| + |y_1+y_2|$.  This metric induces the same topology on $\mathbb{R}^2$ as the standard metric.

The 2 points $(0,0)$ and $(a,a)$ with $a>0$ are a distance $2a$ from each other in this metric.  The key point is that there are infinitely many shortest "geodesics" between these 2 points - any monotonic staircase picture is an example of one.

On the other hand, there is a well known consequence of the Gauss Lemma that, given a Riemannian metric, for a small enough neighborhood around any point there are unique shortest geodesics between any 2 points in the neighborhood.

But any neighborhood of $(0,0)$ contains at least one point of the form $(a,a)$, so the taxicab metric cannot be induced from a Riemannian metric.
