4

If you have $n$ points in $\mathbf{R}^2$, and you write down the $n \times n$ matrix of distances between each pair of points, then you get a weighted graph with $n$ nodes.

When can you do the reverse? I.e., when can the nodes in a weighted graph be embedded in some metric space? Is there some simple characterization? Has this been studied before?

amWhy
  • 209,954
theQman
  • 1,097

3 Answers3

3

An obvious necessary conditions are non-negativity of weights and that in each cycle the weight of the longest side is not bigger than the sum of the other edges. This condition also is sufficient, because if it is satisfied then we can consider the vertices of the graph as points of a metric space $(X,d)$ with the distance $d(x,y)$ equal to the minimum weight of a path between $x$ and $y$ for each $x,y\in X$. (The second condition assures that $d(x,y)$ is the weight of and edge between $x$ and $y$ for any adjacent vertices $x$ and $y$ of the graph).

Alex Ravsky
  • 90,434
1

There's definitely no simple answer. We have obvious restrictions (by the triangle inequality, the length of any path from $A$ to $B$ is greater than or equal to the length of the direct edge) and dimension-linked restrictions (e.g, we can't fit a $K_4$ with all edges equal in two dimensions), but we also have less obvious restrictions - for example, a $K_4$ with edges $AB=AC=AD=BC=BD=1$ and $CD=1.8$ is impossible in any Euclidean space. That example is a special case of a restriction we get from the formula for the volume of a tetrahedron in terms of its edges: $AB^2+CD^2 \le AC^2+BD^2+BC^2+AD^2$ because the square of the volume is nonnegative.

In the case of all (included) edges marked at length $1$ and restricted to the Euclidean plane, these are known as unit-distance graphs. My avatar is an example of such - a Petersen graph drawn with all edges of equal length.

jmerry
  • 19,403
0

In such a Matrix, notice that we'll have always the diagonal zero and the triangularity would be symmetrical with diagonal as axis. It's better to keep it on mind. Because, the information we are interested into would already be contained in one of the superior/inferior triangular sides independently.

The reason I precised the detail above is that my following suggestion came to my mind while I was working on Matrix. If we take a break from math and raise our head, the viewpoint as we see the paper on which the Matrix is written can help: We can take the usual Euclidean distance between "indices in the Matrix," rather than diving into $\mathbb{R}^2$ space of the question.

The relation above will be: a surjective distance function; a metric independent of the graph's parameter which restricts the reversibility of the graph's embedding.