1 Introduction

Discrete Morse theory is a combinatorial version of the classical smooth Morse theory. It was originally developed by Forman (1998).

In discrete Morse theory, topological properties of simplicial complexes X are analyzed by considering discrete Morse functions \(f:X \rightarrow {\mathbb {R}}\). These topological properties can in turn be used to obtain cell decompositions of X with fewer cells. A good introduction to the topic is found in Forman (2001).

Merge trees are used in Morse theory in order to keep track of the development of connected components of sublevel sets \(X_a:=f^{-1}(-\infty ,a]\) of a given Morse function \(f:X\rightarrow {\mathbb {R}}\). Since the sublevel sets form a filtration of X, merge trees can be seen as a combinatorial description of the persistent connectivity of X. In particular, every branching in the induced merge tree M(Xf) corresponds to a pair of connected components of a sublevel set \(X_{a-\varepsilon }\) that merge to one connected component in a sublevel complex \(X_a\) of higher level.

Initially, merge trees were introduced to topological data analysis as an approximation to the Reeb graph, respectively contour tree, in Carr et al. (2003). The Reeb graph is a graph that keeps track of the connected components of level sets of any given filtered manifold. In applications, the data set is often interpreted as a sampling of the graph of a function rather than a more general manifold, which is why the Reeb graph is often actually a tree, the so-called contour tree.

Among other implementations of techniques of smooth Morse theory, computational methods for the Reeb graph have originally been introduced in Shinagawa et al. (1991) in order to handle surfaces embedded in 3D with the help of computers. Later on, several ways to compute and apply contour trees of data sets have been discussed in many articles, e.g. Kweon and Kanade (1994), van Kreveld et al. (1997), Tarasov and Vyalyi (1998), and Carr et al. (2003). Among other applications, merge trees have been used in visualization, e.g. in Oesterling et al. (2013), Weber et al. (2007), Oesterling et al. (2017), and Yan et al. (2019). Surveys about applications of merge trees and other concepts in visualization can be found in Heine et al. (2016) and Liu et al. (2016). Furthermore, a certain version of chiral merge trees has been used in Baryshnikov (2019) to analyze asymmetries of time series.

We focus on the more structural and theoretical side of merge trees, in particular the connection to discrete Morse theory. We consider a specific construction for merge trees induced by discrete Morse functions on trees which was introduced in Johnson and Scoville (2022). We use this construction to gain a better understanding of the set of discrete Morse functions, the set of merge trees, and the relationship between the two.

Similar work has been done in Curry (2019) for the relationship between Morse-like functions on the interval and a related version of merge trees. Furthermore, our work is in some sense similar to parts of Curry et al. (2021), with the difference being that the authors of Curry et al. (2021) consider the relationship between merge trees and their induced barcodes instead. It seems reasonable to adapt the following terms from both of these articles and say that we consider a different instance of the “fiber of the persistence map”, respectively a different instance of the “inverse problem” of the “persistence map”. These names refer to the fact that merge trees and barcodes are invariants of filtered spaces rather than just spaces. In this context, the name “persistent” became popular due to persistent homology as it appears in topological data analysis. Similar to the authors of Curry (2019) and Curry et al. (2021), we are interested in finding out what information is lost by considering our invariant at hand, the induced merge tree, instead of the given data, in our case a discrete Morse function, and how this information might be re-obtained. Such knowledge might be helpful to investigate the space of merge trees and the space of discrete Morse functions in future work. Furthermore, a good understanding of the fiber of the persistence map is useful for topological data analysis because it hints at features which might be lost due to the chosen invariant. Moreover, insights about the inverse problem might be helpful to enhance the chosen invariant in a way such that it preserves certain desired features of the data set.

We respond to an open question asked in Johnson and Scoville (2022) by showing that every merge tree is represented by a discrete Morse function (dMf). In particular, for any given merge tree we construct a dMf on a path as a representative of the isomorphism class defined by said merge tree:

Theorem 5.5

Let T be a merge tree. Then there is a path P such that \(T\cong M(P,f_{io})\cong M(P,f_{sc})\) holds as merge trees where \(f_{io}\) denotes the induced index-ordered dMf (Definition 3.20) and \(f_{sc}\) denotes the sublevel-connected dMf (Definition 4.5) on P.

In particular, the discrete Morse function from Theorem 5.5 can be chosen to be index-ordered (Definition 2.1) or sublevel-connected (Definition 2.31).

The main tool for the construction is the corresponding Morse order (Definition 3.3), that is, the index Morse order (Definition 3.3) or the sublevel-connected Morse order (Definition 2.31) on the nodes of a given merge tree T. The index Morse order defines leaf nodes to be strictly less than inner nodes. Among leaf nodes and among inner nodes, the index Morse order is defined by using a twisted version of length-lexicographical order on the set of path words (Lemma 3.16) that correspond to the respective nodes. The path words are defined by the chirality of the nodes of the shortest path from the root to the corresponding node. For the sublevel-connected Morse order (Definition 4.1) we do not artificially distinguish between leaf nodes and inner nodes.

We use the index Morse order (Definition 3.3) to define the index Morse labeling (Definition 3.7) on the nodes of T. Together with the simplex order (Definition 3.11), which establishes a correspondence (Remark 3.18) between the nodes of T and the simplices of a path P, the index Morse labeling defines the induced index-ordered discrete Morse function on said path P.

In Sect. 2.2 we introduce several kinds of equivalence relations on the sets of discrete Morse functions with only critical cells on paths and trees. These equivalence relations allow us to identify equivalence classes of discrete Morse functions with isomorphism classes of Morse labeled merge trees:

Theorem 5.4

The induced labeled merge tree \(M(\_\,{,}\,\_)\) and the induced dMf \(\Phi \) define maps that are inverse to each other in the sense that:

  1. (1)

    For a dMf (Pf) with only critical cells, the dMf \(\Phi (M(P,f),\lambda _f)\) is symmetry-equivalent to (Pf), and

  2. (2)

    For an Ml tree \((T,\lambda )\), the Ml tree \(M(\Phi T,f_\lambda )\) is isomorphic to \((T,\lambda )\).

Theorem 5.6

The induced labeled merge tree \(M(\_\,{,}\,\_)\) and the induced dMf \(\Phi \) define maps that are inverse to each other in the sense that:

  1. (1)

    For any dMf (Xf) with only critical cells, the dMf \(\Phi (M(X,f),\lambda _f)\) is cm-equivalent to (Xf), and

  2. (2)

    For any Ml tree \((T,\lambda )\), the Ml tree \(M(\Phi T,f_\lambda )\) is isomorphic to \((T,\lambda )\).

The construction of the discrete Morse function induced by a Morse labeling is similar to the construction of functions on the interval in Curry (2019). In particular, Theorem 5.4 is very similar to the result (Curry 2019, Prop 6.11). The use of Morse labelings in this work basically plays the role of the function \(\pi :T \rightarrow {\mathbb {R}}\) from Curry (2019). Moreover, the simplex order is almost the same as the use of chirality in Curry (2019, Lem 6.4). But in this work, Morse orders, and in turn Morse labelings, have to satisfy a certain compatibility with the chirality, that is, property (2) of Definition 2.17.

The notion of merge trees we use originates from Johnson and Scoville (2022, Def 5) and differs from the one used in Curry (2019): A priori, merge trees T in the sense of Johnson and Scoville (2022) do not carry a height function \(T \rightarrow {\mathbb {R}}\) as part of their data. Instead, the two children of each node have a chirality assigned to them as part of the tree’s data. This means that for any two child nodes of the same parent node, it is specified as part of data which is the right and which is the left child. This version of chirality is also canonically assigned to merge trees induced by discrete Morse functions. In contrast, the chirality of chiral merge trees in the sense of Curry (2019) arises from a chosen orientation on the interval. We obtain a similar correspondence between the chirality of merge trees and orientations on paths using the simplex order, Definition 3.11. Apart from these differences, the notion of merge trees in the sense of Johnson and Scoville (2022) is closely related to the one from Curry (2019). Chirality in the sense of Johnson and Scoville (2022) is a specific version of the notion of chirality used in Curry (2019). In order to see this, we show that the construction of the merge tree M(Xf) induced by a discrete Morse function f in the sense of Johnson and Scoville (2022) can be modified, see Proposition 2.20, to obtain a function \(T \rightarrow {\mathbb {R}}\) from f, similarly to Curry (2019). This gives rise to the notion of Morse labelings, Definition 2.19, and Morse orders, Definition 3.3. It turns out that the use of chirality in Johnson and Scoville (2022) assumes a certain compatibility between Morse orders and the simplex order, whereas the use of chirality in Curry (2019) does not. As a result, the induced merge tree in the sense of Curry (2019) distinguishes between symmetry equivalences, Definition 2.42, whereas the induced merge tree in the sense of Johnson and Scoville (2022) identifies symmetry-equivalent discrete Morse functions with each other, see Proposition 2.48. We discuss this in a bit more detail at the end of Sect. 5.

In said discussion, we mention the notion of CMl trees, see Definition 5.9, which is as objects basically the same as the notion of merge trees from Curry et al. (2021, Def 2.2). However, the notion of combinatorial equivalence of labeled merge trees from Curry et al. (2021, Def 2.6) corresponds to a non-chiral version of shuffle equivalence Definition 2.24 rather than an equivalence of the induced persistent set as in Curry (2019, 5.1), which is more similar to an isomorphism of Ml trees Definition 2.23. The chiral merge trees from Baryshnikov (2019, Def 2.1) are as objects also very similar to the chiral merge trees from Curry (2019) and, thus, differ similarly from our notion of labeled merge trees.

The aforementioned versions of labeled merge trees all have in common that their labelings need to be compatible with some other data inherent to the merge tree. In contrast to that, the labelings from Yan et al. (2019) can be quite arbitrary and might even assign multiple labels to a single node. Hence, our Ml trees a priori seem to be unrelated to the notion of labeled merge trees from Yan et al. (2019).

2 Preliminaries

We consider discrete Morse functions (dMf) on trees. Recall that trees are finite acyclic simple graphs. Furthermore, simple graphs are 1-dimensional simplicial complexes. Where feasible, we introduce the preliminaries in the broader generality they are usually defined in, rather than in the lesser generality we actually need for this work. We adapt most notations and conventions from Johnson and Scoville (2022). For simplicity, we assume all trees in this article to be non-empty. Similar to Johnson and Scoville (2022), we assume the dMfs to fulfill certain generic properties. In detail this means the following:

Definition 2.1

Let X be a simplicial complex. A map \(f :X \rightarrow {\mathbb {R}}\) is called a discrete Morse function (dMf) if it fulfills the following properties for any pair of simplices \(\sigma ,\tau \in X\):

  1. (i)

    \(\sigma \subseteq \tau \Rightarrow f(\sigma ) \le f(\tau )\) (weakly increasing)

  2. (ii)

    f is at most \(2-1\)

  3. (iii)

    \(f(\sigma )=f(\tau ) \Rightarrow (\sigma \subset \tau \vee \tau \subset \sigma )\) (matching)

Simplices on which f is \(1-1\) are called critical. Simplices which belong to the preimage of the same value are called matched. The set of critical simplices is denoted by \({\text {Cr}}(f)\). Values of critical simplices under f are called critical values of f. A dMf is called index-ordered if for arbitrary critical simplices \(\sigma ,\tau \) the following holds: If \({\text {dim}}(\sigma )\) is smaller than \(\dim (\tau )\), then \(f(\sigma ) < f(\tau )\) holds.

Remark 2.2

The definition given above is not the most general definition of dMfs but rather assumes several generic properties. This means that any dMf in the sense of Forman (1998) can be modified by a Forman equivalence (see Johnson and Scoville, 2022, Def 4.1) to fulfill these properties, that is, without changing the induced Morse matching. As usual in the context of dMfs, we write \(f:X \rightarrow {\mathbb {R}}\) although the map f is actually defined on the face poset of X.

