<figure><img src="image_1.png" /></figure>

HAL
open science

# Intrinsic Interleaving Distance for Merge Trees

Ellen Gasparovic, Elizabeth Munch, Steve Oudot, Katharine Turner, Bei

Wang, Yusu Wang

► To cite this version:

Ellen Gasparovic, Elizabeth Munch, Steve Oudot, Katharine Turner, Bei Wang, et al. Intrinsic Interleaving Distance for Merge Trees. La Matematica, 2025, 4 (1), pp.40-65. 10.1007/s44007-024-00143-9. hal-02425600

HAL Id: hal-02425600

https://inria.hal.science/hal-02425600v1

Submitted on 26 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Intrinsic Interleaving Distance for Merge Trees

Ellen Gasparovic*, Elizabeth Munch†, Steve Oudot‡, Katharine Turner§, Bei Wang¶, Yusu Wang||

## Abstract

Merge trees are a type of graph-based topological summary that track the evolution of connected components in the sublevel sets of scalar functions. They enjoy widespread applications in data analysis and scientific visualization. In this paper, we consider the problem of comparing two merge trees via the notion of interleaving distance in the metric space setting. We investigate various theoretical properties of such a metric. In particular, we show that the interleaving distance is intrinsic on the space of labeled merge trees and provide an algorithm to construct metric 1-centers for collections of labeled merge trees. We further prove that the intrinsic property of the interleaving distance also holds for the space of unlabeled merge trees. Our results are a first step toward performing statistics on graph-based topological summaries.

## 1 Introduction

Many applications in science and engineering use scalar functions to describe and model their data. For example, atmospheric scientists compare simulated data from the Weather Research and Forecasting (WRF) Model with daily surface observations in weather forecasts, where both simulated and observed parameters (such as surface temperature, pressure, precipitation, and wind speed) can be modeled as scalar functions. We are interested in comparing scalar functions by comparing their topological summaries. There are several types of summaries constructed from topological methods, including vector-based summaries such as persistence diagrams [36] and barcodes [41], as well as graph-based summaries such as merge trees, contour trees [16], and Reeb graphs [59].

The merge tree (sometimes referred to as a barrier tree [39] or a join tree [16]) for a given topological space $\mathcal{X}$ equipped with a continuous scalar function is a combinatorial construction that tracks the evolution of sublevel sets. For a given function $f: \mathcal{X} \to \mathbb{R}$, the merge tree encodes the connected components of the sublevel sets $f^{-1}(-\infty, a]$ for $a \in \mathbb{R}$. This construction is closely related to that of the Reeb graph [59], which analogously encodes connected components of the level sets $f^{-1}(a)$. The contour tree [16] is a special type of Reeb graph for a simply connected domain. Both merge trees and Reeb graphs are related to the level set topology through critical points of the scalar functions [53]. Furthermore, the mapper graph [63], which has found considerable success in applications, can be viewed as an approximation of a Reeb graph [19, 6, 17]. These constructions are referred to as graph-based summaries as the output object of study is always a graph $G$ equipped with an induced real-valued function $f: G \to \mathbb{R}$. They have appeared in many

<footnote>*Union College, gasparoe@union.edu</footnote>

<footnote>†Michigan State University, muncheli@msu.edu</footnote>

<footnote>‡Inria Saclay, steve.oudot@inria.fr</footnote>

<footnote>§Australian National University, katharine.turner@anu.edu.au</footnote>

<footnote>¶University of Utah, beiwang@sci.utah.edu</footnote>

<footnote>||Ohio State University, yusu@cse.ohio-state.edu</footnote>
contexts and applications over the last few decades [69, 57, 70]. Similar concepts also appeared within probability theory as trees created through excursion sets of random functions, and these trees are shown to be related to random branching processes (e.g. [46, 38]).

**Related work** Considerable recent effort has gone into understanding how to perform proper statistics on graph-based summaries. For instance, how does one define the mean of a collection of these objects? The first step toward answering this question is to determine a metric for the comparison of two summaries. This has been extensively studied recently with the creation of a veritable zoo of metric options for Reeb graphs and merge trees [54, 28, 3, 5, 2, 31, 4, 66, 18, 6]; see two recent surveys [71, 10] and Section 2.3 for a discussion of some of these metrics. In particular, Carrière and Oudot [18] have investigated whether some of these metrics are *intrinsic* in the more general case of Reeb graphs; i.e., that the distance between two (close enough) graphs can be realized by a geodesic.

In this paper, we continue the investigation into the intrinsic-ness of these metrics with the more narrow view of merge trees. The main distance we study is the interleaving distance. This metric was originally given in the context of persistence modules [20, 21] as a generalization of the bottleneck distance, and has been ported to merge trees [54, 67] and Reeb graphs [28, 24] via a category-theoretic viewpoint [11, 29]. When restricting ourselves from Reeb graphs to merge trees, we can actually work in an even more restrictive setting that has desirable theoretical properties, namely, labeled merge trees. In this case, we study a data triple: a merge tree $T$ with its function $f: T \to \mathbb{R}$, and a labeling $\pi: \{1, \dots, n\} \to V(T)$ of its vertices, which at a minimum encompasses the leaves of $T$. The interleaving distance for labeled merge trees has been investigated in [55], where it is shown that the metric can be naturally realized as the $L_\infty$-distance for a particular matrix construction. This matrix construction has already been discovered in the context of dendrograms [65] and phylogenetic trees [14], where the objects of interest are closely related to merge trees. The phylogenetic tree literature, in particular, provides a wealth of other options for metrics [60, 61, 27, 26, 32, 7, 9, 8, 37, 13, 23, 47]. There has also been interest in that community for creating summaries of collections of phylogenetic trees [52, 51, 40].

These ideas are also closely related to those of ultrametrics, a strengthening of the triangle inequality for a metric into a requirement that $d(x, y) \le \max\{d(x, z), d(z, y)\}$ (for all $z$). Independent of the phylogenetic tree work, there has been extensive interest in what is known as Gelfand's Problem from the ultrametric literature, that is, to describe all finite ultrametric spaces up to isometry using graph theory. The answer to this question is exactly a restriction of the labeled merge tree, although their literature never calls it such [42, 44, 50, 34, 33].

Furthermore, our work has close ties with the literature on consensus of classification [49]. In the language used therein, labeled merge trees belong to the class of valued classification trees, with the path-length distance being actually induced by the function values. Geodesic midpoints between two merge trees are called *medians* and defined as Fréchet means in the considered metric between trees. Finding medians is a special instance of the so-called consensus problem, and it is known to have an easily computable solution when the metric between merge trees is chosen to be the $\ell^\infty$-distance between their corresponding ultra matrices [22], as is the case in our work. By contrast, the problem is known to be NP-hard when other $\ell^p$-distances are put on the ultra matrices, typically when $p = 1$ or $2$ [1], and in such situations one must resort to approximate solutions—e.g., mean-squares approximations in the case $p = 2$ [30, 48].

**Our contributions** In this paper, we prove that the interleaving distance is intrinsic on both the space of labeled merge trees as well as on the space of unlabeled merge trees. Furthermore,
in the labeled merge tree setting, we provide explicit procedures for constructing geodesics and metric 1-centers. Our results mark important progress toward the goal of performing statistics on graph-based topological summaries to be used for topological data analysis and visualization. For instance, using results in this paper, Yan et al. [72] computed geodesics of merge trees and their structural averages for ensemble analysis and uncertainty visualization, and Curry et al. [25] utilized an estimation of the interleaving distance between unlabeled merge trees in order to classify and compare point cloud data.

In Section 2, we provide the necessary background on labeled merge trees and establish a correspondence between labeled merge trees and a particular class of matrices known as ultra matrices (Lemma 2.9). Then, in Section 3, we prove a stability result for the labeled interleaving distance $d_I^L$ (Lemma 3.1), which we use both to show that $d_I^L$ is *strictly intrinsic* on the space of labeled merge trees (Corollary 3.2) as well as to construct 1-centers for collections of labeled merge trees in Section 3.3.

Section 4 focuses on unlabeled merge trees and the interleaving distance. In particular, given two unlabeled merge trees, we show that the unlabeled interleaving distance between them is equal to the infimum over all finite labelings for the two trees of the labeled interleaving distance between them (Theorem 4.1). In fact, we show in Corollary 4.4 that the infimum is always achieved. Section 4 concludes with the result that the interleaving distance is intrinsic on the space of unlabeled merge trees (Corollary 4.5). We end with a discussion of open problems and future work in Section 5.

# 2 Background

In this section, we give the basic definitions for our constructions of interest. We refer to Fig. 1 for an overview of notations. For the entirety of the section, we fix $n$, and denote $\{1, \cdots, n\}$ by $[n]$ and isomorphism by $\cong$. We note that some of the notions here appear in the literature under different names. For example, the concept of ultra matrix is the same as the one induced from the *ultra network* proposed in [64], both of which correspond to the distance matrix for a relaxed version of the ultrametric (see Definition 2.4). The concept of a merge tree is also the same as the *tree gram* in [64], both of which generalize the standard dendrogram. A dendrogram could be represented as an ultrametric, as shown by Jardine and Sibson [45], Hartigan [43], Carlsson and Mémoli [15].

<figure><img src="image_3.png" /><figcaption>Figure 1: A roadmap of key notations.</figcaption></figure>

## 2.1 Labeled Merge Trees

First, we give the definition of a *merge tree* (which we shall also refer to as an *unlabeled merge tree* to contrast it with its labeled counterpart, defined subsequently) and related notions arising from the phylogenetic tree literature that we will make use of shortly.
**Definition 2.1.** A merge tree is a pair $(T, f)$ of a finite rooted tree $T$ with vertex set $V(T)$ and a function $f: V(T) \to \mathbb{R} \cup \infty$ such that adjacent vertices do not have equal function value, every non-root vertex has exactly one neighbor with higher function value, and the root (a degree one node) is the only point with the value $\infty$. The space of merge trees is denoted MT.

Note that the topology on the space of merge trees is the one induced by viewing MT as a metric space with a given choice of metric (in this paper, we shall assume it is the interleaving distance, as defined later in this section). We commonly call the function $f$ a height function, the non-root vertices with degree 1 are called leaves, and we let $\text{depth}(u)$ denote the largest height difference between the vertex $u$ in $T$ and any node in the subtree rooted at $u$. All merge trees under consideration in this paper are assumed to be finite.

Note that in some cases — for instance, when a merge tree is constructed from sublevel sets of input data given by a topological space with a function $g: X \to \mathbb{R}$ — we prefer to think of a merge tree as a continuous object. Specifically, a merge tree is constructed as a quotient space $X/\sim$, with the equivalence relation $x \sim x'$ iff $g(x) = g(x') = a$ and $x$ and $x'$ are in the same connected component of $g^{-1}(\infty, a]$. In this case, with nice enough assumptions on the input data, a merge tree is a 1-dimensional stratified space equipped with a function, that is, its edges are homeomorphic to intervals rather than being combinatorial elements. In this setting, replacing a merge tree edge $e = (u, v)$ with $f(u) < f(v)$ by a subdivision of that edge where the interior vertex $w$ satisfies $f(u) < f(w) < f(v)$ does not change the inherent structure of the tree (sometimes such a tree is referred to as an *augmented merge tree*). We consider two merge trees to be the same if one can be obtained from the other by a sequence of such subdivisions or the inverse operation.

Furthermore, the merge tree structure induces a poset relation on the vertices of $T$. We say $v$ is an *ancestor* of $w$ and write $v \succ w$ if the unique path from $v$ to $w$ strictly decreases in $f$. This occurs if and only if $w$ is in the subtree of $v$. We use $\text{LCA}(v, w) \in T$ to mean the lowest common ancestor of $v$ and $w$ (or $\text{LCA}_f(v, w)$ if the function needs to be emphasized), and $f(\text{LCA}(v, w))$ for its function value. We have $\text{LCA}(v, v) = v$. We abuse notation and write $\text{LCA}(S)$ for the lowest common ancestor of any finite set $S \subset V(T)$.

Note that the merge tree as defined is closely related to the construction of a rooted, weighted tree. In fact, a merge tree induces a rooted weighted tree by putting the weight $f(u)-f(v)$ on each directed edge of the tree $T$. However, because of the function setting, the merge tree requirements are stricter since, for instance, a merge tree $(T, f)$ and its shift (i.e., translation) $(T, f+100)$ are considered different as merge trees but induce the same weighting.

The merge tree structure provides a method for inducing a metric on the underlying tree vertices via the metric given by the length of the unique path between two points. Note that there is a canonical weighting associated to any merge tree $(T, f)$, namely, $\omega(u, v) = |f(u) - f(v)|$ for any two adjacent vertices $u$ and $v$ in the tree. Furthermore, as paths are unique in a tree, we can define a metric for any pair of vertices by $\delta_T(u, v) = \sum \omega(e)$ for the edges in the path from $u$ to $v$.

We remind the reader that we use the terms *merge tree* and *unlabeled merge tree* interchangeably. In Section 3, we will be focusing on *labeled merge trees*, defined as follows.

**Definition 2.2.** A labeled merge tree is a triple $(T, f, \pi)$ consisting of a merge tree $(T, f)$ along with a map $\pi: [n] \to V(T)$ that is surjective on the set of leaves. When additional data are unnecessary or clear from context, we sometimes write $T$ for $(T, f, \pi)$. The space of labeled merge trees is denoted LMT.

Note that the topology on LMT comes from viewing it as a metric space with the labeled interleaving distance, as defined later in this section. Analogous to the unlabeled case, we consider
<figure><img src="image_4.png" /><figcaption>Figure 2: An example of a labeled merge tree with two types of degenerate labels. As all matrices used are symmetric, we only show the upper triangular portion.</figcaption></figure>

two labeled merge trees to be the same if one can be obtained via edge contractions or insertions that respect the function values and existing labels.

Definition 2.2 is closely related to that of a *weighted, rooted X-tree* from the phylogenetic literature [62]. Specifically, given a set $X$, an $X$-tree is a pair $(T, \phi)$ where $T$ is a tree and $\phi: X \to V(T)$ is a map so that every vertex of degree at most 2 is in the image. The difference is that such weighted graphs do not keep track of function values, so that two different labeled merge trees that induce the same weighting might be considered to be the same $X$-tree. Thus, a labeled merge tree can be thought of as a weighted, labeled $X$-tree (where $X = [n]$) with $f(u)$ specified for a subset of vertices $u$ that includes all leaves, and function values for the remaining vertices can be deduced from the weights on leaves.

As with $X$-trees, labels for our merge tree are allowed to go to vertices that are not leaves; we essentially think of these as degenerate labeled leaves. Furthermore, we do allow $\pi$ to be non-injectivite, so a vertex can have multiple labels. See Fig. 2 for an example with labels on degenerate leaves and vertices with more than one label.

## 2.2 Relating Merge Trees and Matrices

In this section, we give the relationship between labeled merge trees and a particular class of matrices. Again, see Fig. 1 for an overview of notation.

We begin with the traditional notion of an *ultrametric* and our variant of it that relaxes one of the conditions, which will be closely related to our labeled merge trees.

**Definition 2.3.** An *ultrametric* is a function $d: X \times X \to \mathbb{R}$ such that for any $x, y, z \in X$,

* $d(x, y) \ge 0$ and is equal to 0 if and only if $x = y$,

* $d(x, y) = d(y, x)$, and

* $d(x, y) \le \max\{d(x, z), d(z, y)\}$.

**Definition 2.4.** A *relaxed ultrametric* is a function $d: X \times X \to \mathbb{R}$ such that for any $x, y, z \in X$,

* $d(x, y) = d(y, x)$, and

* $d(x, y) \le \max\{d(x, z), d(z, y)\}$.

It is well known that ultrametrics satisfy the isosceles triangle property. That is, for any triple $x, y, z$, at least two of $d(x, y)$, $d(y, z)$, and $d(x, z)$ must be equal. Otherwise, assume without loss of generality that $d(x, y) < d(y, z) < d(x, z)$, and then $d(x, z) \le \max\{d(x, y), d(y, z)\}$. Note that
this further implies that the pair that are equal must be at least as big as the third value, since $d(x, y) = d(y, z) < d(x, z)$ still violates the ultrametric property. Note that relaxed ultrametrics still satisfy the isosceles triangle property.

When we have a set $X \cong [n]$, the information in a relaxed ultrametric can be stored as follows.

**Definition 2.5.** A symmetric matrix $M \in \mathbb{R}^{n \times n}$ is called **valid** if $M_{ii} \le M_{ij}$ for all $1 \le i, j \le n$. A valid matrix $M$ is called **ultra** if $M_{ij} \le \max\{M_{ik}, M_{kj}\}$ for every $1 \le k \le n$. The spaces of valid and ultra matrices are denoted VM and UM, respectively.

In particular, a relaxed ultrametric on $[n]$ is represented by an ultra matrix. As with merge trees, we will endow VM and UM with the topology induced by the relevant metric, in this case, the $\ell^\infty$ distance between matrices, $\|M - M'\|_\infty = \max_{i,j} |m_{i,j} - m'_{i,j}|$.

Inspired by the cophenetic matrix construction of Cardona et al. [14] that is studied in relation to merge trees in [55], there is a natural way to associate a matrix to a labeled merge tree as follows.

**Definition 2.6.** The induced matrix of a labeled merge tree $(T, f, \pi)$, denoted $\mathcal{M}(T, f, \pi) \in \mathbb{R}^{n \times n}$, is the matrix

$$ \mathcal{M}(T, f, \pi)_{ij} = f(\text{LCA}(\pi(i), \pi(j))). $$

See Fig. 2 for an example.

**Lemma 2.7.** The induced matrix of a labeled merge tree is an ultra matrix. That is, $\mathcal{M}(T, f, \pi) \in \text{UM} \text{ for } (T, f, \pi) \in \text{LMT}$.

*Proof.* Let $M = \mathcal{M}(T, f, \pi)$ for $(T, f, \pi) \in \text{LMT}$. First, to check that it is a valid matrix, we see that $M_{ii}$ is simply the function value $f(\pi(i))$. So, as $f(u) \le f(\text{LCA}(u, v))$ by definition, we have

$$ M_{ii} = f(\pi(i)) \le f(\text{LCA}(\pi(i), \pi(j))) = M_{ij}. $$

To check that $M$ is an ultra matrix, let $u = \text{LCA}(\pi(i), \pi(k))$, $v = \text{LCA}(\pi(j), \pi(k))$, $w = \text{LCA}(\pi(i), \pi(j), \pi(k))$. This means that $u \preceq w$ and $v \preceq w$. If $u$ and $v$ are not comparable, then there are two distinct paths from $\pi(j)$ to each of them, and thus we have a loop $\pi(j) \to u \to w \to v \to \pi(j)$, contradicting the tree property of $T$. If $u$ and $v$ are comparable, assume without loss of generality that $u \preceq v$; then $v$ is a common ancestor for $\pi(i)$, $\pi(j)$, and $\pi(k)$, and thus $w \preceq v$. This implies $f(w) \le f(v)$, and so for all $k$,

$$ M_{ij} \le f(w) \le f(v) = \max\{f(u), f(v)\} = \max\{M_{ik}, M_{jk}\}. \quad \square $$

A valid matrix may be viewed as representing a function $f_M$ on a complete graph $K$ of $n$ vertices, with function value $M_{ii}$ defined on vertex $i$ and function value $M_{ij}$ defined on edge $(i, j)$. Note that because $M$ is a valid matrix, any sublevel set of the resulting function $f: K \to \mathbb{R}$ satisfies the condition that every edge has equal or higher function value than either of its vertices. Given a valid matrix, one thus may obtain a labeled merge tree and subsequently an ultra matrix in the following way.

