1 Introduction

In recent years, the impressive growth of data and their heterogeneity has increased the demand for new ways of visualizing and analyzing data. To this purpose, many techniques rooted in shape analysis have turned out to be successful, in particular those based on topology Heine et al. (2016).

Topology-based techniques. Most of topology-based techniques find their theoretical roots in the interplay between homology and critical points of functions as provided by Morse Theory Milnor (1963). Homology is an algebraic theory to detect topological features of a domain such as connected components, loops, cavities and higher-dimensional holes, each counted by its corresponding Betti number. Morse Theory establishes a link between critical points and Betti numbers. In particular, weak Morse inequalities state that the number of critical points of functions, called Morse functions, bound from above the Betti numbers of the domain. In case of equality, the Morse function is called a perfect function as the critical points of such function provide an optimal bound for the Betti numbers of that domain. Not all domains admit a perfect function. Only in a few cases, such as for PL triangulated n-spheres Eells and Kuiper (1962), the existence of a perfect function is guaranteed. This explains why tighter properties or low dimensions are usually assumed on the domain in order to ensure perfectness.

In the context of visual analytics and data analysis, the above mentioned interplay has produced successful strategies. In the former case, Morse Theory is exploited in topological consistent segmentation techniques of scalar field domains: the key notion of a Morse complex associated to a discrete gradient vector field, where integral lines connect critical points, provides a simplified representations De Floriani et al. (2015). In the latter case, the demand for meaningful concise representations of heterogeneous data motivates Topological Data Analysis - TDA Carlsson (2009). In the pipeline of TDA, one starts from a point cloud representing data with unknown structure. Some combinatorial shape is associated to the point cloud, e.g., a simplicial complex. Such simplicial complex is filtered by a nested sequence of complexes, called a filtration, e.g., by taking sublevel sets with respect to some measurements on data. Persistent homology Edelsbrunner and Harer (2010) gives a representation of homological changes along the filtration. The signature thus obtained as data summary is called a persistence diagram.

Interplay between persistent homology and Morse theory. In order to relate persistent homology to Morse theory, it is usual to resort to the Forman’s discrete counterpart to Morse theory Forman (1998). The crucial observation is that birth-death values in a persistence diagram correspond to pairings of critical cells with respect to a discrete gradient vector field which is somehow “consistent” with persistence in the sense that persistent homology is preserved in the associated Morse complex. On the one hand, this property is used as a data-driven way of removing noise, for instance in 3D-scalar field visualization Fellegara et al. (2014) to remove low persistence critical pairs via cancellations Forman (1998). On the other hand, discrete Morse theory provides a preprocessing tool to reduce the amount of data on which to compute persistent homology by retaining the meaningful information in terms of critical cells Mischaikow and Nanda (2013). In this sense, by considering only those critical cells corresponding to births and deaths of persistence, one can consider the associated Morse complex being optimal. For instance, the advantage of the algorithm in Robins et al. (2011) over the one in King et al. (2005) is that it retrieves all and only the critical cells that correspond to births and deaths in persistence, at least for complexes of up to dimension 2 if simplicial, and embedded in the 3D-Euclidean space if cubical. Here, the dimensional bound for simplicial complexes or the Euclidean embedding for cubical complexes exclude some shapes known not to admit perfect functions (such as the “dunce hat” shown in Fig. 5). Making this notion of optimality explicit in a way generalizable to the case of multivariate data is one of the aims of this paper.

Interpreting and analyzing multivariate data. Nowadays, one of the greatest challenges in visual analytics and data analysis consists in representing and interpreting multivariate data, that is data measured by multiple filtering functions or directly given in the form of vector fields, such as simulations based on models with partial differential equations, e.g., computational fluid dynamics, electromagnetic fields, or weather forecasts. However, multivariate data are often too large to be processed and their entire information is typically not derivable from methods independently acting on single components.

In this work, we address the problem of detecting the most significant piece of hidden information in multivariate data, and we try to give theoretical insights to the problem of capturing the interdependence among component values stated in Kehrer and Hauser (2013). An example of Morse-based techniques applied to visual analytics over multivariate data is provided in Iuricich et al. (2016). Therein, a discrete gradient vector field simultaneously consistent with two scalar fields (temperature and pressure) is applied to segment the Hurricane Isabel dataset: the hurricane’s eye is detected as the largest cluster of critical cells of the gradient vector field. In general, not all discrete gradient vector fields need to have the same amount of critical cells. This motivates us in investigating minimality in terms of number of cells. To address that, our strategy consists in generalizing to the multi-parameter case the perfectness-optimality properties derived from the interplay between (persistent) homology computation and discrete Morse Theory. All along the paper, the case of vectorial data or multiple measures will be called multi-parameter case as opposed to the one-parameter case of scalar field data and single measures.

Multi-parameter Persistent Homology - MPH Carlsson and Zomorodian (2009) is a natural generalization of the usual one-parameter persistent homology where the application of homology to a multi-parameter filtration provides a multi-parameter persistence module. The multi-parameter case is much more complex than the one-parameter one in terms of both encoding of information and computability Cagliari et al. (2010). Unfortunately, a multi-parameter counterpart to (discrete) Morse theory is only partially developed in Allili et al. (2017).

However, some analogies still hold. these analogies to the one-parameter case are related to the possibility of computing discrete gradient vector fields being consistent with a multifiltration, meaning by that, that the associated Morse complex preserves the MPH information. Motivated by this fact, the algorithms (Allili et al. 2017; Allili et al. 2017; Iuricich et al. 2016) retrieve a discrete gradient vector field consistent with a multi-filtration. The Morse-based reduction preprocessing for computing MPH invariants is shown to be effective in Scaramuccia et al. (2020).

The construction of such gradient vector field is efficiently achieved, actually in linear time in Iuricich et al. (2016) and Allili et al. (2017) whenever the worst-case size of a cell star is negligible with respect to the whole complex size. The algorithm in Iuricich et al. (2016) improves that in Allili et al. (2017) in terms of speed but it is equivalent to it in terms of retrieved critical cells Scaramuccia et al. (2020). However, even for these algorithms, the question about whether they retrieve the minimum, also known as optimal, number of critical cells necessary to get the same persistence modules was left as an open problem. In contrast, as mentioned above, it was answered positively, at least in low dimensions, for one-parameter filtrations in Robins et al. (2011).

Having the guarantee from the above mentioned papers that discrete gradient vector fields consistent with given multi-filtrations can be easily constructed, it is now of key interest to understand whether it is possible to achieve the minimum number of critical cells while preserving persistent homology. In order to answer to this question, it is convenient to develop an analogue for multi-parameter persistent homology of the well-known standard Morse inequalities that relate the number of critical cells of a discrete gradient vector field to the Betti numbers of the underlying cell complex.

Contributions. As a first contribution of this paper, we show that an analogue for multi-parameter persistent homology of the well-known standard Morse inequalities can be obtained by replacing Betti numbers by a sort of relative Betti numbers defined using the dimension of the relative homology of subsequent sublevel sets. Therefore, by analogy with usual perfectness in Morse theory Lewiner et al. (2003), we define relative-perfectness as the property of attaining an equality between its critical cells and such relative Betti numbers. This provides a new optimality criterion for any algorithm retrieving a discrete gradient vector field compatible with a multi-filtration.

We observe that for one-parameter filtrations, relative-perfectness simply means that each critical cell corresponds to a positive (i.e., giving birth) or negative (i.e., giving death) cell of exactly one persistence pair. This is the same property yielding optimality in Robins et al. (2011). To go a little bit further, it is crucial to ask what kind of information the critical cells can carry about the corresponding persistence modules. In the context of multi-parameter persistent homology, births and deaths are not paired in a single invariant like the persistence diagram, but separately detected by invariants known as Betti tables Eisenbud (2005). The zeroth Betti table \(\xi _0\) detects births and the first Betti table \(\xi _1\) detects deaths. For a bi-filtration there is also a second Betti table \(\xi _2\). As observed in Knudson (2008), births and deaths in multi-parameter persistent homology do not necessarily happen due to the entrance of “real” critical cells in the multi-filtration, but can also be ascribed to the appearance of “virtual” critical cells. The latter are detected by the second Betti table \(\xi _2\). For a general multifiltration with n-parameters there might be non-trivial \(\xi _0, \dots , \xi _n\) Betti tables.

Our second contribution of this paper consists of inequalities showing that, for general discrete gradients consistent with a bi-filtration, the number of critical cells bounds from above a linear combination of values from Betti tables thus providing an estimation of the latter ones. In addition, in the case when the gradient vector field is relative-perfect, we can even deduce double inequalities with the number of critical cells bounding from below the number of births and deaths captured by \(\xi _0\) and \(\xi _1\), up to those due to “virtual” cells captured by \(\xi _2\).

Since one of our inequalities holds under the relative-perfectness assumption, as a last contribution, we prove that relative-perfectness for multi-filtrations can be actually achieved by algorithms (Allili et al. 2017; Iuricich et al. 2016), at least in the case of simplicial complex domains of dimension 2. Analogously to the one-parameter case, in Robins et al. (2011) this can be seen as an optimality property among all consistent discrete gradients.

Organization of the paper. In Sect. 2, we review the technical tools for this paper: combinatorial cell complexes and their homology, filtrations and persistent homology, Betti tables of persistence modules, combinatorial Morse theory. We conclude the section illustrating some known connections between persistent homology and discrete Morse theory. In Sect. 3, we introduce the notions of multi-parameter Morse numbers and relative-perfectness for a discrete gradient vector field consistent with a multi-filtration and show, through their mutual relations, the link to the optimality notion. We also show the consistency of the new definitions with known results, in the case of one-parameter persistent homology, precisely connecting Morse numbers and births and deaths instants. In Sect. 4, we extend such connection to the case of bi-filtrations showing the relation between Morse numbers and Betti tables for relative-perfect gradient vector fields. In Sect. 5, we prove that for simplicial complexes of dimension 2 any generic assignment on the vertices permits the algorithmic construction of such relative-perfect gradient vector fields. Section 6 contains a brief discussion on potentialities of these results and open questions.

2 Preliminaries

2.1 Cell complexes and their homology

Intuitively, cell complexes are objects that can be decomposed into elementary pieces with simple topology, known as cells, and glued together along their boundaries, themselves decomposed into faces. In this paper we describe cell complexes following the combinatorial framework of Lefschetz (1942). Such abstraction turns out useful to describe the discrete Morse complex and its homology.

By a cell complex we mean a finite set K, whose elements are called cells, with a gradation \(K_q\), \(q\in {\mathbb {Z}}\), and an incidence function \( \kappa :K\times K\rightarrow {\mathbb {F}}\) over a field \({\mathbb {F}}\), such that: (i) \(K_q =\emptyset \) for \(q < 0\), (ii) for every cell \({\tau }\in K\) there exists a unique number q, called the dimension of \({\tau }\) and denoted \(\dim {\tau }\), such that \({\tau }\in K_q\), (iii) \(\kappa ({\tau },\sigma )\ne 0\) implies \(\dim {\tau }= \dim \sigma + 1\), (iv) for each \({\tau }\) and \(\sigma \) in K, \(\sum _{\rho \in K}\kappa ({\tau },\rho )\cdot \kappa (\rho ,\sigma ) = 0\). The dimension of a cell complex is the maximal dimension of its cells. The nine shapes in Fig. 1 are examples of cell complexes whose dimensions range from 0 to 2.

A facet of \({\tau }\) in K is a cell \(\sigma \) such that \(\kappa ({\tau }, \sigma )\ne 0\). Reciprocally, \({\tau }\) is a cofacet of \(\sigma \). Moreover, \(\sigma \) is a face of \({\tau }\) and \({\tau }\) is a coface of \(\sigma \) if there is a sequence of cells ordered by the facet relation starting with \(\sigma \) and ending with \({\tau }\). A subcomplex A of K is a subset of K such that the restriction of the incidence function to \(A\times A\) turns A into a cell complex.

Simplicial complexes are an important class of cell complexes whose cells and face relations admit a fully combinatorial treatment. The cells of dimension \(q\ge 0\) in a simplicial complex are called q -simplices. Points, edges, triangles and tetrahedra correspond to q-simplices with q equal to 0, 1, 2, and 3, respectively. Assume a total ordering of \(K_0\) is given and every simplex \(\sigma \) in K is coded as \([v_0, v_1, \dots , v_q]\), where the vertices \(v_0, v_1, \dots , v_q\) are listed according to the prescribed ordering of \(K_0\). The incidence function

$$\begin{aligned} \kappa ({\tau }, \sigma ) := \left\{ \begin{array}{ll} (-1)^i &{} \text{ if } {\tau }= [v_0,v_1, \ldots ,v_q] \text{ and } \sigma = [v_0,v_1, \ldots ,v_{i-1},v_{i+1},\ldots ,v_q]\\ 0 &{} \text{ otherwise. }\end{array}\right. \end{aligned}$$

describes the incidence relations among simplices.

For a cell complex K and for all \(q\in {\mathbb {Z}}\), we let \(C_q(K)\) be the vector space generated by \(K_q\) over \({\mathbb {F}}\). We define a linear map called the boundary operator \(\partial _q:C_q(K)\longrightarrow C_{q-1}(K)\) by setting

$$\begin{aligned} \partial _q({\tau }) :=\sum _{\sigma \in K_{q-1}}\kappa ({\tau }, \sigma )\sigma \end{aligned}$$

The pair \((C_*(K),\partial _* )\) is by definition the chain complex of K. We define the homology of K as the homology of its chain complex: \(H_q(K)=\ker (\partial _q)/\mathrm { im} (\partial _{q+1})\), where, as usual, for any linear map h, the notations \(\ker (h)\), \({{\,\mathrm{im}\,}}(h)\) and \({{\,\mathrm{coker}\,}}(h)\) denote the kernel, the image, and the cokernel of h respectively, and we will make use of it all along the paper.

In the case of a simplicial complex one obtains the usual simplicial homology. The dimension of the vector space \(H_q(K)\) is often denoted by \(\beta _q(K)\), and called the qth Betti number of K. Betti numbers reveal topological features such as the number of holes of the cell complex. In particular, \(\beta _0\), \(\beta _1\), \(\beta _2\) are the number of connected components, tunnels, and voids, respectively.

In what follows we will be interested in applying homology to increasing families of subcomplexes in order to turn homology into a tool for analyzing cell complexes at multiple scales.

2.2 Multi-filtrations and multi-parameter persistent homology

In its original setting, the persistent homology of a cell complex is defined as the homology of a nested family of subcomplexes parameterized by a single index. Nevertheless, generalizations have been proposed which originate from different choices of the set of parameters. In this paper we will be interested in considering families of nested subcomplexes depending on \(n\ge 1\) integer parameters. For every \(u=(u_i),v=(v_i)\in {\mathbb {Z}}^n\), we write \(u\preceq v\) if and only if \(u_i\le v_i\) for \(1\le i\le n\). To specify that \(u\preceq v\) and \(u_j<v_j\) for some index j, we also write \(u \precneqq v\).

An n-filtration (generally speaking, a multi-filtration) of a cell complex K is a family \({{\mathcal {K}}}=\{K^u\}_{u\in {\mathbb {Z}}^n}\) such that \(K^u\) is a subcomplex of \(K^v\) whenever \(u\preceq v\), \(K^u=\emptyset \) for \(u\preceq 0\), and \(K^u=K\) whenever u is sufficiently large. The value of the parameter u will be called the filtration grade.

A multi-filtration of a cell complex K is said to be one-critical if, for every \(\sigma \in K\), there exists one and only one filtration grade \(u\in {\mathbb {Z}}^n\) such that \(\sigma \in K^u-\bigcup _{i=1}^nK^{u-e_i}\), with \(e_1,e_2,\ldots , e_n\) denoting the standard basis of \({\mathbb {Z}}^n\), where \(e_i\) indicates the element of \({\mathbb {Z}}^n\) with all entries equal 0 except for the ith entry equal 1. Throughout this paper we will always assume multi-filtrations to be one-critical, thus dropping the term one-critical for brevity. Moreover, we often refer to a multi-filtration as a multi-filtered complex.

Applying homology to a multi-filtered cell complex now yields multi-parameter persistent homology. Denoting by \(H_q(\cdot )\) the qth homology functor, for any n-filtration \({{\mathcal {K}}}=\{K^u\}_{u\in {\mathbb {Z}}^n}\) of a cell complex, we obtain the n-parameter (generally speaking, multi-parameter) persistence module \({{\mathbb {V}}}=\{{{\mathbb {V}}}_u,i_{{\mathbb {V}}}^{u,v}\}_{u\preceq v\in {\mathbb {Z}}^n}\) with \({{\mathbb {V}}}_u=H_q(K^u)\) and \(i_{{\mathbb {V}}}^{u,v}=i_q^{u,v}:H_q(K^u)\rightarrow H_q(K^v)\) induced by the inclusion maps \(K^u\hookrightarrow K^v\). An example of n-filtration with \(n=2\) together with its persistence module for the homology degree \(q=0\) is shown in Fig. 1.

Fig. 1
figure 1

On the left, a 2-filtered simplicial complex \({\mathcal {K}}\). By applying homology in degree 0 to \({\mathcal {K}}\), the persistence module \({\mathbb {V}}\) is shown in the middle. For each filtration grade, the corresponding \({\mathbb {F}}\)-vector space is represented by the span of its generators, one for each connected component. The inclusion maps between subsequent cell complexes in the 2-filtered complex correspond to linear maps between vector spaces in the persistence module, which can be represented as matrices with respect to the chosen generators. On the right, we show the Betti tables \(\xi _i\) with \(i=0,1,2\) are depicted. From top to bottom respectively, the non-null values capture the multigrades in the filtration with new born homology classes (\(\xi _0\)), deaths of homology classes (\(\xi _1\)), and relations among previously independent deaths of homology classes (\(\xi _2\))

The rank of linear maps \(i_q^{u,v}\) provides a continuously parameterized family of Betti numbers \(\beta _q(u,v)\), called persistent Betti numbers Cerri et al. (2013) or rank invariant Carlsson and Zomorodian (2009), giving the number of q-holes in K that persist at least from u to v along the filtration. When \(n=1\), we obtain persistence intervals with endpoints \(u<v\). A maximal interval with endpoints \(u<v\) signals that at grade u a q-cell \(\sigma \), therefore called a positive cell, enters into the filtration creating a new class in \(H_q(K^u)\) that did not exist in \(H_q(K^{u-1})\), while at grade v a \((q+1)\)-cell \({\tau }\), therefore called a negative cell, enters into the filtration killing the class created by \(\sigma \).

From a different perspective, as observed in Carlsson and Zomorodian (2009), the instants when a homology class is created or destroyed along a multi-parameter filtration are captured by Betti tables of the persistence modules seen as graded modules over a polynomial ring. More precisely, for \({{\mathbb {V}}}\) a finitely presented n-parameter persistence module, the ith multi-graded Betti table of \({{\mathbb {V}}}\), with \(i\ge 0\), is a function \(\xi _i^{{\mathbb {V}}} :{\mathbb {Z}}^n \rightarrow {\mathbb {N}}\) defined by

$$\begin{aligned} \xi _i^{{\mathbb {V}}}(u):=\dim {{\,\mathrm{Tor}\,}}_i^{P_n}({{\mathbb {V}}},{\mathbb {F}})(u). \end{aligned}$$

with \(P_n\) the polynomial ring \({\mathbb {F}}[x_1,x_2,\ldots ,x_n]\). By the Hilbert’s Syzygy Theorem, \(\xi _i^{{\mathbb {V}}}\) is identically 0 for \(i > n\), and so we obtain a finite family of discrete invariants \(\xi _0^{{\mathbb {V}}},\xi _1^{{\mathbb {V}}},\ldots ,\xi _n^{{\mathbb {V}}}:{\mathbb {Z}}^n \rightarrow {\mathbb {N}}\).

In order to go through computations of Betti tables, we can consider the Koszul complex Weibel (1995) whose homologies, in any degree, are the same that define the Betti tables of \({{\mathbb {V}}}\). The relation with the Koszul complex is a convenient one for computing Betti tables. At the same time, the link between the two notions when \({\mathbb {V}}\) is a persistence module provides a useful way of visualizing algebraic invariants. Indeed, Betti tables capture relations among homological features: we have non-zero values at multigrades where, either new connected components are born (\(\xi _0^{{\mathbb {V}}}\)), or connected components die (\(\xi _1^{{\mathbb {V}}}\)), or previously independent deaths get related (\(\xi _2^{{\mathbb {V}}}\)), and so on (See Fig. 1). In particular:

  • in the case \(n=1\), for each grade u, the Koszul complex is given by the chain complex

    whose homology gives the following formulas for the Betti tables of \({{\mathbb {V}}}\):

    (1)
  • In the case \(n=2\), setting \(x=u-e_1\), \(y=u-e_2\), and \(z=u-e_1-e_2\) for each multigrade u, the Koszul complex is given by the chain complex

    with the linear maps \({{\,\mathrm{spl}\,}}^u_{{\mathbb {V}}}\) and \({{\,\mathrm{mrg}\,}}^u_{{\mathbb {V}}}\) defined to combine the persistence module linear maps \(i_{ {{\mathbb {V}}}}^{z,x}\), \(i_{ {{\mathbb {V}}}}^{z,y}\), \(i_{ {{\mathbb {V}}}}^{x,u}\), \(i_{ {{\mathbb {V}}}}^{y,u}\) according to the matrix expressions \({{\,\mathrm{spl}\,}}^u_{{\mathbb {V}}}=\left[ \begin{matrix}i_{ {{\mathbb {V}}}}^{z,x} \\ i_{ {{\mathbb {V}}}}^{z,y}\end{matrix}\right] \) and \({{\,\mathrm{mrg}\,}}^u_{{\mathbb {V}}}=\left[ \begin{matrix}i_{{\mathbb {V}}}^{x,u}&- i_{{\mathbb {V}}}^{y,u}\end{matrix}\right] \). Intuitively, as by one-criticality \(K^z= K^x\cap K^y\) , the map \({{\,\mathrm{spl}\,}}_{{\mathbb {V}}}^u)\) comes from mapping elements of the intersection \(K^x\cap K^y\) separately into \(K^x\) and \(K^y\) (hence, the word split), whereas the map \({{\,\mathrm{mrg}\,}}_{{\mathbb {V}}}^u)\) comes from mapping a pair of elements that live separately in \(K^x\) and \(K^y\) into \(K^u\) that contains both (hence the word merge). The homology of the Koszul complex gives the following formulas for the Betti tables of \({{\mathbb {V}}}\):

    (2)

In the rest of the paper, when \({{\mathbb {V}}}=\{H_q(K^u),i_q^{u,v}\}\), we will write \(\xi _i^q\) in place of \(\xi _i^{{\mathbb {V}}}\).

2.3 Perfectness of discrete gradient vector fields

Many of the familiar results from smooth Morse theory Milnor (1963) apply also in the combinatorial setting. In this section, we restrict ourselves to consider only chain complexes of K over \({\mathbb {F}}={\mathbb {Z}}/2{\mathbb {Z}}\). Following Forman (1998), a discrete vector is a pair of cells \((\sigma , {\tau })\) of \(K\times K\) with \(\sigma \) a facet of \({\tau }\). A discrete vector field V is a set of discrete vectors of K inducing a partition on the cells of K into three disjoint sets MST such that M is the set of unpaired cells, called critical cells, S is the set of cells paired to a cofacet, T is the set of cells paired to a facet, and there is a bijection between S and T.

A V-path connecting two cells \(\sigma \) and \(\sigma '\) is a sequence \((\sigma _0,{\tau }_0,\sigma _1,{\tau }_1,\ldots , \sigma _{r-1},{\tau }_{r-1},\sigma _r)\), with \(r\ge 1\) such that \(\sigma _0=\sigma \), \(\sigma _r=\sigma '\), \((\sigma _i,{\tau }_i)\) is a discrete vector of V, and \(\sigma _{i+1}\) is a facet of \({\tau }_i\). If \(\sigma _r=\sigma _0\), the V-path is said to be closed, and if \(r=1\), the V-path is said to be trivial. A discrete vector field V not containing any non-trivial closed V-path is called a discrete gradient vector field. An example of discrete gradient vector field is shown in Fig. 2 (left).

Fig. 2
figure 2

Left: a simplicial complex K filtered by sublevel sets of a function f taking 2 values over each simplex. Middle: a discrete gradient vector field V on K. Each arrow is from a q-simplex, say \(\sigma \), to a \((q+1)\)-simplex, say \({\tau }\), that contains \(\sigma \) as a face, and is used to visualize the discrete vector \((\sigma , {\tau })\) in V. A critical cell is a simplex from which no arrow starts and no arrow ends. Here, V is consistent with f since all discrete vectors involve simplices having the same function value under f but not relative-perfect. Right: a discrete gradient vector field V on K consistent with f that is also relative-perfect. The two critical vertexes correspond to new born connected component and the critical edge correspond to the death of one connected component

For any pair \(({\tau },\sigma )\in M\times M\) of critical cells of a discrete gradient vector field V, there is a separatrix from \({\tau }\) to \(\sigma \) if \({\tau }\) is a cofacet of \(\sigma \) or \({\tau }\) has a facet connected to \(\sigma \) through a V-path. The parity of the number of such separatrices defines the value of an incidence function \(\kappa ':M\times M\rightarrow {\mathbb {Z}}/2{\mathbb {Z}}\). The critical set M together with the incidence function \(\kappa '\) form a cell complex called the discrete Morse complex of V. As in smooth Morse theory, the discrete Morse complex M and the original cell complex K have isomorphic homology. Moreover, the number of q-dimensional critical cells of V, called the qth Morse number and denoted by \(m_q(V)\), bounds the qth Betti number of K, i.e. the following Morse inequalities hold: for any \(q \ge 0\),

$$\begin{aligned} m_q(V) \ge \beta _q(K):=\dim H_q(K). \end{aligned}$$
(3)

Ideally, we would like the Morse inequalities to be equalities, but it usually is not so. If that is the case we speak of a perfect gradient vector field. Some cell complexes (e.g., the dunce hat and the Bing’s house) do not admit a perfect discrete Morse gradient. Some complexes admit a perfect discrete Morse gradient depending on the choice of coefficients. As reviewed in Varli et al. (2018), every sphere of dimension \(d > 4\) has a triangulation which does not admit a perfect discrete Morse function. On the other hand, it is easy to see that every 1-dimensional cell complex (i.e. graph) has a perfect discrete Morse function, and every 2-dimensional subcomplex of a 2-manifold has a \({\mathbb {Z}}_2\)-perfect discrete Morse function.

The rest of the paper will be devoted to study the analogue of perfectness for a discrete gradient vector field consistent with a multi-filtration.

2.4 Consistency of discrete gradient vector fields with multi-filtrations

We are interested in discrete gradient vector fields consistent with multi-filtrations as studied in Allili et al. (2017).

Definition 1

A discrete gradient vector field V on a cell complex K is consistent with a multi-filtration \({{\mathcal {K}}}=\{K^u\}_{u\in {\mathbb {Z}}^n}\) of K if for all \((\sigma ,{\tau })\) in V, \(\sigma \in K^u\) if and only if \({\tau }\in K^u\).

As an example, the discrete gradient vector field on the left of Fig. 2 is consistent with the sublevel set filtration induced by the function illustrated on the right.

Consistency of V with a multi-filtration is interesting because it ensures that persistence modules are preserved. Indeed, if V is a discrete gradient vector field on a cell complex K consistent with the multi-filtration \({{\mathcal {K}}}=\{K^u\}_{u\in {\mathbb {Z}}^n}\), and M is the discrete Morse complex of V, letting \({{\mathcal {M}}}=\{M^u\}_{u\in {\mathbb {Z}}^n}\) be the multi-filtration inherited from \({\mathcal {K}}\), the restriction of the incidence function of M to \(M^u\times M^u\) yields a cell complex for every filtration grade \(u\in {\mathbb {Z}}^n\). Moreover, for every \(q\ge 0\) and every \(u\in {\mathbb {Z}}^n\), there is an isomorphism \(\pi _q^u:H_q(K^u)\rightarrow H_q(M^u)\) such that the diagram

(4)

commutes for every \(u\preceq v\in {\mathbb {Z}}^n\).