In Nanda et al. (2018), a similar generic property is used to analyze flow paths induced by dMfs. The notion of faithful dMfs as defined in Nanda et al. (2018, Def 2.9) is almost the same as index-ordered dMfs in this article. The only difference is that for index-ordered dMfs matched cells have the same value, whereas for faithful dMfs the values of the matched boundary simplices are higher than the values on the corresponding matched co-boundary simplices.

Furthermore, since simple graphs and in particular trees are examples of simplicial complexes, the definition of dMfs can be applied to them as well.

Remark 2.3

Because f maps \({\text {Cr}}(f)\) injectively into a totally ordered set, it induces a total order on \({\text {Cr}}(f)\). We refer to this induced order whenever we speak of simplices being ordered by f.

Notation 2.4

We use the following conventions regarding notation:

  • We depict dMfs on graphs by labeling the graph with the values of the dMf.

  • Let G be a graph and let v be a node of G. By G[v] we denote the connected component of G which contains v.

Definition 2.5

  • Let X be a simplicial complex, \(f :X\rightarrow {\mathbb {R}}\) a dMf and \(a\in {\mathbb {R}}\). The sublevel complex of level a, denoted by \(X^f_a\), is defined by \(X^f_a:=\{\sigma \in X \ |\ f(\sigma ) \le a \}\). If the referred dMf f is clear from the context, we drop the superscript f from the notation.

  • The ordered critical values \(c_0< c_1< \cdots < c_{m}\) induce a chain of sublevel complexes \(X^f_{c_0}\subsetneq X^f_{c_1}\subsetneq \dots \subsetneq X^f_{c_{m}}\). Within this chain, we refer by \(X^f_{c_i-\varepsilon }\) to the complex that immediately precedes \(X_{c_i}\).

Remark 2.6

The given definition of sublevel complexes differs from the standard one used in the literature. We make use of the fact that a dMf f being weakly increasing implies that \(X_a^f\) as defined above is already a subcomplex of X. If we wanted to consider the general definition of dMfs as introduced in Forman (1998), we would have to work with the smallest supercomplex of \(X_a^f\) in X instead. Taking the smallest supercomplex corresponds to additionally including all faces of simplices of \(X_a^f\) to make \(X_a^f\) a simplicial complex.

Lemma 2.7

Let X be a finite simplicial complex and let \(f :X \rightarrow {\mathbb {R}}\) be a dMf. Then f attains its minimum on a critical 0-simplex. Furthermore, the statement also holds for the restriction to any connected component of sublevel complexes.

Sketch of Proof

The statement follows by a proof by contradiction and properties (i) and (ii) of Definition 2.1. \(\square \)

Remark 2.8

The analogous statement for the maximum of a dMf f on arbitrary 1-simplices is false, as the following example shows:

figure a

Here, the maximum is attained on a pair of matched simplices.

2.1 Merge trees

We briefly recapture preliminaries about merge trees as they are explained in Johnson and Scoville (2022). The basic idea is that merge trees keep track of the chronological development of the connected components of sublevel sets. We adapt the point of view of Johnson and Scoville (2022), that is, we consider them ‘upside down’. Thus, the children will appear above their parent node. Afterwards we introduce additional structure that dMfs induce on their corresponding merge trees and consider notions of equivalence which arise from that structure.

Definition 2.9

(Merge Tree) A merge tree is a full rooted chiral binary tree T. In detail this means that T is a rooted tree fulfilling the properties of being binary and full, and that T has the extra datum of being chiral:

Full binary:

Each node of T has either zero or two children.

Chiral:

Each child node in T carries the extra datum, the so-called chirality, of being a left or a right child.

Morphisms of merge trees are morphisms of rooted binary trees which are compatible with the chirality.

For rooted trees T we use the notions of subtrees, ancestors and descendants as they are commonly used in computer science.

Definition 2.10

For any node p of T, the descendants of p are defined inductively: A node c is a descendant of p if the parent node of c is a descendant of p or p itself.

A subtree of T is a subgraph of T that consists of exactly all of the descendants of some node p of T.

For a node p of T we call all nodes which lie on the shortest path between p and the root, including the root, the ancestors of p.

Notation 2.11

For an inner node c of T, we denote the left child of c with \(c_l\) and the right child of c with \(c_r\). We illustrate this notation in the following example:

figure b

Remark 2.12

For full binary trees T with i(T) inner nodes and l(T) leaves it is a well-known result that \(l(T)=i(T)+1\) holds. It can be proved inductively.

Remark 2.13

The chirality of nodes will either be denoted by labels or indicated implicitly by embedding the merge tree on the page. Throughout the literature there are different notions of merge trees that are not always distinguished by name or notation. In this work, merge trees do not have explicit weights on edges. Moreover, merge trees in this work a priori do not carry a function to the real numbers. In that way, we distinguish between merge trees and Morse labeled merge trees which will be introduced in Definition 2.19. We use the chirality to obtain Morse labelings on unlabeled merge trees. This leads to Definition 3.3.

Construction 2.14

(Johnson and Scoville 2022, Thm 9) Let X be a tree and let \(f:X \rightarrow {\mathbb {R}}\) be a dMf. The merge tree induced by f, denoted by M(Xf) is constructed as follows:

Let \(c_0<c_1<\cdots < c_m\) be the critical values of f that are assigned to 1-simplices. The associated merge tree M(Xf) is constructed by induction over these critical values in descending order. Furthermore, we label the nodes of M(Xf) in order to refer to them later. The label of a node n will be denoted by \(\lambda (n)\).

For the base case we begin by creating a node \(M(c_m)\) which corresponds to the critical 1-simplex in X labeled \(c_m\) and setting its label \(\lambda (M(c_m))\) to \((c_m,L)\).

For the inductive step, let \(M(c_i)\) be a node of M(Xf) that corresponds to a critical 1-simplex between two 0-simplices v and w. Define \(\lambda _v:=\) \(\max \{f(\sigma ) |\sigma \in X_{c_i-\varepsilon }[v], \sigma \text { critical}\}\) and \(\lambda _w:=\max \{f(\sigma ) \vert \sigma \in X_{c_i-\varepsilon }[w], \sigma \text { critical}\}\). Two child nodes of \(M(c_i)\) are created, named \(n_{\lambda _v}\) and \(n_{\lambda _w}\). Then label the new nodes \(\lambda (n_{\lambda _v}):=\lambda _v\) and \(\lambda (n_{\lambda _w}):=\lambda _w\). If \(\min \{f(\sigma ) \vert \sigma \in X_{c_i-\varepsilon }[v]\}<\min \{f(\sigma ) \vert \sigma \in X_{c_i-\varepsilon }[w]\}\), we assign \(n_{\lambda _v}\) the same chirality (L or R) as \(M(c_i)\) and give \(n_{\lambda _w}\) the opposite chirality. Continue the induction over the rest of the critical 1-simplices.

Remark 2.15

By construction, one of the following two cases holds for the labels \(\lambda _v\) and \(\lambda _w\). They might be either critical values lower than \(c_i\) that are assigned to edges or critical values that are assigned to nodes. The two labels \(\lambda _v\) and \(\lambda _w\) do not necessarily belong to the same case.

Therefore, the nodes \(n_{\lambda _v}\) and \(n_{\lambda _w}\) will possibly be denoted as \(M(c_j)\) and \(M(c_k)\) for some \(j,k<i\) in later steps of the induction. In particular, this means that the node which is considered in the first instance of the inductive step is \(c_m\).

Remark 2.16

Although the induced merge tree as introduced above comes with a labeling, the labeling is not part of the data of the induced merge tree. This is one of the main differences between merge trees in Johnson and Scoville (2022) and the merge trees in Curry (2019).

We consider one way to keep some information provided by the induced labeling on M(Xf).

Definition 2.17

