# Gromov-Hausdorff Distance and Correspondences

This term, some members of the probability group have been reading Probability and Real Trees, by Steve Evans based on his Saint-Flour course in 2005. A pdf can be found here. This morning was my turn to present, and I gave a precis of Chapter 4, which concerns metrics on metric spaces, a family of tools which will be essential for later chapters which discuss convergence of trees, viewed as metric objects. Hausdorff Distance We start by considering a metric on subsets of a given base space X. The Hausdorff distance between two sets A, B is defined as $d_H(A,B):=\inf\{ r>0: A\subset U_r(B), B\subset U_r(A)\},$

where $U_r(A):=\{x\in X, d(x,A)< r\}$ consists of set A, and all the points within r of set A. So the Hausdorff distance measures how much we have to fatten each set before it contains the other. Note that if we have a giant set next to a tiny one, we will have to fatten the tiny one a great deal more to achieve this. Sometimes it will be more helpful to think of the following alternative characterisation $d_H(A,B) = \max\left \{ \sup_{a\in A}\inf_{b\in B} d(a,b), \inf_{a\in A}\sup_{b\in B} d(a,b)\right\}.$

In words, we measure how far away is the point in A farthest from B, and vice versa, and take the larger of the two. The presence of the sups and infs indicates that the inclusion or otherwise of the boundaries of A,B does not affect this distance. In particular, this means that $d_H(A,\bar A) = d_H(A,A^{\circ})$, and so to allow us to call Hausdorff distance a metric, we restrict attention to the closed subsets of X, M(X).

We also observe immediately that if X does not have bounded diameter, then it is possible for the Hausdorff distance between two sets to be infinite. We won’t worry about that for now, because we will mainly be considering host spaces which are compact, for which the following results will be useful.

Lemma 4.4 – If (X,d) is complete, then (M(X),d_H) is also complete.

Proof: Assume we have a sequence of closed sets $S_1,S_2,\ldots \subset X$ which have the Cauchy property under d_H. I’m going to do this slightly differently to Evans, because it’s not the case you can immediately choose $x_n\in S_n$ for each n, such that $d(x_n,x_m)\le d_H(S_n,S_m)$ for all m,n. For an explicit counterexample, see comment from Ed Crane below the article.

Note that if a subsequence of a Cauchy sequence converges to a limit, then the whole sequence converges to that same limit. So we can WLOG replace $S_1,S_2,\ldots$ by some subsequence such that $d_H(S_n,S_{n+1})\le 2^{-n}$. Now it is clear that for any $x_n\in S_n$, there is a choice of $x_{n+1}\in S_{n+1}$ such that $d(x_n,x_{n+1})\le 2^{-n}$ (*). Starting from arbitrary $x_1\in S_1$, we can construct in this manner a sequence $x_1,x_2,\ldots,\in X$ that is Cauchy, and thus has a limit point $x\in X$.

Let $\mathcal{X}$ be the set of sequences $(x_m,x_{m+1},\ldots)$ for some m, with $x_n\in S_n\,\forall n\ge m$, satisfying (*). Now let S be the closure of the set of limit points of this family of sequences, which we have shown is non-empty.

Then for any n, and any $x_n\in S_n$, we can construct such a sequence, and its limit point x, and the triangle inequality down the path $x_n,x_{n+1},\ldots$ gives $d(x_n,S)\le 2^{-(n-1)}$. Furthermore, by construction $S\subset U_{2^{-(n-1)}}(S_n)$, hence it follows that $S_n \stackrel{d_H}\rightarrow S$.

Lemma 4.5 – Given (X,d) compact, (M(X),d_H) is also compact.

Sketch proof: We are working with metric spaces, for which the existence of a finite $\epsilon$-net for every $\epsilon>0$ is equivalent to compactness. [An $\epsilon$-net is a set S of points in the space such that every point of the space lies within $\epsilon$ of an element of S. Thinking another way, it is the set of centres of the balls in a finite covering of the space by $\epsilon$-balls.] It is not too hard to check that if $S_\epsilon$ is an $\epsilon$-net for (X,d), then $\mathcal{P}(S_\epsilon)$ is finite, and an $\epsilon$-net for (M(X),d_H).

Gromov-Hausdorff Distance

So far this is fine, but won’t be useful by itself for comparing how similar two trees are as metric spaces, because we can’t be sure a priori that we can embed them in a common host space. To resolve this, we consider instead the Gromov-Hausdorff distance, which will serve as a distance between metric spaces, even when they are not canonically defined as subsets of a common metric space.

Given X, Y metric spaces, we define $d_{GH}(X,Y)=\inf_Z \left\{ d_H(X',Y') \, : \, X',Y' \subset (Z,d)\text{ a metric space }, X'\simeq X, Y'\simeq Y\right\}.$