2.5 Retrieval of consistent discrete gradient fields

The retrieval of discrete gradient vector fields consistent with suitable n-filtrations is guaranteed by algorithms such as ProcessLowerStars Robins et al. (2011) when \(n=1\) , and Matching Allili et al. (2017), or equivalently ComputeDiscreteGradient Iuricich et al. (2016), when \(n\ge 1\).

In order to apply such algorithms, the multi-filtration needs to be constructed as follows. Assuming K to be a simplicial complex, first a function \(f_0:K_0\rightarrow {\mathbb {Z}}^n\) is given on the vertices of K with the property of being component-wise injective. Next, \(f_0\) is extended to the whole K by setting \(f=(f_i):K\rightarrow {\mathbb {Z}}^n\), \(f_i(\tau )=\max \{f_i(\sigma ): \sigma { isafacetof}\tau \} \). Finally, the multi-filtration \({{\mathcal {K}}}=\{K^u\}_{u\in {\mathbb {Z}}^n}\) is defined by sublevel sets \(K^u=\{\sigma \in K: f(\sigma )\preceq u\}\).

The requirement for \(f_0\) to have injective components is not very restrictive as it can be achieved by arbitrarily small perturbations. The extension of the values of the function to other simplices using the \(\max \) is quite natural in view of the results of Cavazza et al. (2013) showing that this reflects multi-parameter interpolation from the vertices in the discrete case. Moreover, multi-filtration is one-critical.

All the above-mentioned algorithms are based on a common subroutine acting locally on lower stars. We call this subroutine HomotopyExpansion and we report its pseudocode in Appendix A. For every cell \(\sigma \) in K, its lower star is defined as the set of all the cofaces of \(\sigma \) in K on which the function f takes a value smaller or equal than that on \(\sigma \) itself: \(L_f(\sigma )=\{ {\tau }\in K: \sigma \) is a face of \({\tau }\) s.t. \(f({\tau })\preceq f(\sigma )\}\).

While for \(n=1\) it is sufficient to run HomotopyExpansion on lower stars of each vertex, for \(n>1\), it needs to be run on lower stars of minimal simplices of any dimension contained in level sets of f, with minimality taken with respect to the facet relation (Fig. 3).

Fig. 3
figure 3

Working example for the subroutine HomotopyExpansion. Each image in the figure represents an operation performed at a specific line with respect to the code in Appendix A: a the input lower star of vertex 5; b Vertex 5 is paired to edge [1,5] at line 8; c Edge [2,5] is found critical at line 24; d edge [3,5] is paired to triangle [2,3,5] at line 17; e edge [4,5] is paired to triangle [3,4,5] at line 17; f the discrete gradient vector field retrieved by HomotopyExpansion

In the following sections, after extending the concept of perfectness to discrete gradient fields consistent with multi-filtration, we will prove that the discrete gradient fields retrieved by such algorithms are relative-perfect, at least when \(\dim K\le 2\).

3 Relative-perfect discrete gradient vector fields

In this section, we introduce a notion of perfectness of gradient vector fields for (multi-parameter) persistent homology (Definition 3) as a generalization of the notion for the case of standard homology. In order to support our approach, Proposition 1 relates relative homology with the number of critical cells. Moreover, in Proposition 2 and Proposition 3 we show the meaning of relative-perfectness in the case of 1-parameter persistent homology, and the differences between the 1- and the multi-parameter cases.

We start with an analogue for the usual Morse inequalities (3) in the persistence setting. We assume V to be a discrete gradient vector field consistent with a multi-filtration \({{\mathcal {K}}}=\{K^u\}_{u\in Z^n}\) of a cell complex K, and M the discrete Morse complex of V. Recall that we always assume multi-filtrations to be one-critical. We first introduce the discrete Morse numbers for V.

Definition 2

For any \(u\in {\mathbb {Z}}^n\) and \(q\in {\mathbb {Z}}\), we set \(m_q(u)\) to be the number of critical q-cells of V contained in \(M^u-\bigcup _{i=1}^n M^{u-e_i}\), and call it the qth (multi-parameter) Morse number of V.

Recall that we introduced in Sect. 2.2 the notation \(e_i\) to indicate the i-th element of the standard basis of \({\mathbb {Z}}^n\). Because \(\bigcup _{i=1}^n M^{u-e_i}\) is a subcomplex of \(M^u\), we can consider the homology of the relative pair \((M^u,\bigcup _{i=1}^n M^{u-e_i})\), and analogously for K. They are related as follows.

Lemma 1

Let \(S\subseteq S'\) be non-empty subsets of \(Q=\{0,1\}^n\). For each filtration grade \(u\in {\mathbb {Z}}^n\), and each homology degree \(q\in {\mathbb {Z}}\), there are isomorphisms \(\varphi _q^{S}:H_q \left( \bigcup _{s\in S}K ^{u-s}\right) \rightarrow H_q \left( \bigcup _{s\in S} M ^{u-s}\right) \) and \(\varphi _q^{S'}:H_q \left( \bigcup _{s\in S}K ^{u-s}\right) \rightarrow H_q \left( \bigcup _{s\in S} M ^{u-s}\right) \) that make the diagram

whose horizontal maps are induced by inclusions, commute.

Proof

With each non-empty subset S of Q we associate the subcomplex \(\bigcup _{s\in S}K ^{u-s}\) of \(K^u\). With \(S=\emptyset \), we associate \(K^{u-\sum _{i=1}^n e_i}\). For \(S\subseteq S'\subseteq Q\), we have \(\bigcup _{s\in S}K ^{u-s}\subseteq \bigcup _{s\in S'}K ^{u-s}\). The inclusion of subsets of Q is a well-founded partial order relation.

