The Parameterized Complexity of Finding Minimum Bounded Chains

Finding the smallest $d$-chain with a specific $(d-1)$-boundary in a simplicial complex is known as the \textsc{Minimum Bounded Chain} (MBC$_d$) problem. The MBC$_d$ problem is NP-hard for all $d\geq 2$. In this paper, we prove that it is also W[1]-hard for all $d\geq 2$, if we parameterize the problem by solution size. We also give an algorithm solving the MBC$_1$ problem in polynomial time and introduce and implemented two fixed parameter tractable (FPT) algorithms solving the MBC$_d$ problem for all $d$. The first algorithm is a generalized version of Dijkstra's algorithm and is parameterized by solution size and coface degree. The second algorithm is a dynamic programming approach based on treewidth, which has the same runtime as a lower bound we prove under the exponential time hypothesis.


Introduction
The Minimum Bounded Chain (MBC d ) problem in dimension d is the problem of finding a minimum d-chain W , whose boundary ∂W is a given (d−1)cycle U .This problem is a useful generalization of the shortest path problem.It has been applied to 3d image segmentation [1] and to find representative cycles in persistent homology [2,3] (see Figure 1).
The problem with coefficients in Z and R has previously received some attention [4,5,6].Here we study the problem with coefficients in Z 2 .The MBC d problem with coefficients in Z 2 is known to be NP-hard to approximate [7].Previous study of the MBC d problem with coefficients in Z 2 focus either on the case of d-dimensional simplicial complexes embeddable in R d+1 [7], or specific Figure 1: A space at filtration step t−1 (left) where the addition of the blue edge at time step t in the filtration (middle) gives birth to a persistent cycle.In the rightmost figure we have highlighted some options for representatives of this cycle: the dark magenta, orange, yellow, or green path together with the new edge.Several measures have been used for deciding which cycle is the best representative.One way is to give each edge a weight and to choose the cycle whose edges sum up to the lowest total weight.If we assume these weights to be proportional to length in this figure, we get that the green path together with the blue edge is the cycle with lowest total weight.Solving the MBC 1 problem at filtration step t − 1 with the boundary of the blue edge as boundary gives this green path.
types of input cycles [8,9].Here we treat the general case of the MBC d problem with coefficients in Z 2 .This can be viewed as a special case of the algebraic problem known as maximum likelihood decoding (MLD) [10].
A recent paper shows that the MBC d problem with coefficients in Z 2 is fixed-parameter tractable with respect to the treewidth of the 1-skeleton [11, Theorem 1.7 (Sec.5.4).The MBC d problem can not be solved in 2 o(τ ) poly(n)time for any d ≥ 2, unless the exponential time hypothesis is false.
For Theorem 1.2 and Theorem 1.6 we give explicit algorithms that solve the problem in the stated times, with implementations available at https:// github.com/lar-sal/PersHomLoc.This paper is structured as follows.In Section 2, we formally define the concepts and problems used throughout this paper.In Section 3 we show that the MBC 1 problem is solvable in polynomial time.Next, in Section 4 we give our solution to the MBC d problem using an algorithm inspired by Dijkstra's shortest path algorithm.We also prove hardness results relevant to this algorithm.In Section 5, we present the treewidth based algorithm and outline the proof showing that this algorithm is ETH-optimal.Finally, in Section 6, we reflect on our results and give some open problems for future research.

Preliminaries
This section introduce notation, concepts and definitions that are used frequently throughout the paper.

Minimum Bounded Chains
Let S be a set and let Z 2 be the field on two elements.The vector space generated by S with coefficients in Z 2 is denoted by Z 2 [S].Elements in Z 2 [S] can be thought of as subsets of S, using the bijection mapping the vector s∈S a s s in Z 2 [S] to the subset {s ∈ S | a s = 1} of S. This bijection is an isomorphism when viewing P(S) (the powerset of S) as a vector space where we let symmetric difference X Y := (X ∪ Y ) \ (X ∩ Y ) act as addition and define scalar multiplication as 0 • X = ∅ and 1 • X = X for any set X ⊆ S.
A (finite) simplicial complex K is a (finite) family of sets (called simplices) closed under inclusion, i.e. if σ ∈ K and ρ ⊆ σ then ρ ∈ K.We say that ρ is a face of σ and that σ is a coface of ρ.A d-dimensional simplex (or a d-simplex ) is a simplex containing d + 1 elements.A coface ρ ⊆ σ has codimension i if dim(σ) = dim(ρ) + i.The set of d-simplices in K is denoted by K d .We often draw geometric representations of simplicial complexes (see Figure 2).A geometric representation of a 2-dimensional simplicial complex.Within it we have highlighted a 2-dimensional chain (purple) and its 1-dimensional boundary (red), a 1dimensional cycle that is not a boundary of a 2-dimensional chain (yellow) and a 1-dimensional chain that is not a cycle (turquoise).In Figure 2 we have some examples of different chains, cycles and boundaries.
A weighted simplicial complex (K, ω) is a simplicial complex K together with a family of positive real numbers ω = {w σ |σ ∈ K}.The number w σ > 0 is the weight of the simplex σ, and the weight of a d-chain is the sum of the weights of the simplices it contains.For unweighted simplicial complexes, we assign weight 1 to all simplices, such that the weight of a chain W corresponds to the number of simplices in unweighted simplicial complexes.
This paper is primarily about the problem of finding the smallest chain whose image under ∂ is some given boundary.More formally we look at the following problem: An example of the MBC 1 and the MBC 2 problems are given in Figure 3.There are also more restrictive versions of this problem.In this paper, we are also interested in the problem where we know that boundary we are given is particularly simple.A spherical chain is a d-cycle whose closure (when viewed as a subspace of the simplicial complex) is homotopy equivalent to a d-sphere.Our main reason for defining the SMBC d problem is that by proving this problem to be computationally hard we also prove that the problem of locating persistent cycles is hard.This is because finding the location of a persistent cycle is the same as finding the smallest chain that has the same boundary as the simplex added when the persistent cycle is born (see Figure 1).
By looking at the boundary matrix, the MBC d problem reduces to a special case of a well-known algebraic problem.
2 and a non-negative weight vector ω ∈ R n .OUTPUT: A vector x ∈ Z n 2 such that Ax = u.MINIMIZING: The weight of the vector w(x) = ω T x.
The algorithms presented in this paper actually solve the maximum likelihood decoding problem, although the considered parameters have a more natural interpretation for the MBC d problem.

Computational Complexity
Computational complexity is all about how fast an algorithm can solve a given problem (i.e. the runtime of the algorithm).The gold standard are the algorithms that have a runtime that is polynomial in the input-size.The family of problems that can be solved in polynomial time is referred to as P.
A problem is said to be in NP if the correctness of each solution to the problem can be verified in polynomial time and if a brute-force search algorithm can actually find a solution by trying all of them.A problem is said to be NPcomplete if it is in NP and if solving the problem in polynomial time means that we can solve every problem in NP in polynomial time.
Many of the problems in this paper (and in life generally) are known to be NP-complete.If the famous P =NP conjecture is true, then no NP-complete problem can be solved in polynomial time.Despite this, we want to solve these problems "in practice", and there are roughly five main (non-disjoint) frameworks that are used to describe what "solving something in practice" means: 1. Approximation: Develop algorithms to find near-optimal solutions.2. Randomization: Use randomization to get a better expected runtime.
3. Restriction: Restrict attention to special cases.4. Heuristics: Find algorithms that often work well but that we can't prove are always fast and correct at the same time.
5. Parameterization: Design algorithms that are polynomial whenever parameters describing the problem are fixed to a constant value.
We focus on parameterized algorithms in this paper.Section 2.2.1 and Section 2.2.2 give a brief introduction to the concepts we need from parameterized complexity theory.For a more in-depth understanding of this field, consult either of the textbooks [12,13].

Parameterized Algorithms
A parameter is a number associated to each instance/input of a computational problem.The parameters typically describe some property of the problem instance (e.g.coface degree or treewidth) or its solution (e.g.solution size).A computational problem together with specified parameters is called a parameterized problem.A parameterized algorithm is an algorithm solving a parameterized problem where we measure the runtime as a function of both the parameter and the input size.This allows for a more fine-grained analysis of the computational complexity of hard computational problems where the goal is to find parameterized algorithms that are provably efficient whenever the parameter is small.
We want parameterized algorithms that are fixed parameter tractable (FPT), meaning that the expected exponential explosion in runtime is confined to the parameter alone.More precisely, if k is the parameter, n is the input size and f is a computable functions then an FPT-algorithm has a runtime on the form f (k) • poly(n).A problem is said to be in FPT if it can be solved by some FPT-algorithm.
Problems in FPT are often contrasted with those in XP, that are only solvable by some XP-algorithm.These are algorithm with runtime of the form O(n g(k) ) where g is some computable function.Table 1 shows how the archetypical FPT-runtime 2 k n compares with the archetypical XP-runtime n k+1 for various values of k and n.In addition to this, FPT is known to be a strict subset of XP [12,  There are often trivial brute force XP-algorithms that solve NP-complete problems.For example, the MBC d problem parameterized by solution size k has a trivial n O(k) -time algorithm.Simply compute the boundary of every dchain |W | ≤ k and keep track of the smallest W you find where ∂W = U .Coming up with FPT-algorithms is often much harder as they typically require some level of insight into the computational problem in their design.

W[1]-Hardness and the ETH
Some parameterized problems do not appear to be solvable by any FPTalgorithm at all.One way of resolving these situation is to show that the problem is ParaNP-complete, i.e. that it is NP-complete even when the parameter in question is constant.In this case, the problem can not be solved by either an FPT-or an XP-algorithm (assuming P =NP).Unfortunately, this means that we can't use this particular trick to prove that a problem has no FPT-algorithm if it has an XP-algorithm.To tackle this, we need hardness hypothesises that have been specially tailored to parameterized algorithms.
In particular, we are interested in two hardness hypothesises commonly used in parameterized complexity theory.The first is FPT = W [1] (see [12,Chapter 21] for the exact definition of W [1]), which is a hypothesis similar to P =NP.We say that a parameterized problem is W [1]-hard if solving it in FPT-times implies FPT=W [1].We can prove that a parameterized problem B is W [1]hard we show that there is a parameterized reduction from A to B, where A is parameterized problem already known to be W [1]-hard.Definition 2.4 (Parameterized reduction).Let A and B be parameterized problems.A parameterized reduction F : A → B is a function mapping instances (X, k) of A to instances (Y, l) of B in such a way that • F (X, k) can be computed in FPT-time.
• l ≤ g(k) for some computable function g.
• (X, k) is a "yes" instance if and only if (Y, l) is a "yes" instance.
The second hypothesis is the exponential time hypothesis (ETH).It is primarily based on the fact that no one has been able to solve 3-SAT1 in subexponential time.If we let n be the number of variables in a 3-SAT formula, then we have: Definition 2.5 (ETH).3-SAT cannot be solved in 2 o(n) -time.
While the ETH is perhaps the easiest of the hypothesis to understand, it is also the strongest assumption made in this paper.Explicitly, the ETH implies FPT =W [1] which in turn implies P =NP.See the references mentioned at the start of this section for further details.

The MBC 1 problem is in P
In order to solve the MBC d problem we only need information about the d and d − 1 dimensional simplices.We can therefore restrict attention to the simplicial complexes that are 1-dimensional (i.e.graphs) when d = 1, without loss of generality.If the simplicial complex given as input has a higher dimension, we can just solve the problem on its 1-skeleton.
We now formulate the MBC 1 problem using graph theoretical language.Let the input be a finite, simple and undirected graph denoted by G and let V (G) denote the set of vertices and E(G) be the set of edges in the graph.A 0-chain U is a subset of vertices while a 1-chain W is a subset of edges.We write ∂W = U if and only if the set of vertices having odd degree in the subgraph G = (V (G), W ) ⊆ (V (G), E(G)) is equal to U .Using the handshaking lemma (i.e.v∈V (G ) deg G (v) = 2|E(G )|), we know that the 0-chain U must contain an even number of vertices if it is the boundary of a 1-chain.
A walk in a graph from v to u is a sequence of edges (e 1 , e 2 , . . .e r ) = ((v, x 1 ), (x 1 , x 2 ), . . ., (x r−1 , u), and it is said to be cyclic if v = u.A trail in a graph is a walk where every edge is traversed no more than once.We say that a 1-chain W is acyclic if the subgraph G = (V (G), W ) does not contain a cyclic trail.Note that a cyclic trail visits any vertex in the graph an even number of times.This means that removing the edges of such a trail contained in a 1-chain reduces the weight of that chain without changing its boundary (pictured in Figure 4).This proves the following lemma.Lemma 3.1.Any optimal solution to the MBC 1 problem is an acyclic 1-chain.Let U be a 0-chain where |U | = 2n.We define a pairing of U to be a collection of n pairs (v i , u i ) n i=0 covering U , i.e. n i=0 {v i , u i } = U .We denote the set of edges on a trail from v to u as t(v, u).Lemma 3.2.Let U be a 0-chain with |U | = 2n.If W is an acyclic 1-chain with ∂W = U , then there exist a pairing (v i , u i ) n i=0 of U and edge-disjoint trails t(v i , u i ) so that Proof.We use induction on n.
The base case n = 0 holds trivially, so assume that the hypothesis is true for n − 1 and consider the case |U | = 2n.Let W be an acyclic chain with ∂W = U , where W = E(G ) for some subgraph G ⊆ G. Let v be a vertex in U .Then there is a trail t(v, u) in G between v and some other vertex u in U .Now, W = W \ t(v, u) is itself going to be an acyclic chain with boundary U = U \ {v, u}, where |U | = 2(n − 1).By the induction hypothesis there is a pairing to the pairing of U gives a pairing of U , and adding t(v, u) to the collection of trails completes the proof of the inductive step.
For the acyclic 1-cycle in Figure 4, we have a pairing with edge-disjoint trails colored in Figure 5. Next, let the shortest path from v to u in some graph G be denoted as p(v, u).Proposition 3.3.Optimal solutions W to the MBC 1 problem on input U are disjoint unions of shortest paths between pairs (v i , u i ) n i=0 in a pairing of U , i.e.
Proof.We give a proof by contradiction, where the idea is pictured in Figure 5.
First, let W be an optimal solution of MBC 1 .By Lemma 3.2 we know that there exist a pairing In order to get a contradiction, we assume that at least one of these trails, say t(v i , u i ), is not a shortest path between v i and u i in G.
Let p(v i , u i ) denote an actual shortest path.Then we know that the 1-chain given by the symmetric difference have the same boundary as W .This is because taking the symmetric difference of a trail changes precisely the odd-even parity of its start and end vertex (and nothing else).The chain W clearly has a weight lower than W , since This contradicts the minimality of W .  4 (left), removing the magenta path and replacing it with the shortest path between its endpoints to the chain (middle) gives an even smaller 1-chain (right).Note that if the same edge appears both an old path and in the new path then these cancel out because we "added" the path using symmetric difference.
Note that when the boundary U consists of two points (the SMBC 1 case), then the problem is to find the shortest path between these two points, a problem famously in P.
The process of replacing a trail with the shortest path does not in general give a minimum bounding chain (Figure 6).However, we can in general use the Folyd-Warshall algorithm [14] to get a matrix of the distances between every pair of vertices in the graph, and from this form a new (complete) graph whose vertices are the elements in U and where the edge weights are the length of the shortest path between the two end vertices.A solution to the MBC 1 problem then corresponds to a minimum weight perfect matching in this new graph by Proposition 3.3, and we can find such a matching in polynomial time using Edmonds blossom algorithm [15].Thus we have proved Theorem 1.1.
Figure 6: A partitioning of the (rightmost) 1-chain from Figure 5 (left) and the 1-chain we get from replacing the two paths between the pairs of vertices with shortest path between the endpoints (middle).The resulting 1-chain is not the same as the minimum bounding chain, shown to the right.

The Dijkstra Approach
This section introduces an algorithm inspired by Dijkstra's shortest path algorithm to solve the MBC d problem.Here we also prove hardness results for solution size and coface degree.

The Algorithm
We now describe an algorithm that solves the MBC d problem for any d ≥ 1.We first give the basic idea of the algorithm, which we then improve through some simple modifications.Definition 4.1.Let (K, w) be a weighted simplicial complex and let d ≥ 1 be an integer.The graph G d (K) is the weighted graph with vertex set C d−1 (K) and edges (U, U ) between pairs of chains whenever ∂(σ) = U U for some d-simplex σ in K.The length of the edge (U, U ) is equal to the weight of σ.
Since we have chains with coefficients in Z 2 , traversing an edge can therefore be viewed geometrically as taking the symmetric difference of the boundary of the simplex σ with the current (d−1)-chain U .This means that for every bound- Proposition 4.2.The MBC d problem can be solved by finding the shortest path p(U, 0) in G d (K), where U is the given input boundary.
gives us a graph G d (K) with 2 n vertices (each having degree m) and 2 n−1 • m edges.Using Dijkstra with Fibonacci heaps [16] we can find such a path in This gives us an algorithm that is slightly worse than brute force (since m < n trying all possible chains W takes O(2 m poly(m, n))-time).Next, we make two simple observations that increase the theoretical (parameterized) runtime significantly.
First, note that if we have U = ∂(W ) then for every simplex ρ ∈ U the chain W must contain at least some coface σ of ρ.Second, the order in which we add d-simplices to our path is irrelevant.This means that we only need (directed) edges going from a given chain U to chains U ∂(σ) where ρ ∈ ∂(σ) for some choice of ρ in U .We make these remarks into a definition and a theorem: Definition 4.3.Let (K, w) be a weighted simplicial complex, let d ≥ 1 be an integer, and for every is the directed weighted graph with vertex set C d−1 (K) and edges (U, U ) between pairs of chains whenever ∂(σ) = U U for some d-dimensional coface σ of ρ U (see Figure 7).The length of the edge (U, U ) is equal to the weight of σ.Note that the graph G d D (K) is not uniquely determined from the input of the MBC d alone, since we have to choose some ρ U at every node U of the graph.This choice can be made arbitrarily or deliberately.It would be interesting to see if we can get better algorithms (at least in practice) by exploring different heuristics we can use when making this choice.It is enough to consider the component of the graph containing our input boundary U , but as Dijkstra's algorithm can be run while gradually constructing G d D (K) we do not need to save the entire graph to memory anyways.D (K) for some simplicial complex K. Nodes in the graph are 1-boundaries (dark blue) with a fixed 1-simplex (red).For every 2dimensional coface (orange and yellow) of this 1-simplex we have an edge in the graph, and traversing the edge corresponds to taking the symmetric difference with the boundary of this coface.
The SMBC 1 problem when K is a graph corresponds to finding the shortest path p(s, e) between two given nodes s, e ∈ K.If we always pick ρ U = e for the edges in G 1 D (K), then we get an isomorphism between the subgraph of K explored by Dijkstra's algorithm finding p(s, e), and the subgraph of G d D (K) explored finding p(v + e, 0), sending nodes v + e → v and 0 → e.
We now work out the runtime we get solving the MBC d problem by finding the shortest path in G d D (K) under different parameterizations.In particular, we investigate the parameters coface degree and solution size.
The coface degree of a (d − 1)-simplex ρ is defined as the number of cofaces of dimension d (or codimension 1).The coface degree (in dimension d − 1) of a simplicial complex K is the maximum coface degree of any (d − 1)-simplex in K, which we denote by c.In a simplicial complex with coface degree c, we know that the graph G d D (K) have at most c edges out of every vertex.This means that if we take c to be our parameter, we get a runtime of O(2 n (c + n)) (where we remember that n is the number of (d − 1)-simplices in K).This is still exponential in n, so this particular parameterization itself doesn't improve the runtime of our algorithm by much.In Section 4.2.1 we see that there are good reasons for why our algorithm does not perform better using this parameterization on its own.
The next parameter we want to investigate is the solution size k (i.e. the number of d-simplices we want the solution to contain).For the unweighted case, if k is fixed, then we can restrict the search to the (d − 1)-chains of distance at most k from the input chain U .This can be achieved by keeping track of the size of the path up to each chain, and ignoring them if the path has more than k edges.To estimate the runtime of this parameterized algorithm, we need to count how many vertices there are in this new subgraph.
First, we see that there is one vertex of distance 0 from U , namely U itself.In a chain complex K with coface degree c, we can by definition get to at most c new vertices once we are at distance 1 from U , one for each coface of the (d − 1)-simplex we choose in U .With each new step we can get to at most c new each for each of the vertices from the step before.Clearly then, there are at most c k new vertices at distance k from U than at distance k − 1.
Thus, if we only want solutions containing at most k-simplices, then we only need to consider the subgraph with Running Dijkstra on a graph of this size takes In the weighted case, we need to keep track both of how much the path weighs and how many simplices are on it.A convenient way of dealing with this is by making a slightly larger directed graph and solving Dijkstra there instead.For a general weighted directed graph G, consider the directed graph G whose vertices are pairs (v, i), consisting of a vertex v ∈ V (G) and an integer 0 ≤ i ≤ k.The idea is that the number i keeps count of how many simplices we have added to the path.To make this work, we make the directed edges of G be precisely the pairs of vertices ((v, i), (u, i + 1)) where (v, u) is an edge in E(G).The edge ((v, i), (u, i + 1)) is given the same weight as (v, u) had in G.We can now use Dijkstra in this graph to find the shortest paths from (u, 0) to all the other vertices in this graph.The shortest path from u to v in G is shortest of the distances from (u, 0) to any (v, i).This new graph has Running Dijkstra on the graph of size described in Equation ( 2), we again get a runtime of the form c k • poly(m, n), where the polynomial degree is larger than in the unweighted case.By again noting that m = poly(n), we have Theorem 1.2.In particular, this makes the MBC d problem solvable in FPT when parameterized by solution size and coface degree.We also get an XP-algortihm for the MBC d from this analysis, if we take the problem to be parameterized by solution size alone.The XP-runtime is obtained by replacing c with it's worst possible value, namely m.This is roughly the runtime we would get if we just tried all the m k d-chains W containing less than k-simplices.We show evidence in Section 4.2.2 indicating that no algorithm parameterized by solution size alone can solve the MBC d problem in FPT-time for d ≥ 2.

Hardness Results
In the previous section, we showed that we could solve the MBC d problem parameterized by coface degree and solution size in FPT-time using our Dijkstra inspired algorithm.The same algorithm turns into an XP-algorithm when we parameterized by solution size alone.If we parameterize the MBC d problem by coface degree alone the runtime is exponential.Our analysis shows that the algorithm could potentially need exponential time even on spaces where the coface degree is at most 3.
In this section, we use parameterized complexity theory to show that these runtimes actually make a lot of sense.We also show bounds as to how much more we can expect to improve them.

Coface Degree
We begin by looking at the parameter maximum coface degree.Recall that for an instance of MBC d , namely a simplicial complex K and a (d − 1)-chain U , the maximum coface degree is the highest number of d-simplices in K that share a common (d − 1)-simplex as a face.If this parameter is 2, the problem is solvable in polynomial time by a simple preprocessing routine.However, this is the only case where we gain anything, as we have the following result.
Theorem 4.6.The unweighted SMBC d problem for d ≥ 2 is NP-complete, even when restricted to spaces with coface degree three.
In dimension 2, this is not stated in [7], but it follows from their the polynomial time reduction as the output space has maximum coface degree 3. The reduction in Section 5.4 can also be altered to show this.To get the result in higher dimensions, we take the suspension like they do in [8], which does not change the coface degree.As a consequence we have that the MBC d problem is NP-complete even for spaces with coface degree three, as stated in Theorem 1.3.

Solution Size
The next parameter we look at is the solution size, which is how many simplices there are in the solution.Be aware that we do not talk about the solution weight, that is the sum of the weights of these simplices.We begin by stating the hardness result.We show the d = 2 case, and the higher dimensions follow again by taking the suspension, which changes the solution size linearly by doubling once for each suspension.It may be possible to prove this result with a modified argument based on the parameterized reduction from the Grid Tiling problem to the 2-Sphere Recognition problem in [17].Here, we present a completely different reduction from the α×β-Clique problem defined below, as this gives us further hardness results for when the MBC d problem is parameterized with respect to both solution size and maximum coface degree (see Section 4.2.3).
Before we state the problem, we define a α × β-grid graph G for positive integers α, β to be a graph where each vertex is uniquely specified by two numbers, its column i (where 1 ≤ i ≤ α) and row j (where 1 ≤ j ≤ β).We denote vertices by (i, j), and to keep track of what happens in the reduction, we give the vertices of each column the same color, saying that the vertex (i, j) has color i.We draw α × β-grid graphs as in Figure 8, where we place the vertices in rows and columns forming a grid.An α-clique in an α × β-grid graph is a collection of α different colored vertices all having edges between each other.We now describe a polynomial reduction from the α × β-Clique problem to the SMBC 2 problem.The first step is to give a polynomial time algorithm for constructing simplicial complexes X(G) from any given α × β-grid graphs G.This space X(G) is made up of basic building blocks pictured in Figure 9, which also shows the short hand notation we use throughout this section.(1, 1) ( The space X(G) is rather complicated, so we split the construction into five "layers", each consisting of one or more copies of the objects introduced in Figure 9.In Figure 10 we have a systematic overview of which objects occupy any given layer and how these layers are connected.For a concrete example of the reduction see Figure 11, showing the space X(G) where G is the grid graph from Figure 8. Finally, to see the location of the minimum bounding chain corresponding in X(G) that corresponds to the clique in G, see Figure 12  We glue these spaces together along their boundaries when we combine them.
The first layer of the space X(G) is simple: it is a pair of pants with α legs, as pictured in 9.The input chain of the SMBC 2 problem is the 1-simplices on the boundary of the "waist" of the pair of pants, which we denote by x.The boundary of each leg represents precisely one of the α colors in G and we denote them by The second layer of the reduction is given by gluing β cylinders to each leg x i along one of the boundary components, where we recall β is the number of vertices of each color.We denote the cylinders boundary component that is not glued to x i by y i,j where 1 ≤ j ≤ β, as seen in Figure 10.Here y i,j corresponds to the vertex (i, j) in our graph G, and if the cylinder to y i,j is part of a solution to the SMBC 2 problem in X(G) with boundary x, then the vertex (i, j) is part of an α-clique in G.
With this second layer we have represented the all the vertices of the graph G, and we need to encode the edges.The most naive way would be to glue a cylinder to the boundaries y i,j and y i ,j if there is an edge between the vertices the two boundaries represent.However, this encoding does not work as seen by the counterexample in Figure 10.
Instead, we encode the fact that every vertex must have α − 1 neighbours, each one of a different color.In particular, we want to say that each cycle representing a vertex must be canceled α−1 times, once for every color different from its own.The first step (layer 3) is to attach a pair of pants with α − 1 legs (similar to the one in layer 1) to each circle y i,j , one leg for each remaining color.We denote the cycle at the boundary of each leg by y i,j i , where 1 ≤ i ≤ α and i = i (see Figure 10).Layer 4 is another layer of cylinders, similar to layer 2. We glue β cylinders to each y i,j i , representing the possible vertices of color i that share an edge with the vertex represented by y i,j .In layer 2 we forced a solution to pick a vertex in every color, and in layer 4 we force it for each chosen vertex to pick a neighbor of that vertex of every other color.We denote the new boundaries created by z i,j i ,j , where i, j and i is as above and 1 ≤ j ≤ β represents a possible neighbour of the vertex represented by y i,j of color i .
Finally, in layer 5, we encode the edges.If there is an edge in the graph G from vertex j of color i to vertex j of color i , then z i,j i ,j and z i ,j i,j are connected by a cylinder edge((i, j), (i j )).
The problem of finding any bounding chain for x in this space may seem to be equivalent with finding a clique in the input graph.However, we know that this is not the case, as it is still easy to look for such a bounding chain using linear algebra.We need to ask if there is a bounding chain in this complex of small size.To find the exact value of the bounding chain we are looking for, requires some careful counting.Roughly speaking, for some constants A 0 , A 1 and A 2 , we want a solution of size equal to the sum of: 1. the 2-simplices in the pair of pants with α legs pictured in Figure 9, given by the formula 2. the number of 2-simplices in a cylinder multiplied by α, given by the formula A 2 • α.
LAYER 1 edge((i, j), (i , j )) Figure 10: A small portion of each of the five layers in the reduction using the short hand notation from Figure 9.
5. the number of 2-simplices in a cylinder edge((i, j), (i , j )) multiplied by α(α − 1)/2, given by the formula Let k = k (α) be given by the formula  Proof.The reduction runs in polynomial time, as the size of the output instance is polynomial in the size of the input instance.So we have yet to show that there exists a solution of the α × β-Clique problem if and only if there exists a solution to the SMBC 2 problem of weight less than or equal to k .From the observations made during the construction we know that if there is a clique {(1, j 1 ), • • • , (α, j α )} in G then there is a bounding chain W of x in X(G) of weight k .Explicitly, the chain W consists of all simplices in • the pair of pants in layer 1, • for 1 ≤ i ≤ α the α cylinders ending in y i,ji in layer 2 and their corresponding pair of pants in layer 3, • for each of these pair of pants with waist y i,ji the α − 1 cylinders ending in z i ,j i i,ji in layer 4, • and all the connecting cylinders between z i ,j i i,ji and z i,ji i ,j i in layer 5.
For the converse implication, we let W be a bounding chain of x in X(G) of size k , and look at which simplices must be part of W whenever ∂W = x.For x to be the boundary, the chain W must contain all the simplices in the pair of pants in layer 1.This pair of pants has an extra boundary consisting of the circles x i for 1 ≤ i ≤ α, which needs to be canceled by some other simplices in W .To cancel x i the bounding chain W needs to contain all simplices of an odd number of cylinders intersecting x i in layer 2. In particular it needs to contain at least one such cylinder, giving a new boundary y i,j which can only be canceled by adding the corresponding pair of pants in layer 3.This gives α − 1 new boundaries y i i,j for i = i, each of which we again need cancel by adding the simplices in at least one cylinder in layer 4 for each i .After this process we are left with at least α(α − 1) extra boundaries z i ,j i,j that still have to be canceled by simplices in the chain W , and even more if we pick more than one cylinder in layer 2 and 4. Each z i ,j i,j has to be removed by a cylinder in layer 5, and a cylinder can remove at most two such boundaries.Since we know that the maximum of the sum of weights of simplices in W is k , and by subtracting the weights of the simplices we already know is part of it, we see that there is only room for at most α(α − 1)/2 more cylinders in W .This is exactly the minimum amount to cancel the rest of the boundaries, so we know they must be part of the bounding chain W and that W does not contain any other simplices.Thus we conclude that only one cylinder is picked for each x i , the one corresponding to some vertex (i, j i ).The collection of these vertices {(i, j(i))|1 ≤ i ≤ α} forms a clique as there must be cylinders in W and therefore in the space X(G) connecting every pair of boundaries (z i ,j(i ) i,j(i) , z i,j(i) i ,j(i ) ).These cylinders are present in X(G) if and only if there are edges in G going between the vertex j(i) of color i and vertex j (i ) of color i in G, so we have our result.This finishes the proof of Lemma 4.7, and therefore of Theorem 1.4.
Figure 12: The minimum bounding chain in the space X(G) from Figure 11 where the input boundary is the 1-simplices in the topmost circle/waist.Note that it picks out every cylinder in layer 5 corresponding to edges in the clique.

Solution Size and Coface Degree
We saw in Section 4.2.1 that parameterizing the MBC d problem with respect to the coface degree still yields an NP-complete problem.In Section 4.2.2 we saw that restricting the solution size does help a bit, but the problem is still W [1]-hard.We also saw in Section 4.1 that the problem is polynomial when parameterized by both solution size and coface degree.In this section we give an ETH based hardness result giving a lower bound on runtime when considering both of these parameters at once.
Before we turn to this theorem we need a lemma from the parameterized complexity theory "folklore".For completeness we have included a proof based on a sketch obtained in private correspondence with Daniel Lokshtanov.
Proof.We make a small alteration to the k × k-clique result form [13,Thm. 14.12], which gives a reduction from the 3-Coloring problem.
Let G be a graph with |V (G)| = N vertices, and let V 1 , . . ., V α be a cover of V (G) where |V i | ≤ N/α for every 1 ≤ i ≤ α.There is at most 3 |Vi| ≤ 3 N/α 3-colorings of the full subgraph of G with vertices V i , so let β = 3 N/α and let O( √ k).While this is also the case for surfaces of fixed genus it is not true for 2-chains in general.It seems therefore unlikely that a similar technique can be used on the MBC d problem.
Finally, there might be some other reduction that gives a better (i.e.higher) lower bound.Note that because of the algorithm by B. Burton et al., such a reduction needs to have certain properties, assuming the ETH is true.In particular, the optimal solutions to the instances in the image of the reduction can not all be surfaces of bounded genus.

Treewidth
We study the parameterized complexity of the MBC d problem parameterized by τ , the treewidth of the d'th level of the Hasse diagram, which we describe later.This section contains two main results: 1.The MBC d problem can be solved in O(2 2τ τ 2 n)-time when parameterized by τ .
2. This algorithm is ETH-tight for d ≥ 2 (no 2 o(τ ) poly(n)-time algorithm exists unless the ETH is false).
These results share many similarities with the main results of [9] concerning the related Homology Localization problem, and several details are the same.For this reason, we leave parts of the proofs to that paper, where the analogous proofs are given in great detail.

Tree Decompositions
A tree T is a connected graph with no cycles (i.e.H 1 (T ) is trivial).A rooted tree (T, r) is a tree T together with a vertex r ∈ V (T ) called the root.A vertex s in (T, r) is said to be the descendant of another vertex t if t appears on the (unique) path from s to r.If t is the first vertex on this path, then t is the parent of s and s is a child of t.Vertices with no children are called leaves.
Intuitively, the treewidth is a measure of how close a given graph is to being a tree (see Figure 13).Many problems become solvable in FPT-time when they are parameterized by treewidth in the same way that many NP-complete problems become solvable in polynomial time when we restrict the input graphs to be trees.We define treewidth in terms of tree decompositions of graphs in this paper.When we design our algorithm, which is a dynamic programming routine on a tree decomposition of a graph.Definition 5.1 (Nice Tree Decomposition).A tree decomposition of a graph G is a rooted tree (T, r) together with a function X − : V (T ) → P(V (G)) mapping vertices t in T to subsets X t ⊆ V (G) called bags.This map must have the following properties: • For all vertices v in G there exists a vertex t in T such that v ∈ X t .
• For all edges vu in G there exists a vertex t in T such that u, v ∈ X t .
• If u ∈ X t ∩ X t for vertices t, t in T then u ∈ X s for every vertex s on the path in T from t to t .
A tree decomposition is said to be nice if X r = ∅ and every bag X t is one of the following: • A leaf bag where t is a leaf and X t = ∅.
• An introduce bag where t has a child s, and X t = X s {v} for a vertex v in G.
• A forget bag where t has a child s, and X t {v} = X s for a vertex v in G.
• A join bag where t has two children, s and s , and X t = X s = X s .Definition 5.2 (Treewidth).The width of a tree decomposition is the size of the largest bag it contains minus one.The treewidth of a graph is the smallest width of all the possible tree decompositions of that graph.
It is well known that every tree decomposition of a graph G can be transformed into a nice tree decomposition of G without increasing the width and while keeping the number of bags it contains linear in |V (G)|.

Graph Maximum Likelihood Decoding
We present an FPT-algorithm for the MBC d problem parameterized by the treewidth of the d'th level of the Hasse diagram of the simplicial complex.In fact, the algorithm we describe is more general, as it also solves the MLD problem in FPT-time where we use the treewidth of the bipartite graph Hasse(A) as a parameter.Definition 5.3.We can represent any matrix A with coefficients in Z 2 as a bipartite graph Hasse(A) where the rows ρ i and columns σ j of A are vertices and where the edges are pairs of rows and columns (ρ i , σ j ) such that A i,j = 1.
Another way of defining Hasse(A) is to say that it is the bipartite graph having A as its biadjacency matrix.See Figure 14    We can now reformulate the MLD problem as a problem on bipartite graphs.Let G be a graph and let ∂σ denote the set of neighbors of a vertex σ in G.The boundary ∂W of a subset of vertices W ⊆ V (G) is the symmetric difference of the neighbors of all vertices in W , i.e. ∂W = σ∈W ∂σ.Theorem 5.5.The MLD problem can be solved in O(2 2τ τ 2 n)-time when parameterized by the width τ of a (nice) tree decomposition of Hasse(A), which we assume is given as part of the input.Theorem 1.6 as an almost immediate consequence of this result.If we are not given a nice tree decomposition as part of the input, we first compute one.There is an algorithm running in 2 O(τ ) n-time that finds a tree decomposition whose width τ is a constant factor approximation of the true treewidth τ [19].
To see how solving the GMLD problem can be used to solve the MBC d problem, let (K, U ) be an instance of the MBC d problem consisting of a simplicial complex K and a boundary U .To reduce to the MLD problem, set A to be the matrix associated to the linear transformation , where we use the d-simplices as a basis for C d (K) and the (d − 1)-simplices as a basis for C d−1 (K)).The weight of each column of the matrix is set to the weight of the simplex it corresponds to and the target vector be the sum of the (d − 1)simplices in W . Solving this MLD problem is then precisely the same as solving the original MBC d problem.
Remark 5.6.We have used the notation Hasse(A) because if A is the matrix associated to a boundary map from d-dimensional chains, then Hasse(A) is the same graph as the d'th level of the Hasse diagram of the simplicial complex.This graph was used as a basis for one of the FPT-algorithms [9,Theorem 5.6] and it is has d and d − 1 simplices as vertices and face-coface pairs (ρ, σ) as edges, see Figure 15.It is the treewidth of this graph we talk about when we talk about the treewidth of a simplicial complex in this paper.
Our algorithm works by dynamically solving several instances of the following problem.This problem can be seen as being analogous to the Restricted OUTPUT: A subset W ⊆ C having all the following properties: We can think of the Restricted GMLD as the problem where we are free to ignore everything outside of G t and where the solutions are completely determined on X t ⊆ G t by the sets Q t and P t .This means in particular that the special case of G t = V (G) and X t = ∅ is just the normal GMLD since this means that we are not ignoring anything and that no additional restrictions are placed upon the problem.
The main idea of our algorithm for solving the GMLD problem is now the same as for most other treewidth based algorithms.We dynamically solve multiple instances of the restricted GMLD on every bag X t of a (fixed) nice tree decomposition of the bipartite graph G.At each bag, we store the optimal value of solutions for every pair of subsets Q t and P t .The algorithm does this by starting at the leaves working its way "up" towards the root, extending and combining solutions to bigger and bigger parts of the GMLD as we move along.At the root bag there is precisely one instance of the restricted GLMD problem to solve, namely the special case where G r = V (G) and X r = ∅ (and so we have solved the GMLD).

An FPT-Algorithm
Let (T, r) and X − be a nice tree decomposition of the weighted bipartite graph G where V (G) = (R, C) and where U ⊆ R. For a vertex t in T , let G t be the union of all bags X s where s is a descendant of t.This means that we have G r = V (G) and X r = ∅ as we promised.For every vertex t in T we describe how to find the weight of a minimal solution, denoted table[t, Q t , P t ], to the R-GMLD problem on (G, U ) restricted by the four-tuple (G t , X t , Q t , P t ).
• Leaf Bag: • Introduce Bag: We split this into two cases.In either case the vertex t in T has a child s.First, assume that the introduced vertex σ ∈ C corresponds to a column making Next assume a row vertex ρ ∈ R is introduced so that X t = X s ∪ {ρ}.If ρ ∈ P t ∂(Q t ) U then there is no solution and we store the value infinity at this entry.Otherwise we have Lemma 5.8.The above algorithm solves the GMLD problem.
Proof.Showing that this algorithm is correct requires many technical but elementary steps.We have therefore decided to omit most details and instead focus on the bigger picture.For a more detailed exposition of a similar proof, see [9].We use the same basic technique for all the different bags (except for the leaf bags).The idea is to use the set of all feasible solutions S(t, Q t , P t ) (i.e.all solutions, both optimal and non-optimal) to instances of the restricted GMLD problems to argue that each of the formulas in the algorithm are correct.We do this by first showing that the left hand side of the equation is smaller than or the same size as the right hand side, and then to show the opposite.
• Leaf Bag: We have that G t = ∅ and so there is only one problem instance to solve: There is only one solution to this problem, which is W = ∅ and this solution has weight 0.
The idea here is to show that if we set W = W ∪ W then the relation between P t , P s and P s is exactly the one described above.For the other way we let The above treewidth algorithm terminates in O(4 τ n) time, where τ is the treewidth of Hasse(A).To see this, note that at each introduce and forget bag the algorithm has to compute at most 2 τ values, each taking constant time.Meanwhile at the join bag the algorithm computes at most 2 τ values where each is the minimum of 2 τ numbers, which means that the join bag takes O(4 τ n) time.The number of bags is linear in input size, so we get our result.Together with Lemma 5.8, this discussion proves Theorem 1.6.
The algorithm can be made to return an optimal solution in O(4 τ n) time by backtracking through the tables of solutions for each bag.Using the more naive approach of keeping track of a representative optimal solution is also possible.This would give us a worse runtime of O(4 τ n 2 ) as we need to copy and store partial solutions which may have size linear in n.The algorithm can also be used to find a maximum cycle, since it works even when the weights are negative.

ETH-tightness
In this final subsection we show that the treewidth based FPT algorithm we just discussed is ETH-tight, by proving Theorem 1.7.In fact, this theorem is true even for the SMBC d problem.
Theorem 5.9.The unweighted SMBC d problem can not be solved in 2 o(τ ) poly(n)time, assuming the ETH.
Taking suspension doubles the treewidth of a space [9, Sec.2.2], so it is sufficient to show the result for d = 2, and the general case follows by inductively taking the suspension.The reduction we use to prove this result builds on the reduction from Max Cut parameterized by treewidth presented in [9,Sec. 6].This reduction can in turn be thought of as a specialized version of the reduction presented in [7].Recall that a cut in a graph is just a partitioning of the vertices of a graph G into two sets I and J, and the size of the cut is the number of edges crossing the cut (see Figure 16).Our reduction maps a graph G to the space Y (G).We think of Y (G) as the quotient of three sub-spaces (see the example in Figure 17): 2. Y S (G): The 2-dimensional (orientable manifold) simplicial complex obtained by associating a 2-sphere to every vertex v of G and take the connected sum of neighboring vertices.Two spheres intersects in a circle if there is an edge between the corresponding vertices, and the leg of Y P (G) corresponding this edge is glued to this circle.This subspace looks like the surface of some thickening of the graph G.
3. Y D (G): Finally, glue a disk along its boundary to each such intersectioncircles.
We can always find a bounding chain in Y (G), by taking the pair of pants and all disks in Y D (G).The idea is that the disks we have in the bounding chain correspond to edges that are not cut.So to maximize the size of the cut, we want to minimize the number of disks in our solution.To achieve this, we make the disks as big (consisting of many simplices) as possible, by subdividing them sufficiently many times.
Mapping solutions back and forth is quite intuitive.Given a cut (I, J), the minimum bounding chain of the 1-simplices in the waist x consists of the pair ∪ ∪ of pants, each of the spheres corresponding to vertices in I and each of the disks corresponding to edges that are not cut.Conversely, starting with a bounding chain W of the waist, we get a cut (I, J) by letting a vertex v be in I if a 2-simplex (and hence every 2-simplex) of the sphere corresponding to v is in W , otherwise it is in J.
We are left with the task of finding a triangulation of the space Y (G) of low treewidth.We describe how the techniques developed in [9] can be altered to work for the SMBC d problem.
The fundamental idea is to let the triangulation of the space depend on some (arbitrary) nice tree decomposition of the input graph G of low treewidth.So the first step of the reduction would be to compute such a nice tree decomposition TD(G) (to within a constant factor approximation of the actually treewidth), which we know can be done in 2 O(τ ) n-time.A concrete example of what a nice tree decomposition and the corresponding space typically look like is pictured in Figure 18.The next step is to give the idea of how to triangulate the space.The subspace Y S (G) is triangulated like [9,Sec. 6,2].Intuitively, we deform the spheres representing each vertex v into long "tubes" following the shape of the bags containing v in the nice tree decomposition of the input graph.The underlying graph of such a space is of low treewidth, as we can find a tree decomposition of treewidth linear in the treewidth of G [9, Lemma 6.5].
The pair of pants Y P (G) is triangulated in a similar way, by thinking of it as a sphere corresponding to a vertex that is in every non-empty bag of the nice tree decomposition.Finally, the disks in Y D (G) is stretched out like long cylinders/tubes, keeping in mind that we want them containing many simplices, but covered by small bags of the tree decomposition.The final result looks like in Figure 18.

Conclusion
We have shown that the MBC d problem is difficult to solve even for spaces with small coface degree or small solution sizes and provided two parameterized algorithms for solving the MBC d problem.However, there are still many unanswered questions and interesting research directions to explore.

The MBC 1 problem
The polynomial time algorithm for the MBC 1 problem presented in this paper was chosen because it was easy to describe.Recall that we essentially solved the problem by combining two algorithms.First we use the Floyd-Warshall algorithm to construct a distance matrix from the 1-skeleton of the input space.Then we use any polynomial time algorithm solving the minimal weighted matching problem on a sub-matrix of the distance matrix (viewed as a complete graph).It would be interesting to know if this problem can be solved more efficiently using a more carefully designed algorithm.

The Dijkstra approach
The techniques we developed in Section 4 open up many new directions of further research, both theoretical and practical, that we think deserves some attention.Recall that k denote solution size and that c denote coface degree while n is the number of d − 1 simplices.
• Can we bridge the gap between the 2 O(k log(c)) poly(n)-time algorithm and the 2 o( √ k log(c)) poly(n)-time ETH lower bound presented in this paper?
• Is there a constant 0 < e < 1 for which we can solve the MBC d problem in c ek poly(n) time?We suspect that it is possible to solve the MBC 2 problem in O(c 1 3 k n)-time, by only looking at simplicies if they are at most k/3 "simplices away" from the boundary (instead of k).
• Can we modify our algorithm so that it can be used to find the smallest 2-manifold in a simplicial complex with a particular boundary?
• Is there a kernel smaller than the obvious one2 of size c k for the MBC d problem?
• The Dijkstra based algorithm is well suited as a basis for using various kinds of A*-type heuristics.It would therefore be very interesting to explore how this can be used to speed up computations in practice.

Treewidth
There are also a open questions surrounding our results on treewidth of the d'th level of the Hasse diagram.This is perhaps particularly interesting as there seems to be an increasing interest in the use of treewidth techniques in computational topology.
• Is it possible to solve the MBC d problem in 2 τ poly(n)-time?
• Can we implement better treewidth algorithms (e.g. by using massive parallelization) that are competitive with ILP-solvers?
• We can use a slight modification of our ETH-reduction to prove that finding a 2-manifold with a a particular boundary (or genus) in a simplicial complex cannot be done in 2 o(τ ) poly(n)-time (assuming the ETH).Black and Nayyeri proved that this problem can be solved in τ O(τ 2 1 ) 1 poly(n)time in [11,Theorem 1.1], where τ 1 is the treewidth of the 1-skeleton of the simplicial complex.This leaves a gap down to our lower bound which it would be interesting to see if could be bridged.

Applications in Topological Data Analysis
We began working on this project because we were interested in designing algorithms for finding geometrically concise representatives for cycles in persistent homology.Though it turned into a paper on theoretical computer science in the end, we have described a polynomial time algorithm for finding the shortest 1-cycle born at a given filtration value as well as two FPT-algorithm solving the same problem in higher dimensions.We look forward to exploring how information about these representatives may be included in the persistent homology toolkit in the future.

Figure 2 :
Figure2: A geometric representation of a 2-dimensional simplicial complex.Within it we have highlighted a 2-dimensional chain (purple) and its 1-dimensional boundary (red), a 1dimensional cycle that is not a boundary of a 2-dimensional chain (yellow) and a 1-dimensional chain that is not a cycle (turquoise).

A
vector in C d (K) := Z 2 [K d ] is called a d-chain in K.The boundary ∂σ of a d-simplex σ, is the (d − 1)-chain that is the sum of the (d − 1)-faces of σ.The boundary of the d-chain W is the (d − 1)-chain ∂W , defined as the sum ∂W = σ | aσ=1 ∂σ.Alternatively, ∂W contains a (d−1)-simplex ρ if and only if ρ is the codimension 1 face of an odd number of simplices in W .A d-chain with an empty boundary is called a d-cycle, and the subgroup of d-cycles is denoted by Z d (K) := ker ∂ ⊆ C d (K).Meanwhile, the d-chains that are boundaries of some (d + 1)-chain are called d-boundaries and they form a subgroup denoted by B d (K) := Im ∂ ⊆ Z d (K) ⊆ C d (K).

Definition 2 . 2 .
Spherical Minimum Bounded Chain (SMBC d ) problem INPUT: A simplicial complex K and a spherical (d − 1)-boundary.U OUTPUT: A d-chain W in C d (K) (if it exists) such that U = ∂W .MINIMIZING: The weight of W .

Figure 3 :
Figure3: Two examples of minimum bounded chains, where the input boundary is in yellow, and the bounding chain is red.The first example is an instance of both the MBC 1 problem and the SMBC 1 problem.The second example is only an instance of the MBC 2 problem, since the yellow boundary is not a 1-sphere (i.e. a circle) but the disjoint union of three circles.

Figure 4 :
Figure 4: A 1-chain (left) containing two cyclic trails marked in red (middle) and an acyclic 1-chain with the same boundary obtained by removing the red cyclic trails (right).

Figure 5 :
Figure5: A partitioning of the (rightmost) 1-chain from Figure4(left), removing the magenta path and replacing it with the shortest path between its endpoints to the chain (middle) gives an even smaller 1-chain (right).Note that if the same edge appears both an old path and in the new path then these cancel out because we "added" the path using symmetric difference.

Theorem 4 . 4 .
The MBC d problem can be solved by finding the shortest path p(U, 0) in G d D (K), where U is the given input boundary.

Figure 7 :
Figure 7: A representation of a part of the graph G 2D (K) for some simplicial complex K. Nodes in the graph are 1-boundaries (dark blue) with a fixed 1-simplex (red).For every 2dimensional coface (orange and yellow) of this 1-simplex we have an edge in the graph, and traversing the edge corresponds to taking the symmetric difference with the boundary of this coface.

Theorem 4 . 5 .
The MBC d problem can be solved in c k • poly(m, n)-time.

Lemma 4 . 7 .
The unweighted SMBC d problem is W[1]-hard when parameterized by solution size.

Figure 8 :
Figure 8: An example of a 4 × 4-grid graph (the vertices are drawn as boxes) containing a 4-clique on the 4 emphasized vertices of different colors/columns.

Figure 9 :
Figure 9: An overview of short hand notation used in several of the reductions in this paper.We glue these spaces together along their boundaries when we combine them.

Figure 11 :
Figure 11: A concrete example of the reduction, showing the 4×4-grid graph G from Figure 8 together with the space X(G).

Figure 13 :
Figure 13: A figure illustrating a tree decomposition.The figure to the left shows the tree and the figure to the right shows a graph covered by sets (i.e.bags) of different colours.The nodes in the figure to the left maps to the sets covering the graph in such a way that nodes are mapped to bags of similar colour and relative position.The width of this decomposition (and also the treewidth of the graph), is 3 = 4 − 1.
for a small example of what Hasse(A) may look like.

Figure 14 :
Figure14: A matrix A with coefficients in Z 2 , and the graph Hasse(A) whose vertices are rows (red) and columns (blue), and there are edges (orange) between a row i and a column j if the element A i,j is 1.

Figure 15 :
Figure 15: The graph Hasse(A) when A comes from a simplicial complex.Vertices are (d−1)simplices (red) and d-simplices (blue), and there are edges (orange) between them if they are face-coface pairs.

Figure 16 :
Figure 16: A graph G (left) with two different cuts indicated by the dashed line in (middle and right).The edges crossing the cuts are marked in red.

1 .
Y P (G): A pair of pants with |E(G)| legs, one for each edge in G.The 1-simplices contained in the "waist" x of this pair of pants is the input boundary U to the MBC 2 problem.

Figure 17 :
Figure 17: A figure showing the three components of the space Y (G) reduced from the graph G in Figure 16 (the dashed lines).The pair of pants Y P (G) (left), the connected spheres (or "thick graph") Y S (G) (middle) and the disks Y D (G) (right).The input chain of the MBC 2 problem is colored in red.

Figure 18 :
Figure18:A nice tree decomposition (left) of the graph G from Figure16where the image of the function X − is pictured inside each vertex, and how to shape/triangulate the space Y (G) to keep its treewidth down.

table [ t
, Q t , P t ] = table[s, Q t , P t \ {ρ}] ρ ∈ P t table[s, Q t , P t ] ρ / ∈ P t .Again we have that s is the child of t and there are two cases.If we forget a vertex corresponding to a row ρ ∈ R so that X t = X s \ {ρ} then table[t, Q t , P t ] = table[s, Q t , P t ].If we forget a vertex corresponding to a column σ ∈ C so that X t = X s \ {σ} then table[t, Q t , P t ] = min(table[s, Q t , P t ] , table[s, Q t ∪ {σ}, P t ] + w σ ).Let s and s be the two children of t so that X t = X s = X s .Then table[t, Q t , P t ] is the smallest sum table[s, Q t , P s ] + table[s , Q t , P s ] over all pairs P s , P s ⊆ X t ∩ R such that P t = P s P s

•
Introduce Bag: When a column σ is introduced there are two cases as it is either in Q t or it is not.In the first case we can show that W ∈ S(t, Q t , P t ) if and only if W ∈ S(s, Q t , P t ), and in the latter we have to show that W ∈ S(t, Q t , P t ) if and only if W \ {σ} ∈ S(s, Q t \ {σ}, P t (∂σ ∩X s )).The details of this are elementary, using the fact that an introduced node in a nice tree decomposition is not adjacent to any forgotten nodes.The case where a row vertex is introduced is analogous.• Forget Bag: When a column σ is forgotten we show that W ∈ S(t, Q t , P t ) if and only if W ∈ S(s, Q t , P t )∪S(s, Q t ∪{σ}, P t ).If W ∈ S(t, Q t ∪{σ}, P t ) then W ∈ S(s, Q t , P t ) also has to take the weight of σ.When a row ρ is forgotten we show that W ∈ S(t, Q t , P t ) if and only if W ∈ S(t, Q t , P t ).The reason why we don't also have to think about W ∈ S(t, Q t , P t ∪ {ρ}) is that this is no longer a solution as the row ρ would be in the boundary of W .
• Join Bag: In the last case we have a solution W ∈ S(t, Q t , P t ) if and only if there is a pair of solutions W ∈ S(s, Q t , P s ) and W ∈ S(s , Q t , P s ) such that P t = P s