1
$\begingroup$

Notation: By a simplex, we mean the convex hull of a finite set of distinct points in $\mathbb R^n$, which are called the vertices of the simplex. $\mathcal H^n$ will denote the $n$-dimensional Hausdorff measure.

Question: Let $S$ and $T$ be two (not necessarily disjoint) simplices in $\mathbb R^N$ with vertices $x_1, \dots, x_n$; $y_1, \dots, y_m$, where $2 \leq n, m \leq N$. What is the average distance between points of $S$ and $T$? In other words, how can one compute the integral

$$\frac{1}{\mathcal H^n (S) \mathcal H^m (T)} \int_{T} \int_{S} |x - y| \, d\mathcal H^n (x) \, d\mathcal H^m (y)$$

explicitly in terms of the vertices $x_i, y_j$? This seems like a linear, finite dimensional problem so there may be an explicit solution.

Remark: The motivation for this problem was a numerical problem - given a representation of a domain by a set of polytopes, how can we compute explicitly the average distance between points in the domain? The computation reduces to computing the above integral over pairs of simplices.

$\endgroup$
12
  • 2
    $\begingroup$ it is by no means "linear" $\endgroup$ Commented Nov 27, 2023 at 8:39
  • 1
    $\begingroup$ Your "simplices" are what is commonly called polytopes. Even the calculation of the volume of a polytope is a nontrivial problem, solved by Lawrence for simple polytopes. One can possibly use results/methods of Haase to extend Lawrence's result to all polytopes. As for an explicit expression of the average distance between polytopes, this seems way too hard for MO (if at all possible to do), especially if the distance is Euclidean. $\endgroup$ Commented Nov 27, 2023 at 15:52
  • 1
    $\begingroup$ @IosifPinelis Nope, the OP's simplices are, indeed, simplices (if they degenerate, the requested measure is $0$). The explicit formula is out of question, of course, but the question what to do if one desperately needs to compute that integral reasonably fast and with decent precision remains. $\endgroup$
    – fedja
    Commented Nov 27, 2023 at 22:49
  • $\begingroup$ @IosifPinelis I see. Do you think an explicit formula for the case of triangles in $\mathbb R^2$ is possible at least? This was the original setting of the numerical problem. $\endgroup$
    – Nate River
    Commented Nov 28, 2023 at 2:31
  • $\begingroup$ @fedja : So, are you saying that, if e.g. $n=2$ and the points are the vertices of the unit square, then the convex hull of this set of points is a simplex?? $\endgroup$ Commented Nov 28, 2023 at 14:36

1 Answer 1

1
$\begingroup$

It is highly unlikely that an explicit expression exists.

Even the calculation of the volume of a polytope is a nontrivial problem, solved by Lawrence for simple polytopes. One can possibly use results/methods of Haase to extend Lawrence's result to all polytopes. As for an explicit expression of the average distance between polytopes, this seems way too hard for MO (if at all possible to do), especially if the distance is Euclidean

Even if $n=2=m$ and $S$ and $T$ are the following specific triangles: $$S=\{(x,y)\in\mathbb R^2\colon0\le x\le1,0\le y\le1-x\}$$ and $$T=\{(u,v)\in\mathbb R^2\colon2\le u\le4,1\le v\le1+u/2\},$$ Mathematica has been unable to find the average Euclidean distance working on the integral

Integrate[Sqrt[(x - u)^2 + (y - v)^2], {x, 0, 1}, {y, 0, 1 - x}, {u, 2, 4}, {v, 1, 1 + u/2}]

for over 20 min. Update: Eventually, in this specific case Mathematica output a long expression, occupying more than a page.

This suggests that, even if there is an explicit expression of the average Euclidean distance for triangles $S$ and $T$ on a plane, it will probably be hard to analyze, perhaps harder to analyze than just the definition of the average distance -- and then such an explicit expression would probably be of no use.


As for numerical calculation, in the case of triangles in $\mathbb R^2$ we just have a quadruple integral with very simply expressed affine limits of integration, which easily reduces to an ordinary integral:

enter image description here

So, it is straightforward (but a bit tedious) to compute the integral in question, using (say) the interval method. One can also use other numerical integration methods.

$\endgroup$
2
  • $\begingroup$ Thank you very much for the complete answer. I am very surprised that even the triangles in $\mathbb R^2$ case is this complicated. $\endgroup$
    – Nate River
    Commented Nov 28, 2023 at 23:03
  • 1
    $\begingroup$ @NateRiver : You are very welcome. Even for triangles on the plane, it is a quadruple integral, whose completely specified version took Mathematica about half an hour to compute. So, it was actually a bit surprising to me that this quadruple integral in general can be reduced to an ordinary integral. $\endgroup$ Commented Nov 29, 2023 at 0:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .