ETH-Tight Complexity of Optimal Morse Matching on Bounded-Treewidth Complexes
Abstract
The Optimal Morse Matching (OMM) problem asks for a discrete gradient vector field on a simplicial complex that minimizes the number of critical simplices. It is NP-hard and has been studied extensively in heuristic, approximation, and parameterized complexity settings. Parameterized by treewidth , OMM has long been known to be solvable on triangulations of -manifolds in time and in FPT time for triangulations of arbitrary manifolds, but the exact dependence on has remained an open question. We resolve this by giving a new -time algorithm for any finite regular CW complex, and show that no -time algorithm exists unless the Exponential Time Hypothesis (ETH) fails.
Keywords and phrases:
Discrete Morse Theory, Simplicial Complexes, Optimal Morse Matching, Treewidth, Parameterized Algorithms, Computational Topology, Dynamic Programming, Exponential Time Hypothesis, Topological Data AnalysisFunding:
Erlend Raa Vågset: Supported in part by the Research Council of Norway, grant “Parameterized Complexity for Practical Computing (PCPC)” (No. 274526).Copyright and License:
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithms ; Theory of computation Algorithm design techniques ; Mathematics of computing Combinatorial algorithms ; Mathematics of computing Algebraic topologyAcknowledgements:
Geevarghese Philip thanks Priyavrat Deshpande for introducing him to Morse matchings and to questions concerning their efficient computation.Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Classical Morse theory [37] and its discrete counterpart [21, 22] provide a framework for simplifying spaces while preserving their essential topological features (see Figure 1). They do so by relating scalar functions to gradient flows in the smooth setting and discrete Morse functions to discrete gradient vector fields (Morse matchings) in the combinatorial setting. Much of the computational work on discrete Morse theory has focused on the matching perspective [32, 34, 40, 27, 1, 23], with the pioneering work on treewidth in computational topology [12] being no exception. At first sight, this close relationship suggests that the two formulations are interchangeable. In reality, they form diverging roads in the algorithmic landscape; let us follow the one less traveled by.
Morse theory has applications in topological data analysis and computational topology [27, 2, 33, 38, 23, 16], robotics and configuration spaces [20, 24], molecular modeling [14], and mesh and image processing [35, 18]. A recurring primitive in these works is to construct a discrete gradient vector field, also known as a Morse matching, with few critical simplices, yielding strong homotopy-preserving simplifications. Intuitively, such a field is a discrete vector field without “swirls”: there are no loops in the flow lines, so one can contract the space along them without changing the homotopy type. Combinatorially, such a field corresponds to a matching in the Hasse diagram of the complex such that reversing the matched edges does not create any directed cycles. This motivates the Optimal Morse Matching (OMM) problem, also known as Min-/Max-Morse Matching, depending on whether the objective is to minimize the number of critical simplices or maximize the number of matched pairs:
Problem 1 (Optimal Morse Matching (OMM)).
Input: A finite simplicial complex and a weight function .
Task: Find a discrete gradient vector field on .
Optimize: Minimize the total weight of critical (i.e., unmatched) simplices.
From a computational complexity perspective, OMM and closely related variants are highly intractable: they are NP-hard [32], admit strong classical inapproximability bounds [3], and are linked to other hard topological decision problems such as Collapsibility [42, 36], Erasibility of -complexes [12, 3], and Shellability [25]. Algorithmic work includes approximation algorithms for Max-Morse Matching [40] and a variety of heuristic and workflow-based methods for practical simplification [2, 34, 27, 23, 1]. On the parameterized side, using the optimum number of critical simplices as parameter, Erasability and Min-Morse Matching are -hard and admit no FPT approximation schemes [12, 4].
To circumvent these complexity barriers we turn to treewidth, which intuitively measures how close a combinatorial object is to being a tree; see Figure 2. An early systematic use of treewidth in discrete Morse theory is the fixed-parameter algorithm of [12] for OMM, which runs in time when parameterized by the treewidth of an associated spine graph for -complexes, and by the treewidth of either the spine graph or the dual graph for triangulated -manifolds. This was complemented by a Courcelle-style metatheorem for MSO-definable properties on triangulations [11], which yields fixed-parameter tractability for OMM on triangulated manifolds of fixed dimension when parameterized by the treewidth of the dual graph. Since then, treewidth has become central in computational topology, leading to FPT algorithms for a range of NP-hard topological problems and invariants [10, 13, 6], ETH-tight lower bounds for several of these problems [8, 5, 7, 43], and detailed studies of the width of triangulated -manifolds [30, 28, 29].
Remark 2.
Across the literature, “treewidth ” is measured on different associated graphs (dual graphs, spine graphs, Hasse diagrams), chosen to suit the problem at hand. For fixed dimension, [11] shows that the treewidth of the Hasse diagram of a triangulation is bounded by a constant factor times the treewidth of its dual graph, and [12] shows that in dimension the spine treewidth is likewise linearly bounded in terms of the dual treewidth. Thus, for fixed dimension these parameters coincide up to constant factors hidden in the -notation. In this paper we simply write “treewidth ” and, in practice, work with the Hasse diagram.
1.1 Contributions
Algorithmic.
We give an explicit dynamic program (DP) for a digraph formulation of Optimal Morse Matching parameterized by treewidth , which in particular solves OMM on all finite regular CW complexes of treewidth . It runs in time , thereby extending and improving both the earlier explicit treewidth-based algorithms for -complexes and triangulated -manifolds with running time [12] and the implicit MSO-based algorithm for triangulated manifolds in [11]. The simple invariant and state space allowed us to implement the algorithm and verify it on small instances by exhaustive search.
Optimality.
Under ETH, our running time is optimal: using a known treewidth-based lower bound for Directed Feedback Vertex Set (DFVS), we show that there is no -time algorithm for Optimal Morse Matching parameterized by treewidth , even on -dimensional complexes of top coface degree at most . This follows from a new polynomial-time reduction from DFVS to Erasability, to which we apply the recent Width Preserving Strategy (WiPS) framework of [43] to ensure that treewidth is preserved. Combined with the standard equivalence between Erasability and OMM on -dimensional complexes, this yields the ETH-tight dependence.
Conceptual.
Our order-based formulation (Feedback Morse Order) shows that working indirectly with vertex orders rather than directly with matchings captures exactly what a treewidth DP for OMM needs to remember. This ordering viewpoint transfers to Alternating Cycle-Free/Uniquely Restricted Matchings (AC-FM/URM) on bipartite graphs, but the connection breaks on general graphs. Here, AC-FM and URM still only admit -time algorithms and lack tight-ETH lower bounds. We therefore point to AC-FM and URM as natural candidates for genuinely -time problems in treewidth and as targets for either -time algorithms or matching lower bounds.
Remark 3.
Some proofs of correctness, running-time analyses, and additional details are deferred to the full version [39].
2 Preliminaries
We use standard terminology from parameterized complexity [19, 17] and discrete Morse theory [21, 22, 41]. We write for the input size; for OMM, is the number of cells of the complex, which equals the number of vertices of its Hasse diagram.
2.1 Parameterized complexity theory
Treewidth and nice tree decompositions.
When we speak of the treewidth of a digraph or a complex, we mean the treewidth of the natural underlying undirected graph in the first case, and of the Hasse diagram in the second. Informally, treewidth measures how close a graph is to being a tree (see also Figure 2): we cover the graph by overlapping bags of vertices arranged in a tree so that each edge lies entirely inside some bag and the bags containing any fixed vertex form a connected subtree; the width is one less than the size of the largest bag, and the treewidth is the minimum width over all such decompositions; this will be our parameter throughout the paper. Such decompositions let us localize global constraints: a dynamic program only needs to maintain partial solutions on a bag of size and combine them along the tree, so we can brute-force over states per bag rather than over the whole graph and obtain running times of the form . We use rooted nice tree decompositions; unless stated otherwise, we fix an arbitrary root bag and process the decomposition bottom–up. Formal definitions are given in the full version [39, App. A.1]. In this paper we work with the standard nice node types (leaf, introduce-vertex, forget-vertex, and join), and we also use auxiliary introduce-edge bags: unary nodes whose bag is identical to that of their child and that are annotated with a single edge in the bag, marking the point where that edge is processed in the dynamic program or reduction. This is a standard refinement that preserves width.
FPT and ETH.
A parameterized problem with parameter is fixed-parameter tractable (FPT) if it can be solved in time for some computable function ; such running times are considered efficient when is small compared to , since the combinatorial explosion is confined to while the dependence on the input size remains polynomial. For conditional lower bounds we assume the Exponential Time Hypothesis (ETH) [31], which states that 3-SAT on variables cannot be solved in time ; ETH is a strengthening of that has withstood decades of algorithmic progress and underpins many tight running-time lower bounds. Our hardness source is Directed Feedback Vertex Set parameterized by the treewidth of the underlying undirected graph of the input digraph , where a feedback vertex set in a digraph is a set such that is acyclic.
Problem 4 (Directed Feedback Vertex Set (DFVS)).
Input: A directed graph and an integer .
Question: Does contain a feedback vertex set of size at most ?
Theorem 5 (Bonamy et al. [9]).
Unless ETH fails, DFVS parameterized by the treewidth of the underlying undirected graph of the input digraph cannot be solved in -time.
2.2 Discrete Morse theory
Complexes and Hasse diagrams.
We use the standard notions of finite regular CW complexes and discrete Morse theory in the sense of Forman [21], and keep the topological preliminaries brief. Face relations are given by closure containment, so the face poset and its directed Hasse diagram encode the incidence data we use. We write for the directed Hasse diagram of a complex ; it has one vertex per cell and an arc whenever is an immediate face of (a cover relation in the face poset), and hence . Let be the underlying undirected graph; we measure treewidth on , denoted . Simplicial complexes are the special case where cells are simplices (points, lines, triangles, tetrahedra, etc.); we use them in figures and in our reduction.
Discrete Morse theory on complexes.
Forman’s discrete Morse theory can be phrased entirely in terms of matchings on the Hasse diagram of a finite regular CW complex . A discrete vector field is a matching on , i.e. a set of pairs with an arc of such that each cell appears in at most one pair. From we obtain a new digraph by reversing exactly the matched arcs and leaving all others unchanged; if is acyclic, then is a discrete gradient vector field. Forman’s correspondence states that (i) every discrete Morse function on induces such a gradient vector field, and (ii) conversely, every discrete gradient vector field arises from some discrete Morse function; in both directions, the unmatched cells in are precisely the critical cells of the corresponding Morse function. Collapsing along the gradient flow yields a smaller Morse complex (see Figure 1) that is homotopy equivalent to and can make downstream topological computations much cheaper. The Optimal Morse Matching problem (Problem 1) asks for a discrete gradient vector field minimizing the total weight of these unmatched cells.
Erasibility in 2D.
For our lower bound we use the notion of erasibility of -dimensional simplicial complexes . A -simplex (edge) is free if it is contained in exactly one -simplex , and removing together with is an elementary collapse. A -simplex is erasible if it can be removed through a sequence of elementary collapses, and is erasible if every -simplex can be eliminated in this way, that is, if collapses to a -dimensional complex.
Problem 6 (Erasibility).
Input: A -dimensional simplicial complex and an integer .
Question: Is there a set of -simplices in such that and is erasible?
3 Algorithm
We give a fixed-parameter algorithm for Feedback Morse Matching, a digraph generalization of Optimal Morse Matching, on digraphs whose underlying undirected graph has treewidth . The algorithm rests on three ingredients: (i) we work in the general setting of arbitrary digraphs rather than Hasse diagrams only; (ii) we adopt the Morse-function viewpoint and encode solutions as vertex orders (Feedback Morse Orders) instead of matchings; and (iii) this yields a very simple dynamic program whose state at each bag consists only of an order on the bag and a subset of its vertices. This order–mask formulation avoids the more involved connectivity machinery of previous approaches and leads to a running time of .
3.1 Of feedback Morse matchings and feedback Morse orders
Generalizing OMM to digraphs.
For our algorithmic purposes it is convenient to generalize the matching viewpoint from Hasse diagrams to arbitrary digraphs, and to allow both positive and negative weights. Given a digraph and a matching , let be the digraph obtained by reversing every edge of and leaving all other edges unchanged; we call a feedback Morse matching if is acyclic. In the resulting Feedback Morse Matching (FMM) problem (Problem 3.1), the input is a digraph and a weight function , and the task is to find a feedback Morse matching minimizing the total weight of unmatched vertices. When is the Hasse diagram of a simplicial complex and is identified with the simplices of , discrete gradient vector fields on are exactly feedback Morse matchings on . Thus OMM is the special case of FMM where comes from a complex and is nonnegative; in the classical unweighted case , the objective is simply the number of critical simplices [32, 3]. Mixed-sign weights in this framework allow one to favour or penalize particular cells (useful for extending a Morse Matching), while the purely negative-weight variant (e.g. ) on general digraphs corresponds to finding a smallest feedback Morse matching, that is, a minimum-size matching whose reversals destroy all directed cycles in .
Problem 8 (Feedback Morse Matching (FMM)).
Input: A finite directed graph and a weight function .
Question: Find a feedback Morse matching that minimizes the total weight of unmatched vertices.
Theorem 9.
Let be a digraph whose underlying undirected graph has treewidth , and let . Given vertex weights , Feedback Morse Matching on can be solved in time .
Shifting from matchings to orders.
As committed procrastinators, we now do our best to avoid thinking about matchings. Instead, we turn to vertex orders. Let be a total order of . An edge is backward with respect to if appears before in , and let be the set of backward edges. Once is fixed, the set of edges to reverse is determined: we always take and reverse exactly these edges. We call a feedback Morse order if is a matching (no two edges in share a vertex).
Problem 10 (Feedback Morse Order (FMO)).
Input: A digraph and a weight function .
Question: Find a feedback Morse order that minimizes the total weight of vertices that are unmatched in .
Lemma 11 (Matchings vs. orders).
Let be a digraph. If is a feedback Morse order, then is a feedback Morse matching on . Conversely, if is a feedback Morse matching on , then there exists a feedback Morse order with .
Proof.
For any order , reversing all backward edges makes every edge point forward along , so reversing all backward edges yields an acyclic digraph; if is a matching, it is a feedback Morse matching. Conversely, if is a feedback Morse matching, then is acyclic, and any topological order of satisfies .
A Forman correspondence.
By Lemma 11, FMO and FMM are equivalent optimization problems: every optimal feedback Morse order induces an optimal feedback Morse matching and vice versa, so in what follows we work entirely with the order-based formulation.
3.2 R-FMO: The boundary subproblem on bags
Orders and masks on bags.
We run our dynamic program over a rooted nice tree decomposition of the underlying undirected graph of , refined with introduce-edge bags as in Section 2. For a bag let be its vertex set, the subtree rooted at , the vertices appearing in bags of , and the subgraph on whose edges are exactly those whose introduce-edge bags lie in . Intuitively, is the part of the graph already processed when we are at , and is its boundary. A global feedback Morse order on restricts at to a total order on and a set of boundary vertices already matched inside ; we view as a mask on , marking which boundary vertices are already matched. This leads to the following boundary subproblem.
Problem 12 (Restricted Feedback Morse Order (R-FMO)).
Input: A digraph with vertex weights , a boundary set , a total order of , and a subset .
Question: Among all feedback Morse orders on with and , minimize ; if no such exists, the optimum is defined as .
The global optimum of FMO (and hence of FMM) is the value of an R-FMO instance at the root bag, whose boundary is empty; in particular, every state in our dynamic program will consist of an order on the bag together with a mask of matched boundary vertices.
3.3 Dynamic program on a tree decomposition
We now describe the dynamic program at a high level. Full recurrences and a formal DP invariant are presented in [39, App. A]. For each bag and each state on as above, we maintain a table entry , defined as the optimum of the R-FMO instance , that is, the minimum total weight of unmatched vertices in over all feedback Morse orders on compatible with ; if no such order exists, we set . Figure 10 illustrates how such states are propagated along a tree decomposition and how locally invalid states are discarded. We process the nice tree decomposition bottom–up. At each bag type we update the table using only local information.
Leaf.
The processed subgraph is empty, so there is a single state with empty order and empty matched set, and cost .
Introduce-vertex.
A new vertex enters the bag (and the graph) with no incident edges yet. It cannot already be matched, so is forbidden. Otherwise we extend the order by inserting at its chosen position; the cost does not change.
Introduce-edge.
A new edge is introduced between vertices already in the bag. The order determines whether it is forward or backward: (i) if is forward in , it can never be backward in any extension and thus can never enter the matching; (ii) if is backward in , it must be in the matching, and this is the unique place where it is introduced along the path. In the backward case we insist that and are currently unmatched in the child and become matched in the parent. Any state where this would create a double match in is discarded.
Forget-vertex.
A vertex leaves the bag. At this moment all edges incident to have already been introduced below, so ’s matching status is final. We branch on whether is matched in the child: if is unmatched, we add to the cost; if is matched, never contributes again. We then take the minimum over all child states in which appears at some position in the child order and the projected order on the remaining bag is .
Join.
Two subtrees with the same bag are merged. The processed subgraph is the union of and , and the bag order is the same in all three bags. The order already decides which bag-internal edges are backward, and hence which bag vertices are forced to be matched via those edges; call this set . Every feasible state must satisfy for the parent and both children (if induces conflicting backward edges, all such states are infeasible and ). Outside , a bag vertex can be matched strictly below in at most one of the two subtrees (there are no edges between the forgotten parts of the two subgraphs). Thus for a parent state we look over all pairs of child matched sets such that and We then set to the minimum of over all such pairs.
A formal DP invariant and soundness/completeness proofs can be found in [39, App. A]. At the root bag , the bag is empty, so there is a single state ; its value is exactly the optimum of FMO on , and hence of FMM and OMM.
3.4 Running time
We sketch the running-time bound; the full accounting is given in [39, App. A.11]. Let be the treewidth of the underlying undirected graph of and set . In a nice tree decomposition of width , each bag has size at most . A DP state is a pair where is a total order on the current bag and is a subset of its vertices. Hence the number of states per bag is at most For each fixed state, leaf/introduce-vertex/introduce-edge transitions take time, and a forget transition branches over insertion positions. At a join bag, the order is shared by both children, and combining solutions amounts to splitting the bag-mask information between the two subtrees, yielding at most admissible child pairs per state. Thus the work per bag is , and since the decomposition has bags, the total running time is .
4 ETH-optimality
How expensive is treewidth for OMM? Our -time algorithm shows what is achievable, and in this section we prove that this is indeed the true price under the Exponential Time Hypothesis (ETH). Starting from the ETH-based lower bound for Directed Feedback Vertex Set (DFVS) parameterized by treewidth, we give a new polynomial-time reduction from DFVS to Erasibility on -dimensional complexes of bounded coface degree. We then realize this reduction bag-by-bag using the Width Preserving Strategy (WiPS), which performs structural induction along a tree decomposition and keeps treewidth within a constant factor. As a consequence, any -time algorithm for OMM (even in this restricted setting) would yield such an algorithm for DFVS, contradicting ETH and pinning down the dependence on as .
Theorem 13.
Assuming ETH, Erasibility parameterized by treewidth admits no -time algorithm, even when the input is restricted to -dimensional simplicial complexes of top coface degree at most .
4.1 Gadgets and obstructions
Vertex gadgets: fuses and locks.
Let be a DFVS instance. For each vertex we build a local gadget , illustrated in Figure 11. The fuse is a 2-dimensional simplicial complex homeomorphic to a hollow cylinder with two boundary circles: one is a free boundary circle (marked in red) from which we can start collapsing the complex, “unravelling” the fuse by elementary collapses along the cylinder; the other boundary circle is non-free and is glued to the lock . The lock is a 2-dimensional simplicial complex homeomorphic to a compact orientable surface of genus with a single boundary component, which is attached to this non-free boundary circle of the fuse. For each outgoing arc in , we select a distinct simple closed curve on and glue it to a cross-section circle of the fuse , so that each such curve acts like a finger pinching the fuse: it prevents from collapsing past that cross-section as long as the lock is present. In the interior of we mark a single triangle (the detonator); deleting this triangle makes the entire lock collapsible, eliminates all its pinches, and simultaneously releases every constraint that imposes on neighbouring fuses. We triangulate so that it becomes collapsible in either of two situations: after deleting , or after its attached fuse has been completely collapsed. In particular, as long as is present and is intact, the lock cannot be collapsed while it still pinches some neighbouring fuse.
Ouroboroi as obstructions.
Fix a directed cycle in . For each arc (indices modulo ) we use one outgoing handle of and glue it so that it pinches the fuse as described above. Taking exactly these pieces along the cycle yields a closed ring of vertex gadgets in which each lock pinches the next fuse; because of the visual similarity to a snake eating its own tail, we call such a ring an -ouroboros, see Figure 12. Along an ouroboros, each fuse can be collapsed from its free boundary until it reaches the first pinch, but it cannot be collapsed past that point while the corresponding lock is present. By construction, every edge in this ring belongs to at least two triangles (coming from the fuse, the lock, or their intersection), so inside this subcomplex there are no free edges and hence no elementary collapses. In particular, an ouroboros persists under any sequence of elementary collapses until at least one of its locks is destroyed, and we will use these rings as obstructions witnessing the presence of directed cycles in .
4.2 Correctness of the reduction
Let be the complex constructed from a DFVS instance , and for each vertex let be its detonator triangle in the gadget . We show that this construction yields a parameter-preserving polynomial-time reduction from DFVS to Erasibility: for every integer , has a feedback vertex set of size at most if and only if becomes erasible after deleting at most triangles.
Forward direction.
Let be a feedback vertex set of size at most , and let . Deleting makes the entire lock collapsible and removes all its pinches on neighbouring fuses, so in we can collapse every lock with . Since is acyclic, we can order its vertices topologically and, in that order, collapse each remaining gadget : once all incoming locks to have been removed, the fuse collapses completely, and by the gadget design the remaining lock then collapses as well. At the end only gadgets for vertices in remain, but their locks have already been removed and their fuses are just cylinders with a free boundary, so they also collapse. Thus is erasible after deleting triangles.
Backward direction.
Conversely, let be a set of at most triangles such that is erasible, and define . Clearly . Suppose for contradiction that still contains a directed cycle . By construction, the gadgets contain an -ouroboros subcomplex . Since no gadget on intersects , is disjoint from , and every edge of still lies in at least two triangles in . Hence no edge of is ever free, so no sequence of elementary collapses can remove , and is not erasible – a contradiction. Thus is acyclic, and is a feedback vertex set of size at most .
4.3 Preserving width via WiPS
Width blow-up.
Hardness reductions for problems parameterized by treewidth must control the width of the target instance: a naïve “glue all gadgets at once” construction can easily turn a bounded-treewidth graph into a complex whose Hasse diagram has very large treewidth. In our setting, globally attaching all vertex gadgets would allow long fuses and many handles to interact and form large grid-like regions in the Hasse diagram, even when itself has small treewidth; see [5] for a concrete construction or Figure 13 for intuition.
WiPS.
To avoid this blow-up, we assemble the same gadgets incrementally along a nice tree decomposition of , following the Width Preserving Strategy (WiPS) [43]. For each bag we maintain a partial complex together with a small interface of boundary circles associated with the vertices in , and when moving from a child bag to its parent we only apply constant-size local updates touching this interface: at an introduce-vertex bag we attach a fresh gadget ; at an introduce-edge bag we add a single pinching handle between and ; at a forget-vertex bag we cap off the remaining boundary components of ; and at a join bag we merge the two partial gadgets for each along a constant-size interface (on the lock side via a pair-of-pants, on the fuse side by attaching both child cylinders to a common boundary circle and extending it by a short cylinder). Intuitively, each bag only “sees” a bounded portion of the complex, and only a bounded number of new simplices is introduced per bag; see Figure 14.
Summary.
Instantiating WiPS with our gadgets, we obtain that if has treewidth , then the complex produced by the above construction has a Hasse diagram of treewidth at most for fixed constants independent of , and remains polynomial in . A detailed WiPS induction invariant and the exact bag-by-bag construction are in [39, App. B]. Here we only use this width bound together with the gadget behavior described above. Together with the correctness of the DFVS-to-Erasibility reduction proved above, this yields Theorem 13.
5 Discussion
Table 1 summarises our treewidth-parameterized bounds. For FMM/FMO on digraphs, OMM on Hasse diagrams, and 2D Erasability with coface degree at most 4 we obtain algorithms running in time , and our width-preserving reduction from DFVS shows that no algorithm exists under ETH. Thus these problems have optimal dependence on treewidth. The rows with unknown ETH bounds in Table 1 show that the same dynamic programme extends to OMM on triangulated manifolds and to negative-weight FMM/FMO, and it remains open whether ETH lower bounds also carry over or whether the extra structure allows faster algorithms. Our algorithm also applies to AC-FM on bipartite graphs. In the single-level bipartite incidence-graph setting used in the matching-based formulation of discrete Morse theory (e.g. spine graphs), AC-FM, URM [26], and the corresponding discrete Morse matching problem are equivalent; see [12]. Hence we obtain a -time algorithm for bipartite AC-FM/URM. Our ETH lower bound already holds for bipartite incidence graphs of maximum degree at most 4, in particular for those arising from -complexes, so the dependence is ETH-tight in the bipartite setting. By contrast, on general graphs the recent treewidth-based dynamic programme of [15] runs in time. Whether the dependence can also be achieved for general graphs remains open.
| Problem | Setting | Algorithm | ETH |
|---|---|---|---|
| FMM/FMO | General digraphs, any weights | ||
| FMM/FMO | General digraphs, negative weights | – | |
| OMM | DAGs/Hasse diagrams | ||
| OMM | Triangulated -manifolds | – | |
| 2D Erasability | Coface degree , unweighted | ||
| Conjectured | Coface degree , embeddable in | ||
| AC-FM/URM | General graphs, algorithm from [15] | ||
| AC-FM/URM | Bipartite graphs | ||
| AC-FM/URM | Bipartite graphs, maximum degree |
Representation matters.
Forman’s correspondence identifies discrete Morse matchings with Morse functions or orders on the underlying Hasse diagram, but these viewpoints behave very differently for treewidth-based algorithms. Most prior work, including Hasse-based formulations of OMM and the parameterized algorithm of [12], stays in the matching language: discrete gradients are matchings and gradient paths are alternating paths. In that setting one either appeals to meta-theorems such as Courcelle’s theorem, with non-elementary state spaces, or designs ad-hoc state summaries based on alternating-path patterns on each bag of a tree decomposition. Figure 15 shows that such summaries are delicate: alternating reachability is not transitive, and merging states solely on the basis of their alternating pattern can silently discard globally optimal extensions. In particular, our example suggests that the union–find based invariant used in [12], which implicitly treats alternating connectivity as an equivalence relation, is too coarse as stated; one really needs to know which vertices are alternating-reachable from which, not just which “components” they lie in. The recent AC-FM/URM dynamic program of [15] can be seen as a systematic matching-based repair: on each bag it stores an “alternating matrix” recording, for every pair of vertices, whether they are connected by an alternating path with respect to the current matching, that is, the full relation of alternating reachability. This avoids over-pruning and, on bipartite incidence graphs (such as spines or Hasse diagrams), yields a faithful matching-based implementation of discrete Morse matchings, but at the price of a state space for bags of size , as reflected in Table 1. Beyond the bipartite/Hasse case the relationship between AC-FM and FMM breaks down, and we do not currently see how to compress alternating information on general graphs to obtain a dependence without a substantially different representation.
Conclusion.
We give an order-based dynamic program for Optimal Morse Matching on bounded-treewidth complexes with running time and, via WiPS-style width-preserving reductions, ETH-tight lower bounds that persist even under strong restrictions on the input. For discrete Morse theory, our results suggest that for treewidth, taking the path of functions and orderings has made all the difference. Looking ahead, the road keeps going:
-
Three gaps suggested by Table 1. First, prove the conjectured ETH-tight lower bound for 2D Erasability on complexes of coface degree embeddable in . Second, for triangulated manifolds can we obtain a -time algorithm for OMM? Third, for AC-FM/URM we have an ETH-tight running time on bipartite graphs, while on general graphs the best known DP runs in time [15]. Can we show under ETH that a quadratic dependence on treewidth in the exponent is unavoidable in the general-graph case?
-
A locality constraint for OMM. With solution-size parameterizations remaining -hard [12, 4], it is natural to look for complementary structural parameters. One concrete direction is to enforce local simplification by bounding (or minimizing) the length of the longest gradient path, equivalently the longest alternating path in the Hasse diagram after reversing matched edges. What is the complexity of OMM under such a locality constraint, and how does it interact with bounded treewidth?
-
WiPS beyond this paper. Our ETH lower bound relies on the Width Preserving Strategy (WiPS) [43], which enables reductions to be carried out bag-by-bag while keeping treewidth under control. Can WiPS be developed into a general toolbox for proving tight treewidth lower bounds (and perhaps transferring XNLP-hardness) for other problems studied via treewidth in topology and geometry, for example quantum invariants and decision problems on triangulations [10, 13, 6]?
References
- [1] Madjid Allili, Tomasz Kaczynski, Claudia Landi, and Filippo Masoni. Acyclic partial matchings for multidimensional persistence: Algorithm and combinatorial interpretation. Journal of Mathematical Imaging and Vision, 61(2):174–192, 2019. doi:10.1007/s10851-018-0843-8.
- [2] Ulrich Bauer, Carsten Lange, and Max Wardetzky. Optimal topological simplification of discrete functions on surfaces. Discrete & Computational Geometry, 47(2):347–377, 2012. doi:10.1007/s00454-011-9350-z.
- [3] Ulrich Bauer and Abhishek Rathod. Hardness of approximation for Morse matching. In Timothy M. Chan, editor, Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2019, San Diego, California, USA, January 6-9, 2019, pages 2663–2674. SIAM, 2019. doi:10.1137/1.9781611975482.165.
- [4] Ulrich Bauer and Abhishek Rathod. Parameterized inapproximability of Morse matching. Computational Geometry, 126:102148, 2025. doi:10.1016/j.comgeo.2024.102148.
- [5] Mitchell Black, Nello Blaser, Amir Nayyeri, and Erlend Raa Vågset. ETH-tight algorithms for finding surfaces in simplicial complexes of bounded treewidth. In 38th International Symposium on Computational Geometry (SoCG 2022), volume 224 of Leibniz International Proceedings in Informatics (LIPIcs), pages 17:1–17:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.SoCG.2022.17.
- [6] Mitchell Black and Amir Nayyeri. Finding minimum bounded and homologous chains in simplicial complexes with bounded-treewidth 1-skeleton. arXiv, 2021. arXiv:2107.10339.
- [7] Nello Blaser, Morten Brun, Lars M. Salbu, and Erlend Raa Vågset. The parameterized complexity of finding minimum bounded chains. Computational Geometry, 122:102102, 2024. doi:10.1016/j.comgeo.2024.102102.
- [8] Nello Blaser and Erlend Raa Vågset. Homology localization through the looking-glass of parameterized complexity theory. Journal of Applied and Computational Topology, 9:16, 2025. doi:10.1007/s41468-025-00212-0.
- [9] Marthe Bonamy, Łukasz Kowalik, Jesper Nederlof, Michał Pilipczuk, Arkadiusz Socała, and Marcin Wrochna. On directed feedback vertex set parameterized by treewidth. In Andreas Brandstädt, Ekkehard Köhler, and Klaus Meer, editors, Graph-Theoretic Concepts in Computer Science (WG 2018), volume 11159 of Lecture Notes in Computer Science, pages 65–78. Springer, 2018. Also available as arXiv:1707.01470. doi:10.1007/978-3-030-00256-5_6.
- [10] Benjamin A. Burton. The HOMFLY–PT Polynomial is Fixed-Parameter Tractable. In Bettina Speckmann and Csaba D. Tóth, editors, 34th International Symposium on Computational Geometry (SoCG 2018), volume 99 of Leibniz International Proceedings in Informatics (LIPIcs), pages 18:1–18:14, Dagstuhl, Germany, 2018. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2018.18.
- [11] Benjamin A. Burton and Rodney G. Downey. Courcelle’s theorem for triangulations. Journal of Combinatorial Theory, Series A, 146:264–294, February 2017. doi:10.1016/j.jcta.2016.10.001.
- [12] Benjamin A. Burton, Thomas Lewiner, João Paixão, and Jonathan Spreer. Parameterized complexity of discrete Morse theory. ACM Transactions on Mathematical Software, 42(1):6:1–6:24, March 2016. doi:10.1145/2738034.
- [13] Benjamin A. Burton, Clément Maria, and Jonathan Spreer. Algorithms and complexity for Turaev–Viro invariants. Journal of Applied and Computational Topology, 2(1-2):33–53, 2018. doi:10.1007/s41468-018-0016-2.
- [14] Frédéric Cazals, Frédéric Chazal, and Thomas Lewiner. Molecular shape analysis based upon the Morse–Smale complex and the Connolly function. In Proceedings of the 19th Annual Symposium on Computational Geometry, pages 351–360, 2003. doi:10.1145/777792.777845.
- [15] Juhi Chaudhary, Ignasi Sau, and Meirav Zehavi. A parameterized perspective on uniquely restricted matchings. Procedia Computer Science, 273:509–516, 2025. Also available as arXiv:2508.12004. doi:10.1016/j.procs.2025.10.339.
- [16] Justin Curry, Robert Ghrist, and Vidit Nanda. Discrete Morse theory for computing cellular sheaf cohomology. Foundations of Computational Mathematics, 16(4):875–897, 2016. doi:10.1007/s10208-015-9266-8.
- [17] Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, Cham, 2015. doi:10.1007/978-3-319-21275-3.
- [18] Olaf Delgado-Friedrichs, Vanessa Robins, and Adrian Sheppard. Skeletonization and partitioning of digital images using discrete Morse theory. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(3):654–666, 2015. doi:10.1109/TPAMI.2014.2346172.
- [19] Rodney G. Downey and Michael R. Fellows. Parameterized Complexity. Monographs in Computer Science. Springer, New York, NY, 1999. doi:10.1007/978-1-4612-0515-9.
- [20] Michael Farber. Invitation to Topological Robotics. Zurich Lectures in Advanced Mathematics. European Mathematical Society (EMS), Zürich, 2008. doi:10.4171/054.
- [21] Robin Forman. Morse theory for cell complexes. Advances in Mathematics, 134(1):90–145, 1998. doi:10.1006/aima.1997.1650.
- [22] Robin Forman. A user’s guide to discrete Morse theory. Séminaire Lotharingien de Combinatoire, 48:B48c, 2002. URL: https://www.mat.univie.ac.at/˜slc/wpapers/s48forman.html.
- [23] Ulderico Fugacci, Federico Iuricich, and Leila De Floriani. Computing discrete Morse complexes from simplicial complexes. Graphical Models, 103:101023, 2019. doi:10.1016/j.gmod.2019.101023.
- [24] Robert Ghrist. Configuration spaces, braids, and robotics. In Braids: Introductory Lectures on Braids, Configurations and Their Applications, pages 263–304. World Scientific, 2010. doi:10.1142/9789814291415_0004.
- [25] Xavier Goaoc, Pavel Paták, Zuzana Patáková, Martin Tancer, and Uli Wagner. Shellability is NP-complete. Journal of the ACM, 66(3):21, 2019. doi:10.1145/3314024.
- [26] Martin Charles Golumbic, Tom Hirst, and Michael Lewenstein. Uniquely restricted matchings. Algorithmica, 31(2):139–154, 2001. doi:10.1007/s00453-001-0004-z.
- [27] Shaun Harker, Konstantin Mischaikow, Marian Mrozek, and Vidit Nanda. Discrete Morse theoretic algorithms for computing homology of complexes and maps. Foundations of Computational Mathematics, 14(1):151–184, 2014. doi:10.1007/s10208-013-9145-0.
- [28] Kristóf Huszár and Jonathan Spreer. 3-Manifold Triangulations with Small Treewidth. In Gill Barequet and Yusu Wang, editors, 35th International Symposium on Computational Geometry (SoCG 2019), volume 129 of Leibniz International Proceedings in Informatics (LIPIcs), pages 44:1–44:20, Dagstuhl, Germany, 2019. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2019.44.
- [29] Kristóf Huszár and Jonathan Spreer. On the width of complicated JSJ decompositions. Discrete & Computational Geometry, 74(4):917–943, 2025. doi:10.1007/s00454-025-00746-1.
- [30] Kristóf Huszár, Jonathan Spreer, and Uli Wagner. On the treewidth of triangulated 3-manifolds. Journal of Computational Geometry, 10(2):70–98, 2019. doi:10.20382/jocg.v10i2a5.
- [31] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? Journal of Computer and System Sciences, 63(4):512–530, 2001. doi:10.1006/jcss.2001.1774.
- [32] Michael Joswig and Marc E. Pfetsch. Computing optimal Morse matchings. SIAM Journal on Discrete Mathematics, 20(1):11–25, 2006. doi:10.1137/S0895480104445885.
- [33] Harish Kannan, Emil Saucan, Indrava Roy, and Areejit Samal. Persistent homology of unweighted complex networks via discrete Morse theory. Scientific Reports, 9:13817, 2019. doi:10.1038/s41598-019-50202-3.
- [34] Thomas Lewiner, Helio Lopes, and Geovan Tavares. Toward optimality in discrete Morse theory. Experimental Mathematics, 12(3):271–285, 2003. doi:10.1080/10586458.2003.10504498.
- [35] Thomas Lewiner, Helio Lopes, and Geovan Tavares. Applications of Forman’s discrete Morse theory to topology visualization and mesh compression. IEEE Transactions on Visualization and Computer Graphics, 10(5):499–508, 2004. doi:10.1109/TVCG.2004.18.
- [36] Rémy Malgouyres and Angel R. Francés. Determining whether a simplicial 3-complex collapses to a 1-complex is NP-complete. In Discrete Geometry for Computer Imagery (DGCI 2008), volume 4992 of Lecture Notes in Computer Science, pages 177–188. Springer, 2008. doi:10.1007/978-3-540-79126-3_17.
- [37] Marston Morse. The Calculus of Variations in the Large, volume 18 of American Mathematical Society Colloquium Publications. American Mathematical Society, Providence, RI, 1996. Reprint of the 1934 original. doi:10.1090/coll/018.
- [38] Soham Mukherjee. Denoising with discrete Morse theory. The Visual Computer, 37(9):2883–2894, 2021. doi:10.1007/s00371-021-02255-7.
- [39] Geevarghese Philip and Erlend Raa Vågset. ETH-tight complexity of optimal Morse matching on bounded-treewidth complexes, 2026. Full version. arXiv:2603.05406.
- [40] Abhishek Rathod, Talha Bin Masood, and Vijay Natarajan. Approximation algorithms for Max Morse Matching. Computational Geometry, 61:1–23, 2017. doi:10.1016/j.comgeo.2016.10.002.
- [41] Nicholas A. Scoville. Discrete Morse Theory, volume 90 of Student Mathematical Library. American Mathematical Society, Providence, RI, 2019. doi:10.1090/stml/090.
- [42] Martin Tancer. Recognition of collapsible complexes is NP-complete. Discrete & Computational Geometry, 55(1):21–38, 2016. doi:10.1007/s00454-015-9747-1.
- [43] Erlend Raa Vågset. Optimal parameterized algorithms for solving NP-hard problems in topology. PhD thesis, University of Bergen, Bergen, Norway, 2024. URL: https://urn.nb.no/URN:NBN:no-nb_pliktmonografi_000039725.