**Definition 2.8.** Let $M \in \mathbb{R}^{n \times n}$ be a valid matrix, $K$ be a complete graph over $n$ vertices, and $f_M: K \to \mathbb{R}$ be a function induced from $M$ with $f_M(v_i) = M_{ii}$ and $f_M((v_i, v_j)) = M_{ij}$. The labeled merge tree of a valid matrix $M$, denoted as $\mathcal{T}(M)$, is the labeled merge tree of the complete graph $K$ with the induced function $f_M$.

Basically, given a valid matrix $M$, we can consider $M$ to induce weights of a complete graph $K$ on $n$ vertices. We then compute a minimal spanning tree $\mathcal{T}(M)$ of this complete graph based on the weights. The resulting tree $\mathcal{T}(M)$ is the labeled merge tree of $M$. It gives rise to an induced
relaxed ultra matrix $\mathcal{MT}(M)$ (recall Definition 2.4). This procedure corresponds to the maximal subdominant construction in [22].

Note that the labeling is inherited by including internally labeled vertices if there is any pair $i \neq j$ for which $M_{ii} = M_{ij}$. See Fig. 2 for a labeled tree containing an example where $M_{ii} = M_{ij} = M_{jj}$ creates a leaf with two labels, as well as an example where $M_{ii} = M_{ij} > M_{jj}$ creates an internal labeled vertex.

**Lemma 2.9.** $\mathcal{M}$ induces a bijection between labeled merge trees and ultra matrices.

*Proof.* We start with injectivity of $\mathcal{M}$. From [62, Def. 7.1.2], a metric $\delta$ is called a tree metric if there exists a weighted $[n]$-tree (i.e., a weighted $X$-tree with $X = [n]$) $(T, f, \pi, \omega)$ for which $\delta(i, j) = \sum_{e \in \gamma} \omega(e)$ for $\gamma$ the unique path from $\pi(i)$ to $\pi(j)$ if $\pi(i) \neq \pi(j)$, and is 0 otherwise. By [62, Thm. 7.1.8], such a weighted $[n]$-tree representation is unique. For any $(T, f, \pi) \in \text{LMT}$, we can construct a tree metric $\delta_T: [n] \times [n] \to \mathbb{R}_{\ge 0}$ uniquely from $\mathcal{M}(T, f, \pi)$ by setting

$$ \delta_T(i, j) = 2\mathcal{M}(T)_{ij} - \mathcal{M}(T)_{ii} - \mathcal{M}(T)_{jj}. $$

To see this is a tree metric, observe that we first assign a length to each edge as the height difference of its two end points. For $i = j$, we are not traveling along any edges, and this formula gives $\delta_T(i, i) = 0$, as desired. For $i \neq j$, we want the length of the path from $\pi(i)$ to $\pi(j)$. This path starts at $\pi(i)$ with height $\mathcal{M}(T)_{ii}$, moves upward to the least common ancestor of $\pi(i)$ and $\pi(j)$ at height $\mathcal{M}(T)_{ij}$, and moves downward to $\pi(j)$ at height $\mathcal{M}(T)_{jj}$. The formula combines these two upward and downward paths together.

So, given any $(T, f, \pi)$, $(T', f', \pi') \in \text{LMT}$, we construct the two tree metrics $\delta_T$ and $\delta'_T$. However, these two tree metrics are equivalent as $\delta'_T(x, y) \le \delta_T(x, y) \le 2\delta'_T(x, y)$. This implies that any continuity condition is the same under either choice of metric.

For ease of notation, denote $\mathcal{M}(T, f, \pi)$ by $\mathcal{M}(T)$; similarly for $\mathcal{M}(T')$. If $\mathcal{M}(T) = \mathcal{M}(T')$, then $(T, f, \pi, \omega) = (T', f', \pi', \omega')$ as weighted $[n]$-trees by keeping the weighting but ignoring the function values and which vertex is the root. Since the function value of any labeled vertex can be determined by $\mathcal{M}(T)_{ii}$, this implies that $T = T'$ as labeled merge trees.

Next, we tackle surjectivity of $\mathcal{M}$. Given any ultra matrix $M$, we want a labeled merge tree $T$ for which $\mathcal{M}(T) = M$. In particular, we will show that $T = \mathcal{T}(M)$ satisfies this requirement, which further gives that $\mathcal{T}$ is the inverse of $\mathcal{M}$. To construct $\mathcal{T}(M)$, let $K$ be the complete graph on $n$ vertices with vertices labeled $v_1, \dots, v_n$. Define the map $s: K \to \mathbb{R}$ on the complete graph $K$ by $s(v_i) = M_{ii}$ (vertex map) and $s(v_i, v_j) = M_{ij}$ (edge map). Because $M$ is a valid matrix, this gives a well-defined map; in particular, $s(v_i) \le s(v_i, v_j)$ for any $i \neq j$.

First, we check that the diagonal entries of the matrices $\mathcal{M}(\mathcal{T}(M))$ and $M$ agree. By definition of the construction of $\mathcal{T}(M)$, there is a vertex $\pi(i)$ in the resulting tree with function value $f(\pi(i)) = s(v_i) = M_{ii}$, so clearly $\mathcal{M}(\mathcal{T}(M))_{ii} = f(\text{LCA}(\pi(i), \pi(i))) = f(\pi(i)) = M_{ii}$.

Finally, we check the off-diagonal entries, so assume $i \neq j$ and consider $M_{ij}$. Note that $\mathcal{M}(\mathcal{T}(M))_{i,j} = f(\text{LCA}(\pi(i), \pi(j)))$ is exactly the function value for which the components containing $v_i$ and $v_j$ merge in the sublevel set of $s: K \to \mathbb{R}$ (see [35] for a discussion on sublevel set persistence). Because $s(v_i, v_j) = M_{ij}$, this means that $\mathcal{M}(\mathcal{T}(M))_{i,j} \le M_{ij}$. Seeking a contradiction, assume that $\mathcal{M}(\mathcal{T}(M))_{i,j} < M_{ij}$. In order for the components with $v_i$ and $v_j$ to have merged before $M_{ij}$, there must be a path $\gamma = v_i u_1 u_2 \cdots u_k v_j$ for which every internal edge $e$ has $s(e) < M_{ij}$. By the isosceles property using the triangle $v_i v_j u_1$, we know that $s(v_i, v_j) = M_{ij}$ and $s(v_i, u_1) < M_{ij}$, so $s(v_j, u_1) = M_{ij}$. The same logic for triangle $u_1 u_2 v_j$ implies that $s(v_j, u_2) = M_{ij}$. Repeating this process for the entire path, we conclude finally that $s(v_j, u_{k-1}) = M_{ij}$. However,
then the triangle $v_j u_{k-1} u_k$ has both $s(u_{k-1}, u_k)$ and $s(u_k, v_j)$ strictly less than $s(u_{k-1}, v_j)$, contradicting the isosceles triangle property. Thus, we conclude that no such path exists, and therefore $\mathcal{M}(\mathcal{T}(M))_{ij} = M_{ij}$. □

In the course of the above proof, we have showed that $\mathcal{MT}$ is the identity when restricted to ultra matrices, but this is not the case when extending to only valid matrices. However, this construction does offer a method for turning a valid matrix into an ultra matrix.

**Definition 2.10.** The *ultra matrix of a valid matrix* $M \in \mathbf{VM}$, denoted $\mathcal{U}(M)$, is defined to be the induced matrix of $\mathcal{T}(M)$. That is, $\mathcal{U} = \mathcal{MT}$.

## 2.3 Available Metrics

There are a number of metrics that may be defined on the space of (labeled) merge trees. Note that any metric defined on labeled merge trees can be extended to unlabeled merge trees by simply ignoring the labeling information, while likely turning the metric into a pseudometric. In this paper, we focus on interleaving distance $d_I$ and labeled interleaving distance $d_I^L$. Other popular distances include the functional distortion distance $d_{FD}$ [3] and the bottleneck distance $d_B$.

**Interleaving distance** The interleaving distance is an idea arising from the generalization of the bottleneck distance for persistence diagrams to arbitrary persistence modules [20]. Generalizations abound [11, 56, 29], but the analog for merge trees was first given in [54]. We give a modified (non-standard) formulation here, which was shown to be equivalent to the original [67] (see Theorem 7 of [67] for the statement and Appendix A of [67] for its proof).

**Definition 2.11.** Given two merge trees $(T, f), (T', f')$, a $\delta$-good map $\alpha : (T, f) \to (T', f')$ is a continuous map on the metric trees such that the following properties hold:

(i) For any $x$ in the geometric realization $|T|$, $f'(\alpha(x)) - f(x) = \delta$;

(ii) For any $w \in \mathrm{Im}(\alpha)$ with $x' := \mathrm{LCA}(\alpha^{-1}(w))$, $f(x') - f(u) \le 2\delta$ for all $u \in \alpha^{-1}(w)$; and

(iii) For any $w \notin \mathrm{Im}(\alpha)$, $\mathrm{depth}(w) \le 2\delta$.

The *interleaving distance* is then defined to be

$$d_I((T, f), (T', f')) = \inf\{\delta \mid \exists \delta\text{-good } \alpha : (T, f) \to (T', f')\}.$$

One particularly useful property that we will use later is the following.

**Lemma 2.12.** Let $\alpha : (T, f) \to (T', f')$ be a continuous map such that $f'(\alpha(x)) = f(x) + \delta$ for any $x \in |T|$. Assume $u \preceq v$. Then

* $\alpha(u) \preceq \alpha(v)$, and

* if $w$ is the unique ancestor of $\alpha(u)$ with $f'(w) = f(v) + \delta$, then $w = \alpha(v)$.