In words, the Gromov-Hausdorff distance between two metric spaces examines the ways to embed them isometrically into a common larger metric space, and gives the minimal Hausdorff distance between them under the class of such embeddings. One issue is that the collection of all metric spaces is not a set. For example, given any set, we can define a metric via the discrete metric, so the collection of metric spaces is at least as large as the collection of all sets, which is not a set. Fortunately, all is not broken, as when we consider a general metric space Z in which we might embed copies of X and Y we are wasting lots of the perhaps very complicated space, because we only need to compare the subsets which are isometric copies of X and Y. So in fact, we lose nothing if we assume that Z is a disjoint union of copies of X and Y, with a metric chosen appropriately. So $d_{GH}=\inf\left\{ d_H(X,Y) : d\text{ a metric on }X\coprod Y\text{ restricting to }d_X \text{ on }X,\, d_Y\text{ on }Y \right\}.$

In practice though, this is difficult to compute, since the set of things we have to minimize over is complicated. It turns out we can find an equivalent characterisation which will be easier to use in a number of examples, including the case of real trees which is the whole point of the course.

Correspondence and Distortion

We define a correspondence from X to Y to be $\mathcal{R}\subset X\times Y\text{ s.t. } \pi_X(\mathcal {R}) = X, \, \pi_Y(\mathcal {R}) = Y,$

where $\pi_X,\pi_Y$ are the canonical projection maps from $X\times Y$ into $X,Y$ respectively. So we can think of a correspondence as being something like a matching from X to Y. In a matching, we insist that the projection maps into each set are injections, ie that each element of X (resp Y) can appear in at most one pair, whereas for a correspondence, we demand that the projection maps are surjections, ie that each element of X appears in at least one pair.

Then the distortion of a correspondence $\mathrm{dis}(\mathcal{R}):= \sup\left\{ |d_X(x,x') - d_Y(y,y')| \,;\, (x,y),(x',y')\in \mathcal{R} \right\}.$

In words, if two sets are non-isomorphic, then a correspondence can’t describe an isometry between the sets, and the distortion is a measure of how far from being an isometry the correspondence is. That is, given a pair of pairs in the correspondence, for an isometry, the distance between the X-elements would be equal to the distance between the Y-elements, and the distortion measures the largest discrepancy between such pairs of pairs over the correspondence.

Theorem 4.11 $d_{GH}(X,Y) = \frac12 \inf_{\mathcal{R}} (\mathrm{dis}\mathcal R)$, where the infimum is taken over all correspondences $\mathcal{R}$ X to Y.

Remark: The RHS of this equivalence can be thought of as the set coupling between X and Y such that the pairs have as equal distances as possible.

Proof: Given an embedding into $X\coprod Y$ with $d_H(X,Y), we have $\mathcal{R}$ with $\mathrm{dis}\mathcal {R}<2r$, by taking: $\mathcal{R}=\{(x,y): d(x,y)

From the definition of Hausdorff distance, it follows that the for every x, there is a y with d(x,y)<r, and hence the appropriate projection maps are projections.

So it remains to prove that $d_{GH}(X,Y)\le \frac12 \mathrm{dis}\mathcal{R}$. We can define a metric on $X\times Y$ by $d(x,y)=\int\left\{ d_X(x,x')+d_Y(y,y') + r \,:\, (x',y')\in \mathcal{R} \right\}.$

Then for any $x\in X$, there is $(x,y)\in\mathcal{R}$, and thus $d(x,y)\le r$, and vice versa hence $d_H(X,Y)\le r$.

It only remains to check that this is actually a metric. Let’s take $x,\bar x \in X$, and so $d(\bar x,y)\le \inf\{ d_X(x,\bar x) + d_X(x,x')+d_Y(y,y')+r \,: \, (x',y')\in\mathcal{R}\},$

so taking $d_X(x,\bar x)$ outside the brackets gives one form of the triangle inequality. We have to check the ‘other combination’ of the triangle inequality. We assume that the infima for $(x,y), (\bar x,y)$ are attained at $(x',y'),(\bar x',\bar y')$ respectively. $d(x,y)+d(\bar x,y)= 2r+ d_X(x,x')+d_X(\bar x,\bar x') + d_Y(y,y')+d_Y(d,\bar y').$

But we also have $d_X(x',\bar x')-d_Y(y',\bar y')\ge -r$ from the definition of distortion, and so adding these gives the triangle inequality we want, and completes the proof of this theorem.corc

## 6 thoughts on “Gromov-Hausdorff Distance and Correspondences”

1. j2kun on said:

> In a matching, we insist that the projection maps into each set are injections, ie that each element of X (resp Y) can appear in at most one pair, whereas for a correspondence, we demand that the projection maps are injections, ie that each element of X appears in at least one pair.

It seems like you mean a correspondence should have projections be surjections, yes?

• Thank you! Corrected now.

2. Ed Crane on said:

Regarding your comment in the first paragraph of the proof of Lemma 4.4, consider the following example. Take $X$ to be the circle $\mathbb{R}/\mathbb{Z}$, take $S_1 = \{0,1/2\}$, $S_2 = \{1/6,2/3\}$ and $S_3 = \{1/3,5/6\}$. Then $d_H(S_1, S_2) = d_H(S_1,S_3) = d_H(S_2,S_3) = 1/6$ but there is no choice of $x_1 \in S_1$, $x_2 \in S_2$ and $x_3 \in S_3$ such that $d(x_n,x_m) \le d_H(S_n,S_m)$ for all $n,m \in \{1,2,3\}$.

3. Dvir on said:

That’s a great post, thank you!