For each \(S\subseteq Q\), we take the map \(\varphi _q^{S}\) to be the restrictions of the map \(\pi _q^u\) of diagram (4) to \(\bigcup _{s\in S}K ^{u-s}\), so the considered diagrams commute. We now prove that the maps \(\varphi _q^{S}\) are isomorphisms. We prove the claim by well-founded induction on the relation \(\le \). If S is the empty subset, the diagram in the claim coincides with that of (4) and so the claim is true. Let \(S'\) be a subset of Q and let us assume the claim is true for every \(S\subseteq S'\). By the inductive step the maps \(\varphi _q^{S}\) and \(\varphi _q^{\{s'\}}\) are isomorphisms so that \(\psi _q^{S'}=\varphi _q^{S}\oplus \varphi _q^{\{s'\}}:H_q(\bigcup _{s\in S} K^{u-s})\oplus H_q(K^{u-s'})\rightarrow H_q(\bigcup _{s\in S} M^{u-s})\oplus H_q(M^{u-s'})\) satisfy the claimed property. Moreover, because the multi-filtration is one-critical, denoting by \(\mathrm {l.u.b.}(s,s')\) the least upper bound of s and \(s'\) in \(Q\subseteq {\mathbb {Z}}^n\), and letting \(T=\{t\in \{0,1\}^n: t=\mathrm {l.u.b.}(s,s'), s\in S\}\), we have \(\bigcup _{s\in S}K ^{u-s}\cap K^{u-s'}=\bigcup _{t\in T }K^{u-t}\). Analogously, \(\bigcup _{s\in S}M^{u-s}\cap M^{u-s'}=\bigcup _{t\in T } M^{u-t}\). Because \(T\subseteq S'\), by the inductive step we deduce that \(\varphi _q^T:H_q(\bigcup _{s\in S}K ^{u-s}\cap K^{u-s'})\rightarrow H_q(\bigcup _{s\in S}M^{u-s}\cap M^{u-s'})\) satisfies the claimed property.

We now take the triples \((\bigcup _{s\in S'} K^{u-s}, \bigcup _{s\in S} K^{u-s},K^{u-s'})\) and \((\bigcup _{s\in S'} M^{u-s}, \bigcup _{s\in S} M^{u-s},M^{u-s'})\) with \(S\subseteq S'\subseteq Q\). As we have seen, their Mayer-Vietoris exact sequences are connected by maps that make the following diagram commute

with \(\psi _q^S\) and \(\varphi _{q-1}^T\) isomorphisms. By the Five Lemma, we deduce that also \(\varphi _q^{S'}\) is an isomorphism, proving the claim. \(\square \)

Lemma 2

For each filtration grade \(u\in {\mathbb {Z}}^n\), and each homology degree \(q\in {\mathbb {Z}}\),

$$\begin{aligned} H_q \left( K^u, \bigcup _{i=1}^nK ^{u-e_i}\right) \cong H_q \left( M^u, \bigcup _{i=1}^n M ^{u-e_i}\right) . \end{aligned}$$

Proof

Lemma 1 implies that the map \(\varphi _q^S:H_q(\bigcup _{s\in S}K^{u-s}) \rightarrow H_q(\bigcup _{s\in S}^{u-s})\), with \(S=\{e_1,e_2,\ldots , e_n\}\), is an isomorphisms for any \(q\in {\mathbb {Z}}\). Thus, we are in the position of applying the Five Lemma to the following long exact sequence of pairs:

Hence \(\dim H_q(K^u, \bigcup _{i=1}^n K^{u-e_i})=\dim H_q(M^u, \bigcup _{i=1}^n M^{u-e_i})\), proving the claim. \(\square \)

Proposition 1

For any homology degree \(q\in {\mathbb {Z}}\), and any filtration grade \(u\in {\mathbb {Z}}^n\), it holds that

$$\begin{aligned} m_q(u)\ge \dim H_q \left( K^u,\bigcup _{i=1}^n K^{u-e_i}\right) . \end{aligned}$$

Moreover, in order to have \(m_q(u)=\dim H_q(M^u, \bigcup _{i=1}^n M ^{u-e_i})\), it is sufficient that the relative boundary map \(\partial ^{rel}_q:C_q(M^u, \bigcup _{i=1}^n M ^{u-e_i})\rightarrow C_{q-1}(M^u, \bigcup _{i=1}^n M ^{u-e_i})\) is trivial for all integers q.

Proof

By definition, \(m_q(u)\) is equal to the number of q-dimensional critical cells of V in \(M^u-\bigcup _{i=1}^n M^{u-e_i}\). Therefore, \(m_q(z)= \dim C_q(M^u)-\dim C_q(\bigcup _{i=1}^n M^{u-e_i})=\dim C_q(M^u,\bigcup _{i=1}^n M^{u-e_i})\).

On the other hand, \( \dim H_q(M^u,\bigcup _{i=1}^n M^{u-e_i})=\dim \ker (\partial ^{rel}_q)/\mathrm {im}\, (\partial ^{rel}_{q+1})\le \dim C_q(M^u,\bigcup _{i=1}^n M^{u-e_i})\). Moreover, if \(\partial ^{rel}_q\) is trivial for all \(q\in {\mathbb {Z}}\), then \(\ker (\partial ^{rel}_q)= C_q(M^u, \bigcup _{i=1}^n M ^{u-e_i})\) and \(\mathrm {im}\, (\partial ^{rel}_{q+1})=0\).

Hence, \(\dim H_q(M^u, \bigcup _{i=1}^n M ^{u-e_i})=\dim C_q(M^u,\bigcup _{i=1}^n M ^{u-e_i})=m_q(u)\). Thus, the claim follows by applying Lemma 2. \(\square \)

The inequality of Proposition 1 can be seen as a generalization of standard Morse equalities (3) for persistence modules, where homology needs to be replaced by relative homology. This motivates the following definition of relative-perfectness.

Definition 3

We say that V is a relative-perfect discrete gradient vector field if

$$\begin{aligned} m_q(u)=\dim H_q \left( K^u,\bigcup _{i=1}^n K^{u-e_i}\right) \end{aligned}$$

for every \(q\in {\mathbb {Z}}\).

An example of a relative-perfect discrete gradient compared to one that is only consistent with f is shown in Fig. 2: for \(u=(1,2)\) and \(q=1\), in the middle, we have a critical 1-simplex, thus \(m_1(1,2)=1\). However, \(K^{(1,2)}\) is composed of the two vertexes with values (0, 1) and (1, 2) along with the critical 1-simplex whereas the union of all previous steps reduces to \(K^{(0,1)}\). Hence, \(\dim H_1(K^u,\bigcup _{i=1}^n K^{u-e_i})=0\) which is strictly less than \(m_1(1,2)=1\); on the right, we see a relative-perfect discrete gradient with each of its critical simplices appearing at a multigrade where the relative homology is non-trivial.

A standard application of the rank-nullity formula to the long exact homology sequence of the pair \((K ^u,\bigcup _{i=1}^nK ^{u-e_i})\) gives the following result.

Proposition 2

For any \(q\in {\mathbb {Z}}\) and any \(u\in {\mathbb {Z}}^n\), denoting by \(j_q^u :H_q(\bigcup _{i=1}^nK ^{u-e_i})\rightarrow H_q(K ^u)\) the maps induced by the inclusion of cell complexes, it holds that

$$\begin{aligned} \dim H_q\left( K ^u,\bigcup _{i=1}^nK ^{u-e_i}\right) = \dim {{\,\mathrm{coker}\,}}(j_q^u) + \dim \ker (j_{q-1}^u). \end{aligned}$$

Proof

Let us consider the long exact homological sequence of the pair \((K^u,\bigcup _{i=1}^nK^{u-e_i})\):

Because the sequence is exact, applying the rank-nullity dimension formula, we deduce that

$$\begin{aligned}&\dim {{\,\mathrm{coker}\,}}(i_q^u) + \dim \ker (i_{q-1}^u)\\&\quad = \dim H_q(K^u) - \dim \ker (j_q^u) + \dim {{\,\mathrm{im}\,}}(\delta _q^u) \\&\quad = \dim H_q(K^u) - \dim \ker (j_q^u) + \dim H_q \left( K^u,\bigcup _{i=1}^nK^{u-e_i}\right) - \dim \ker (\delta _q^u) \\&\quad = \dim H_q(K^u) - \dim \ker (j_q^u) + \dim H_q \left( K^u,\bigcup _{i=1}^nK^{u-e_i}\right) - \dim {{\,\mathrm{im}\,}}(j_q^u) \\&\quad = \dim H_q \left( K^u,\bigcup _{i=1}^nK^{u-e_i}\right) . \end{aligned}$$

\(\square \)

In other words, a discrete gradient vector field V consistent with a multi-filtration is relative-perfect provided that each of its critical cells contributes either to the birth or to the death of a homology class:

  1. 1.

    \(\dim {{\,\mathrm{coker}\,}}(j_q^u)\) is the number of linearly independent q-cycles in \(H_q(K^u)\) not coming from \(H_q(\bigcup _{i=1}^nK ^{u-e_i})\);

  2. 2.

    \(\dim \ker (j_{q-1}^u)\) is the number of linearly independent \((q-1)\)-cycles in \(H_{q-1}(\bigcup _{i=1}^nK ^{u-e_i})\) that become trivial in \(H_{q-1}(K^{u})\).

For the case \(n=1\), we have \(j_q^u=i_q^{u-1,u}\), that is the map induced by the inclusion of \(K^{u-1}\) into \(K^u\). Hence, also recalling Eq. (1), for \(n=1\) our definition of relative-perfectness can be equivalently reformulated as follows.

Proposition 3

A discrete gradient vector field V consistent with a 1-filtration \({{\mathcal {K}}}=\{K^u\}_{u\in {\mathbb {Z}}}\) of a cell complex K is relative-perfect if and only if each critical k-cell \(\sigma \) of V is either a positive or a negative cell. Equivalently, V is relative-perfect if and only if

$$\begin{aligned} m_q(u)=\xi _0^q(u)+\xi _1^{q-1}(u). \end{aligned}$$

The latter is precisely the property proved in Robins et al. (2011) for the discrete gradient vector field retrieved by algorithm ProcessLowerStars when applied to 3D cubical grids endowed with 1-filtrations.

In the multi-parameter case, relative-perfectness still ensures that all critical cells correspond to births or deaths of homology classes. However, in this case new homology classes can be created even without adding new cells, as shown in Fig. 4. Thus, the idea of positive and negative cells is ineffective in the multi-parameter case, unless one introduces the idea of virtual cells as highlighted in Knudson (2008). Moreover in Fig. 4, one can also notice the dual situation where critical cells can be necessary to kill virtual homology classes that is classes simply coming from the union of previous steps and never appearing in the multi-filtration. Next section will make this idea precise in the case of two parameters.

Fig. 4
figure 4

In the multi-parameter case, birth of new homology classes may not correspond to newly added critical cells (loops on the left) or critical cells may be negative for homological classes simply due to the union of previous steps and never existing along the multi-filtration (2-simplices on the right)

We conclude the section noting that, contrary to usual perfectness, it is possible to have relative-perfect discrete gradient vector fields on the dunce hat, as shown in Fig. 5. In Section 2.5 we will show that this is always the case for simplicial complexes of dimension 2 endowed with filtrations induced by component-wise injective functions on the vertices.

Fig. 5
figure 5

A relative-perfect discrete gradient vector field consistent with the filtration induced by the vertex indexing

4 Estimation of Betti tables via critical cells

In this section, we focus our attention on bi-filtrations, i.e. the case \(n=2\). Our goal is to show that, for a discrete gradient vector field consistent with a bi-filtration, the number of critical cells gives bounds on the Betti tables values of the corresponding persistence module. Such bounds can be seen as a sort of Morse inequalities for persistent homology, generalizing the standard Morse inequalities (3) for homology. Such inequalities will shed new light on relative-perfectness.

In this section, we consider the persistence module \({{\mathbb {V}}}=\{{{\mathbb {V}}}_u,i_q^{u,v}\}_{u\preceq v\in {\mathbb {Z}}^n}\) with \({{\mathbb {V}}}_u=H_q(K^u)\) and \(i_q^{u,v}:H_q(K^u)\rightarrow H_q(K^v)\) induced by the inclusion maps \(K^u\hookrightarrow K^v\), and assume that K is equipped with a discrete gradient vector field consistent with the multi-filtration of K. Moreover, in accordance with Eq. (2), for any \(u\in {\mathbb {Z}}^2\), we set \(x=u-e_1\), \(y=u-e_2\), and \(z=u-e_1-e_2\).

Our first step is to relate the dimensions of the kernel and cokernel of the linear maps \(j_q^u :H_q(K ^x\cup K^y)\rightarrow H_q(K ^u)\) induced by inclusions to the values in the Betti tables of the persistence module \({{\mathbb {V}}}\).

Lemma 3

Given the commutative diagram of finite dimensional vector spaces

it holds that

  1. 1.

    \(\dim \ker (\mu )=\dim ({{\,\mathrm{im}\,}}(\gamma )\cap \ker (\iota ))+\dim \ker (\gamma )\);

  2. 2.

    \(\dim \ker (\iota )=\dim \left( {{\,\mathrm{im}\,}}(\gamma ) \cap \ker (\iota )\right) -\dim {{\,\mathrm{im}\,}}(\gamma )+\dim \left( {{\,\mathrm{im}\,}}(\gamma ) +\ker (\iota )\right) \);

  3. 3.

    \(\dim {{\,\mathrm{coker}\,}}(\iota )=\dim {{\,\mathrm{coker}\,}}(\mu )-\dim D +\dim \left( {{\,\mathrm{im}\,}}(\gamma ) +\ker (\iota )\right) \).

Proof

The first claim follows by the commutativity of the diagram, while the second claim follows immediately from the Grassmann’s formula relating the dimensions of the sum and intersection of vector spaces. As for the third claim, repeatedly applying the rank-nullity formula, the Grassmann’s formula, and the the first claim, we see that

$$\begin{aligned} \dim {{\,\mathrm{coker}\,}}(\iota )&=\dim A-\dim {{\,\mathrm{im}\,}}(\iota ) \\&=\dim A-\dim {{\,\mathrm{im}\,}}(\mu )+\dim {{\,\mathrm{im}\,}}(\mu )-(\dim D-\dim \ker (\iota )) \\&=\dim {{\,\mathrm{coker}\,}}(\mu )+(\dim C-\dim \ker (\mu ))-\dim D+\dim \ker (\iota )\\&=\dim {{\,\mathrm{coker}\,}}(\mu ) +(\dim \ker (\gamma )+\dim {{\,\mathrm{im}\,}}(\gamma ))-(\dim ({{\,\mathrm{im}\,}}(\gamma )\cap \ker (\iota ))\\&\quad +\dim \ker (\gamma ))-\dim D+\dim \ker (\iota )\\&=\dim {{\,\mathrm{coker}\,}}(\mu )-\dim D+\dim ({{\,\mathrm{im}\,}}(\gamma )+\ker (\iota )). \end{aligned}$$

\(\square \)

Proposition 4

For any \(q\in {\mathbb {Z}}\), let \(\alpha _q^u:H_q(K^x)\rightarrow H_q(K^x\cup K^y)\), \(\beta _q^u:H_q(K^y)\rightarrow H_q(K^x\cup K^y)\), \(i_q^u :H_q(K^x\cup K^y)\rightarrow H_q(K^u)\) be the linear maps induced by the inclusions of cell complexes. It holds that:

  1. 1.

    \(\dim {{\,\mathrm{coker}\,}}(i_q^u)=\xi _0^{q}(z) - \dim H_{q}(K^x\cup K^y) + \dim (\ker (i_{q}^u)+{{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u)).\)

  2. 2.

    \(\dim \ker (i_q^u)=\xi _1^{q}(z)+ \xi _2^{q-1}(z)- \dim H_{q}(K^x\cup K^y) + \dim (\ker (i_{q}^u)+{{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u)).\)

Proof

By Lemma 3 applied to the commutative diagram

with \({{\,\mathrm{mrg}\,}}_q^u\) as in Eq. (2), we get

$$\begin{aligned} \dim {{\,\mathrm{coker}\,}}(i_q^u)&=\dim {{\,\mathrm{coker}\,}}({{\,\mathrm{mrg}\,}}_q^u) - \dim H_{q}(K^x\cup K^y)\nonumber \\&\quad + \dim (\ker (i_{q}^u)+{{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u)), \end{aligned}$$
(5)
$$\begin{aligned} \dim \ker ({{\,\mathrm{mrg}\,}}_{q}^u)&=\dim \ker (\alpha _{q}^u - \beta _{q}^u)\nonumber \\&\quad + \dim (\ker (i_{q}^u) \cap {{\,\mathrm{im}\,}}(\alpha _{q}^u - \beta _{q}^u)), \end{aligned}$$
(6)
$$\begin{aligned} \dim \ker (i_q^u)&=\dim \left( {{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u) \cap \ker (i_{q}^u)\right) \nonumber \\&\quad -\dim {{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u)+\dim \left( {{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u) +\ker (i_{q}^u)\right) \end{aligned}$$
(7)

From (5) we immediately get the first claim because \(\dim {{\,\mathrm{coker}\,}}({{\,\mathrm{mrg}\,}}_q^u)=\xi _0^{q}(z)\) by Eq. (2). To prove the second claim, let us now consider the Mayer-Vietoris exact homological sequence of the triad \((K^x\cup K^y, K^x, K^y)\). Observing that by construction \(K^x\cap K^y=K^z\), we have

(8)

From (2), (6), and the exactness of sequence (8) at \(H_q(K^x)\oplus H_q(K^y)\), we see that

$$\begin{aligned} \begin{aligned} \xi _1^{q}(z)&=\dim \ker ({{\,\mathrm{mrg}\,}}_{q}^u) - \dim {{\,\mathrm{im}\,}}({{\,\mathrm{spl}\,}}_{q}^u) \\&= \dim \ker (\alpha _{q}^u - \beta _{q}^u) + \dim (\ker (i_{q}^u) \cap {{\,\mathrm{im}\,}}(\alpha _{q}^u - \beta _{q}^u)) - \dim {{\,\mathrm{im}\,}}({{\,\mathrm{spl}\,}}_{q}^u) \\&=\dim (\ker (i_{q}^u) \cap {{\,\mathrm{im}\,}}(\alpha _{q}^u - \beta _{q}^u)). \end{aligned} \end{aligned}$$
(9)

Analogously, from (2), the exactness of sequence (8) at \(H_q(K^x\cup K^y)\), we get

$$\begin{aligned} \begin{aligned} \xi _2^{q-1}(z)&= \dim \ker ({{\,\mathrm{spl}\,}}_{q-1}^u) = \dim {{\,\mathrm{im}\,}}(\delta _{q}^u). \end{aligned} \end{aligned}$$
(10)

By applying the rank-nullity formula linking the dimensions of the kernel and the image of a linear map and, again, the same exactness, we get

$$\begin{aligned} \begin{aligned} \xi _2^{q-1}(z)&= \dim H_{q}(K^x\cup K^y) - \dim \ker (\delta _{q}^u) \\&= \dim H_{q}(K^x\cup K^y) - \dim {{\,\mathrm{im}\,}}(\alpha _{q}^u - \beta _{q}^u). \end{aligned} \end{aligned}$$
(11)

Hence, from (7), (9), and (11), we get

$$\begin{aligned} \dim \ker (i_q^u)&=\xi _1^{q}(z)-\dim {{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u)+\dim \left( {{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u) +\ker (i_{q}^u)\right) \\&=\xi _1^{q}(z)+\xi _2^{q-1}(z)-\dim H_{q}(K^x\cup K^y)+\dim \left( {{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u) +\ker (i_{q}^u)\right) . \end{aligned}$$

\(\square \)

Corollary 1

For any \(q\in {\mathbb {Z}}\),

$$\begin{aligned} \xi _0^{q}(u)+ \xi _1^{q-1}(u)- \xi _2^{q-1}(u) \le \dim H_q(K^u,K^x\cup K^y) \le \xi _0^{q}(u) + \xi _1^{q-1}(u) + \xi _2^{q-2}(u) \end{aligned}$$

Proof

By Proposition 2, \(\dim H_q(K^u,K^x\cup K^y)=\dim {{\,\mathrm{coker}\,}}(i_q^u)+\dim (\ker (i_{q-1}^u))\). Thus, from Proposition 4,

$$\begin{aligned} \begin{aligned}&\dim H_q(K^u,K^x\cup K^y)\\&\quad =\xi _0^{q}(u)+ \xi _1^{q-1}(u)+ \xi _2^{q-2}(u)\\&\qquad - \dim H_{q}(K^x\cup K^y) + \dim (\ker (i_{q}^u)+{{\,\mathrm{im}\,}}(\alpha _{q}^u-\beta _{q}^u))\\&\qquad - \dim H_{q-1}(K^x\cup K^y) + \dim (\ker (i_{q-1}^u)+{{\,\mathrm{im}\,}}(\alpha _{q-1}^u-\beta _{q-1}^u)). \end{aligned} \end{aligned}$$
(12)

Since it holds that \((\ker (i_q^u) + {{\,\mathrm{im}\,}}(\alpha _q^u - \beta _q^u))\supseteq {{\,\mathrm{im}\,}}(\alpha _q^u - \beta _q^u)\) for any integer q, from Eq. (12) we deduce that

$$\begin{aligned} \dim H_q(K^u,K^x\cup K^y)&\ge \xi _0^{q}(u) + \xi _1^{q-1}(u) + \xi _2^{q-2}(u)\\&\quad - \dim H_{q}(K^x\cup K^y) + \dim {{\,\mathrm{im}\,}}(\alpha _q^u - \beta _q^u) \\&\quad - \dim H_{q-1}(K^x\cup K^y) + \dim {{\,\mathrm{im}\,}}(\alpha _{q-1}^u - \beta _{q-1}^u) \\&= \xi _0^{q}(u) + \xi _1^{q-1}(u) -\xi _2^{q-1}(u), \end{aligned}$$

again by Eq. (11), thus proving the left-hand inequality.

On the other hand, for all integers q, we have

$$\begin{aligned} \dim H_q(K^x\cup K^y)-\dim (\ker (i_q^u) + {{\,\mathrm{im}\,}}(\alpha _q^u - \beta _q^u)) \ge 0 \end{aligned}$$

so that Eq. (12) implies the right-hand inequality. \(\square \)

As an immediate consequence of Proposition 1, we deduce the following result showing that the number of critical cells of a discrete gradient vector field may be used to estimate Betti tables of persistence modules at least for bi-filtrations.

Corollary 2

For any \(u\in {\mathbb {Z}}^2\) and \(q\in {\mathbb {Z}}\),

$$\begin{aligned} m_q(u)\ge \xi _0^{q}(u) + \xi _1^{q-1}(u) - \xi _2^{q-1}(u). \end{aligned}$$

Moreover, if the gradient is relative-perfect, then it also holds

$$\begin{aligned} m_q(u)\le \xi _0^{q}(u) + \xi _1^{q-1}(u) + \xi _2^{q-1}(u). \end{aligned}$$

We may interpret Corollary 2 as a generalization of Proposition 2 to the bi-filtration case, taking care of the possible presence of virtual cells as discussed after Proposition 3. This is achieved by adding the term relative to the second Betti table \(\xi _2\).

Inequalities in Corollary 2 are sharp. To see that the first inequality can be an equality, we take \(q=1\), the simplicial complex K of dimension 1 with four vertices abcd and four edges [ab], [bc], [cd], [da], the function f defined on the vertices by \(f(a)=(0,0)\), \(f(c)=(1,1)\), \(f(b)=(3,2)\), \(f(d)=(2,3)\). Moreover, the second inequality turns out be an equality taking \(q=2\), the simplicial complex K with four vertices abcd, five edges [ab], [bc], [cd], [da], [bd] and two triangles [abd] and [bcd], the function f defined on the vertices by \(f(a)=(0,0)\), \(f(c)=(1,1)\), \(f(b)=(3,2)\), \(f(d)=(2,3)\).

5 Retrieval of relative-perfect discrete gradient vector fields

Throughout this section we assume K to be a simplicial complex of dimension at most 2, filtered by the sublevel sets of the extension of a component-wise injective function f defined on the vertices of K as described in Sect. 2.5. Our goal is to prove that, under such assumptions, there always exists a discrete gradient vector field compatible with such filtration that is relative-perfect. The proof will be constructive and based on repeatedly using the routine HomotopyExpansion (see Appendix A for details) on the sets of a suitable partition of K to build the desired discrete vector field. To this aim, we start proving further properties of the considered multi-filtration.

We start observing that lower stars of simplices are contained in level sets.

Lemma 4

For every \(\sigma \in K\), it holds that \( L_f(\sigma )\subseteq f^{-1}(f(\sigma ))\).

Proof

By definition, f is not decreasing with dimension, so that \(f(\sigma )\preceq f({\tau })\) for every coface \({\tau }\) of \(\sigma \). By definition of lower star, \({\tau }\in L _f(\sigma )\) implies that \(f({\tau })\preceq f(\sigma )\). Thus, for \({\tau }\in L _f(\sigma )\), \(f({\tau })\preceq f(\sigma )\preceq f({\tau })\), yielding the claim. \(\square \)

Next we see that there are simplices, which we call primary, whose lower stars coincide with level sets and therefore form a partition of K.

Lemma 5

For every \(u\in f(K)\), there exists a unique simplex \(\sigma \in K\) such that \(f^{-1}(u)=L_f(\sigma )\).

Proof

In order to prove uniqueness, suppose there are two cells \(\sigma ,\sigma '\in K\) such that \(L_f(\sigma )=f^{-1}(u)=L_f(\sigma ')\). Because any cell belongs to its own lower star, we get \(\sigma '\in L_f(\sigma )\) and \(\sigma \in L_f(\sigma ')\), implying that \(\sigma '\) is a face of \(\sigma \) and \(\sigma \) is a face of \(\sigma '\). Hence, \(\sigma =\sigma '\). Let us prove existence. By component-wise injectiveness of f on the vertices of K, if \(u\in f(K)\), then for each \(1\le i\le n\) there exists a unique vertex \(v_i\) such \(f_i(v_i)=u_i\). By the definition of f, \(v_i\) is a face of \({\tau }\) for every \({\tau }\in f_i^{-1}(u_i)\). Thus, \(v_i\) is a face of \({\tau }\) for every \({\tau }\in f^{-1}(u)\). The simplex \(\sigma \) generated by all such vertices \(v_i\), \(1\le i\le n\), is also a face of \({\tau }\) for every \({\tau }\in f^{-1}(u)\). Moreover, \(f(\sigma )=u=f({\tau })\). Hence, for every \({\tau }\in f^{-1}(u)\), we have \({\tau }\in L_f(\sigma )\), implying \(f^{-1}(u)\subseteq L_f(\sigma )\). On the other hand, from \(f(\sigma )=u\), by Lemma 4, we also deduce that \( L_f(\sigma )\subseteq f^{-1}(u)\), concluding the proof. \(\square \)

The next result shows that the number of V-paths exiting from a simplex is equal to the codimension of that simplex with respect to the primary simplex whose lower star it belongs to.

Lemma 6

Let \(\sigma \in K\) be a primary simplex. Each simplex \({\tau }\in L _f(\sigma )\) with \(\dim {\tau }-\dim \sigma =p\) has exactly p facets contained in \(L _f(\sigma )\).

Proof

By Lemma 5, \( L_f(\sigma )\subseteq f^{-1}(f(s))\). Hence, all the facets of \({\tau }\) that admit \(\sigma \) as a face belong to \(L_f(\sigma )\). The total number of such facets of \({\tau }\) is equal to p. Indeed, letting \(t=\dim {\tau }\) and \(s=\dim \sigma \), so that \(t=s+p\), a facet of \({\tau }\) that admits \(\sigma \) as a face is generated by t vertices, chosen among the \(t+1\) vertices of \({\tau }\), \(s+1\) of which are already fixed as generators of \(\sigma \). Therefore, the number of such facets is \({(t+1)-(s+1) \atopwithdelims ()t-(s+1)}={p \atopwithdelims ()p-1}=p\). \(\square \)

The following lemma shows that branching of V-paths is not possible in the lower star of a primary simplex, provided that K is of dimension at most 2.

Lemma 7

No V-path \((\sigma _0,{\tau }_0,\sigma _1,{\tau }_1,\ldots , \sigma _{r-1},{\tau }_{r-1},\sigma _r)\) containing only cells of \(L_f(\sigma )\) can branch, for any \(\sigma \in K\), provided that \(\dim {\tau }_i-\dim \sigma \le 2\).

Proof

By contradiction, let \((\sigma _0,{\tau }_0,\sigma _1,{\tau }_1,\ldots , \sigma _{r-1},{\tau }_{r-1},\sigma _r)\) in \(L_f(\sigma )\) branch at some simplex \({\tau }_i\) with \(0\le i\ge r-1\). Because V is a discrete vector field, \(\sigma _{i}\) can be paired only to \({\tau }_{i}\) and, analogously, \(\sigma _{i+1}\) can be paired only to \({\tau }_{i+1}\). Hence, the simplex \({\tau }_i\) must have at least one more facet, different from \(\sigma _i\) and \(\sigma _{i+1}\), belonging \(L _f(\sigma )\), for a branching to occur. Because \(\dim {\tau }_i-\dim \sigma \le 2\), this contradicts Lemma 6 with \(p=\dim {\tau }_i-\dim \sigma \). \(\square \)

Lemma 8

Let \(\sigma \) be a primary simplex. Let \({\tau }\) be a critical cell of V belonging to \(L_f(\sigma )\) with \(\dim {\tau }-\dim \sigma =2\). Let \({\rho }'\) and \({\rho }''\) be the two distinct facets of \({\tau }\) also belonging to \(L_f(\sigma )\). There exists one and only one simplex \({\bar{\sigma }}\) such that \({\rho }'\) and \( {\rho }''\) are connected to \({\bar{\sigma }}\) via V-paths entirely contained in \(L_f(\sigma )\).

Proof

Because \(\dim {\tau }=\dim \sigma +2\), by Lemma 6\({\rho }'\) and \({\rho }''\) are the only two facets of \({\tau }\) contained in \(L_f(\sigma )\). Without loss of generality, we can assume \({\rho }'\) is classified by HomotopyExpansion earlier than \({\rho }''\). When it happens, either \({\rho }'\) is classified as critical or paired to another cell. If \({\rho }'\) is paired to another cell, it cannot be \(\sigma \) otherwise \({\rho }'i\) enters Ord0, \({\tau }\) enters Ord1, and \(r''\) and \({\tau }\) are eventually paired at line 17, contradicting the assumption that \({\tau }\) is critical. An analogous argument shows that \({\rho }'\) cannot be classified as critical. Thus, \({\rho }'\) needs to be paired to a cofacet different from \({\tau }\). As a consequence of such pairing, \({\rho }''\) enters Ord0, and \({\tau }\) enters Ord1. Again, \({\rho }''\) cannot be classified as critical, nor paired to \({\tau }\) because we are assuming that \({\tau }\) will eventually be classified as critical. Thus, \({\rho }''\) will rather be paired to some other cofacet \({\tau }'\) that entered into Ord1 before \({\tau }\).

Let us now consider two maximal V-paths \(({\rho }'_0,{\tau }'_0,\ldots , {\tau }'_{r-1}, {\rho }_r)\) and \(({\rho }''_0,{\tau }''_0,\ldots ,{\tau }''_{s-1}, {\rho }''_s)\) starting from \({\rho }'\) and \({\rho }''\), respectively, i.e. \({\rho }'={\rho }'_0\) and \({\rho }''={\rho }_0''\). By Lemma 7, there are only two such paths. Moreover, because such V-paths are maximal, \({\rho }'_r\) and \({\rho }''_s\) must be either critical or paired with \(\sigma \). Let us consider all the possible cases. If both \({\rho }'_r\) and \({\rho }''_s\) are paired to \(\sigma \), then the claim is proved with \({\bar{\sigma }}= {\rho }'_r ={\rho }''_s\) the unique simplex paired to \(\sigma \). If one of them is paired to \(\sigma \) and the other is critical, we get a contradiction. Indeed, the one paired to \(\sigma \) is classified earlier because the instruction is at line 8. After that, Ord1 is never empty, so that the other one cannot be classified as critical. Analogously, if \({\rho }'_r \ne {\rho }''_s\) and both are classified critical, then we get a contradiction because after the first one is classified as critical Ord1 is never empty. The only remaining case is when \({\rho }'_r ={\rho }''_s\) is classified as critical, which again proves the claim. \(\square \)

Theorem 1

For every simplicial complex K of dimension not greater than 2, and for every component-wise injective function \(f:K_0\rightarrow {\mathbb {Z}}^n\), there exists a relative-perfect discrete gradient vector field V consistent with the sublevel set multi-filtration \({{\mathcal {K}}}=\{K^u\}_{u\in {\mathbb {Z}}^n}\) induced by f by setting \(K^u=\{\sigma \in K: f(\sigma )\preceq u\}\) and \(f_i(\sigma )=\max \{f_i(\sigma ): \sigma \) is a facet of \({\tau }\} \).

Proof

By Proposition 1, it suffices to show that, for any filtration grade \(u\in {\mathbb {Z}}^n\) and any homology degree \(q\in {\mathbb {Z}}\), each q-simplex \({\tau }\) of V in \(M^u-\bigcup _{i=1}^n M^{u-e_i}\) satisfies \(\partial ^{rel}_q {\tau }= 0\).

Let \({\tau }\) be a q-simplex belonging to \(M^u-\bigcup _{i=1}^n M^{u-e_i}\). In other words, \({\tau }\) is a critical q-simplex of V belonging to \(K^u-\bigcup _{i=1}^n K^{u-e_i}\). Because \(K^u-\bigcup _{i=1}^n K ^{u-e_i}=f^{-1}(u)\), and because by Lemma 5 there is a unique primary simplex \(\sigma \) in K such that \(L _f(\sigma )=f^{-1}(u)\), we have \({\tau }\in L _f(\sigma )\). Let \(p=\dim {\tau }-\dim \sigma \). Since the sub-routine HomotopyExpansion works independently over each \( L _f(\sigma )\) with \(\sigma \) a primary simplex, we can confine ourselves to showing that for each of the cases \(p=0,1,2\) the boundary of \({\tau }\) in \( L _f(\sigma )\) relative to \(\bigcup _{i=1}^n K^{u-e_i}\) is trivial.

If \(p=0\), that is \({\tau }\) is a critical simplex of the same dimension as \(\sigma \), then \({\tau }= \sigma \) and line 8 in the sub-routine HomotopyExpansion ensures that \(L _f(\sigma )=\{\sigma \}\). Thus, for \(p=0\), we have \(\partial ^{rel}{\tau }=0\).

If \(p=1\), then \(\sigma \) is the only facet of \({\tau }\) in \(L _f(\sigma )\). Line 8 in the sub-routine HomotopyExpansion ensures that \(\sigma \) is non-critical, implying that \(\partial ^{rel}{\tau }=0\) also in this case.

If \(p=2\), we prove that \(\partial ^{rel}{\tau }=0\) by analyzing all the maximal V-paths contained in \(L _f(\sigma )\) starting from the facets of the critical cell \({\tau }\). Because \(p=2\), \({\tau }\) has exactly two facets in \(L _f(\sigma )\) by Lemma 6. By Lemma 8, the two faces of \({\tau }\) in \(L _f({\tau })\) admit each a V-path to the same simplex \({\rho }\). If \({\rho }\) is not critical, then \(\partial ^{rel}{\tau }=0\), trivially. Assume on the contrary that \({\rho }\) is critical. By Lemma 7, V-paths cannot branch inside \(L_f(\sigma )\). This means that precisely two V-paths connect \({\tau }\) to \({\rho }\). Hence, \(\partial ^{rel}{\tau }=0\) in this case as well because we are taking coefficients in \({\mathbb {Z}}/2{\mathbb {Z}}\). \(\square \)

As mentioned above, a consequence of Theorem 1 is that, even if some simplicial complexes of dimension 2 such as the dunce hat do not admit perfect discrete gradient vector fields with respect to standard homology, they always admits relative-perfect gradients. However, the lack of perfectness with respect to standard homology implies a lack of relative-perfectness in dimension 3. For example, the simplicial complex obtained taking the cone over the dunce hat from a ninth vertex, endowed with the filtration induced by the vertex indexing, does not admit a relative-perfect discrete gradient vector field.

6 Conclusions

Inspired by Morse inequalities, we have introduced in Definition 3 the notion of relative-perfectness of a discrete gradient vector field consistent with a one-critical multi-parameter filtration. Relative-perfectness boils down to the Morse complex of the gradient vector field having the minimal number of critical cells necessary to preserve multi-parameter persistence. Strictly speaking, such a definition had no previous one-parameter counterpart. However, we have shown that relative-perfectness generalizes to the multi-parameter case the optimality property satisfied by the output discrete gradient field obtained through algorithm Robins et al. (2011).

Specifically for the multi-parameter case, we have highlighted the phenomenon of “virtual” critical cells, already treated in Knudson (2008), concerning homological changes not depending on any particular critical cells added. In the same way, we have noticed the dual phenomenon of “virtual” homological changes where critical cells are added to preserve, rather than to change, homology. Both phenomena were known to be algebraically captured by Betti tables of the persistence-module associated to the multi-filtration.

For the case of two-parameter filtrations, we have proven in Corollary 2 sharp inequalities relating a relative-perfect discrete gradient and the Betti tables of the associated persistence module. These results show a link between multi-parameter persistent homology and discrete Morse theory that can be leveraged for a better understanding of the former. For instance, our results could turn out useful in situations where one first needs to compute Betti tables as a preprocessing step ahead of persistence computations as in RIVET Lesnick and Wright (2015), because the computations of critical cells can be exploited in both steps. The results of this paper suggest that analogous inequalities could hold for a larger number of parameters. However, deriving such inequalities would almost surely require more sophisticated techniques of homological algebra such as the spectral sequence of Mayer-Vietoris.

Concerning computability, we have proven that algorithms (Allili et al. 2017; Iuricich et al. 2016) under their assumptions, i.e., for one-critical filtrations, ensure the relative-perfectness of the output discrete gradient field whenever in the case of simplicial complexes of dimension up to 2 with no restriction on the number of parameters in the filtration. A limitation of such algorithmic construction is that the gradient vector field is computed from a function which is extended from the vertices to other simplices by taking the maximum. While this may be natural for spatial data, it is not so for a Vietoris-Rips complex built from finite metric spaces. From another perspective, it would be interesting to ascertain whether the algorithms considered in those papers permit the construction of relative-perfect gradient vector fields also for simplicial complexes of dimension higher than two. A counterexample to this is easily built by coning on the dunce hat in Fig. 5. However, this does not exclude the possibility of such result provided that lower links of simplices are good enough. In general, defining suitable classes of simplicial complexes admitting relative-perfect discrete gradients seems not to be more difficult than it is in the one-parameter or the classical Morse theory case.

Our contribution in defining relative-perfectness can be applied to computing multi-parameter persistent homology through a preprocessing performing a reduction before actual computations. Other approaches exist. As discussed in Fugacci and Kerber (2019), it is important to remark that in the multi-parameter case, by reducing to the Morse complex by means of a relative-perfect discrete gradient field, does not ensure to obtain the “smallest” filtered complex preserving the persistence module. Rather, the obtained filtered object is the most convenient among the Morse complexes preserving the multi-filtration. Indeed, this gap can be filled as proposed in Fugacci and Kerber (2019) reducing directly on the boundary matrix of the multi-filtered chain complex. In terms of chain complex size, authors prove their reduction to be optimal within the class of all filtered chain complexes whose homology is isomorphic to the input one. In that work, authors highlight that a consistent Morse complex belong to that class but not all the elements in the class are Morse complexes. Our result in Proposition 2 ensures that, their notion of optimality is satisfied by a relative-perfect reduction. Thus, relative-perfectness, whenever applicable, captures the same idea but places it into the framework of discrete Morse theory. In terms of computation performance, this implies that, for simplicial complexes of dimension up to 2, the algorithms (Allili et al. 2017; Iuricich et al. 2016) satisfy the same optimality property as in Fugacci and Kerber (2019). For higher dimensions, the last two mentioned algorithms do not ensure the optimality achieved by the algorithm Fugacci and Kerber (2019). Moreover, timings have been compared showing that Fugacci and Kerber (2019) is generally an order of magnitude faster than Iuricich et al. (2016). However, we remark that a discrete gradient stores additional information with respect to the only boundary matrix. For instance, the gradient provides an implicit remapping of the Morse complex onto the original complex. As already stated, the interplay between discrete Morse theory and multi-parameter persistence might shed some light on the understanding of the latter’s invariants.

This last observation motivates another possible direction for future works towards the analysis and visualization of multivariate data. Indeed, via a discrete gradient field, one can get a topologically meaningful subdivision of the domain according to a multi-filtration. A pair in a discrete gradient is consistent with a multi-filtration whenever such pairing is possible for all filtration components. This can be exploited to give a meaning and to detect interdependence among components. More practically, our future interest consists in comparing relative-perfectness to the analysis and visualization techniques based on classical Pareto points Smale (1975), that is points of the domain where it is impossible to increase a component value along a component without decreasing some other component. Some theoretical results already exist that relate discontinuity points in the persistence space to Pareto points Cerri and Frosini (2009).