*Proof.* Note that $u \preceq v$ implies that $f(u) \le f(v)$ and further that the unique path $\gamma$ from $u$ to $v$ in $T$ is monotone increasing in $f$. Then the image of $\gamma$ in $T'$, $\alpha(\gamma)$, satisfies $f'(\alpha(\gamma(t))) = f(\gamma(t)) + \delta$ and thus is monotone increasing in $f'$. Thus, by definition, we have that $\alpha(u) \preceq \alpha(v)$. Further, the uniqueness of paths implies that if $w$ is the unique ancestor with $f'(w) = f(v) + \delta$, then it must be the endpoint of $\gamma$, and so $w = \alpha(v)$. □
**Labeled interleaving distance** The following metric is closely related to one originally defined in [14] for comparing phylogenetic trees.

**Definition 2.13.** Given two labeled merge trees sharing the same set of n labels, the labeled interleaving distance is

$$d_I^L((T, f, \pi), (T', f', \pi')) = \|\mathcal{M}(T, f, \pi) - \mathcal{M}(T', f', \pi')\|_{\infty}.$$

The reason for calling such a distance an interleaving distance comes from [55] where it is shown that this metric arises as an interleaving distance on a particular category with a flow [29]. Note that because we need the labels in order to be able to have a well-defined matrix, this metric only works on labeled merge trees.

## 2.4 Intrinsic Metrics

Given a metric $d$ on merge trees, we may define its intrinsic version as follows; see, e.g., [12].

**Definition 2.14.** Given two merge trees, let $\gamma: [0, 1] \to \text{MT}$ be a continuous path in $d$ such that $\gamma(0) = T$ and $\gamma(1) = T'$. The length of $\gamma$ induced by the distance $d$ is defined as

$$L_d(\gamma) = \sup_{n, \sum i=0}^{n-1} \sum_{i=0}^{n-1} d(\gamma(t_i), \gamma(t_{i+1})),$$

where $n$ ranges over $\mathbb{N}$ and $\sum$ ranges over all partitions $0 = t_0 \le t_1 \le \dots \le t_n = 1$ of $[0, 1]$. The intrinsic metric $\hat{d}$ induced by the distance $d$ is

$$\hat{d}(T, T') = \inf_{\gamma} L_d(\gamma).$$

Thus, the induced intrinsic metric on a metric space is the infimum of the lengths of all paths from one point to another. It is known that $d$ is always less than or equal to $\hat{d}$.

A metric space is said to be a *length space* if the original metric $d$ coincides with the intrinsic metric $\hat{d}$. Recall that a metric space is said to be a *geodesic space* if any two points in the space can be connected by a curve of length equal to the distance between the two points. In this case, the metric is said to be *strictly intrinsic*. Note that a geodesic space is necessarily a length space.

# 3 Geodesics and 1-Centers for Labeled Merge Trees

In this section, we prove an inequality involving the labeled interleaving distance and provide methods for constructing geodesics and 1-centers for collections of labeled merge trees.

## 3.1 More on the Labeled Interleaving Distance

The following result is not new. It follows from Theorem 2 of [64], which is slightly more general than the lemma below in the sense that the matrices $M$ and $M'$ are allowed to be non-valid as well. It is also a slight generalization of Lemma 15 of [15] (which is the following result restricted to the metric setting). It can also be deduced from Proposition 1 and Corollary 1 of [22] because the set of relaxed ultra matrices (which are the matrices corresponding to merge trees) is stable under translations along the diagonal. See Section 3 of [22] for the special case of ultra matrices (equivalently, labeled dendrograms), which adapts straightforwardly to our slightly more general setting. Nevertheless, here we provide simple and direct proofs, both for completeness and clarity.
**Lemma 3.1.** For any pair of valid matrices $M, M' \in \text{VM}$,

$$d_I^L(\mathcal{T}(M), \mathcal{T}(M')) \le \|M - M'\|_{\infty}.$$

*Proof.* Since, by definition, $d_I^L(\mathcal{T}(M), \mathcal{T}(M')) = \|\mathcal{U}(M) - \mathcal{U}(M')\|_{\infty}$, we will actually establish the inequality $\|\mathcal{U}(M) - \mathcal{U}(M')\|_{\infty} \le \|M - M'\|_{\infty}$.

Let $\delta = \|M - M'\|_{\infty}$. Let $T = \mathcal{M}(M)$ and $T' = \mathcal{M}(M')$ be the associated merge trees, and $\tilde{M} = \mathcal{U}(M)$ and $\tilde{M}' = \mathcal{U}(M')$ the induced ultra matrices. Consider any pair of (possibly equal) labels $i$ and $j$ with $1 \le i \le j \le n$. We consider the vertices $v_i$ and $v_j$ in the complete graph $K$ with $s, s' : K \to \mathbb{R}$ the maps on $K$ induced by $M$ and $M'$, respectively. As $v_i$ and $v_j$ are in the same component of the $(M_{ij})$-sublevel set of $s$ (i.e., sublevel set of $s$ at value $M_{ij}$, $s^{-1}(\infty, M_{ij})$), there is a path $\gamma$ in $K$ with $s(e) \le \tilde{M}_{ij}$ for all edges $e$ in the path. Because $\|M - M'\|_{\infty} \le \delta$, we have that

$$s'(e) \le s(e) + \delta \le \tilde{M}_{ij} + \delta$$

for every $e \in \gamma$. So, $v_i$ and $v_j$ are in the same component of the $(\tilde{M}_{ij} + \delta)$-sublevel set of $s'$ and thus $\tilde{M}'_{ij} \le \tilde{M}_{ij} + \delta$.

Symmetrically, for any $t < \tilde{M}_{ij} - \delta$, $v_i$ and $v_j$ do not lie in the same connected component of the $t$-sublevel set of $s'$. Otherwise, by the same argument as above, $v_i$ and $v_j$ would belong to the same connected component of the $(t+\delta)$-sublevel set of $T$ with $t+\delta < \tilde{M}_{ij}$, a contradiction. Hence, $\tilde{M}'_{ij} \ge \tilde{M}_{ij} - \delta$. It follows that $|\tilde{M}'_{ij} - \tilde{M}_{ij}| \le \delta$, and since this is true for all labels $1 \le i \le j \le n$, the symmetric matrices $\tilde{M}, \tilde{M}'$ satisfy $\|\tilde{M} - \tilde{M}'\|_{\infty} \le \delta$. Hence, $d_I^L(T, T') = \|\tilde{M} - \tilde{M}'\|_{\infty} \le \delta$. $\square$

## 3.2 Geodesics in LMT

The next corollary looks at the straight line between the matrices associated to two labeled merge trees. Specifically, given any two labeled merge trees $T, T' \in \text{LMT}$, we know that their associated matrices $M = \mathcal{M}(T), M' = \mathcal{M}(T')$ are ultra matrices. We can define the line between them by setting $M^{\lambda} := (1 - \lambda)M + \lambda M'$ for $\lambda \in [0, 1]$. While not necessarily ultra matrices, it is easy to check that $M^{\lambda} \in \text{VM}$ for all $\lambda \in [0, 1]$. We can then pull this back to a path of labeled merge trees by setting $T^{\lambda} = \mathcal{T}(M^{\lambda})$.

**Corollary 3.2 (LMT Geodesics).** Given any two labeled merge trees $T, T' \in \text{LMT}$, and their corresponding ultra matrices $M = \mathcal{M}(T), M' = \mathcal{M}(T')$, the family of merge trees $\{T^{\lambda} := \mathcal{T}(M^{\lambda})\}_{\lambda \in [0, 1]}$ defines a geodesic between $T$ and $T'$ in the metric $d_I^L$. As a consequence, on the space of labeled merge trees, the metric $d_I^L$ is strictly intrinsic.

*Proof.* Let $\delta$ denote the distance $d_I^L(T, T') = \|M - M'\|_{\infty}$. For any $0 \le \lambda \le \lambda' \le 1$, the linearly interpolating matrices $M^{\lambda}, M'^{\lambda}$ satisfy $\|M^{\lambda} - M'^{\lambda}\|_{\infty} \le (\lambda' - \lambda)\delta$. Hence, by Lemma 3.1, we have $d_I^L(T^{\lambda}, T'^{\lambda}) \le (\lambda' - \lambda)\delta$. Since this is true for all $0 \le \lambda \le \lambda' \le 1$, the triangle inequality implies that the family $\{T^{\lambda}\}_{\lambda \in [0, 1]}$ defines a geodesic between $T$ and $T'$. $\square$

See the example of Fig. 3. Setting $\lambda = 1/2$, $M^{\lambda}$ is the matrix (labeled $M$) shown in the middle green circle, and $T^{\lambda}$ (labeled $\mathcal{T}(M)$) is the tree shown at the far right. Corollary 3.2 discusses the geodesics in the space of labeled merge trees. A metric space in general may have no geodesics; thus Corollary 3.2 provides an additional property for the space of interest. Furthermore, a geodesic can be used to perform shape morphing between a pair of merge trees (see [72]).
<figure><img src="image_5.png" /><figcaption>Figure 3: An example of the averaging process for labeled merge trees. $T^1$ and $T^2$ are labeled merge trees with induced matrices $M^1$ and $M^2$. $M$ is the pointwise average of $M^1$ and $M^2$, but is not an ultra matrix. The labeled merge tree $\mathcal{T}(M)$ is shown, whose induced matrix is the ultra matrix $\mathcal{U}(M)$.</figcaption></figure>

## 3.3 1-centers in LMT

Our 1-center merge tree originates from the notion of a metric $k$-center in graph theory. Given $m$ number of cities, one aims to build $k$ facilities that minimize the maximum distance between a city to a facility. For $k = 1$, a metric 1-center of a finite set of labeled merge trees is one that minimizes the maximum distance to any other tree in the set. A metric 1-center may or may not be unique.

**Definition 3.3.** Given a metric space $(X, d)$, a 1-center $c \in X$ of a finite point set $P = \{p_1, \dots, p_m\} \subset X$ is

$$c \in \arg \min_{x \in X} \max_{p \in P} d(x, p).$$

That is, $c$ is a center of the minimum enclosing ball of $P$.

Here, we use the set notation $\in$ to indicate that $c$ may not be unique. In the case of a finite collection of numbers $\chi$ in $\mathbb{R}$, the 1-center is simply the midpoint of the enclosing interval, $(\max(\chi)+\min(\chi))/2$. Now suppose we are given a collection of matrices $\{M^1, \dots, M^N\}$. Let $M_{mid}$ denote the matrix consisting of the entry-wise 1-center of the matrices, i.e., $M[i][j]$ is the midpoint of the enclosing interval of numbers $\{M^1[i][j], M^2[i][j], \dots, M^N[i][j]\}$. It is easy to see that $M_{mid}$ is a 1-center for these matrices in the space of all matrices equipped with the $\ell^\infty$ norm. A similar statement holds for a collection of valid matrices, and we include its simple proof for completeness.

**Claim 3.4.** Let $M^1, \dots, M^N$ be valid $n \times n$ matrices, and $M_{mid}$ be the matrix consisting of the entry-wise 1-center of these matrices. Then $M_{mid}$ must be valid as well and $M_{mid}$ is a 1-center of $\{M^1, \dots, M^N\}$ in the space of valid matrices equipped with the $\ell^\infty$ norm.

*Proof.* In what follows, all spaces of matrices are equipped with the $\ell^\infty$ norm. Since the space of valid matrices is a subspace of the space of all matrices, it follows that $M_{mid}$ is a 1-center of
$\{M^1, \dots, M^N\}$ in the space of all matrices. Hence to prove the claim we only need to show that $M_{mid}$ is a valid matrix. In other words, $M_{mid}[i][i] \le M_{mid}[i][j]$ for any $i, j \in [n]$. To see why this holds, note that for any $i, j \in [n]$,

$$M_{mid}[i][i] = \frac{\max_k(M_{ii}^k) + \min_k(M_{ii}^k)}{2} \le \frac{\max_k(M_{ij}^k) + \min_k(M_{ij}^k)}{2} = M_{mid}[i][j].$$

The claim thus follows.

<figure><img src="image_6.png" /></figure>

$M_{mid}$ as a 1-center of valid matrices is, by itself, a valid matrix, but may not be an ultra matrix, so we can replace it by its labeled merge tree (following the procedure described by Definition 2.8) and take its corresponding ultra matrix, thus turning it back to an ultra matrix.

The main result of this section is an algorithm to compute the 1-center of a collection of labeled merge trees under the labeled interleaving distance $d_I^L$. In particular, suppose we are given a set of labeled merge trees $\{T^1, \dots, T^N\}$, whose corresponding induced matrices $\{M^1, \dots, M^N\}$ are both valid and ultra. We compute a 1-center valid matrix $M_{mid}$ of $\{M^1, \dots, M^N\}$ following Claim 3.4, and convert it to a labeled merge tree, denoted $T^*$. Then $T^*$ is a 1-center of the labeled merge trees, see Fig. 3 for a simple example. The correctness of this procedure is established in the following Proposition 3.5.

**Proposition 3.5 (LMT 1-Center).** Let $\{T^1, \dots, T^N\}$ be a set of labeled merge trees, which gives rise to a set of valid and ultra matrices $\{M^1, \dots, M^N\}$. Let $T^*$ be a merge tree constructed as above. Then $T^*$ is a 1-center of $\{T^1, \dots, T^N\}$. Furthermore, let $U^* = M(T^*) = MT(M_{mid})$ be the ultra matrix corresponding to $T^*$. Then $U^*$ is a 1-center of the set of ultra matrices $\{M^1, \dots, M^N\}$.

*Proof.* Recall that (the valid matrix) $M_{mid}$ is the 1-center of ultra matrices $\{M^1, \dots, M^N\}$ in the space of valid matrices following Claim 3.4. Set $\delta = \max_i \|M_{mid} - M^i\|_{\infty}$. Then $d_I^L(T, T^i) \le \|M_{mid} - M^i\|_{\infty}$ by Lemma 3.1. It then follows that

$$\max_i d_I^L(T^*, T^i) \le \max_i \|M_{mid} - M^i\|_{\infty} \le \delta.$$

Thus $\{T_i\}_{i=1}^N$ is contained in a ball of radius $\delta$ centered at $T^*$.

We now show that this is in fact a minimum enclosing ball of $\{T^1, \dots, T^N\}$ in the space of labeled merge trees, which would then imply that $T^*$ is a 1-center for these merge trees. Specifically, assume there exists a $\tilde{T}$ such that $\max_i d_I^L(\tilde{T}, T^i) < \delta$. Set $\tilde{U} = M(\tilde{T})$. Then for any $i$,

$$\|\tilde{U} - M^i\|_{\infty} = d_I^L(\tilde{T}(\tilde{U}), \tilde{T}(M^i)) = d_I^L(\tilde{T}, T^i) < \delta.$$

Hence $\tilde{U}$, as a valid matrix, gives rise to a smaller $\max_i \|\tilde{U} - M^i\|$, which contradicts the assumption that $M_{mid}$ is a 1-center within the space of valid matrices (i.e, $M_{mid} = \arg\min_M \max_i \|M - M^i\|$). Hence such a $\tilde{T}$ cannot exist, and $T^*$ is a 1-center for $\{T^1, \dots, T^N\}$. By the relation between distance for ultra matrices and for their corresponding labeled merge trees, $U^* = M(T^*)$ is a 1-center for $\{M^1, \dots, M^N\}$, as well.

<figure><img src="image_7.png" /></figure>
**Remark.** As a corollary of the above result, if we are given a collection of ultra matrices {$M^1, \dots, M^N$}, then $U^* = \mathcal{MT}(M_{mid})$ is a 1-center for them in the space of ultra matrices, where $M_{mid}$ as defined earlier is the matrix consisting of the entry-wise 1-center of the input ultra matrices and $M_{mid}$ is itself not necessarily a ultra matrix. Computing 1-centers for ultrametrics has been explored in the literature. While in general, this problem is NP-hard, for the case when we consider the $\ell^\infty$-norm on the space of ultrametrics (which is the same as our setting), it is known that there is a simple algorithm to compute it [22]. However, our approach above is completely different from the previous approach in [22], and has a different interpretation as well.

# 4 Interleaving Distances for Unlabeled Merge Trees

Moving to the unlabeled setting, we establish the existence of a certain labeling for a pair of merge trees that allows us to show that the interleaving distance for unlabeled merge trees is intrinsic.

**Theorem 4.1.** Given two merge trees $(T, f)$ and $(T', f')$, let $L$ and $L'$ be the respective leaf sets. Then

$$d_I((T, f), (T', f')) = \inf_{\pi, \pi'} d_I^L((T, f, \pi), (T', f', \pi')) \quad (1)$$

where the infimum is taken over all finite labelings of the two given merge trees, $\pi$ and $\pi'$, using at most $|L| + |L'|$ labels.

Prior to proving the theorem, we will investigate the following construction of a labeling when given a $\delta$-good map. First, note that given two labeled merge trees $(T, f, \pi)$ and $(T', f', \pi')$, where $\pi : [n] \to V(T)$ and $\pi' : [n] \to V(T')$, the labeling information can be equivalently stored as an ordered collection of pairs $\Pi = \{(\pi(i), \pi'(i)) | i \in [n]\} \subseteq V(T) \times V(T')$. Since the order of the labels does not matter for this particular application, we will build $\Pi$ iteratively and assign the integers at the end.

Let $L$ and $L'$ denote the leaf sets for $T$ and $T'$, respectively. Assume we are given a $\delta$-good map $\alpha$ as described in Definition 2.11. While this map is defined on the underlying metric trees, note that we can subdivide the trees so that $\alpha(v)$ is a vertex in $T'$ for any vertex in $T$, and further that every point in the set $\alpha^{-1}(w)$ is a vertex in $T$ if $w$ is a vertex in $T'$.

Then, we construct the labeling $\Pi$ as follows.

(S-1) Fix some $v \in L$, and let $w = \alpha(v)$. Then for every $u \in \alpha^{-1}(w)$, add $(u, w)$ to $\Pi$. Repeat this for every vertex in $L$.

(S-2) For any leaf node $w \in L' \setminus \text{Im}(\alpha)$, let $x$ be its lowest ancestor contained in $\text{Im}(\alpha)$. Let $u \in \alpha^{-1}(x)$ be an arbitrary preimage of $x$ from $|T|$. Add $(u, w)$ to $\Pi$. Repeat for all leaves in $L'$.

(S-3) Fix an ordering on the pairs in $\Pi = \{(u_i, w_i) | i \in [n]\}$ and define $\pi(i) = u_i \in T$ and $\pi'(i) = w_i \in T'$.

Observe that since the preimage of any leaf node $w \in L' \cap \text{Im}(\alpha)$ must be some vertex (or vertices) in $L$, any $w \in L' \cap \text{Im}(\alpha)$ will be paired with some $u \in L$ by the process in (S-1), so this procedure does not miss any leaves in $T'$. See Fig. 4 for an example.

To use this construction to prove Theorem 4.1, we will use the following two lemmas.

**Lemma 4.2.** For any $(u, w) \in \Pi$, $|f(u) - f'(w)| \le \delta$.
<figure><img src="image_8.png" /><figcaption>Figure 4: Given $\alpha : (T, f) \to (T', f')$, this is an example of the labeling induced by the procedure discussed after Theorem 4.1. The image of the map $\alpha$ is given by the red dashed lines, and $\alpha$ is $\delta$-good for $\delta = a_{i+1} - a_i$. Labels 1-4 were generated in (S-1), the rest in (S-2). Note that there were two options for the location of label 7 in $T$. The other choice would be the same as the vertex labeled 3, and would only change the red entries in $M(T, f, \pi)$.</figcaption></figure>

**Proof.** If $(u, w)$ is generated from (S-1) above, then the lemma holds by property (i) in the definition of the $\delta$-good map $\alpha$ (see Definition 2.11). If $(u, w)$ is generated from (S-2), then the lemma follows from property (iii) of the $\delta$-good map $\alpha$. Indeed, let $x$ be the lowest ancestor of $w$ contained in $\text{Im}(\alpha)$, so that $\alpha(u) = x$. Then $0 \le f'(x) - f'(w) \le 2\delta$ and $f'(x) - f(u) = \delta$, implying that $|f'(w) - f(u)| \le \delta$. $\square$

**Lemma 4.3.** For any $(u_1, w_1), (u_2, w_2) \in \Pi$, $|f(\text{LCA}(u_1, u_2)) - f'(\text{LCA}(w_1, w_2))| \le \delta$.

**Proof.** Assume we are given $\alpha$, a $\delta$-good map. If $(u_i, w_i)$ is generated from (S-1), set $w'_i = w_i$. If $(u_i, w_i)$ is generated via (S-2), then let $w'_i$ be the lowest ancestor of $w_i$ in $\text{Im}(\alpha)$. In both cases, we have that $\alpha(u_i) = w'_i$ and $w_i \le w'_i$.

Set $u_0 = \text{LCA}(u_1, u_2)$, $w_0 = \text{LCA}(w_1, w_2)$ and $w'_0 = \text{LCA}(w'_1, w'_2)$. We will first show that $w_0 = w'_0$. If both pairs come from (S-1), then $w_i = w'_i$ and the claim is obvious. So, assume that at least one, say $(u_1, w_1)$, comes from (S-2) and thus $w_1 \ne w'_1$. As $w_i \le w'_i \le w'_0$ for each $i$, the least common ancestor property implies $w_0 \le w'_0$. Seeking a contradiction, assume that $w_0$ is not a common ancestor of both $w'_i$; without loss of generality, say $w_0$ is not an ancestor of $w'_1$. Let $z = \text{LCA}(w_0, w'_1, w'_2)$. Then there are two paths in $T'$ from $w_1$ to $z$: one through $w_0$ and one through $w'_1$. This contradicts the tree assumption of $T'$. Therefore, $w_0$ is a common ancestor of $w'_i$, implying $w'_0 \le w_0$, and so $w_0 = w'_0$.

We will now prove the main claim, namely, that $|f(u_0) - f'(w_0)| \le \delta$. To see that this is the case, assume that the claim does not hold; that is, either $f(u_0) - f'(w_0) > \delta$ or $f'(w_0) - f(u_0) > \delta$. Suppose first that $f'(w_0) - f(u_0) > \delta$, and consider $\alpha(u_0)$. Because $u_i \le u_0$ for $i = 1, 2$, by Lemma 2.12 we must have that $w'_i = \alpha(u_i) \le \alpha(u_0)$ for $i = 1, 2$. However, then $\alpha(u_0)$ is an ancestor of both $w'_1$ and $w'_2$ with

$$f'(\alpha(u_0)) = f(u_0) + \delta < f'(w_0),$$

contradicting the least common ancestor assumption of $w_0$.

Next, suppose $f(u_0) - f'(w_0) > \delta$ and consider $\alpha^{-1}(w_0)$. We claim that any point in $\alpha^{-1}(w_0)$ is a descendant of $u_0$; i.e., $v \le u_0$ for all $v \in \alpha^{-1}(w_0)$. Otherwise, we have that

$$f(\text{LCA}(\alpha^{-1}(w_0))) > f(u_0) > f'(w_0) + \delta = f(v) + 2\delta$$

for any $v \in \alpha^{-1}(w_0)$, contradicting property (ii) of Definition 2.11. For $i = 1, 2$, let $v_i$ be the unique ancestor of $u_i$ with $f(v_i) = f'(w_0) - \delta$. By Lemma 2.12, since $\alpha(u_i) = w'_i$ and $w_0$ is the
unique ancestor of $w'_i$ with $f'(w_0) = f(v_i) + \delta$, this implies that $\alpha(v_i) = w_0$. That is, $v_i \in \alpha^{-1}(w_0)$. Further, $v_1 \neq v_2$. Otherwise if $v := v_1 = v_2$, then

$$f(v) = f'(w_0) - \delta < f(u_0) - 2\delta < f(u_0)$$

and thus $v$ is a lower common ancestor of $u_1$ and $u_2$ than $u_0$, a contradiction. Hence, $LCA(v_1, v_2) = u_0$. However,

$$f(u_0) - f(v_i) = f(u_0) - f'(w_0) + \delta > 2\delta.$$

This also contradicts property (ii) of Definition 2.11, finishing the proof of Lemma 4.3. □

*Proof of Theorem 4.1.* Say we have a $\delta$-good map $\alpha$ for some $\delta \ge d_I((T, f), (T', f'))$. We construct the labelings $\pi, \pi'$ as described above. Then Lemma 4.2 and Lemma 4.3 imply that

$$d_I^L((T, f, \pi), (T', f', \pi')) \le \delta.$$

As this is true for any $\delta$, $\inf_{\Pi} d_I^L((T, f, \pi), (T', f', \pi')) \le d_I((T, f), (T', f'))$.

To show the other inequality, assume we are given any pair of labelings $\pi, \pi'$ and assume

$$d_I^L((T, f, \pi), (T', f', \pi')) = \delta.$$

We will construct the map $\alpha$ and show that it is $\delta$-good. For any $x \in |T|$, let $S_x \subseteq [n]$ be the labels in the subtree of $x$. Let $y_i$ be the unique ancestor of $\pi'(i) \in |T|$ for $i \in S_x$ with $f'(y_i) = f(x) + \delta$. First, we note that $y_i = y_j$ for all $i, j \in S_x$. Indeed, let $M = \mathcal{M}(T, f, \pi)$ and $M' = \mathcal{M}(T', f', \pi')$. Then we know $M'_{ij} \le \delta + M_{ij}$ and so

$$f'(y_i) = f(x) + \delta \ge f(\mathrm{LCA}(\pi(S_x))) = M_{ij} + \delta \ge M'_{ij} = f'(\mathrm{LCA}(\pi'(S_x))).$$

Because every $y_i$ has function value greater than the lowest common ancestor of $\pi'(S_x)$, the tree property implies that all $y_i$ are equal. Thus, we can set $\alpha(x) = y_i$ for any $i \in S_x$ and it is well-defined.

We need to ensure that the $\alpha$ constructed is $\delta$-good as given in Definition 2.11. The map satisfies property (i) by construction, so we move on to (ii). Let $w \in |T'| \cap \mathrm{Im}(\alpha)$ and set $x' = \mathrm{LCA}(\alpha^{-1}(w)) \in |T|$. Fix any $u \in \alpha^{-1}(w)$, and clearly $f(u) \le f(x')$. Now $x'$ must be $\mathrm{LCA}(u, u')$ for some other $u' \in \alpha^{-1}(w)$. Let $i$ be a label in the subtree of $u$, and let $j$ be a label in the subtree of $u'$. This further implies that $x' = \mathrm{LCA}(\pi(i), \pi(j))$. Set $w' = \mathrm{LCA}(\pi'(i), \pi'(j))$ and note that as $\pi'(i) \le w$ and $\pi'(j) \le w$, this implies that $w' \le w$. In particular, this means $f'(w') \le f'(w)$. Further, by assumption $|f(x') - f'(w')| = |M_{ij} - M'_{ij}| \le \delta$. Thus,

$$f(x') - f(u) \le (f'(w) - f(u)) + (f(x') - f'(w')) + (f'(w') - f'(w)) \le 2\delta$$

as the first part of the middle term is exactly $\delta$, the second is $\le \delta$, and the last is negative, showing that $\alpha$ satisfies property (ii).

Finally, we ensure property (iii). Let $w \in |T'| \setminus \mathrm{Im}(\alpha)$. Let $i$ be the label of any leaf in the subtree of $w$, and set $y = \alpha(\pi(i))$ to be the image of the vertex labeled $i$ in $T$. Then the tree property implies that $\pi'(i) \le w \le y$ and thus $f'(\pi'(i)) \le f'(w) \le f'(y)$. So,

$$|f'(w) - f'(\pi'(i))| \le |f'(\pi'(i)) - f'(y)| \le |f'(\pi'(i)) - f(\pi(i))| + \delta = |M_{ii} - M'_{ii}| + \delta \le 2\delta.$$

As this is true for every leaf in the subtree of $w$, depth($w$) $\le 2\delta$ and so $\alpha$ satisfies property (iii).

Thus, we have that $d_I((T, f), (T', f')) \le d_I^L((T, f, \pi), (T', f', \pi'))$ for any given $\Pi$, completing the proof of the theorem. □
We can use the construction from the proof to state something stronger. Recall that we work with finite labeled and unlabeled merge trees throughout the paper.

**Corollary 4.4.** There exist an $n$ and a pair of labelings $\pi, \pi'$ so that

$$d_I((T, f), (T', f')) = d_I^L((T, f, \pi), (T', f', \pi')),$$

where $L$ (resp. $L'$) is the set of leaves of $T$ (resp. $T'$). Thus, the interleaving distance for finite merge trees is always achieved by a map $\alpha$.

*Proof.* The right side of Equation (1) in Theorem 4.1 is taken over labelings using at most $N = |L| + |L'|$ labels, which is finite. (Here, $L'$ is the set of leaves of $T'$.) Up to reordering, we can use the first $|L|$ numbers to label the leaves in $T$ and the last $|L'|$ to label the leaves in $T'$. All that remains to show is that there are finitely many possible locations to place the remaining labels in each tree. Indeed, if $d_I(T, T') = \delta$, then for each $i \in \{1, \dots, |L|\}$, one has the option of placing $i$ at any point in $(f')^{-1}(f(\pi(i)) + \delta) \subset T'$. Note that $|(f')^{-1}(f(\pi(i)) + \delta)|$ is finite. Similarly, there are $|f^{-1}(f'(\pi'(i)) + \delta)|$ possible locations available for $i \in \{|L| + 1, N\}$ to be placed in $T$. For any fixed choice from this set for every $i$, let $M$ and $M'$ be the associated matrices for $T$ and $T'$, respectively.

The options are set up so that any choice of location for label $i$ in the opposite tree will automatically satisfy $|M_{ii} - M'_{ii}| = \delta$, so we need only ensure that some choice in each tree of these locations for every $i$ promises $|M_{ij} - M'_{ij}| \le \delta$. For every choice of remaining labels, say there is some $i, j$ for which $|M_{ij} - M'_{ij}| > \delta$. As we have finitely many options, there is an $\epsilon$ so that $|M_{ij} - M'_{ij}| > \delta + \epsilon$. However, there is certainly a $(\delta + \epsilon/2)$-good map $\alpha$ that does not take the labels into consideration, and we could then build the labeling as discussed in Theorem 4.1, giving a contradiction. Thus, one of finitely many options achieves the left infimum of (1), and thus there is a $\delta$-good map $\alpha$ that also achieves the unlabeled distance. $\square$

We conclude this section by showing that the interleaving distance is intrinsic on the space of finite (unlabeled) merge trees. Recall from Definition 2.14, $\hat{d}$ denotes the intrinsic metric induced by a metric $d$.

**Corollary 4.5.** For the space of finite (unlabeled) merge trees, $d_I = \hat{d}_I$.

*Proof.* Let $T$ and $T'$ be two merge trees, and set $\delta = d_I((T, f), (T', f'))$. Let $\pi, \pi'$ be optimal labelings such that $d_I((T, f), (T', f')) = d_I^L((T, f, \pi), (T', f', \pi')) = \delta$, as established by Corollary 4.4.

Now consider the space of labeled merge trees LMT. By Corollary 3.2, there exists a geodesic $\gamma : (T, f, \pi) \rightsquigarrow (T', f', \pi')$ in LMT such that the length $L_{d_I^L}(\gamma) = \delta$.

Note that $\gamma$ can be projected to a path $\gamma'$ from $T$ to $T'$ in the space of (unlabeled) merge trees MT by simply ignoring the labeling. As $d_I((T, f), (T', f')) \le d_I^L((T, f, \pi_1), (T', f', \pi_2))$ for any labelings $\pi_1, \pi_2$ between any two trees $T$ and $T'$, we have

$$\hat{d}_I(T, T') \le L_{d_I}(\gamma') \le L_{d_I^L}(\gamma) = \delta. \qquad (2)$$

On the other hand, by definition of the intrinsic metric $\hat{d}_I$ induced by $d_I$,

$$\hat{d}_I(T, T') \ge d_I(T, T') = \delta. \qquad (3)$$

Combining equations (2) and (3), we conclude that $\hat{d}_I(T, T') = d_I(T, T')$ for any two merge trees $T$ and $T'$. $\square$
# 5 Concluding Remarks and Discussion

In this paper, we investigated whether interleaving-type distances for (finite) labeled or unlabeled merge trees are intrinsic or not, and presented positive answers in both cases. In the case of labeled trees, the geodesic between two labeled merge trees can be characterized and computed easily, and we also showed how to compute the 1-center of a set of labeled merge trees. For unlabeled merge trees, however, computing the geodesic (even if just numerically estimating it) between two merge trees appears to be significantly harder, part of the reason being that it is NP-hard to approximate the interleaving distance between two merge trees, as pointed out in [67].

On the other hand, a simpler and easier to compute object is the bottleneck distance $d_B(T_1, T_2)$ between two (unlabeled) merge trees. We conjecture that the intrinsic distance $\hat{d}_B$ induced by $d_B$ is in fact equivalent to $\hat{d}_I(= d_I)$.

Another natural question is whether (some of the) results for merge trees in this paper can be extended to contour trees. As a first question, can we characterize and compute the midpoint (i.e., the contour tree representing the 1-center) for two labeled contour trees under either $\hat{d}_I$, $\hat{d}_B$, or $\hat{d}_{FD}$ (where we remind the reader that $d_{FD}$ denotes the functional distortion distance)? One idea is to compute the join and split trees of input contour trees, and compute the midpoint of the pair of join trees (resp., the pair of split trees). Note that each join or split tree can be viewed as a merge tree. Next we need to use the common ancestor information in both trees to construct a midpoint for the two contour trees. This step could be subtle: in particular, it is known [68] that in general, given a descending (join) tree $T_J$ and an ascending (split) tree $T_S$ with consistent functions associated to them, there may not exist a contour tree (or even a graph) whose join and split trees are equal to $T_J$ and $T_S$, respectively. If such a contour tree exists, then it is unique, and the algorithm by Carr et al. [16] will compute this tree in near linear time.

Finally, understanding theoretical properties of distances between merge trees has many practical implications. For instance, in scientific visualization, such distances may be employed to study ensemble data sets that arise from scientific simulations (e.g., [72, 58]). Theorem 4.1 suggests the potential development of computing interleaving distances between unlabeled merge trees. Building on the work presented in this paper, Yan et al. [72] computed the structural average and geodesics of merge trees for uncertainty visualization. They explored various labeling strategies for computing interleaving distances between merge trees. Furthermore, Curry et al. [25] estimated the interleaving distance between unlabeled merge trees by searching for an optimal alignment between nodes in the trees with respect to a certain cost function; such estimation was used for classification and comparison of point cloud data. Moving beyond this paper, we envision a number of future applications in topological data analysis and visualization.

**Acknowledgments** Our initial research collaboration began during the Dagstuhl Seminar 17292: Topology, Computation and Data Analysis in July 2017 (organized by Bei Wang, Hamish Carr, and Michael Kerber). We thank all members of the breakout session on Reeb graphs for stimulating discussions. We are grateful to the Institute for Computational and Experimental Research in Mathematics (ICERM) for supporting us through the Collaborate@ICERM program in August 2018. EM was partially supported by National Science Foundation (NSF) through grants CMMI-1800466, DMS-1800446, and CCF-1907591. KT was supported by an ARC Discovery Early Career fellowship. BW was partially supported by Department of Energy (DOE) DE-SC0021015, NSF IIS-1513616 and DBI-1661375, as well as National Institutes of Health (NIH) R01EB022876. YW was partially supported by NSF CCF-1740761 and DMS-1547357, as well as NIH R01EB022899.
## References

[1] J.-P. Barthélemy and B. Leclerc. The median procedure for partitions. *Partitioning Data Sets*, 19:3–34, 1993.

[2] U. Bauer, B. Di Fabio, and C. Landi. An edit distance for Reeb graphs. *Proceedings of the Eurographics Workshop on 3D Object Retrieval*, pages 27–34, 2016.

[3] U. Bauer, X. Ge, and Y. Wang. Measuring distance between Reeb graphs. *Proceedings of the 13th Annual Symposium on Computational Geometry*, pages 464–473, 2014.

[4] U. Bauer, C. Landi, and F. Memoli. The Reeb graph edit distance is universal. *Foundations of Computational Mathematics*, 21:1441–1464, 2021.

[5] U. Bauer, E. Munch, and Y. Wang. Strong equivalence of the interleaving and functional distortion metrics for Reeb graphs. *Proceedings of the 31st International Symposium on Computational Geometry*, 34:461–475, 2015.

[6] K. Beketayev, D. Yeliussizov, D. Morozov, G. H. Weber, and B. Hamann. Measuring the distance between merge trees. In *Mathematics and Visualization*, pages 151–165. Springer International Publishing, 2014.

[7] L. J. Billera, S. P. Holmes, and K. Vogtmann. Geometry of the space of phylogenetic trees. *Advances in Applied Mathematics*, 27(4):733–767, 2001.

[8] D. Bogdanowicz and K. Giaro. Matching split distance for unrooted binary phylogenetic trees. *IEEE/ACM Transactions on Computational Biology and Bioinformatics*, 9(1):150–160, 2012.

[9] D. Bogdanowicz and K. Giaro. On a matching distance between rooted phylogenetic trees. *International Journal of Applied Mathematics and Computer Science*, 23(3):669–684, 2013.

[10] B. Bollen, E. Chambers, J. A. Levine, and E. Munch. Reeb graph metrics from the ground up. *arXiv preprint arXiv:2110.05631*, 2021.

[11] P. Bubenik, V. de Silva, and J. Scott. Metrics for generalized persistence modules. *Foundations of Computational Mathematics*, 15(6):1501–1531, 2014.

[12] D. Burago, Y. Burago, and S. Ivanov. *A Course in Metric Geometry*. American Mathematical Society, 2001.

[13] G. Cardona, M. Llabrés, F. Rosselló, and G. Valiente. Nodal distances for rooted phylogenetic trees. *Journal of Mathematical Biology*, 61(2):253–276, 2009.

[14] G. Cardona, A. Mir, F. Rosselló, L. Rotger, and D. Sánchez. Cophenetic metrics for phylogenetic trees, after Sokal and Rohlf. *BMC Bioinformatics*, 14(1):3, 2013.

[15] G. Carlsson and F. Mémoli. Characterization, stability and convergence of hierarchical clustering methods. *Journal of Machine Learning Research*, 11(47):1425–1470, 2010.

[16] H. Carr, J. Snoeyink, and U. Axen. Computing contour trees in all dimensions. *Computational Geometry*, 24(2):75–94, 2003.

[17] M. Carrière, B. Michel, and S. Oudot. Statistical analysis and parameter selection for mapper. *Journal of Machine Learning Research*, 19:1–39, 2018.
[18] M. Carrière and S. Oudot. Local equivalence and intrinsic metrics between Reeb graphs. *Proceedings of the 33rd International Symposium on Computational Geometry*, 77:25:1–25:15, 2017.

[19] M. Carrière and S. Oudot. Structure and stability of the one-dimensional mapper. *Foundations of Computational Mathematics*, 18(6):1333–1396, 2018.

[20] F. Chazal, D. Cohen-Steiner, M. Glisse, L. J. Guibas, and S. Y. Oudot. Proximity of persistence modules and their diagrams. *Proceedings of the 25th Annual Symposium on Computational Geometry*, pages 237–246, 2009.

[21] F. Chazal, V. de Silva, M. Glisse, and S. Oudot. *The Structure and Stability of Persistence Modules*. Springer International Publishing, 2016.

[22] V. Chepoi and B. Fichet. $l_\infty$-approximation via subdominants. *Journal of Mathematical Psychology*, 44(4):600–616, 2000.

[23] K. Choi and S. M. Gomez. Comparison of phylogenetic trees through alignment of embedded evolutionary distances. *BMC Bioinformatics*, 10(1):423, 2009.

[24] J. Curry. *Sheaves, Cosheaves and Applications*. PhD thesis, University of Pennsylvania, 2014.

[25] J. Curry, H. Hang, W. Mio, T. Needham, and O. B. Okutan. Decorated merge trees for persistent topology. *arXiv preprint arXiv:2103.15804*, 2021.

[26] B. DasGupta, X. He, T. Jiang, M. Li, and J. Tromp. On the linear-cost subtree-transfer distance between phylogenetic trees. *Algorithmica*, 25(2-3):176–195, 1999.

[27] B. DasGupta, X. He, T. Jiang, M. Li, J. Tromp, and L. Zhang. On distances between phylogenetic trees. *Proceedings of the 8th Annual ACM-SIAM Symposium on Discrete Algorithms*, 97:427–436, 1997.

[28] V. de Silva, E. Munch, and A. Patel. Categorified Reeb graphs. *Discrete & Computational Geometry*, pages 1–53, 2016.

[29] V. de Silva, E. Munch, and A. Stefanou. Theory of interleavings on categories with a flow. *Theory and Applications of Categories*, 33(21):583–607, 2018.

[30] G. De Soete. A least squares algorithm for fitting additive trees to proximity data. *Psychome trika*, 48(4):621–626, 1983.

[31] B. Di Fabio and C. Landi. The edit distance for Reeb graphs of surfaces. *Discrete & Computational Geometry*, 55(2):423–461, 2016.

[32] P. W. Diaconis and S. P. Holmes. Matchings and phylogenetic trees. *Proceedings of the National Academy of Sciences*, 95(25):14600–14602, 1998.

[33] O. Dovgoshey and E. Petrov. From isomorphic rooted trees to isometric ultrametric spaces. *p-Adic Numbers, Ultrametric Analysis and Applications*, 10(4):287–298, 2018.

[34] O. Dovgoshey, E. Petrov, and H.-M. Teichert. How rigid the finite ultrametric spaces can be? *Journal of Fixed Point Theory and Applications*, 19(2):1083–1102, 2016.
[35] H. Edelsbrunner and J. Harer. Persistent homology - a survey. *Contemporary Mathematics*, 453:257-282, 2008.

[36] H. Edelsbrunner, D. Letscher, and A. Zomorodian. Topological persistence and simplification. *Discrete & Computational Geometry*, 28:511-533, 2002.

[37] G. F. Estabrook, F. McMorris, and C. A. Meacham. Comparison of undirected phylogenetic trees based on subtrees of four evolutionary units. *Systematic Biology*, 34(2):193-200, 1985.

[38] S. N. Evans. *Probability and Real Trees*. Springer, 2006.

[39] C. Flamm, I. L. Hofacker, P. F. Stadler, and M. T. Wolfinger. Barrier trees of degenerate landscapes. *Zeitschrift für Physikalische Chemie*, 216(2), 2002.

[40] A. Gavryushkin and A. J. Drummond. The space of ultrametric phylogenetic trees. *Journal of Theoretical Biology*, 403:197-208, 2016.

[41] R. Ghrist. Barcodes: the persistent topology of data. *Bulletin of the American Mathematical Society*, 45(1):61-75, 2008.

[42] V. Gurvich and M. Vyalyi. Characterizing (quasi-)ultrametric finite spaces in terms of (directed) graphs. *Discrete Applied Mathematics*, 160(12):1742-1756, 2012.

[43] J. A. Hartigan. Statistical theory in clustering. *Journal of Classification*, 2:63-76, 1985.

[44] B. Hughes. Trees and ultrametric spaces: A categorical equivalence. *Advances in Mathematics*, 189(1):148-191, 2004.

[45] N. Jardine and R. Sibson. *Mathematical Taxonomy*. Wiley Series in Probability and Mathematical Statistics. John Wiley & Sons Ltd., London, 1971.

[46] Jean-François Le Gall. Brownian excursions, trees and measure-valued branching processes. *The Annals of Probability*, 19(4):1399-1439, 1991.

[47] M. Lafond, N. El-Mabrouk, K. Huber, and V. Moulton. The complexity of comparing multiply-labelled trees by extending phylogenetic-tree metrics. *Theoretical Computer Science*, 760:15-34, 2019.

[48] F.-J. Lapointe and G. Cucumel. The average consensus procedure: combination of weighted trees containing identical or overlapping sets of taxa. *Systematic Biology*, 46(2):306-312, 1997.

[49] B. Leclerc. Consensus of classifications: the case of trees. In A. Rizzi, M. Vichi, and H.-H. Bock, editors, *Advances in Data Science and Classification*, pages 81-90, Berlin, Heidelberg, 1998. Springer Berlin Heidelberg.

[50] A. J. Lemin. The category of ultrametric spaces is isomorphic to the category of complete, atomic, tree-like, and real graduated lattices LAT*. *Algebra Universalis*, 50(1):35-49, 2003.

[51] A. Markin and O. Eulenstein. Cophenetic median trees under the manhattan distance. In *Proceedings of the 8th ACM International Conference on Bioinformatics, Computational Biology, and Health Informatics*, pages 194-202, 2017.

[52] E. Miller, M. Owen, and J. S. Provan. Polyhedral computational geometry for averaging metric phylogenetic trees. *Advances in Applied Mathematics*, 68:51-91, 2015.
[53] J. Milnor. *Morse Theory*. Princeton University Press, New Jersey, NY, USA, 1963.

[54] D. Morozov, K. Beketayev, and G. Weber. Interleaving distance between merge trees. *Proceedings of Topology-Based Methods in Visualization*, 2013.

[55] E. Munch and A. Stefanou. The $l^\infty$-cophenetic metric for phylogenetic trees as an interleaving distance. In *Research in Data Science*, pages 109–127. Springer, 2019.

[56] E. Munch and B. Wang. Convergence between categorical representations of Reeb space and Mapper. *Proceedings of the 32nd International Symposium on Computational Geometry*, 51:53:1–53:16, 2016.

[57] P. Oesterling, C. Heine, H. Jaenicke, G. Scheuermann, and G. Heyer. Visualization of high-dimensional point clouds using their density distribution’s topology. *IEEE Transactions on Visualization and Computer Graphics*, 17(11):1547–1559, 2011.

[58] M. Pont, J. Vidal, J. Delon, and J. Tierny. Wasserstein distances, geodesics and barycenters of merge trees. *IEEE Transactions on Visualization and Computer Graphics*, 1(28):291–301, 2022.

[59] G. Reeb. Sur les points singuliers d'une forme de Pfaff complèment intégrable ou d'une fonction numérique. *Comptes Rendus de L'Académie ses Séances*, 222:847-849, 1946.

[60] D. F. Robinson and L. R. Foulds. Comparison of weighted labelled trees. In *Combinatorial mathematics VI*, pages 119–126. Springer, 1979.

[61] D. F. Robinson and L. R. Foulds. Comparison of phylogenetic trees. *Mathematical Biosciences*, 53(1):131–147, 1981.

[62] C. Semple, M. Steel, and R. A. Caplan. *Phylogenetics*. Oxford University Press, 2003.

[63] G. Singh, F. Mémoli, and G. Carlsson. Topological methods for the analysis of high dimensional data sets and 3D object recognition. *Eurographics Symposium on Point-Based Graphics*, pages 91–100, 2007.

[64] Z. Smith, S. Chowdhury, and F. Mémoli. Hierarchical representations of network data with optimal distortion bounds. *Proceedings of 50th Asilomar Conference on Signals, Systems and Computers*, pages 1834–1838, 2016.

[65] R. R. Sokal and F. J. Rohlf. The comparison of dendrograms by objective methods. *Taxon*, 11(2):33, 1962.

[66] R. Sridharamurthy, T. B. Masood, A. Kamakshidasan, and V. Natarajan. Edit distance between merge trees. *IEEE Transactions on Visualization and Computer Graphics*, 26(3):1518–1531, 2020.

[67] E. F. Touli and Y. Wang. FPT-algorithms for computing Gromov-Hausdorff and interleaving distances between trees. *Proceedings of the 27th Annual European Symposium on Algorithms*, pages 83:1–83:14, 2019.

[68] S. Wang, Y. Wang, and R. Wenger. The JS-graph of join and split trees. *Proceedings of the 30th Annual Symposium on Computational Geometry*, pages 539–548, 2014.
[69] G. Weber, P.-T. Bremer, and V. Pascucci. Topological landscapes: A terrain metaphor for scientific data. *IEEE Transactions on Visualization and Computer Graphics*, 13(6):1416–1423, 2007.

[70] W. Widanagamaachchi, A. Jacques, B. Wang, E. Crosman, P.-T. Bremer, V. Pascucci, and J. Horel. Exploring the evolution of pressure-perturbations to understand atmospheric phenomena. *IEEE Pacific Visualization Symposium*, 2017.

[71] L. Yan, T. B. Masood, R. Sridharamurthy, F. Rasheed, V. Natarajan, I. Hotz, and B. Wang. Scalar field comparison with topological descriptors: Properties and applications for scientific visualization. *Computer Graphics Forum*, 40(3):599–633, 2021.

[72] L. Yan, Y. Wang, E. Munch, E. Gasparovic, and B. Wang. A structural average of labeled merge trees for uncertainty visualization. *IEEE Transactions on Visualization and Computer Graphics*, 26(1):832–842, 2020.