Let T be a merge tree. We call a total order \(\le \) on the nodes of T a Morse order if it fulfills the following two properties for any subtree \(T'\) of T:

  1. (1)

    The restriction \(\le _{|T'}\) attains its maximum on the root of \(T'\).

  2. (2)

    The restriction \(\le _{|T'}\) attains its minimum on the subtree with root \({p_{l}}/{p_r}\) if is the chirality of the root p of \(T'\).

Moreover, we call a merge tree \((T,\le )\) together with a Morse order \(\le \) a Morse-ordered merge tree (Mo tree).

Remark 2.18

Assuming property (2) of Definition 2.17 for every subtree \(T'\) with root p of T is equivalent to either of the following:

  • For any subtree \(T'\) with root p of T, the minimum of \(\le _{|T'}\) has the same chirality as p.

  • For any subtree \(T'\) with root p of T, all nodes on the shortest path between p and the minimum of \(\le _{|T'}\) have the same chirality as p.

The equivalence can be proved by an inductive argument over all nodes of the shortest path between p and the minimum.

Because Morse orders \(\le \) define in particular finite totally ordered sets, there are unique order-preserving isomorphisms \(\lambda :(V(T),\le ) \xrightarrow {\cong } \{0,1,\ldots , i(T)+l(T)-1\} \subseteq {\mathbb {N}}_0\subset {\mathbb {R}}\) for each Morse order. Conversely, each injective labeling \(\lambda :T \rightarrow {\mathbb {R}}\) induces an order \(\le _\lambda \) on the nodes of T by usage of the total order on \({\mathbb {R}}\).

Definition 2.19

For Morse orders \(\le \) we call the map \(\lambda _{\le } :(V(T),\le ) \rightarrow \{0,1,\ldots , i(T)+l(T)-1\}\) the Morse labeling induced by \(\le \). We call an arbitrary labeling \(\lambda :T \rightarrow {\mathbb {R}}\) a Morse labeling if it induces a Morse order on T.

We call a merge tree \((T,\lambda )\) with a Morse labeling \(\lambda :T \rightarrow {\mathbb {R}}\) a Morse labeled merge tree (Ml tree).

For a Mo tree \((T,\le )\) we call the Ml tree \((T,\lambda _{\le })\) the Ml tree induced by \((T,\le )\).

Proposition 2.20

Let \(f:X \rightarrow {\mathbb {R}}\) be a dMf. The labeling which appears in Construction 2.14 induces a Morse order on M(Xf). Hence, M(Xf) canonically carries the structure of a Mo tree as well as an Ml tree.

Proof

It is proved in Johnson and Scoville (2022, Thm 9) that M(Xf) is a merge tree. We only have to prove that the labeling induces a Morse order. By Remark 2.3 the set \({\text {Cr}}(f)\) of critical values carries a total order induced by f. Since the critical values of f precisely define the labeling in Construction 2.14, the labeling induces a total order on the nodes of M(Xf). It is only left to prove that this order is a Morse order.

In the construction, each inner node of M(Xf) corresponds to a critical 1-simplex and is labeled with the critical value of said critical 1-simplex. Since parent nodes are created before their child nodes are, and since the critical values are considered from highest to lowest, property (1) of Definition 2.17 is fulfilled. The rule in the construction which decides the chirality of the child nodes is exactly the same as property (2) of Definition 2.17. Hence, it is fulfilled by construction. \(\square \)

We denote the canonical labeling of M(Xf) by \(\lambda _f\).

Remark 2.21

In the aforementioned proof, it becomes clear that both conditions of Definition 2.17 are necessary for a total order on M(Xf) to be induced by a dMf f.

Morse orders are useful for the construction of dMfs that induce given merge trees T. We will see in Proposition 3.23 that for a total order on an arbitrary merge tree T condition (1) is sufficient for inducing a dMf in the sense of Definition 3.20 later on. Nonetheless, condition (2) is necessary to ensure that the induced dMf induces the given merge tree T.

Example 2.22

We consider the following example of a dMf \(f :X\rightarrow {\mathbb {R}}\):

figure c

The critical values on edges are:

$$\begin{aligned} 5<6<9<11<14 \end{aligned}$$

We now show the construction algorithm of M(Xf) visually by depicting \(X_{c_i-\varepsilon }\) on the left and the part of M(Xf) that is created up to the step corresponding to \(c_i\) on the right.

figure d

There are no more critical edges left, so the construction of M(Xf) is finished.

Since there are different notions of merge trees in the literature and since the merge trees in our setting carry a lot of structure, there are multiple possibilities of how to define equivalences of merge trees. In the remainder of this section, we define and discuss some versions of equivalence of merge trees.

Since merge trees are defined to be chiral rooted binary trees, the obvious notion for isomorphisms of merge trees is isomorphisms of chiral rooted binary trees. In detail, this means bijections between the sets of nodes and the sets of vertices which map the root to the root and are compatible with the chiral child relation. For Mo trees (Definition 2.17) we have more notions of equivalence.

Definition 2.23

Let \((T,\le )\) and \((T',\le ')\) be Mo trees. An isomorphism of Mo trees \((T,\le )\cong (T',\le ')\) is an order-preserving isomorphism of the underlying merge trees.

Let \((T,\lambda )\) and \((T',\lambda ')\) be Ml trees. An isomorphism of Ml trees is and isomorphism of the underlying merge trees over \({\mathbb {R}}\), that is, an isomorphism of merge trees \(\varphi :T\rightarrow T'\) such that \( \lambda ' \circ \varphi =\lambda \).

Definition 2.24

Let \((T,\lambda )\) and \((T',\lambda ')\) be Ml trees. A shuffle equivalence \((\varphi ,\psi ):(T,\lambda )\rightarrow (T',\lambda ')\) of Ml trees is a pair of an isomorphism of the underlying merge trees \(\varphi :T\rightarrow T'\) and a bijection \(\psi :{\mathbb {R}}\rightarrow {\mathbb {R}}\) such that

  • \(\psi \circ \lambda = \lambda ' \circ \varphi \) holds,

  • The restriction of \(\psi \) to values on leaves is order-preserving, and

  • The restriction of \(\psi \) to values on inner nodes is order-preserving.

In the special case that the restriction \(\psi _{|{\text {im}}(\lambda )}:{\text {im}}(\lambda )\rightarrow {\text {im}}(\lambda ')\) is an order preserving bijection, we call \((\varphi ,\psi )\) an order equivalence.

A shuffle equivalence \((T,\le )\rightarrow (T',\le ')\) between Mo trees is an isomorphism \(\varphi \) of the underlying merge trees such that

  • The restriction of \(\varphi \) to leaf nodes is order-preserving, and

  • The restriction of \(\varphi \) to inner nodes is order-preserving.

Remark 2.25

The name of shuffle equivalences hints at the fact that two given total orders, one total order on the leaves, and another total order on the inner nodes, might be combined to produce a total order on all nodes in different ways, a bit like shuffling cards. Shuffle equivalence checks if two Morse orders arise from the same underlying orders by different ways of shuffling. But the necessity of ranking ancestors higher than descendants and being compatible with the chirality prevents arbitrary ways of shuffling two given orders on the leaves and inner nodes from producing Morse orders.

Shuffle equivalences induce by definition isomorphisms on the underlying merge trees. We now make the relationship between Mo trees and Ml trees precise.

Proposition 2.26

The Morse labeling induced by a Morse order and the order induced by a Morse labeling define inverse bijections where \(\sim \) denotes order equivalence.

Proof

Let \((T,\le )\) be a Mo tree. It is immediate that \((T,\lambda _\le )\) has the property that \(\lambda _\le \) induces \(\le \) as its induced order on T. Thus, the composition \({\text {iMo}}\circ {\text {iMl}}\) is the identity on MoT.

Let \((T,\lambda )\) be an Ml tree. By definition, the labeling \(\lambda \) induces a Morse order \(\le _\lambda \) on T which makes \((T,\le _\lambda )\) a Mo tree. Since the induced Morse labeling \(\lambda _{\le _\lambda }\) by construction induces \(\le _\lambda \) as its induced order, it follows that \((T,\lambda )\) and \((T,\lambda _{\le _\lambda })\) are order equivalent. \(\square \)

Corollary 2.27

The induced Morse order \({\text {iMo}}\) and the induced Morse labeling \({\text {iMl}}\) induce a bijection between shuffle equivalences of Mo trees and shuffle equivalences of Ml trees.

Proof

The assignment \({\text {iMl}}\) maps shuffle equivalences of Mo trees to shuffle equivalences of Ml trees by Definition 2.24.

Let \(\lambda :T\rightarrow {\mathbb {R}} \) and \(\lambda ' :T' \rightarrow {\mathbb {R}}\) be shuffle-equivalent Morse labelings and let \((\varphi ,\psi )\) be the corresponding shuffle equivalence. Then by Definition 2.19 the map \({\text {iMo}}(\varphi ,\psi )=\varphi :(T,\le _\lambda )\rightarrow (T',\le _{\lambda '})\) has the property that the restriction of \(\varphi \) to leaf nodes is order-preserving, and the restriction of \(\varphi \) to inner nodes is order-preserving. Hence, \(\varphi ={\text {iMo}}(\varphi ,\psi )\) is a shuffle equivalence of Mo trees. \(\square \)

Remark 2.28

In particular, the aforementioned proposition and corollary mean that two Mo trees are isomorphic (respectively shuffle equivalent) if and only if the corresponding Ml trees are order equivalent (respectively shuffle equivalent) and vice versa.

2.2 Generic properties and equivalences of DMFs

In this subsection, we will take a closer look at generic properties that dMfs can be assumed to have. Furthermore we consider some notions of equivalences between dMfs.

A first example of a generic property is the notion of index-ordered dMfs as defined above. It is inspired by the eponymous notion from the smooth case. We use index-ordered dMfs in order to distinguish critical simplices by their dimension because merge trees have the same property: Critical 0-simplices appear as leaves whereas critical 1-simplices appear as inner nodes of the induced merge tree (see Construction 2.14). Thus, index-ordered dMfs seem to be especially suitable for working with merge trees.

Nonetheless, index-ordered dMfs are not compatible with the structure of rooted subtrees. In detail, consider the following:

Remark 2.29

Let \(f:X \rightarrow {\mathbb {R}}\) be an index-ordered dMf on a tree such that the following holds: The tree X has a critical 1-simplex \(\sigma \) such that the corresponding inner node p in M(Xf) has two inner nodes c and \(c'\) as children. Then the image of f on at least one of the connected components corresponding to c or \(c'\) is not an interval in \(f({\text {Cr}}(f))\).

Example 2.30

The following is a small example:

figure e

Neither the subtree with root labeled 4, nor the subtree with root labeled 5 is labeled with an interval in \(f({\text {Cr}}(f))\subseteq {\mathbb {R}}\).

Still, we can assume compatibility with the structure of rooted subtrees as a property:

Definition 2.31

Let \(f:X \rightarrow {\mathbb {R}}\) be a dMf. The function f is called sublevel-connected if for all critical 1-simplices v the set \(f(X_{f(v)}[v])\) is an interval in \(f({\text {Cr}}(f))\).

Remark 2.32

Since both ‘index-ordered’ and ‘sublevel-connected’ are properties that only rely on the values of f on critical simplices, they can easily be arranged without changing the partial matching if the tree X is finite. It is also possible to do this without changing the induced merge tree. One way to obtain a sublevel-connected dMf would be to choose a collapsing order for the induced matching such that the respective connected components of sublevel sets correspond to intervals in said collapsing order. But as seen in Remark 2.29, the two properties are in most cases mutually exclusive.

Example 2.33

Here is a possibility how to modify the dMf from the previous example in order to make it sublevel-connected without changing the induced merge tree:

figure f

Since dMfs can be modified to fulfill either of the two properties, one can always choose the one which is more convenient for the task at hand. Thus, we give two different constructions in this work, one for each property.

We recall that by Remark 2.3 each dMf \(f :X \rightarrow {\mathbb {R}}\) induces an order on the 0-simplices of X and on the 1-simplices of X, respectively. This yields the following definition, which induces a merge-tree-invariant notion of equivalence between dMfs.

Definition 2.34

Let \(f:X\rightarrow {\mathbb {R}}\) and \(g:X\rightarrow {\mathbb {R}}\) be dMfs on a tree X. We call f and g shuffle-equivalent if they have the same critical simplices and if they induce the same order on the critical 0-simplices as well as the same order on the critical 1-simplices.

Let (Xf) and \((X',f')\) be two dMfs on trees. A shuffle equivalence \((\varphi ,\psi ):f \rightarrow f'\) between f and \(f'\) consists of a simplicial map \(\varphi :X \rightarrow X'\) and a bijection \(\psi :{\mathbb {R}} \rightarrow {\mathbb {R}}\) such that

  • \(\psi \circ f=f' \circ \varphi \),

  • \(\varphi _{|{\text {Cr}}(f)}:{\text {Cr}}(f) \rightarrow {\text {Cr}}(f')\) is a bijection,

  • The restriction of \(\psi \) to values on critical 0-simplices is order preserving, and

  • The restriction of \(\psi \) to values on critical 1-simplices is order preserving.

In the special case that the restriction \(\psi _{|{\text {Cr}}(f)}:{\text {Cr}}(f)\rightarrow {\text {Cr}}(f')\) is an order preserving bijection, we call \((\varphi ,\psi )\) an order equivalence.

Remark 2.35

It is immediate that shuffle equivalence of dMfs is an equivalence relation. The name is inspired analogously as for the eponymous notion for Mo trees and Ml trees. Shuffle equivalence checks if two dMfs arise from the same underlying orders by different ways of shuffling. Nonetheless not all ways of shuffling given orders on the critical 0-simplices and critical 1-simplices produce a dMf because dMfs have to be weakly increasing.

Furthermore, shuffle equivalence, and in particular order equivalence, also considers dMfs to be equivalent if they only differ by scaling because a different scaling does not change the induced orders on simplices.

We split the definition of shuffle equivalences in two steps to simplify the proofs of the following propositions. It is immediate that for two dMfs on the same tree X there is a shuffle equivalence between them if and only if they are shuffle equivalent.

Proposition 2.36

Let X be a tree and let \(f:X \rightarrow {\mathbb {R}}\) and \(g:X \rightarrow {\mathbb {R}}\) be two shuffle-equivalent dMfs. Then M(Xf) and M(Xg) are isomorphic as merge trees.

The following two lemmas will be helpful for the proof of the proposition:

Lemma 2.37

Let X be a tree and let \(f:X \rightarrow {\mathbb {R}}\) be a dMf such that X has at least one critical 1-simplex. Then the function \(f_{|{\text {Cr}}(f)}\) attains its maximum on a critical 1-simplex.

Sketch of Proof

Backtracking gradient paths, see Forman (1998, Def 8.4), as long as possible leads to a local maximum which turns out to be a critical 1-simplex. \(\square \)

Lemma 2.38

Let X be a tree and let \(f :X \rightarrow {\mathbb {R}}\) and \(g :X \rightarrow {\mathbb {R}}\) be two shuffle-equivalent dMfs. We denote the critical 1-simplices of f and g by \(c_0<c_1< \cdots <c_n\) where < denotes the ordering induced by f or g, respectively. Then the connected components \(X^f_{f(c_i)}[c_j]\) of sublevel complexes contain the same critical simplices as \(X^g_{g(c_i)}[c_j]\) for all \(j<i\).

Sketch of Proof

First we observe that restrictions of dMfs on trees to connected components of sublevel complexes are again dMfs on trees. With help of Lemma 2.37, it can be proved inductively that in the construction of M(Xf) and M(Xg) the same critical 1-simplices are considered in the same order. The statement then follows inductively. \(\square \)

Proof of Proposition 2.36

We consider the construction of the induced merge tree (see Construction 2.14) and prove inductively the slightly stronger result that both functions yield isomorphic merge trees at every step of the construction. This implies that f and g induce isomorphic merge trees.

Since f and g impose the same order on the set of critical 1-simplices, the construction algorithm considers the same critical 1-simplices during the same steps for both functions. This already proves the base case. In particular, this means that the created root node corresponds to the same critical 1-simplex for both functions. Although the label of the root node might be different for the two dMfs, it does not affect the isomorphism type of the induced merge tree because the labeling is not part of the data of merge trees.

For the inductive step, we observe that in every step of the construction we consider a connected component of sublevel complexes \(X^f_{f(c_i)}[c_j]/X^g_{g(c_i)}[c_j]\) that contains at least one critical 1-simplex, namely the one with the highest remaining critical value \(c_j\). Thus, by Lemma 2.38 in each step of the construction, the same critical simplices occur.

Assume we are at the step that considers the critical 1-simplex \(c_i\). For the two new nodes which are created in the inductive step, two pieces of information are important for the isomorphism type of the induced merge tree, namely the chirality of the new nodes and which critical simplices the new nodes correspond to. The chirality of the new nodes affects the isomorphism type of the induced merge tree directly. The critical simplex corresponding to a child node c decides which connected component of the respective sublevel complex is used to build the subtree with root c and at which point said connected component will be subdivided next.

Both pieces of information are defined by the two connected components that belong to the boundary 0-simplices of \(c_i\). The two child nodes correspond to the critical simplices with the highest critical values.

There are three cases:

  1. (1)

    Both connected components contain at least one critical 1-simplex \(c_j\).

  2. (2)

    One connected component contains at least one critical 1-simplex \(c_j\) whereas the other one only contains one critical 0-simplex c.

  3. (3)

    Each of the two connected components contains only one critical 0-simplex c.

It follows by Lemma 2.37 that in case (1) the corresponding 1-simplices with the highest critical values are critical 1-simplices \(c_j\). In case (2) the same is true for the connected component that contains at least one critical 1-simplex. For the connected components in case (2) and (3) that only contain one critical 0-simplex, respectively, it is true that the critical 0-simplex is the only critical simplex in its corresponding connected component. Thus, the new nodes correspond to the same critical simplices for f and for g because both functions induce the same order on 1-simplices and because connected components only correspond to critical 0-simplices if they are the only critical simplex left in the corresponding connected component. Furthermore, connected components \(X^f_{f(c_i)}[c]/X^g_{g(c_i)}[c]\) that only contain one critical 0-simplex do not have any influence on the induced merge tree M(Xf)/M(Xg) because their corresponding nodes have already been created during a step that considered a critical 1-simplex with a higher critical value and they are not considered in later steps of the construction.

The chirality of the new nodes depends on the minimal values on critical simplices of the two respective connected components \(X^f_{f(c_i)}[c_j]/X^g_{g(c_i)}[c_j]\) or \(X^f_{f(c_i)}[c]/X^g_{g(c_i)}[c]\). By Lemma 2.7, these minima belong to critical 0-simplices. By assumption, f and g induce the same order on the critical 0-simplices, so the same 0-simplex is minimal with respect to both functions. Thus, f and g assign the same chirality to the new nodes. \(\square \)

Remark 2.39

The functions f and g might induce different order relations between 0-simplices and 1-simplices. Therefore, in sublevel complexes that appear during the same step of the construction there might be different connected components that contain only one critical 0-simplex each with respect to the two dMfs. However, those connected components that contain only one critical 0-simplex and no critical 1-simplices do not affect the isomorphism type of the induced merge tree. This is because those connected components correspond to leaves of the merge tree which have already been created during the step that considered the critical 1-simplex between said connected components and other connected components. Furthermore, those connected components do not appear in later steps of the construction of the induced merge tree because they do not contain any critical 1-simplices.

Proposition 2.40

Shuffle equivalences of dMfs induce shuffle equivalences of the induced Ml trees. Moreover, order equivalences of dMfs induce order equivalences of the induced Ml trees.

Sketch of Proof

Since \(\varphi \) is bijective on critical simplices and simplicial, it follows that \(\varphi \) induces a bijection between connected components of sublevel complexes. With this, it follows analogously to the proof of Proposition 2.36 that \(M(X,f)\cong M(X',f')\) holds. The proof that the induced Morse labelings are shuffle equivalent is straightforward and only uses that the restrictions of \(\psi \) to 0-simplices and to 1-simplices are order preserving, and the compatibility between \(\varphi ,\psi ,f\) and \(f'\). \(\square \)

Remark 2.41

The criterion from Proposition 2.36 for merge tree equivalence is sufficient but not necessary, as the following example shows:

figure g

The two dMfs f and g induce inverse orders on the two 0-simplices. Nonetheless, f and g induce the same unlabeled merge tree.

This remark leads us to yet another kind of equivalence relation between dMfs that arises from symmetries of sublevel complexes. In order to make this notion of symmetry precise, we need some preparations.

Definition 2.42

Let \(f:X \rightarrow {\mathbb {R}}\) be a dMf on a tree. For each non-empty connected component \(X^f_c[v]\) of a sublevel complex \(X^f_c\) we denote by \({\text {Aut}}(X^f_c[v])\) the group of simplicial automorphisms of \(X^f_c[v]\). For each \(a \in {\text {Aut}}(X^f_c[v])\) there is an extension to a self-bijection \(X\rightarrow X\) by the identity. The group \(\widetilde{{\text {Aut}}}(X^f_c[v])\) is defined to be the group of said extensions of elements of \({\text {Aut}}(X^f_c[v])\) by the identity. We consider \(\widetilde{{\text {Aut}}}(X^f_c[v])\) as a subgroup of the group of all self-bijections of X. The total order on \({\text {Cr}}(f)\) induced by f induces chains \(\widetilde{{\text {Aut}}}(X^f_{c_0}[v])\subset \widetilde{{\text {Aut}}}(X^f_{c_1}[v]) \subset \dots \) of inclusions of subgroups. Moreover, we have inclusions \(\widetilde{{\text {Aut}}}(X^f_{c_i}[v])\subset \widetilde{{\text {Aut}}}(X^f_{c_j}[v])=\widetilde{{\text {Aut}}}(X^f_{c_j}[w]) \supset \widetilde{{\text {Aut}}}(X^f_{c_i}[w])\) if v and w are in different connected components of some sublevel complex \(X^f_{c_i}\) that merge together in some other sublevel complex \(X^f_{c_j}\) for \(j>i\). We define the sublevel automorphism group of (Xf), denoted by \({\text {Aut}}_{sl}(X,f)\), to be the subgroup generated by \( \bigcup \limits _{c \in {\text {Cr}}(f),v \in X} \widetilde{{\text {Aut}}}(X^f_c[v])\). We call the elements of \({\text {Aut}}_{sl}(X,f)\) sublevel automorphisms.

Remark 2.43

Even though sublevel automorphisms are built out of simplicial automorphisms of connected components \(X^f_c[v]\) of sublevel complexes, they are in general not simplicial maps \(X \rightarrow X\). To be precise, if a simplicial automorphism of \(X^f_c[v]\) was used to construct a sublevel automorphism \(a\in {\text {Aut}}_{sl}(X,f)\), then a will fail to be simplicial at the boundary of \(X^f_c[v]\subset X\).

Proposition 2.44

Let \(f:X\rightarrow {\mathbb {R}}\) be a dMf on a tree and let \(a \in {\text {Aut}}_{sl}(X,f)\) be a sublevel automorphism. Then \(f*a\) defined by \(f*a(\sigma ):=f(a(\sigma ))\) is a dMf on X. Moreover, this defines a right group action of \({\text {Aut}}_{sl}(X,f)\) on the set of dMfs on X.

Sketch of Proof

The proof that \(f*a\) is a dMf is straightforward and the compatibility of the group action follows directly by associativity of the composition of maps. \(\square \)

Remark 2.45

Since automorphisms of simplicial complexes preserve the dimension of simplices, the action of \({\text {Aut}}_{sl}(X,f)\) on the set of dMfs on a tree X preserves the properties of being index-ordered or sublevel-connected.

Definition 2.46

Let \(f:X\rightarrow {\mathbb {R}}\) and \(g:X\rightarrow {\mathbb {R}}\) be dMfs on a tree X. We call f and g sublevel-equivalent if \({\text {Cr}}(f)={\text {Cr}}(g)\) and \(X^f_c\cong X^g_c\) for all \(c\in {\text {Cr}}(f)={\text {Cr}}(g)\). If additionally \(g=f*a\) holds for a sublevel automorphism \(a \in {\text {Aut}}_{sl}(X,f)={\text {Aut}}_{sl}(X,g)\), then we call f and g symmetry-equivalent. We call the map a a symmetry equivalence from f to g.

We call two dMfs \(f:X\rightarrow {\mathbb {R}}\) and \(g:Y\rightarrow {\mathbb {R}}\) symmetry-equivalent if there is a simplicial isomorphism \(\varphi :X\rightarrow Y\) such that f and \(g\circ \varphi \) are symmetry-equivalent.

Example 2.47

We give a list of some symmetry-equivalent dMfs on a path with four vertices. Here we denote the sublevel equivalence induced by the reflection of the connected component of the sublevel complex of level k by \(a_k[k]\):

figure h

Proposition 2.48

Let \(f:X\rightarrow {\mathbb {R}}\) and \(g:X\rightarrow {\mathbb {R}}\) be symmetry-equivalent dMfs on a tree X. Then M(Xf) and M(Xg) are isomorphic as Ml trees.

Sketch of Proof

The proposition can be proved by induction over the level c of the sublevel automorphisms that the given symmetry equivalence consists of. We check that in each step the single sublevel automorphism a of the connected component \(X_c[\sigma ]\) with the 1-simplex \(\sigma \) labeled c in \(X_c\) only affects steps of the construction of the induced Ml tree that consider simplices of \(X_c[\sigma ]\). Moreover, it is straightforward to prove that in these steps, the created nodes and their induced Morse labels are the same as without the application of a. \(\square \)

Remark 2.49

Sublevel automorphisms of dMfs on paths only consist of reflections of the corresponding connected component of a subcomplex. When such a connected component of a sublevel complex of a critical level c is considered during the construction of the induced Ml tree, the reflection of the connected component only causes the two new parts that are obtained by considering a slightly lower level \(c-\varepsilon \) to appear as their mirror images. In particular, the given dMf attains the same values on the two new parts as before. Hence, the two parts that appear are simplicially isomorphic to the ones that appear without application of the reflection.

Definition 2.50

Let (Xf) and \((X',f')\) be dMfs on trees. A component-merge equivalence (cm equivalence) of level a is a bijection \(\varphi :X \rightarrow X'\) such that one of the following, not necessarily exclusive, cases holds:

  1. (1)

    \(\varphi \) is a symmetry equivalence.

  2. (2)

    \(\varphi \) fulfills the following:

    • \(f' \circ \varphi =f\),

    • \(\varphi \) induces a bijection between the sets of connected components of sublevel complexes such that each restriction \(\varphi _{|X_{a-\varepsilon }[v]}:X_{a-\varepsilon }[v] \rightarrow X'_{a-\varepsilon }[\varphi (v)]\) is a cm equivalence of some level \(b<a\), and

    • The edge \(\sigma \in X\) with \(f(\sigma )=a\) merges the two connected components \(X_{a-\varepsilon }[v_1]\) and \(X_{a-\varepsilon }[v_2]\) in \(X_{a}[v_1]=X_{a}[v_2]\) if and only if the edge \(\varphi (\sigma )\) merges the two connected components \(X'_{a-\varepsilon }[\varphi (v_1)]\) and \(X'_{a-\varepsilon }[\varphi (v_2)]\) in \(X'_{a}[\varphi (v_1)]=X'_{a}[\varphi (v_2)]\).

    If \(\varphi \) fulfills property (2) but not property (1), we call \(\varphi \) non-trivial.

Example 2.51

We give an example of two cm-equivalent dMfs on trees. The non-trivial cm equivalence from the left-hand-side to the right-hand-side consists of a symmetry equivalence of level 5 and the attachment of the edge labeled 6 between the vertices labeled 1 and 3 rather than 2 and 3. That is, it is a cm-equivalence of level 6.

figure i

Proposition 2.52

Cm equivalent dMfs on trees induce isomorphic Ml trees.

Proof

Let \(\varphi :(X,f) \rightarrow (X',f')\) be a cm equivalence. By property (ii) of Definition 2.1, at most one non-trivial cm equivalence of level a can occur for any level a because there is at most one edge labeled a in \((X,f),(X',f')\), respectively. Thus, we can decompose any cm equivalence into a sequence \((\varphi _a)_a\) of non-trivial cm equivalences of decreasing levels such that each \(\varphi _a\) only changes the attachment of the single edge \(\sigma \) with \(f(\sigma )=a\) and acts as a symmetry equivalence on the rest of path and dMf. It suffices to consider a single level a because the statement then follows by induction from highest to lowest over all levels a.

For such a non-trivial cm equivalence \(\varphi _a\) we consider the step of the construction of the induced Ml trees that considers the edge \(\sigma \) with \(f(\sigma )=a\) and the edge \(\varphi (\sigma )\). We inductively assume that \(\varphi \) induces an isomorphism of induced Ml trees everywhere outside the subtrees corresponding to the two connected components of \(X^f_{a-\varepsilon }\) that are merged by the edge \(\sigma \) with \(f(\sigma )=a\). That is, on the rest of M(Xf) the map \(M(\varphi )\) is a bijection compatible with the chiral child relation onto \(M(X',f')\) except for the subtrees of \(M(X',f')\) which correspond to the connected components of \(X'^{f'}_{a-\varepsilon }\) which are merged by the edge \(\varphi (\sigma )\). Since the map \(\varphi \) is compatible with the dMfs and because it restricts to a cm equivalence \(X^f_{a-\varepsilon }\rightarrow X'^{f'}_{a-\varepsilon }\), the dMf f attains the same minima and maxima on the two relevant connected components of \(X^{f}_{a-\varepsilon }\) as \(f'\) does on their counterparts of \(X'^{f'}_{a-\varepsilon }\) via \(\varphi \). Since Construction 2.14 only considers which two connected components are merged by the considered edge, it makes no difference for the isomorphism type of the induced Ml trees that \(\sigma \) in general merges the two connected components of \(X^f_{a-\varepsilon }\) at vertices that do not correspond via \(\varphi \) to the ones adjacent to \(\varphi (\sigma )\) in \(X'^{f'}_{a-\varepsilon }\). Thus, the construction of the induced Ml tree produces nodes with the same chirality and label for both induced Ml trees in the steps that consider \(\sigma ,\varphi (\sigma )\), respectively. By assumption, the restriction \(\varphi _{X^{f}_{a-\varepsilon }}:X^f_{a-\varepsilon }\rightarrow X'^{f'}_{a-\varepsilon }\) is a symmetry equivalence, so the isomorphism of Ml trees extends to the subtrees that correspond to the respective connected components. \(\square \)

Proposition 2.53

Let (Xf) be a dMf on a tree. There is a dMf on a path \((P,f')\) such that (Xf) is cm-equivalent to \((P,f')\).

Sketch of Proof

A suitable cm equivalence can be constructed inductively by re-attaching 1-simplices of level a that would become the third 1-simplex incident to some 0-simplex in \(X_a\). \(\square \)

Remark 2.54

The way we defined cm equivalence makes it a generalization of symmetry equivalence. In fact, cm equivalences are the same as symmetry equivalences, i.e. they are always trivial, if we restrict ourselves to dMfs on paths: Without loss of generality, cm equivalences of some level a of a dMf on a path (Pf) describe all different possibilities of how two glue two paths together with a new edge in order to obtain a path again. This means that the edge labeled a can only be adjacent to the vertices that are adjacent to less than two edges, respectively, of the two old paths in \(P_{a-\varepsilon }\). Thus, there are at most four possibilities for the two vertices which may be adjacent to the edge labeled a. All of these possibilities result in dMfs which are related to each other by reflections of the original two paths in \(P_{a-\varepsilon }\). Hence, they are all symmetry-equivalent to each other.

3 Construction of the induced index-ordered DMF

We address the inverse question: For any given merge tree T, is there a discrete Morse function f on a path P such that \(M(P,f)\cong T\)? We answer this question affirmatively by presenting an explicit construction of P and two possible choices for f. The basic idea for the construction is to reverse-engineer the construction of the induced merge tree from Construction 2.14.

To start with the index-ordered case, we define two different orders on T. First we define a Morse order on T, which we call the index Morse order. Afterwards, we define the simplex order on the nodes of T, which we use to turn the Morse labeling induced by the index Morse order into a dMf on P. In Sect. 4 we will present an alternative dMf which represents T, namely the sublevel-connected dMf.

We will discuss in Sect. 5 to what extent the constructed dMf is a unique representative for T.

3.1 The index Morse order

To define the index Morse order, we first observe that every node a of T is uniquely determined by the shortest path from the root to a. We recall that the depth of T is the maximal length of any path in T that appears as the shortest path from the root to a leaf. Because T is chiral, we can identify such shortest paths with certain words:

Definition 3.1

Let T be a merge tree of depth n and let a be a node of T. The path word corresponding to a is a word \(a_0a_1\ldots a_n \in \{L,R,\_\}^{n+1}\) where \(\_\) denotes the empty letter. If a is of depth k, the letters \(a_0\ldots a_k\) are given by the chirality of the nodes belonging to the shortest path from the root to a. The letters \(a_{k+1}\dots a_n\) are then empty.

Remark 3.2

Let ab be nodes of a merge tree T and let \(a_0a_1\ldots a_n\) be the path word corresponding to a and \(b_0b_1\ldots b_n\) be the path word corresponding to b. Then the equation \(a_0=b_0=L\) always holds because we consider paths that begin at the root. Because of \(a_0=b_0=L\) and because we consider finite trees, there is always a maximal \(k \in {\mathbb {N}}\) such that \(a_i=b_i\) holds for all \(i\le k\). Furthermore, the last non-empty letter of a path word is always the chirality of the considered node.

We now define the index Morse order, which will produce an index-ordered dMf on P afterwards.

Definition 3.3

Let T be a merge tree. We define the index Morse order \(\le _{io}\) on the nodes of T as follows:

Let a and b be arbitrary nodes of T. If a is a leaf node and b is an inner node, then we define \(a\le _{io} b\). If either both a and b are leaf nodes or both a and b are inner nodes, we consider the following:

Let \(a_0a_1\ldots a_n\) be the path word corresponding to a and \(b_0b_1\ldots b_n\) the path word corresponding to b. Furthermore, let \(k\in {\mathbb {N}}\) be maximal such that \(a_i=b_i\) for all \(i\le k\). If we define \(a\le _{io} b\) if and only if one of the following cases hold:

  1. (a)
  2. (b)

    \(b_{k+1}=\_\)

  3. (c)

    \(a=b \ (\Leftrightarrow k=n)\)

The index Morse order is tailor-made to induce an index-ordered dMf later on. Nonetheless, we will see in Example 5.2 that it is in general not the only Morse order which induces an index-ordered dMf. In Sect. 4 we will introduce a different, perhaps more natural, Morse order that is more closely related to the sublevel filtration of the induced dMf. But for now we consider an example of the index Morse order and prove that \(\le _{io}\) is actually is a Morse order.

Example 3.4

We consider the following merge tree T:

figure j

The path words are written underneath their corresponding nodes. The index Morse order produces the following chain of inequalities where we denote the nodes by their corresponding path words:

$$\begin{aligned} LLL\_ \lneq LLRR \lneq LLRL \lneq LRR\_ \lneq LRL\_ \lneq LLR\_ \lneq LL\_\_ \lneq LR\_\_ \lneq L\_\_\_ \end{aligned}$$

The inequalities from \(LLL\_\) to \(LRL\_\) arise from the path words of the leaf nodes. The inequality \(LRL\_ \lneq LLR\_\) holds because the node corresponding to \(LRL\_\) is a leaf node and the node corresponding to \(LLR\_\) is an inner node. The inequalities from \(LLR\_\) to \(L\_\_\_\) arise from the path words of the inner nodes.

Remark 3.5

By definition, the root node is always the maximal element of \((V(T),\le _{io})\). Furthermore, the leftmost leaf node of T is always the minimal element of \((V(T),\le _{io})\).

Proposition 3.6

The index Morse order is a Morse order on T.

Sketch of Proof

The proof is a straightforward application of the definitions and involves case distinctions corresponding to the cases a), b), and c) from Definition 3.3. \(\square \)

Definition 3.7

We call the Morse labeling \(\lambda _{io} :(V(T),\le _{io}) \rightarrow \{0,1,\ldots , i(T)+l(T)-1\}\) induced by the index Morse order, see Definition 2.19, the index Morse labeling on T. That is, a node c of T is labeled with \(\lambda _{io}(c)\).

Example 3.8

The index Morse order from Example 3.4 induces the following index Morse labeling:

figure k

3.2 The simplex order

We now define the simplex order on the nodes of T. The simplex order will tell us which nodes of T correspond to which simplices of P.

Remark 3.9

Let T be a merge tree and let ab be nodes of T. Because T is in particular a rooted binary tree, there is a unique node p which is a common ancestor of a and b and has no descendants which are common ancestors of a and b.

Definition 3.10

We call the node p from Remark 3.9 the youngest common ancestor of a and b.

Definition 3.11

Let T be a merge tree. We define the simplex order \(\preceq \) on V(T) as follows: For two nodes a and b of T we define \(a\preceq b\) if and only if one of following mutually exclusive cases holds, where p denotes the youngest common ancestor of a and b:

  1. (1)

    a is a node of the subtree with root \(p_l\) and b is a node of the subtree with root \(p_r\).

  2. (2)

    a is a node of the subtree with root \(b_l\) (in particular \(b=p\)).

  3. (3)

    b is a node of the subtree with root \(a_r\) (in particular \(a=p\)).

  4. (4)

    \(a=b\).

Proposition 3.12

The simplex order is a total order on the nodes of T.

Sketch of Proof of Proposition 3.12

The proof is a bit tedious and consists of many careful case distinctions corresponding to the different cases from Definition 3.11. Otherwise, the proof is a straightforward application of the definitions, paired with a contradiction argument here and there. \(\square \)

We use the following definition to make the intuition of leaves being adjacent precise. This allows us to analyze the simplex order further.

Definition 3.13

Let T be a merge tree and let a and b be leaves of T. We call a and b adjacent if one of the following holds:

  1. (1)

    \(a\preceq b\) and there is no leaf node c of T such that \(a\preceq c \preceq b\) holds.

  2. (2)

    \(b\preceq a\) and there is no leaf node c of T such that \(b\preceq c \preceq a\) holds.

Lemma 3.14

Subtrees of T form chains of cover relations in \((V(T),\preceq )\). In detail, this means the following:

Let p be an inner node of T and let leaf of the subtree with root p. Then the nodes of the subtree with root p in T form the chain of cover relations \(a\prec \cdots \prec p \prec \cdots \prec b\) in \((V(T),\preceq )\). Moreover, any two adjacent leaves of T have the property that the left one of the two adjacent leaves is covered by the youngest common ancestor of the two, whereas the right one covers the youngest common ancestor.

Proof

We prove the lemma inductively. Let p be a node of T such that both child nodes of p are leaves. It follows directly by Definition 3.11 that \(p_r\) covers p and p covers \(p_l\). That is, the subtree with root p forms the chain of cover relations \(a=p_l\prec p \prec p_r=b\).

If p is an arbitrary inner node, then by the inductive hypothesis the subtree with root / forms the chain of cover relations / where / is the leftmost and / the rightmost leaf of the subtree with root /. Since / is a node of the subtree with root /, it follows by case / of Definition 3.11 that / holds. For all nodes c of T which are not nodes of the subtree with root p, the same case from Definition 3.11 holds for c and p as for c and /. Thus, and because / is / in the subtree with root / by the inductive assumption, there is no node c such that / holds. In conclusion, / . \(\square \)

As mentioned before, we will use the simplex order to relate the nodes of T to the simplices of a path P. In order to do that, we now define a corresponding simplex order on the simplices of P.

Definition 3.15

Let P be a path. There are two 0-simplices \(p_0\) and \(p_1\) in P which belong only to one respective 1-simplex. For each simplex \(\sigma \) of P there is a unique shortest path \(\gamma _\sigma \) from \(p_0\) to \(\sigma \). We denote the length, that is, the number of simplices, of such a path \(\gamma _\sigma \) by \(L(\gamma _\sigma )\). The simplex order on P is defined as follows: For two simplices \(\sigma \) and \(\tau \) of P we define \(\sigma \preceq \tau \) if and only if \(L(\gamma _\sigma ) \le L(\gamma _\tau )\).

Lemma 3.16

The simplex order on P is a total order on the simplices of P.

Sketch of Proof

The proof is straightforward and only uses that P is a path and that the integers are linearly ordered. \(\square \)

Remark 3.17

Connected subcomplexes of P correspond to chains of cover relations with respect to the simplex order. Furthermore, any 1-simplex covers its left boundary 0-simplex and is covered by its right boundary 0-simplex. If one visualizes P as being horizontally embedded in a plane such that \(p_0\) is the leftmost 0-simplex of P and \(p_1\) is the rightmost 0-simplex of P, then for simplices \(s,s'\in P\) the relation \(s\prec s'\) holds if and only if s is left of \(s'\). This reminds us of the fact that the simplex order is only defined up to a choice of orientation.

Remark 3.18

Let T be a merge tree and let P be a path with i(T) 1-simplices. Then we have a unique isomorphism \(\phi :(P,\preceq ) \xrightarrow {\cong } (V(T),\preceq )\) of totally ordered sets. The isomorphism \(\phi \) only depends on the choice of \(p_0\) and \(p_1\), that is, on a choice of orientation on P. Choosing \(p_0\) and \(p_1\) the other way around would reverse the simplex order on P.

Before we continue with the definition of the index-ordered dMf, we consider how the simplex order can be used to classify the connected components of sublevel complexes of dMfs on paths (Pf):

Proposition 3.19

Let \(f:P \rightarrow {\mathbb {N}}_0\) be a dMf on a path P. Then the connected components \(P_c[v]\) of sublevel complexes \(P_c\) of P are precisely maximal sequences \(\sigma :=(s_0,\ldots , v, \ldots , s_k)\) of simplices of P such that \(s_i \in P_c\) for all \(i=0,\ldots , k\) and \(s_0\prec \cdots \prec v \prec \cdots \prec s_k\) is a chain of cover relations in \((P,\preceq )\).

Proof

The proof is straightforward and uses Remark 3.17\(\square \)

3.3 The induced index-ordered DMF

Now we explain how the simplex order can be used to construct dMfs on P from Morse orders on T:

Definition 3.20

Let T be a merge tree and P be a path such that the number of 1-simplices is i(T) and let \(\phi :(P,\preceq ) \rightarrow (V(T),\preceq )\) be the isomorphism from Remark 3.18.

For a Morse order \(\le \) and its induced Morse labeling \(\lambda \) we define a map \(f_{\lambda } :P\rightarrow {\mathbb {N}}_0\) by \(f_\lambda :=\lambda \circ \phi \). The map \(f_{\lambda }\) is then called the dMf induced by the Morse order \(\le \) or the dMf induced by the Morse labeling \(\lambda \).

In particular, the map \(f_{io}:=\lambda _{io}\circ \phi \) induced by the index Morse order is called the induced index-ordered dMf.

Remark 3.21

Although \(\phi \) and \(\lambda \) are order-preserving maps with respect to the previously defined total orders, the map \(f_{io}\) does not respect the simplex order in general. Since \(f_{io}\) is supposed to be an index-ordered dMf, it does not need to respect the simplex order. Because the map \(f_{io}\) is supposed to be index-ordered, it rather needs to be compatible with face relation on P, which we will see to be true later on.

Example 3.22

The index Morse order from Example 3.4, respectively the index Morse labeling from Example 3.8, produces the following pair \((P,f_{io})\):

figure l

Proposition 3.23

For any given Morse order \(\le \) on any merge tree T the dMf induced by \(\le \) is a dMf that has only critical cells.

Sketch of Proof

The proof is straightforward and uses Lemma 3.14, Remark 3.17, and property (1) of Definition 2.17. \(\square \)

Remark 3.24

The previous proposition proves that Morse orders \(\le \) on merge trees T always induce dMfs \(f_{\lambda }\). It is a priori unclear though whether the induced dMf \(f_{\lambda }\) induces the given merge tree T as its induced merge tree \(M(P,f_{\lambda })\). We prove this to be true in Theorem 5.5.

Furthermore, condition (1) from Definition 2.17 is necessary for \(f_{\lambda }\) to be a dMf, because a violation of (1) between an inner node and a leaf would result in a violation of \(f_{\lambda }\) being weakly increasing on the corresponding simplices.

Before we continue with the sublevel-connected dMf, we consider how the simplex order can be used to improve our understanding of sublevel complexes of dMfs on paths \((P,f_{\lambda })\) and how they are related to subtrees of T. The condition for this approach to be applicable is that the dMf \(f_{\lambda }\) is induced by a Morse order \(\le \) on T as in Definition 3.20, which we will see to be the general case later on. We will apply this approach to the sublevel-connected case in Sect. 4 where it will be of more importance.

Proposition 3.25

Let \(f_{\lambda }:P \rightarrow {\mathbb {N}}_0\) be a dMf on a path P that is induced by a Morse order \(\le \) on T. Then the connected components \(P_c[v]\) of sublevel complexes \(P_c\) of (Pf) induce subtrees of T via \(\phi \).

Sketch of Proof

It follows by Proposition 3.19 and the definition of \(\phi \) in Remark 3.18 that connected components of sublevel complexes \(P_c[v]\) induce maximal chains of cover relations such that the corresponding simplices are of at most level c in \((V(T),\preceq )\).

The next step is to prove that such chains are equal to the subtree with the chain’s maximum as root. The proof that the chain is contained in the subtree is straightforward. The other inclusion can be proved by contradiction, using that a node outside the subtree would contradict the property of being a chain of cover relations. \(\square \)

4 The sublevel-connected DMF

As remarked in Sect. 2.2 it might sometimes be more convenient to work with sublevel-connected dMfs rather than with index-ordered dMfs. In this section we introduce a slightly different version of the Morse order from Definition 3.3 to construct a sublevel-connected dMf which is shuffle-equivalent to the induced index-ordered dMf and, hence, induces the same given merge tree.

Definition 4.1

Let T be a merge tree. We define the sublevel-connected Morse order \(\le _{sc}\) on the nodes of T as follows:

Let ab be arbitrary nodes of T. Let \(a_0a_1\ldots a_n\) be the path word corresponding to a and \(b_0b_1\ldots b_n\) the path word corresponding to b (see Definition 3.1). Furthermore, let \(k\in {\mathbb {N}}\) be maximal such that \(a_i=b_i\) for all \(i\le k\). If we define \(a\le _{sc} b\) if and only if one of the following cases hold:

  1. (a)
  2. (b)

    \(b_{k+1}=\_\)

  3. (c)

    \(a=b\)

Remark 4.2

The only difference between the definition of the index Morse order and the definition of the sublevel-connected Morse order is that we do not treat leaves and inner nodes differently anymore. Thus, both orders induce the same order on inner nodes and the same order on leaves, which makes the index Morse order and the sublevel-connected Morse order shuffle-equivalent. However, the order relation between a leaf and an inner node is in general different then in the index Morse order.

Remark 4.3

The fact that the sublevel-connected Morse order is a Morse order can be proved the same way as the corresponding statement Proposition 3.6 for the index Morse order was proved. There are just fewer case distinctions to be made for the sublevel-connected Morse order.

Lemma 4.4

Subtrees of T form intervals in \((V(T),\le _{sc})\).

Sketch of Proof

The proof is straightforward and uses the fact that all path words of a subtree \(T'\) start with the same couple of letters corresponding to the root of \(T'\). \(\square \)

The induced sublevel-connected labeling \(\lambda _{sc}\) and the induced sublevel-connected dMf \(f_{sc}\) are defined analogously to the index-ordered case:

Definition 4.5

Let T be a merge tree and P be a path such that the number of 1-simplices is i(T). We call the Morse labeling \(\lambda _{sc} :(V(T),\le _{sc}) \rightarrow \{0,1,\ldots , i(T)+l(T)-1\}\) induced by the sublevel-connected Morse order the sublevel-connected Morse labeling on T. The dMf \(f_{sc}=\lambda _{sc}\circ \phi \) induced by \(\lambda _{sc}\) is called the induced sublevel-connected dMf.

Example 4.6

Let T be the merge tree from Example 3.4. The sublevel-connected Morse labeling on T and the induced sublevel-connected dMf are given below.

figure m

There are now two things left to prove: that the map \(f_{sc}\) is indeed a sublevel-connected dMf and that it induces the given merge tree T.

Proposition 4.7

The induced sublevel-connected dMf \(f_{sc}\) is a sublevel-connected dMf that has only critical cells.

Proof

As a dMf induced by a Morse order, the map \(f_{sc}\) is by Proposition 3.23 a dMf that has only critical cells. It is left to prove that \(f_{sc}\) is sublevel-connected:

By Proposition 3.25, the connected components of sublevel complexes of (Pf) induce subtrees of T via \(\phi \). By Lemma 4.4, subtrees of T form intervals in \((T,\le _{sc})\). The sublevel-connected Morse labeling \(\lambda _{sc}\) by definition maps intervals of \((T,\le _{sc})\) to intervals of \({\mathbb {N}}_0\). By concatenation of these arguments, it follows that \(f_{sc}=\lambda _{sc} \circ \phi \) maps connected components of sublevel complexes to intervals of \({\mathbb {N}}_0\), i.e. the map \(f_{sc}\) is sublevel-connected. \(\square \)

Theorem 4.8

Let T be a merge tree and let P be a path such that the number of 1-simplices in P is i(T). Then \(f_{io}\) and \(f_{sc}\) are shuffle-equivalent where \(f_{sc}\) is the induced sublevel-connected dMf and \(f_{io}\) is the induced index-ordered dMf. Thus, \(M(P,f_{sc})\cong M(P,f_{io})\) holds as merge trees.

Proof

By Remark 4.2, the index Morse order and the sublevel-connected Morse order are shuffle equivalent. It follows by Corollary 2.27 and Definition 3.20 the the index-ordered dMf and the sublevel-connected dMf are shuffle equivalent. Thus, \(M(P,f_{sc})\cong M(P,f_{io})\) follows by Proposition 2.36, where \(f_{io}\) is the induced index-ordered dMf defined in Definition 3.20. \(\square \)

5 Relationships between merge trees and DMFs on paths

In this section we want to take a look at the bigger picture again and consider how we can relate dMfs on paths and trees to merge trees. In order to do this in a structured way, we consider the different sets of dMfs and merge trees and relate them to each other by bijections that are compatible with the various notions of equivalence we introduced earlier. Afterwards, we use said bijections in order to prove that the aforementioned dMfs \(f_{io}\), Definition 3.20, and \(f_{sc}\), Proposition 4.7, both represent the given merge tree. We also relate the sets of dMfs and merge trees mentioned here to the setting of Curry (2019).

Remark 5.1

In order to obtain bijections that are compatible with the various notions of equivalence, we restrict ourselves to the case of dMfs for which all simplices are critical. Since the induced merge tree does not take matched cells into account, we would otherwise need to define a notion of equivalence similar to Forman equivalence (see Johnson and Scoville 2022, Def 4.1) of dMfs that in particular takes simple homotopy equivalences as well as combinatorial aspects of dMfs into account. This could be done by additional pre- and post-composition of the equivalences as we defined them with simple homotopy equivalences that are compatible with the given dMfs. For simplicity, we chose to leave this aspect out of this work.

We denote the set of merge trees up to isomorphism by Mer and the set of dMfs on paths with only critical simplices up to symmetry equivalence by \(DMF^{\text {crit}}_P\). It follows by Proposition 2.48 that the assignment \(M(\_\,{,}\,\_)\) is well-defined on \(DMF^{\text {crit}}_P\). Furthermore, the construction of the induced dMf from Definition 3.20 extends to a map which we denote by \(\Phi \). Since \(\phi \) is well defined up to a choice of orientation, the map \(\Phi \) is in particular well defined up to symmetry equivalence. This leaves us with the diagram in Fig. 1.

Fig. 1
figure 1

Relationships Between Merge Trees and DMFs on Paths

The arrows induced by the index Morse order and the sublevel-connected Morse order are not left-inverse to the forget arrow as the following example shows. We have marked them in red because they are the only arrows that prevent the diagram from commuting completely. Nonetheless, it is obvious that the arrows induced by the two Morse orders are right-inverses of the forgetful arrow.

Example 5.2

Consider the following Ml trees and their corresponding Mo trees:

figure n

It is immediate the \((T,\lambda )\) and \((T',\lambda ')\) are neither isomorphic nor shuffle equivalent. Thus, \((T',\lambda ')\ncong (T,\lambda )= ({\text {forget}}(T',\lambda '),\lambda _{io}) \) holds. Nonetheless, the Ml tree \((T',\lambda ')\) induces an index-ordered dMf.

But we clearly have the following.

Remark 5.3

Let \(T,T'\) be isomorphic merge trees. Then \((T,\le _{io})\cong (T',\le _{io})\) and \((T,\le _{sc})\cong (T',\le _{sc})\) holds as Mo trees. Furthermore, we have \({\text {forget}} (T,\le _{io})\cong T \cong {\text {forget}}(T,\le _{sc})\) as merge trees.

We have already seen in Proposition 2.26 that the maps \({\text {iMo}}\) and \({\text {iMl}}\) are inverse to each other in the sense that they are bijections compatible with isomorphisms, order equivalences and shuffle-equivalences. We now show that \(M(\_\,,\_)\) and \(\Phi \) are also inverse to each other up to the respective notions of equivalence.

Theorem 5.4

The induced labeled merge tree \(M(\_\,,\_)\) and the induced dMf \(\Phi \) define maps that are inverse to each other in the following sense:

  1. (1)

    For any dMf (Pf) with only critical cells, the dMf \(\Phi (M(P,f),\lambda _f)\) is symmetry-equivalent to (Pf), and

  2. (2)

    For any Ml tree \((T,\lambda )\), the Ml tree \(M(\Phi T,f_\lambda )\) is isomorphic to \((T,\lambda )\).

Proof

  1. (1)

    Let (Pf) be a dMf on a path. We construct a symmetry equivalence between f and \(f_{\lambda _f}\). It is given as follows: For any simplex \(\sigma \) of \(\Phi M(P,f)\) there is exactly one simplex \(\tilde{\sigma }\) of P such that \(f(\tilde{\sigma })=f_{\lambda _f}(\sigma )\). This induces a bijection \(\varphi :P \rightarrow \Phi M(P,f)\) which is compatible with f,\(f_{\lambda _f}\) and \({\text {id}}_{\mathbb {R}}\) by definition. But in general, the map \(\varphi \) is not simplicial. This is because the simplex order on M(Pf) might be different than the left/right relation on the corresponding simplices of P. In other words, the map \(M(\_) :P \rightarrow M(P,f)\) is in general not compatible with the two different simplex orders. Nonetheless, the Morse labeling \(\lambda _f\) induced by f orders the nodes of M(Pf) in the same order as their corresponding simplices of P. Thus, connected components of sublevel complexes of (Pf) still correspond to subtrees of M(Pf). Since the induced merge tree assigns the chirality of child nodes according to which connected component carries the minimal value of f, at each inner node of M(Pf) the chirality of the two child nodes is either assigned in accordance with the left/right relation on the corresponding sublevel complex, or it is the opposite. If it is the opposite, this can be corrected by application of the reflection of the corresponding sublevel complex, that is, by application of a sublevel equivalence. In consequence, the difference between the right/left relation of the corresponding simplices in P and the simplex order only lies in symmetry equivalences of P. Thus, \(\varphi \) can be decomposed into a symmetry equivalence of P and a simplicial isomorphism \(\tilde{\varphi }\). Hence, \((\varphi ,\psi )\) is a symmetry equivalence of dMfs on paths.

  2. (2)

    Let \((T,\lambda )\) be an Ml tree. Let \(c_0<c_1<\cdots <c_n\) be the critical values of \(f_{\lambda }\) and let \(\sigma _i \in \Phi T\) such that \(f_\lambda (\sigma _i)=c_i\). We recall that the induced merge tree M defines in particular a bijection between the critical simplices of \(\Phi T\) and the nodes of \(M(\Phi T,f_\lambda )\). For any simplex \(\sigma \in \Phi T\), we denote the node of \(M(\Phi T,f_\lambda )\) that corresponds to \(\sigma \) by \(M(\sigma )\). An isomorphism \(\varphi :(T,\lambda )\rightarrow M(\Phi T,f_\lambda )\) is given by \(\varphi :=M\circ \phi ^{-1}\). It is immediate that \(\varphi \) is a bijection because M and \(\phi \) are. Furthermore, \(\varphi \) is by construction compatible with the respective Morse labelings. It is only left to show that \(\varphi \) is compatible with the chiral child relation and the respective roots.

    Consider \(\sigma _n\in \Phi T\). For both trees, the simplex \(\sigma _n\) corresponds to the root of the respective tree. In \(M(\Phi T,f_\lambda )\) this is the case because \(\sigma _n\) carries the maximal value of \(f_\lambda \). In \((T,\lambda )\) this holds because \(\phi (\sigma _n)\) holds the maximal Morse label \(\lambda (\phi (\sigma _n))=c_n\). Thus, the map \(\varphi \) maps the root of \((T,\lambda )\) to the root of \(M(\Phi T,f_\lambda )\).

    Let \(\sigma _i\) be a simplex of \(\Phi T\). We now prove that \(\varphi \) is compatible with the chiral child relation, that is, that / holds. If \(\sigma _i\) is a 0-simplex then there is nothing to show because then both \(M(\sigma _i)\) and \(\phi (\sigma _i)\) are leaves. Let \(\sigma _i\) be a critical edge with chirality L. The case for chirality R works symmetrically to the case with chirality L.

    By Construction 2.14, the node / corresponds to a critical simplex of the connected component of \(\Phi T_{c_i-\varepsilon }\) that / the minimal value of \(f_\lambda \) on these two connected components. Furthermore, the node / corresponds to the critical simplex that carries the maximal value of \(f_\lambda \) of the respective connected component of \(\Phi T_{c_i-\varepsilon }\).

    By application of Proposition 3.25, we see that the connected components / induce subtrees of \((T,\lambda )\) via \(\phi \). It follows that the node / is contained in the subtree that corresponds to / via \(\phi \) because by (2) of Definition 2.17 the subtree with root does/ carry the minimal Morse label of the subtree with root \(\phi (\sigma _i)\) in \((T,\lambda )\). Furthermore, the node / corresponds to the simplex that carries the maximal value of \(f_\lambda \) of / because by (1) of Definition 2.17 it carries the maximal Morse label on said subtree and because \(\phi \) is order-preserving. Thus, / holds.

\(\square \)

By considering Fig. 1 we see that the difference between taking the induced merge tree of a dMf on a path is the same as taking its induced Ml tree and forgetting the Morse labeling. Thus, constructing a dMf that represents a given merge tree T is up to symmetry equivalence the same as choosing a Morse order on T. This leads us to:

Theorem 5.5

Let T be a merge tree and let P be a path such that the number of 1-simplices in P is i(T). Then \(T\cong M(P,f_{io})\cong M(P,f_{sc})\) holds as merge trees where \(f_{io}\) denotes the induced index-ordered dMf (Definition 3.20) and \(f_{sc}\) denotes the sublevel-connected dMf (Definition 4.5).

Proof

The statement follows by Theorem 5.4, Proposition 2.26, and the fact that by Definition 2.23, isomorphisms of Mo trees are in particular isomorphisms of the underlying merge trees. Furthermore, \(M(P,f_{io})\cong M(P,f_{sc})\) holds by Theorem 4.8. \(\square \)

Using the notion of component-merge equivalence, Definition 2.50, we can extend Theorem 5.4 to a bijection between the set of dMfs with only critical simplices on trees up to cm equivalence \(DMF^{\text {crit}}_X\) and the set of Ml trees up to isomorphism MlT:

Theorem 5.6

The induced labeled merge tree \(M(\_\,{,}\,\_)\) and the induced dMf \(\Phi \) define maps that are inverse to each other in the sense that:

  1. (1)

    For any dMf (Xf) with only critical cells, the dMf \(\Phi (M(X,f),\lambda _f)\) is cm-equivalent to (Xf), and

  2. (2)

    For any Ml tree \((T,\lambda )\), the Ml tree \(M(\Phi T,f_\lambda )\) is isomorphic to \((T,\lambda )\).

Proof

The proof for statement (2) works exactly as in the proof for Theorem 5.4 because symmetry equivalences are in particular cm equivalences. For (1) we apply Proposition 2.53 to consider a representative of the cm equivalence class of (Xf) which is a dMf on a path \((P,f')\). By Proposition 2.52, the isomorphism type of the induced Ml tree does not depend on this choice. Thus, Theorem 5.4 implies that \(\Phi (M(P,f'))\) is symmetry-equivalent to \((P,f')\). Since \((P,f')\) is cm-equivalent to (Xf), so is \(\Phi (M(P,f'))\). \(\square \)

Corollary 5.7

Let T be a merge tree. By Theorems 5.5 and 5.6 it follows that there are dMfs on trees (Xf) such that \(M(X,f)\cong T\) as merge trees.

Corollary 5.8

Applying Theorem 5.6 together with Propositions 2.26 and 2.40 yields the result that there is a bijection \(DMF_X^{crit}/_{\sim }\cong MoT\) where \(\sim \) denotes order equivalence.

We conclude this section by discussing our results and comparing them to the results of Curry (2019). Using the bijections appearing in Fig. 1 and Theorem 5.6 we replaced the question of finding dMfs on paths or arbitrary trees that represent a given merge tree T by finding Morse orders on T instead. This argument can be used to replace the question of classifying merge equivalence classes of dMfs on trees by classifying Morse orders. Example 5.2 tells us that, if a merge tree T has at least three leaves, there might be different Morse orders on T which are not shuffle-equivalent. That is, there are dMfs on trees (Xf) contained in the image of \(\Phi \circ iMl\) which induce T as their merge tree but are neither isomorphic, nor symmetry-equivalent, nor cm-equivalent, nor shuffle-equivalent, nor a combination of the four to each other. We found a non-empty shuffle equivalence class of Morse orders on any merge tree, defined by either the index Morse order or the sublevel-connected Morse order, since the two have been shown to be shuffle-equivalent and, hence, merge-equivalent in Theorem 4.8. This allowed us to answer the aforementioned question of Johnson–Scoville affirmatively. That is, any merge tree is indeed represented by a dMf on a path, which is induced by a Morse order. Using a non-trivial cm equivalence, one can also find a dMf on a tree other than a path as a representative.

Furthermore, our results from Sects. 2.1, 2.2 and 5 allow us to structure the study of the set of merge equivalence classes of dMfs on trees using the following four notions of merge-invariant equivalences between dMfs on trees: Forman equivalence, symmetry equivalence, cm equivalence, and shuffle equivalence.

We discussed in Remark 5.1 how Forman equivalences could be considered together with the other notions of equivalence and why we left Forman equivalences out of this work. In Theorem 5.4 it becomes quite clear that passing to the induced Ml tree identifies symmetry-equivalent dMfs with each other up to isomorphism. Passing from the induced Ml tree to the induced Mo tree then identifies dMfs up to order equivalence with each other up to isomorphism of the underlying Mo tree. Last of all, passing from the induced Mo tree to the induced merge tree in particular identifies shuffle-equivalent dMfs with each other. This allows us to study the different equivalence classes separately for dMfs on paths. The more liberal notion of cm equivalence, Definition 2.50, allowed us to generalize Theorem 5.4 to dMfs on arbitrary trees as seen in Theorem 5.6.

In Curry (2019), the author establishes a bijection between graph-equivalence (Curry 2019, Def 6.1) classes of Morse-like (Curry 2019, Def 6.9) continuous functions on the interval that attain minima at the boundary on the one hand and isomorphism classes of chiral merge trees (Curry 2019, Def 5.3) on the other hand.

At first glance it might seem likely that Ml trees in the sense of Definition 2.19 and chiral merge trees in the sense of Curry (2019, Def 5.3) are directly related by geometric realization and considering the corresponding abstract simplicial complex but, as mentioned in the introduction, there is a subtle difference in the construction of the induced merge tree. To be precise, the two constructions only differ in the induced chirality. In Curry (2019, Sec 5) the chirality is given by which of the two merging components is the left or right one with respect to the chosen orientation on the interval. In Johnson and Scoville (2022) the chirality is given such that drawing the induced merge tree is compatible with the elder rule: The component with the minimal value gets the same chirality as the merged component. This means that following the same chirality leads to the oldest component.

This convention leads to the necessity to assume property (2) of Definition 2.17: a certain compatibility between the Morse order and the chirality. The compatibility between Morse orders and the chirality implies, as seen in Proposition 2.48, that the induced Ml tree does not distinguish between symmetry-equivalent dMfs. If one defines induced Ml trees analogously to Curry (2019), that is by inducing the chirality by a chosen orientation of the path, this notion of induced Ml trees would distinguish symmetry-equivalent dMfs on paths. Moreover, Ml trees induced by symmetry-equivalent dMfs would be related by sequences of reflections of subtrees. The definition could be as follows:

Definition 5.9

Let T be a merge tree. A Curry Morse order is a total order \(\le \) on the nodes of T such that the maximal node of any subtree is the root of said subtree. A Curry Morse labeling on a merge tree T is a labeling \(\lambda \) on the nodes of T that induces a Curry Morse order on T.

A pair \((T,\le )\) of a merge tree with a Curry Morse order on it is called a Curry Morse ordered merge tree (CMo tree). A pair \((T,\lambda )\) of a merge tree with a Curry Morse labeling on it is called a Curry Morse labeled merge tree (CMl tree).

Let \(f:P \rightarrow {\mathbb {R}}\) be a dMf where P is an oriented path. Then the CMl tree induced by f is constructed as is Construction 2.14 with the difference that the chirality is assigned according to the position of the corresponding connected components with respect to the orientation instead of according to critical values.

Remark 5.10

CMl trees as defined above are basically the same concept as generic merge trees as defined in Curry et al. (2021, Def 2.2). We stick to the name CMl trees instead of generic merge trees because we already use the term merge tree in a different way.

Example 5.11

We consider two of the symmetry-equivalent dMfs from Example 2.47 and see how the induced CMl tree distinguishes them whereas the induced Ml trees identifies them as one:

figure o

The notion of CMl trees is related to the notion of chiral merge trees in the sense of Curry (2019) by the interplay between abstract and geometrical simplicial complexes. In detail, the bijection is given as follows:

Construction 5.12

Let \((T,\lambda )\) be a CMl tree. We define a chiral merge tree \(|(T,\lambda )|\) associated to \((T,\lambda )\) as follows:

The compact rooted tree is given by the geometric realization \(|T |\). We attach a distinguished edge \(e_\infty \) to the vertex which corresponds to the root of T in order to obtain a cell complex which we will by abuse of notation also refer to as \(|T |\). The map \(\pi :|T |\rightarrow {\mathbb {R}}\) is given by \(\lambda \) on vertices, and by a linear extension of \(\lambda \) on edges.

For the other way around let \(\pi :T \rightarrow {\mathbb {R}}\) be a chiral merge tree in the sense of Curry (2019, Def 5.3). We define an Ml tree \({\text {abs}}(T)\) associated to T as follows:

We take the 0-skeleton \(T_0\) as the vertex set and the 1-skeleton \((T\setminus \{e_\infty \})_1\) as the set of edges. We define the node which corresponds to \(v_\infty \) to be the root of \({\text {abs}}(T)\). The labeling \(\lambda \) is given by \(\pi \).

The proof that the two constructions are inverse to each other is straightforward.

Furthermore, there is a similar bijection between the two notions of Morse functions:

Construction 5.13

Let (Pf) be a dMf with only critical cells on an oriented path. We define a Morse-like function \(\tilde{f}\) on the interval which attains minima at the boundary as follows:

Let \(k+1\) be the number of 0-simplices in P. We denote the 0-simplices of P by \(n_0,n_1,\ldots , n_k\) from left to right with respect to the given orientation. Then we define \(\tilde{f}(\frac{i}{k}):=f(n_i)\) for \(i\in \{0,1,\ldots ,k\}\). We denote the 1-simplices of P by \(e_1, \ldots , e_k\), again according to the given orientation. Then we define \(\tilde{f}(\frac{2i-1}{2k}):=f(e_i)\) for \(i\in \{0,1,\ldots ,k\}\). We define \(\tilde{f}\) on the rest of the interval as the linear extension. This makes \(\tilde{f}\) a distinct-valued PL function that attains minima at the boundary. Hence, \(\tilde{f}\) is Morse-like.

For the other way around let \(f:I \rightarrow {\mathbb {R}}\) be a Morse-like function that attains minima at the boundary. We define a path P and a dMF \(f'\) on P as follows:

Let \(n_0,n_1,\ldots , n_k\) be the local minima of f ordered by the orientation on I, so in particular \(n_0=0\) and \(n_k=1\). We define P to be a path with \(k+1\) simplices of dimension 0. We choose one of the endpoints to be denoted by \(s_0\) and the one by \(s_k\). We denote the other 0-simplices such that their indices are in accordance with their position in the simplex order (Definition 3.15), making \(s_0\) the minimal simplex with respect to the simplex order. The dMf \(f'\) is defined by \(f'(s_i):=f(n_i)\) on 0-simplices. Let \(c_1,\ldots ,c_k\) be the local maxima of f, ordered in accordance to the orientation on I, and let \(e_1,\ldots , e_k\) be the 1-simplices of P, ordered in accordance to the aforementioned simplex order on P. Then \(f'\) is defined by \(f'(e_i):=f(c_i)\) on 1-simplices.

It is easy to check that the two given constructions are inverse to each other.

A theorem which, analogously to Theorem 5.4, defines a pair of inverse bijections \(M_C(\_~ , \_) :^+DMF^{\text {crit}}_P\leftrightarrow CMlT:\Phi \) can be proved similarly to the proof of Theorem 5.4. The difference is that the induced CMl tree keeps track of symmetry equivalences in the sense that symmetry equivalences of dMfs induce reflections at roots of subtrees on the induced CMl trees. The map \(\Phi \) can be defined the same way as before. Alternatively, one could define the bijection \(\Phi \) as the composition \( {\text {abs}} \circ \Psi ^{-1}\circ |\_ |\) in the diagram in Fig. 2:

Here \(\Psi \) denotes the bijection between the set of Morse-like functions on the interval \(\mathcal {M}\) and the set of chiral merge trees \(\mathcal {X}\) from Curry (2019, Cor 6.11). The map i is the inclusion induced by considering Ml trees as CMl trees. Ml trees can be considered as a special kind of CMl trees because they only differ in the additional property (2) of Definition 2.17 which does not need to hold for CMl trees. The map \(/_{symm}\) is the quotient map that identifies symmetry equivalent dMFs. The map \(o_{JS}\) is defined as the composition \(\Phi \circ i \circ M(\_\,{,}\,\_)\). This definition coincides with choosing the representative of a dMf (Pf) with respect to symmetry equivalence such that the simplex order on P is compatible with f in the following way: At each critical edge e with \(f(e)=c\) the connected component of \(P_{c-\varepsilon }\) that corresponds to is left/right of the edge e with respect to the orientation induced by the simplex order. Here we recall that M(e) denotes the inner node of M(Pf) that corresponds to the critical edge e and that denotes the denotes the left/right child node of M(e). In Example 5.11 we have \(o_{JS}(P,g)=(P,f)\) where (Pf) is oriented from left to right.

The map JS is defined as \(JS :=M(\_\,{,}\,\_) \circ /_{symm} \circ \Phi \). This definition coincides with division by the equivalence relation generated by reflections of subtrees.

Example 5.14

We consider how a sequence of reflections of subtrees maps the CMl trees from Example 5.11 to each other. Here, we denote by \(a_\lambda \) the reflection of the subtree with root labeled \(\lambda \).

figure p

The proof that the two possible definitions for \(\Phi \) coincide and that the diagram from Fig. 2 commutes are straightforward.

As a result, the map \(\Phi \) can be seen as a discrete version of the map \(\Psi \) from Curry (2019, Cor 6.11). Moreover, moving from the setting of Curry (2019) to the setting of Johnson and Scoville (2022) basically means to divide by symmetry equivalences which allows the authors of Johnson and Scoville (2022) to generalize the construction of the induced merge tree to dMfs on trees. In order to extend our generalization Theorem 5.6 to the oriented case, one would need to find a notion of orientation-preserving cm equivalences which distinguishes symmetry-equivalent dMfs.

Fig. 2
figure 2

Relationship to the continuous case

6 Further directions and possible applications

In this section we want to take a look at possible applications of our results. The structured overview of the different notions of equivalence of discrete Morse functions and their connections to each other might be useful to explore the space of discrete Morse functions on a given simplicial complex. Even though the construction of the induced merge tree from Johnson and Scoville (2022) does not easily extend to arbitrary simplicial complexes, the notions of equivalence from this article do. Hence, one could try to use e.g. the notion of symmetry equivalence to structure the space of discrete Morse functions in a nice way, i.e. into orbits of a groupoid action. In a second step, one could then try to define the space of merge trees as a quotient of the space of discrete Morse functions on some “large enough” simplicial complex. With such a construction, one could assemble the results from this article and the results from Curry et al. (2021) into an analysis of a larger instance of the persistence map.

Aside from this, one could try to generalize and enhance the construction of the induced merge tree from Johnson and Scoville (2022) to arbitrary simplicial complexes. Then, in a second step, one could try to use the induced merge tree to find possible cancellations of pairs of critical simplices. This way, the induced merge tree might be helpful to optimize discrete Morse functions.

Furthermore, one could study the possible Morse orders on a given merge tree. With a classification of all Morse orders on a given merge tree T, one could classify all discrete Morse functions on any given tree that induce T as the induced merge tree with the help of Definition 3.20 and cm equivalences.

Ultimately, the proofs of Theorem 5.6 and all the lemmas that lead to it describe exactly which information is lost when considering the induced Ml tree instead of the original dMf. This knowledge might be useful for applications in TDA because it tells the user which kind of features will not be seen by the induced merge tree, and hence, by the persistent zeroth homology and the barcode. Moreover, the knowledge about the exact lost information can be used to enhance the induced merge tree with extra structure such that it no longer disregards certain desired information.