Algorithmic Reconstruction of the Fiber of Persistent Homology on Cell Complexes

Let $K$ be a finite simplicial, cubical, delta or CW complex. The persistence map $\mathrm{PH}$ takes a filter $f:K \rightarrow \mathbb{R}$ as input and returns the barcodes $\mathrm{PH}(f)$ of the associated sublevel set persistent homology modules. We address the inverse problem: given a target barcode $D$, computing the fiber $\mathrm{PH}^{-1}(D)$. For this, we use the fact that $\mathrm{PH}^{-1}(D)$ decomposes as complex of polyhedra when $K$ is a simplicial complex, and we generalise this result to arbitrary based chain complexes. We then design and implement a depth first search algorithm that recovers the polyhedra forming the fiber $\mathrm{PH}^{-1}(D)$. As an application, we solve a corpus of 120 sample problems, providing a first insight into the statistical structure of these fibers, for general CW complexes.


Introduction
Persistent Homology (PH) is a computable descriptor [10,19] for data science problems where topology is prominent, e.g. for analysing graphs and simplicial complexes K. Given a function f : K Ñ R, one assembles the homology groups of the sub complexes f ´1pp´8, tsq into a module which is faithfully represented by a so-called barcode D " PHpf q.Using vectorisation methods [1,4] the topological information of the barcode can then be used in statistical studies and machine learning problems.
To gain an a priori understanding of the problems where PH is applied, it is key to know about the invariance of PH, i.e. the context in which it is a discriminating descriptor.Hence the general inverse problem: what are the different functions f giving rise to the same barcode D " PHpf q? Equivalently we are interested in the properties of the fiber PH ´1pDq over a target barcode D. Prior work [14] has shown the fiber to be the geometric realization of a polyhedral complex; each polyhedron represents the restriction of the fiber to strata of the space of filters.Similarly the space of barcodes is given a stratification, and PH ´1pDq is piecewise-affinely isomorphic to PH ´1pD1 q for any D, D 1 that belong to the same barcode stratum.Furthermore, if D 1 lies in the closure of the stratum containing D, then there is a natural map PH ´1pDq Ñ PH ´1pD 1 q that respect the polyhedral structure of PH ´1pDq and PH ´1pD 1 q.
However, understanding the fiber PH ´1pDq remains a challenge, in general.If the underlying simplicial complex K is a subdivision of the unit interval or of the circle, then the fiber PH ´1pDq is a disjoint union of contractible sets [7] and circles [15], respectively.Outside these and a few other 1-dimensional examples, however, little is known.Even establishing that PH ´1pDq ‰ H can be difficult, as we shall see in appendix A. 1   Algorithm development represents an important step toward addressing this challenge.Computerized calculations offer a range of new examples (intractable by hand) with which to test hypotheses and search for patterns, thus contributing to the growth of theory.They also represent an essential prerequisite to many scientific applications.
In this paper we propose an algorithmic approach to compute the fiber of the persistence map PH, for an arbitrary finite simplicial complex K, over an arbitrary barcode D. We then generalize this approach to include finite CW complexes.
Outline of contributions After introducing elementary material from Persistence theory (section 1), we define in section 2 the key data structures used in our method.The algorithm, presented in section 3, computes the list of polyhedra in the fiber PH ´1pDq.For this, we adopt an inductive approach that constructs filtrations of K simplex by simplex, and simultaneously, an associated barcode via the standard reduction algorithm for computing persistent homology.Through this incremental construction, we ensure that the filtrations remain compatible with the target barcode D. The resulting collection of polyhedra is the polyhedral complex that characterises the homeomorphism type of PH ´1pDq.
That the fiber PH ´1pDq is a polyhedral complex is generalised to arbitrary based chain complexes in section 4, in particular including CW complexes, delta complexes, cubical complexes, on which we can take arbitrary filter functions, or the sub spaces of lower-star and lower-edge filter functions.In turn our algorithm adapts to these situations.
In a section 5 dedicated to experiments, we apply the algorithm to multiple complexes and barcodes, and report statistics about the fiber PH ´1pDq, such as its number of polyhedra and its Betti numbers.Sometimes unexpectedly, most of the properties observed for the 1-dimensional complexes studied in [7,14,15] do not hold for more general complexes.For instance, already for a triangulated 2-sphere the fiber PH ´1pDq over some barcodes D has non-trivial homology in degree 3, unlike all the existing examples of graphs, for which PH ´1pDq has vanishing homology in dimension greater than 1.We also find CW complexes, for example the real projective plane, that are topological manifolds whose fibers are not necessarily manifolds.
By contrast, the algorithm allows us to observe novel trends that hold consistently across examples: for instance to each simplicial complex K we associate a specific barcode D K such that the fiber PH ´1pD K q and K have the same Betti numbers (see conjecture 1).Our code base has private dependencies, hence will be made public at a later time.
Related works Finally we note that for related inverse problems algorithmic approaches to reconstruct the fiber have been designed.For instance instead of taking a single function the Persistent Homology Transform (PHT) of [16] computes the barcodes of a family of functions over a fixed shape in R 3 , which is enough to completely characterise this shape, see [6,12] for generalisations to higher dimensions.These sorts of results motivated the design of algorithms to reconstruct the complex K from the associated family of barcodes [3,11].
Acknowledgments Both authors thank Ulrike Tillmann and Heather Harrington for close guidance and numerous interactions.Both authors acknowledge the support of the Centre for Topological Data Analysis of Oxford, EPSRC grant EP/R018472/1.J.L.'s research is also funded by ESPRC grant EP/R018472/1.G. H.-P. acknowledges support from NSF grant DMS-1854748.

Background
We fix a finite simplicial complex K of dimension dimK and with 7K many simplices.Throughout, (simplicial) homology is taken with coefficients in a fixed field k.A filter over K is a map f : K Ñ I valued in the interval I :" r1; 7Ks Ă R, whose sublevel sets are subcomplexes of K.If we regard K as a poset partially ordered by face inclusions σ Ď σ 1 , then f can be regarded, equivalently, as an order-preserving function into I.The set of filters is a polyhedron contained in the Euclidean space R K .
For each homology degree 0 ď p ď dimK, we have a (finite) persistent homology module arising from the sub-level sets of f .The isomorphism type of each module of this form is uniquely determined by the associated barcode PH p pf q; concretely, the barcode is a finite multi-set of pairs pb, dq, called intervals, each of which characterizes the appearance and annihilation of a class of p-cycles in the filtration.For further details, see [19,9].We denote the set of all barcodes by Bar.
The persistence map PH takes a filter f and returns the dimK `1 barcodes of interest: Our goal is to compute the fiber PH ´1pDq over some pd `1q-tuple of barcodes D " pD 0 , D 1 , ¨¨¨, D dimK q P Bar dimK`1 , from now on called barcode for simplicity.
There is another, equivalent formulation of D which is sometimes better suited to formal arguments.In this approach, we replace the sequence of multisets D with a single, bona fide set X. We regard X as a set of indices x, with one index for each interval in the barcode, and write birthpxq, deathpxq, and dimpxq for the birth time, death time, and dimension, respectively, of the corresponding interval.Thus D p is the multiset tpbirthpxq, deathpxqq : x P X, dimpxq " pu.The set X is especially useful for algorithms, e.g. when writing for-loops, however it is nonstandard as a convention.
By way of compromise, we will identify D with X.When we refer to fixing pb, dq P D, we mean fixing x P X such that birthpxq " b and deathpxq " d.By dimpb, dq, we then mean dimpxq.
We also abuse notation and write pb, dq P D whenever pb, dq P D p for some 0 ď p ď dimK, and we set dimpb, dq :" p.

Given a barcode D, let
EndpDq " tb : pb, dq P D for some du Y td : pb, dq P D for some bu Ď R \ t`8u denote the set of all endpoints of intervals in D. Set End ˚pDq " EndpDqzt8u and write dim D " |End ˚pDq| for the number of finite endpoints.In particular, dim D ď 7K.By normalizing, we may assume without loss of generality that End ˚pDq has form t1, . . ., dim Du.For instance, the barcode D with 4 intervals (in possibly different homology degrees) p1, 2q, p1, 3q, p2, 3q and p2, `8q has dimension 3, since the endpoints values form the set t1, 2, 3u.
For any pair of filters f, g : E Ñ I, let us define the relation f " g by either of the following two equivalent axioms: (A1) There exists an order-preserving map ψ : I Ñ I such that ψpiq " i for each i P t1, . . ., dim Du, and g " ψ ˝f .
(A2) The function g satisfies f peq P End ˚pDq ùñ gpeq " f peq f peq ď f pe 1 q ùñ gpeq ď gpe 1 q. (1) Note that " is reflexive and transitive but not symmetric.Given a filter f we write η i :" f pEq X pi, i `1q and Ppf q :" tg P I E : f " gu Ď I K .Theorems 1.1 and 1.2 below are proved in [14,Theorem 2.2].Recall that a finite set P of polyhedra in R K is a polyhedral complex if for each polyhedron X P P, the faces of X belong to P as well, and if, furthermore, any two polyhedra X, X 1 P P intersect at a common face.The underlying space of P is |P| " Ť XPP X. Theorem 1.1.Let f P PH ´1pDq be a filter in the fiber.Then Ppf q Ď PH ´1pDq, and Ppf q is a polyhedron which is affinely isomorphic to the product ∆ #η 1 ˆ¨¨¨ˆ∆ #η dim D , where ∆ k stands for the standard geometric simplex of dimension k.
The polyhedra Ppf q then assemble into a polyhedral complex with underlying space the fiber PH ´1pDq: Theorem 1.2.The set Ppf q | f P PH ´1pDq ( is a polyhedral complex.
In section 4 we extend Theorems 1.1 and 1.2 to CW complexes and more generally to based chain complexes.
2 Data structures

Classifications of simplices compatible with a barcode
Let us fix a finite simplicial complex K and a barcode D.
An important part of our strategy will be to introduce the concept of D-compatible factorization.This object allows one to define clean correspondences between simplices in K and interval endpoints.This, in turn, allows one to define equivalence classes of simplices according to whether or not they contribute to the barcode D -a major benefit, in terms of overall organization.
Let f P PH ´1pDq be given.Then End ˚pDq " t1, ¨¨¨, dim Du Ď Impf q.Note that containment may be proper because f can take non-integer values, in general.However, we claim t1, ¨¨¨, dim Du " Impf q when f is injective; in this case simplices appear "one at a time" in the corresponding filtration, and a simple counting argument allows one to infer that dim D " #K " #Impf q as a result.We make use of this property in the general case.
Figure 1: Given an injective filter f , the finite endpoints in the barcode PHpf q are canonically identified with simplices in K.
Here, K is the triangle with vertices denoted by a, b and c.The values (in dark blue) of the bijection f : K Ñ t1, ¨¨¨, 6u are displayed along the simplices of K.No two distinct intervals in the resulting barcode (all homology degrees included) share a common end value, and these endpoints are annotated with the corresponding simplex Definition 2.1.Let f be an injective filter valued in t1, ¨¨¨, 7Ku.The associated total order is the unique total order on simplices σ 1 ă ¨¨¨ă σ 7K such that f pσ k q " k for each k.If there exists a non-decreasing continuous map φ : R Þ Ñ I such that PHpφ ˝f q " D, we say that pf, φq is a D-compatible factorization.Remark 2.2.Given a non-decreasing continuous map φ and an arbitrary barcode D 1 " rD 1 0 , . . ., D 1 #K s, let φpD 1 q be the barcode such that φpD 1 q p contains one interval of form pφpb 1 q, φpd 1 qq for each interval pb 1 , d 1 q in D 1 p that satisfies φpb 1 q ‰ φpd 1 q.Here, by convention, we define φp8q " 8. Then the persistence map is equivariant with respect to this action, in the sense that PHpφ ˝f q " φpPHpf qq; see for instance [14,Lemma 1.5].This gives another perspective on the idea of D-compatibility: The barcode PHpf q has endpoints in bijection with the simplices of K, and φ 'contracts' this barcode into D. See Fig. 2 for illustration.
We now describe how a D-compatible factorization pf, φq allows one to disambiguate the homological roles of each simplex.Let σ P K be a given.By injectivity of f , there exists a unique σ 1 P K such that pf pσq, f pσ 1 qq or pf pσ 1 q, f pσqq lies in the barcode PHpf q.We write rσ, σ 1 s f for this pairing; where context leaves no room for confusion, we simply write rσ, σ 1 s.There is also the case where σ is unpaired, i.e. when it corresponds to an infinite interval pf pσq, 8q.We then write rσ, 8s.Then pf, φq gives rise to the following classification of pairs of simplices rσ, σ 1 s (with the possibility that σ 1 " 8) according to whether or not pφ ˝f pσq, φ ˝f pσ 1 qq is an interval in the barcode D: Critical pφ ˝f pσq, φ ˝f pσ 1 qq " pb, dq for some non-trivial interval pb, dq P D; We say that rσ, σ 1 s is pf, φq-critical for pb, dq and record this association via π `pb, dq :" σ and π ´pb, dq :" σ 1 ; Non-Critical Otherwise φ cancels the interval pf pσq, f pσ 1 qq, i.e. φ ˝f pσq " φ ˝f pσ 1 q; We say that rσ, σ 1 s is pf, φq-non-critical.
In particular we have a well-defined bijection of intervals in D with critical pairs: By abuse of terminology we say that a simplex σ is critical if it is part of a critical pair, and that it is non-critical otherwise.Note that an unpaired simplex is necessarily critical for some pb, 8q P D. In Fig. 2, we provide an example of D-compatible pf, φq and the resulting critical and non-critical simplices.
There are uncountably infinitely many D-compatible factorizations.In the two following definitions we compress the necessary information into finitely many equivalence classes of D-compatible factorizations.Definition 2.3.A classification K of simplices of K relative to D, or classification for short, consists of: (i) A bijective filter f : K Ñ t1, ¨¨¨, 7Ku, or equivalently a total ordering σ 1 ă ¨¨¨ă σ 7K ; (ii) A partition of simplices into consecutive ordered sets Φ 1 , ¨¨¨, Φ m , which we refer to as classes: (iii) For each interval endpoint j, a class Φ ij , with j Þ ÝÑ i j a non-decreasing assignment.
Definition 2.4.A D-compatible classification K is a classification induced by a D-compatible factorization pf, φq as follows: (i) f : K Ñ t1, ¨¨¨, 7Ku equals the bijective filter of K inducing the order σ 1 ă ¨¨¨ă σ 7K ; (ii) The image of φ ˝f has cardinality m, i.e. we can write Impφ ˝f q " tt 1 ă ¨¨¨ă t m u, and the associated sequence of pre-images equal the classes of K: pφ ˝f q ´1pt 1 q " Φ 1 , ¨¨¨, pφ ˝f q ´1pt m q " Φ m .
(iii) For each interval endpoint j P End ˚pDq, we have pφ ˝f q ´1pjq " Φ ij .
We depict all this data in Fig 2 .Note that given a classification K the filter f induces pairings rσ, σ 1 s.Proposition 2.5.A classification K is the D-compatible classification induced by some D-compatible factorization if and only if the following two rules are satisfied: Critical rule: For any 1 ď j ă j 1 ď dim D and 0 ď p ď 7K, there are as many pairs rσ j , σ j 1 s f with σ j P Φ ij and σ j 1 P Φ i j 1 , here dim σ j " p, as there are copies of the interval pj, j 1 q in D p ; Non-critical rule: For any remaining pair rσ, σ 1 s, both σ and σ 1 belong to the same class Φ i .
Proof.Indeed, when these two rules are satisfied, we can define φ directly on the classes Φ 1 , ¨¨¨, Φ m as any orderpreserving map sending f pΦ ij q to j.
It is natural to group D-compatible factorizations pf, φq according to the classification K they induce: it is clear that whenever factorizations induce the same classification, then they induce the same pairs rσ, σs of simplices, the same critical and non-critical pairs (and simplices) and the same bijection π from intervals in D to critical pairs.Therefore these concepts are defined as well given a D-compatible classification K.

Relations to the fiber
We explain how to retrieve the polyhedra that compose the fiber PH ´1pDq (see Theorem 1.2) from the set of Dcompatible classifications K.Note that if two D-compatible factorizations pf, φq and pf 1 , φ 1 q induce the same classification K, then by Axiom (A2), they determine the same polyhedron, Ppφ ˝f q " Ppφ 1 ˝f 1 q.Thus the following definition is unambiguous: PpKq :" Ppφ ˝f q.
Moreover, PpKq Ď PH ´1pDq by Theorem 1.1, because pf, φq is D-compatible.Conversely, a filter g P PH ´1pDq can always be written as g " φ ˝f for some injective filter f and non-decreasing map φ : I Ñ I, so that Ppgq " Ppφ ˝f q.Therefore we have the following result: Theorem 2.6.The set PpKq | K is a D-compatible classification ( is the polyhedral complex underlying PH ´1pDq.
The upshot is that it is enough to compute the D-compatible classifications K in order to cover the fiber PH ´1pDq.

Algorithm
We now propose an algorithm to retrieve the fiber PH ´1pDq, i.e. that computes all the D-compatible classifications K of the previous section.Our implementation is simple in spirit: Algorithm 2 builds these classifications from scratch, simplex by simplex, and tries all the possible ways to do so.Along the way the algorithm manipulates partial Dcompatible classifications, which can be thought of as the result of cutting a D-compatible classification K at a given step (see Fig. 3).
Given an integer 1 ď j ď dim D `1, let D ăj " pD ăj 0 , ¨¨¨, D ăj dimK q be the truncated version of D such that for each 0 ď p ď dimK.
where K in is a D ăj -compatible classification, and the set Φ cur is a linearly ordered subset of KzK in called the current class.We say that the current class Φ cur is incomplete under either of the following two non-exclusive conditions: (Critical rule violation) I cur ‰ H; and (Non-critical rule violation) Φ n.c.cur ‰ H.
Otherwise Φ cur is complete.The (Critical rule violation) occurs when the current class Φ cur is a truncated version of the critical class Φ ij containing the simplices critical for the interval endpoint j, and there are still intervals pb, jq or pj, dq that are unpaired with simplices of K.These missing intervals are stored in I cur .Meanwhile, the (Non-critical rule violation) indicates that some non-critical birth simplices τ P Φ cur are not yet paired with a death non-critical simplex, i.e. τ creates a dim τ -cycle which must be destroyed in the same class.These unpaired non-critical simplices are stored in Φ n.c.cur .The current class Φcur " tσ7, σ8u is incomplete for two reasons.On the one hand Critical rule is violated: The current class Φcur is intended to contain critical simplices for the endpoint j " 3, as already it contains the critical simplex σ8 " π´pb1, d1q, but the intervals pb2, d2q and pb3, 8q (in red) also have the endpoint j " 3 and are yet unmatched: so Icur " tpb2, d2q, pb3, 8qu.Hence we should define the simplex π´pb2, d2q that destroys the cycle generated by σ6 " π`pb2, d2q, and a simplex π´pb3, 8q that creates a dimpb3, 8q-cycle, before completion of the class.On the other hand Non-critical rule is violated: here Φ n.c.cur " tσ7u contains the unpaired simplex σ7 which generates an unexpected (dotted red) interval, which shall be destroyed by another simplex before completion of the class.
Algorithm 2 builds all the partial classifications starting with the empty one: F " `Kin , j, Φ cur , I cur , Φ n.c.cur q :" pH, 1, H, D ă2 , Hq, and records complete D-compatible classifications in a list Results.Note that the set I cur of intervals is initialised with intervals starting at the first endpoint 1 of D, since it is necessary that the first simplex to enter the filtration will be critical for such an interval.To check that K is complete is done at line 1 of Algorithm 2, and means that all the simplices of K have entered the filtration and that the target barcode D has been reached.
If the partial classification F is not complete but the current class Φ cur is complete, i.e. the algorithm checks that Critical rule and Non-critical rule are satisfied (line 3), then Φ cur is added to the classification (line 4), and the algorithm prepares the next class to build according to the following alternative.Either the next class will be the class Φ cur " Φ ij that will contain all simplices critical for intervals that have the endpoint j (lines 6 to 9), or the next class will contain only non-critical simplices (line 10).In practice either we fill I cur with all intervals pb, jq and pj, dq in D that have j as endpoint, or we set I cur " H.
The remainder of the algorithm enumerates all ways to extend the partial classification (which is provided by the user as input) by adding one simplex to the current class Φ cur .There are four possible types of extensions, which we explain and illustrate with the example depicted in Fig. 4.
Figure 4: We consider the part of the partial classification from Fig. 3 that is relevant to the current class Φcur only.For Φcur to be completed we must at least find critical simplices π`pb3, 8q and π´pb2, d2q to account for the red intervals pb2, d2q, pb3, 8q, and pair the non-critical simplex σ7 with another non-critical simplex to destroy the unexpected dotted red interval.
(b) Adding a death simplex π´pb2, d2q destroying the dimpb2, d2q-cycle generated by π`pb2, d2q, to be critical for the interval pb2, d2q.cur as in Fig. 5d, i.e. a simplex that creates a dim σ-cycle that shall later be destroyed.
To figure out which simplices σ R K in Y Φ cur can extend the partial D-compatible classifications F through the algorithm, we maintain a matrix δ which is derived from the boundary matrix B via elementary row and column operations.The range of possible extensions can be deduced from the sparsity pattern of δ as follows; see [5] and Remark 3.4 for full details on the construction and interpretation of this matrix.
• Simplex σ can be added as a (critical or non-critical) simplex to Φ cur if and only if δσ " 0 or the lowest non-zero entry of column associated to σ corresponds to another simplex σ 1 that already belongs to the partial classification: σ 1 P K in Y Φ cur .We then write lowpδσq :" σ 1 ; • If a simplex σ such that δσ " 0 is added to Φ cur , then it is a birth simplex and creates a new pair rσ, 8s; • If a simplex σ such that lowpδσq " σ 1 P K in Y Φ cur is added to Φ cur , then it is a death simplex, which has the effect to replace a pair rσ 1 , 8s in F with a new pair rσ 1 , σs.
Given a complete D-compatible classification, recall that we have a correspondence π of intervals in D with critical pairs.When F is a (non-complete) partial D-compatible classification, the correspondence is not necessarily defined for all intervals in D: For instance there are no birth and death critical simplices for pb, dq in F, for any interval pb, dq P D such that j ă b ă d.In this case we only have a partially defined correspondence, which we indicate by the conventions π `pb, dq :" H and π ´pb, dq :" H.Note that it is also possible to have πpb, dq " pσ, Hq whenever we already have a birth critical simplex σ " π `pb, dq in F that is not yet associated with a death critical simplex.In the algorithm, we store and update the partially defined correspondence π as we incrementally construct the partial classification F.
Finally, to improve the time-efficiency of our algorithm, we maintain an array M P N dimK`1 of integers that constrain the non-critical simplices that can be added to the classification in each dimension.In the array M " pM 0 , ¨¨¨, M dimK q, each M p is the number of non-critical positive p-simplices that remain to be added in the classification.Since non-critical simplices come in pairs, M p is also the number of non-critical negative pp `1q-simplices that remain to be added in the classification: At initialization this is the rank rankpB p`1 q of the boundary matrix restricted to pp `1q-simplices, minus the number of bounded bars pb, dq P D in degree p (because those bars are in 1-1 correspondence with negative critical pp `1q-simplices).By convention M ´1 " M dimK`1 " 0.
In practice we call the main algorithm ComputeFiltrationspK, Dq (see Alg 1) to build the initial partial classification and then call the exploration (see Alg. 2) as a subroutine ExtendFiltrationpF, Results, δ, π, Mq.Theorem 3.2.Algorithm ComputeFiltrationspK, Dq returns the list of all D-compatible classifications.

Algorithm 1 ComputeFiltrationspK, Dq
Input: Finite simplicial complex K and target barcode D Output: List Results of all D-compatible classifications 1: F " `Kin , j, Φ cur , I cur , Φ n.c.cur q Ð pH, H, 1, H, D ă2 , Hq 2: Initialise δ as the boundary matrix of K 3: Initialise correspondence πpb, dq :" rH, Hs for bounded pb, dq P D and πpb, 8q :" rH, 8s for infinite pb, 8q P D 4: M p Ð rankpB p`1 q ´7 pb, dq P D | dimpb, dq " p `1, d ă 8 ( , for 0 ď p ď dimK 5: return ExtendFiltrationpF, Results, δ, π, Mq Proof.From Line 1 of Alg. 2, the output consists in the D-compatible classifications K in extracted from complete partial classifications F that are encountered by the algorithm.Thus it suffices to show that any given partial classification F is explored by the algorithm.We proceed by induction on the number m of classes Φ 1 , ¨¨¨, Φ m forming K in , and on the number of simplices in Φ 1 \ ¨¨¨\ Φ m \ Φ cur .Note that the empty partial classification is visited at the beginning of the algorithm, so we may assume that Φ 1 \ ¨¨¨\ Φ m \ Φ cur ‰ H.If Φ cur " H, we have m ě 1 and Φ m ‰ H.We can then form the partial classification F 1 with K 1 in :" Φ 1 \ ¨¨¨\ Φ m´1 , Φ 1 cur :" Φ m , I 1 cur :" H, pΦ n.c.cur q 1 :" H, and j 1 :" j ´1 or j 1 :" j depending on whether Φ m " Φ ij´1 or not.Clearly then, by Lines 3 ´10 of Alg. 2, if F 1 is explored by the algorithm, then so is F. Otherwise, Φ cur ‰ H has a last simplex σ.We can then form F 1 by removing σ, i.e.Φ 1 cur :" Φ cur ztσu, with K 1 in :" K in and j 1 " j unchanged, and with the obvious changes in I 1 cur if σ were a critical simplex, or in pΦ n.c.cur q 1 if it were non-critical.Then F is one of the four incremental extensions of F 1 depicted in Fig. 5, therefore by Lines 14 ´37 of Alg. 2, if F 1 is explored by the algorithm, then so is F. Remark 3.3.The exploration of Algorithm 2 is equivalently viewed as a Depth-First Search (DFS) on the tree of partial D-compatible classifications: each node is a partial classification, whose children differ by the addition of a single simplex according to the four types of extension depicted in Fig. 5.The algorithm records the subset of leaves that correspond to D-compatible classifications.It would also have been possible to design a Breadth-First-Search (BFS) algorithm.However the BFS approach requires more storage, because we can forget the information stored in a node (e.g. the boundary matrix of a partial classification) only when all its children are treated.Hence in a BFS version of the algorithm we would eventually need to store the information of the entire tree, while in the DFS version at most one branch is stored at a time.Remark 3.4.We implicitly maintain a matrix factorization δ " BV at each step of the algorithm, where B P k KˆK is the total boundary matrix of K and δ, V P k KˆK are square.This factorization must satisfy two conditions, each of which is stated in terms of a sequence of form ξ " pσ 1 , . . ., σ p , τ 1 , . . ., τ q , υ 1 , . . ., υ r q, where σ 1 ă ¨¨¨ă σ p is the linear order on K in and υ 1 ă . . .ă υ q is the linear order on Φ cur .We write B for the matrix obtained by permuting rows and columns of B such that simplex ξ k indexes the kth row and column of B, for each k.Matrices δ, and V are defined similarly, by permuting rows and columns to ensure that ξ k indexes the kth row and column of each matrix.Our two conditions can now be stated as follows: • Matrix V must be upper unitriangular.
• Matrix δ must be partially reduced in the following sense.For each birth-death pair rτ, τ 1 s in K in Y Φ cur (including non-critical pairs and excluding pairs of form rτ, 8s), the entry δpτ, τ 1 q must be nonzero, and each entry that lies either directly below δpτ, τ 1 q in column τ 1 (respectively, each entry to the right of δpτ, τ 1 q in row τ ) must equal zero.
It can be shown that the low function of δ agrees with the low function of any R " DV decomposition of B (when restricting each of these functions to the subset K in Y Φ cur ; their values may differ for τ R K in Y Φ cur ), c.f. [5].
To obtain such a factorization after we have added σ to Φ cur , first fix a compatible sequence ξ and permute the columns of δ accordingly; then perform one further swap to ensure that the column indexed by σ appears directly to the right of the last column indexed by K in , keeping the location of all columns indexed by K in fixed.Perform the same permutation on rows.Then add multiples of column σ to columns on its right as necessary to ensure that the unique nonzero entry in row lowpδσq appears in column σ.A routine exercise shows that the resulting matrix δ1 , fits into a matrix factorization δ1 " B V of the appropriate form.
Remark 3.5.From Theorem 2.6 the polyhedra PpKq induced by the D-compatible classifications K describe the fiber PH ´1pDq as a polyhedral complex.In applications where it is desirable to dispose of a simplicial complex structure for PH ´1pDq, we can simply form the nerve of the cover associated to the polyhedra PpKq, which by the return Results Y tK in u 3: else if Φ cur ‰ H and I cur " H and Φ n.c.
We include the construction of this simplicial complex for describing PH ´1pDq in our implementation.Remark 3.6.Since the polyhedral decomposition of the fiber realizes a regular CW complex, computing the Z 2 linear boundary operator of this object reduces to enumerating the codimension-1 faces of each polyhedron.These may be computed from the standard formula for the boundary of a product of copies of standard geometric simplices: Bpσ 1 ˆ¨¨¨σ m q " Ť k rσ 1 ˆ¨¨¨ˆBpσ k q ˆ¨¨¨ˆσ m s Computing the coefficients of the Z-linear boundary matrix is slightly more involved, due to orientation.We deffer this problem to later work.Remark 3.7 (Generalization to barcodes for persistent (relative) (co)homology).The discussion this far has focused exclusively on barcodes of the homological persistence module (obtained by applying the homology functor to a nested sequence of cell complexes).However, there are several other formulae for generating persistence modules from a filtered cell complex.While each construction has distinct and useful algebraic properties, their barcodes are completely determined by that of the homological barcode [8].Thus the procedure to compute fiber of PH also serves to compute the persistence fiber of these other constructions.For a detailed discussion, see Appendix B.

Generalisation to based chain complexes
We generalise the fact that the fiber of the persistence map PH is a polyhedral complex to filters defined directly at the level of based chain complexes.These include filters on simplicial complexes, cubical complexes, delta complexes and CW complexes.In turn our approach for computing PH ´1pDq adapts to these situations as well.Definition 4.1.A based, finite-dimensional, k-linear chain complex is a pair pC, Eq such that ř i dimpC i q ă 8 and E is a union of bases E i of C i for all i.A filter on pC, Eq is a real-valued function f : E Ñ I such that the linear span of te P E : f peq ď tu forms a linear subcomplex of C, for each t P I.
Here are some examples of pC, Eq induced by combinatorial complexes: 1. Simplicial Complexes.Basis E is the collection of simplices in a simplicial complex K.We recover the standard setting of filters over K.
2. Cubical complexes.Basis E is the collection of cubes in a cubical complex.
3. Delta and CW Complexes.Basis E is the collection of cells in a delta complex or CW complex K.
These variations are of interest in practice: For instance with delta and CW complexes we can decompose topological spaces with much fewer simplices, while cubical complexes appear naturally e.g. in image analysis.The main result of this section, Theorem 4.14, generalizes the structure theorem for simplicial complexes (Theorem 1.2) to these important variants.In particular, Theorem 4.14 implies each of the following results.
Theorem 4.2.Let K be a simplicial, cubical, delta or CW complex and let D be a barcode.Then the fiber PH ´1pDq is the underlying space of a polyhedral complex whose polyhedra are products of standard simplices.Theorem 4.3.Theorem 4.2 remains true if we restrict to lower-star filtrations or Vietoris-Rips filtrations.

Polyhedral decomposition of the ambient cube
Let E be a finite set, and let Γ " tγ 0 ă ¨¨¨ă γ m u be a finite subset of the interval I, where γ 0 " 1 and γ m ď 7K.For any pair of functions f, g : E Ñ I, let us define the relation f " Γ g by either of the following two equivalent axioms: (A1) There exists an order-preserving map ψ : I Ñ I such that ψpγ i q " γ i for each i, and g " ψ ˝f .
(A2) The function g satisfies f peq P Γ ùñ gpeq " f peq f peq ď f pe 1 q ùñ gpeq ď gpe 1 q. (2) Note that the relation " Γ is reflexive and transitive but not symmetric.We write P Γ pf q :" tg P I E : f " Γ gu.
Lemma 4.4.The set P Γ pf q is a compact polyhedron.
Proof.Axiom (A2) represents a family of logical conditions, each of which determines either a hyperplane, i.e. tg : gpeq " cu, or a closed half-space, i.e. tg : gpe 1 q ´gpeq ě 0u.The intersection of these sets, P Γ pf q, is a bounded polyhedron.
Proposition 4.6.The set of convex polyhedra P Γ " tP Γ pf q : f : E Ñ Iu is a polyhedral complex; the underlying space is |P Γ | " I E .
Next we provide the description of each polyhedron P Γ pf q in the complex as a product of standard simplices.For convenience let γ m`1 :" 8, and for each i P t1, . . ., mu, let η i " f pEq X pγ i , γ i`1 q.
Lemma 4.7.If each η i is nonempty, then P Γ pf q is affinely isomorphic to ∆ #η 0 ˆ¨¨¨ˆ∆ #η m , where ∆ k stands for the standard geometric simplex of dimension k.

Polyhedral decomposition of PH ´1pDq for based chain complexes
Let pC, Eq be a based, finite-dimensional, k-linear chain complex.
Lemma 4.8.Let f be a filter on pC, Eq; D be the associated (total) barcode; and Γ :" End ˚pDq be the set of finite endpoints of intervals in D. Then each element of P Γ pf q is a bona fide filter on pC, Eq with barcode D.
Proof.The persistence map is equivariant in the sense that PHpψ ˝f q " ψ.PHpf q for ψ : I Ñ I a non-decreasing map, as can be proven e.g.following [14,Lemma 1.5].Here ψ acts point-wise on intervals of PHpf q, i.e. each interval pb, dq P PHpf q produces an interval pψpbq, ψpdqq in ψ.PHpf q whenever ψpbq ‰ ψpdq.The result follows from Axiom (A1).
Given S a union of polyhedra in a polyhedral complex P, then the subcomplex induced by S is defined as PrSs " tX P P : X Ď Su.
Theorem 4.9.Let pC, Eq be a point-wise finite dimensional based chain complex; D be a barcode; Γ :" End ˚pDq; and PH ´1pDq be the set of filters on pC, Eq with barcode D. Then PH ´1pDq is a union of polyhedra in P Γ , hence there exists a well-defined polyhedral subcomplex with underlying space |P Γ rPH ´1pDqs| " PH ´1pDq.
Proof.Lemma 4.8 implies that PH ´1pDq is a union of the polyhedra in tP Γ pf q : f P PH ´1pDqu, and by continuity it is a closed subset of the polyhedral complex P Γ " tP Γ pf q : f : E Ñ Iu (Proposition 4.6).Therefore PH ´1pDq is a sub-polyhedral complex.

Polyhedral decomposition of PH ´1pDq for CW complexes
The polyhedral decomposition of PH ´1pDq for based chain complexes (Theorem 4.9) does not carry over directly to arbitrary CW complexes because given a CW complex K, there may exist filters on the associated based chain complex pC, Eq that do not correspond to valid filters of K.Here the notion of filter on a CW complex (respectively, delta or cubical complex) naturally generalises the simplicial situation: it qualifies any function f : K Ñ I whose sub-level sets are sub-CW complexes (respectively, sub-delta or sub-cubical complexes).
Example 4.10.Let K " tv, eu be the CW decomposition of S 1 with one vertex, v, and one edge, e.Since all boundary maps are 0, the filtration teu Ď tv, eu is perfectly valid for pC, Eq, but not for K.
Fortunately this problem is simple to address.Lemma 4.11 represents the only technical observation needed to extend our polyhedral characterization of the persistence fiber from regular finite CW complexes to arbitrary finite CW complexes.The proof is vacuous.
Lemma 4.11.Suppose that a function P : I E Ñ tTrue, Falseu satisfies the condition that P pf q " True ùñ P evaluates to True on each element of P Γ pf q.
Then P ´1pTrueq is a union of polyhedra in P Γ , hence P Γ rP ´1pTrueqs is a polyhedral subcomplex.
Theorem 4.12.Let K be a simplicial, cubical, delta or CW complex.Let D be a barcode, and let pC, Eq be the induced based chain complex.Then the fiber PH ´1pDq is a polyhedral complex whose polyhedra are products of standard simplices.
Implementation Algorithm 1 was implemented in the programming language Rust.This implementation accommodates user-defined coefficient fields, based complexes, and restricted families of filters, e.g.lower-star.The implementation uses several dependencies from the ExHACT library [13] for low-level functions, including reduction of boundary matrices and implementation of common coefficient fields.Source code for both libraries is to be made available in the near future.
Reading the results The outputs of the algorithm are reported in figures.Each figure corresponds to a specific simplicial, or CW complex and provides statistics about the fiber PH ´1pDq for various barcodes in a table.By convention, black intervals in the target barcode D are of dimension 0, blue intervals are of dimension 1, while green intervals are of dimension 2. In all cases the number of polyhedra in PH ´1pDq is binned by dimension in the form of an array, and the Betti numbers are computed with coefficients in Z 2 .Unless explicitly stated otherwise: • The facets are the top dimensional polyhedra.Otherwise, we explicitly report in red the facets binned by dimension in an array; • The persistence modules associated to barcodes D are computed with coefficients in Z 2 .Otherwise, in special cases where we also compute persistence modules with coefficients in Q, the coefficient field is indicated in blue by a specific mention; • The fiber is computed inside the space of all filters.Otherwise, we provide as many columns for statistics about PH ´1pDq as there are categories of filters to consider.

Simplicial Complexes
In all the examples of this section K is a simplicial complex.When K is a tree (Figure 6), we report these statistics both when the domain of PH consists of all filters and when it is restricted to lower star filters.For lower star filters on the interval the fiber is shown by [7] to consist of contractible components.Our computations indicate that this property holds as well for general filters on the interval, however it breaks for other trees where the fiber has loops as indicated by non-trivial Betti numbers β 1 .
Figure 6: Some statistics about fibers PH ´1pDq when K is a tree.
For lower star filters on arbitrary subdivisions of the circle it is proven in [15] that the fiber is made of circular components.Our computations (Figure 7) suggest that this property holds as well when allowing general filters and adding dangling edges to the circle.
When K is homotopy equivalent to a bouquet of two circles (Figure 8), the fiber itself has trivial homology in degree higher than 1 and we observe cases (indicated in red) where some facets are not top-dimensional polyhedra.
In light of all the previous calculations, we can conjecture that when K is a graph the fiber PH ´1pDq has trivial homology in degrees higher than 1.However, when K is the 2-skeleton of the 3-simplex (Figure 9), for some barcodes D the fiber has non-trivial degree 3 homology.Therefore in general the fiber PH ´1pDq may have higher non-trivial homologies than the base complex K. Let K be an arbitrary connected simplicial complex, and let D K be the barcode with one infinite bar p0, `8q in degree 0, with no finite bars, followed by infinite bars p1, `8q of multiplicity β p pKq in each degree p ě 1.In all the examples computed with Z 2 coefficients by our algorithm, the fiber PH ´1pD K q and the base complex K have the same Betti numbers (with coefficients in Z 2 ).This motivates the following conjecture.
Conjecture 1.Let K be a simplicial complex.Then the fiber PH ´1pD K q and K have the same Betti numbers.

CW Complexes
In this section K is a surface with a CW structure: the torus (Fig. 10), the Klein bottle (Fig. 11), the real projective plane (Fig. 12), the Möbius strip (Fig. 13), the cylinder (Fig. 14) and the Dunce Hat (Fig. 15).Indeed from section 4 our algorithm adapts to CW complexes and more generally to based chain complexes.This is a precious feature since simplicial triangulations of our surfaces have many simplices, hence our algorithm struggles to compute the associated fibers, while it handles cellular decompositions which are much smaller.
For cellular triangulations that are too small (e.g. the first two decompositions of the torus in Fig. 10), fibers are not interesting.This is why we consider cellular decompositions that are not minimal and have sufficiently many simplices for the fibers to be interesting.For such fibers, the remarks of section 5.1 about simplicial complexes apply as well.In particular, the fiber PH ´1pD K q and the base complex K have the same Betti numbers.
We also find novel behaviours: Figure 8: Some statistics about fibers PH ´1pDq when K is homotopy equivalent to a bouquet of two circles.
• For some CW complexes that are topological manifolds, such as the real projective plane and the Klein bottle, there are fibers whose facets do not consist only in top-dimensional polyhedra.In particular these fibers are not manifolds.• For some CW complexes that are topological manifolds, such as the real projective plane, there are fibers whose connected components don't have the same homotopy type.This situation is detected whenever β 0 pPH ´1pDqq ě 2 and β p pPH ´1pDqq " 1 for some p ě 1. • For some spaces like the Klein bottle and the real projective plane whose homology with coefficients in Z 2 differ from that with coefficients in Q, the fibers PH ´1pDq strongly depend on the choice field.Namely, the number of polyhedra in the fibers, the dimensions of the facets and the Betti numbers are not the same whether the persistence module associated to D is computed with coefficients in Z 2 or Q. • The dunce hat is contractible but some fibers have non-trivial 2-dimensional homology.

Conclusion
This work introduces and implements the first algorithm to compute the fiber PH ´1pDq Ď R K .Each fiber PH ´1pDq admits a canonical polyhedral decomposition [14], and the output of the algorithm is a collection of polyhedra, with each polyhedron represented in computer memory as an ordered partitions of K.
The proposed algorithm leverages the combinatorial structure of PH ´1pDq to organize the computation as a depth-first search; this ensures that the memory requirement to run the computation (excluding the list of polyhedra returned) scales quadratically with the size of K, rather than exponentially, as would naive implementations.
In addition, we extend the polyhedral decomposition of the fiber from [14, Theorem 2.2] to encompass not only simplicial complexes but CW complexes generally, including cubical and delta complexes.We also incorporate Figure 9: Some statistics about fibers PH ´1pDq when K is homotopy equivalent to a 2-sphere.
variations on the notion of filter that arise naturally in applications, e.g. the lower-star filtration and Vietoris-Rips filtration.The proposed algorithm adapts naturally to these settings, and we include these variants in the implementation.Indeed, this flexibility proves useful in experiments, since several computations which proved intractable on a simplicial complex K due to excessive time demands later proved feasible for homeomorphic CW complexes that had fewer cells.This work enables the research community to study persistence fibers empirically, for the first time.As a demonstration, we compute the fibers of approximately 120 barcode strata, the only corpus of its kind.The Betti statistics of the associated polyhedral complexes suggest several numerical trends, and provide counterexamples which would be impossible to replicate by hand.
An interesting feature of these complexes is their size.In each of our experiments, the underlying simplicial or CW complex had fewer than 20 cells; however the associated fibers often had hundreds of thousands of polyhedra -in some cases, millions.It is surprising that so many distinct solution classes should exist, given the size of K and the number of conditions imposed by the persistence map.These examples should inform general approaches to computation in the future, and motivate the mathematical problem of formulating new, more compact representations of the fiber.
Even in cases where the fiber remains small enough to fit comfortably in computer memory, we find that challenges remain vis-a-vis overall execution time.Most computations that are run on complexes with 15 cells or more consume hours or days; run time also depends, to a large degree, on the barcode selected.Moreover, the overwhelming majority of internal calls to our recursive depth-first-search algorithm yield only proper faces of polyhedra that have already been computed.This points to several natural and concrete directions either for development of new algorithms or improvement of the methods presented here.

A Connection with Simple Homotopy Theory
In this section we show that collapsibility of a complex K, which is a combinatorial and stronger notion of contractibility, is equivalent to the fiber PH ´1pDq over a well-chosen barcode D being non-empty.In particular we can use our algorithm for computing PH ´1pDq to determine whether K is collapsible.
Given τ, σ two simplices, τ Ď σ and dim σ " dim τ `1, such that σ is a maximal face of K and no other simplex contains τ , we say that τ is a free face.The operation of removing τ, σ is called an elementary collapse, and if L :" Kztτ Ď σu is the resulting complex we write K OE L. Finally K is said to be collapsible if there is a sequence of elementary collapses from K to one of its vertices: Collapsibility implies contractibility but the reverse is false: the dunce hat and the house with two rooms are instances of contractible 2-complexes that are not collapsible.However we have the following well-known Zeeman's conjecture, appropriately phrased in [2] for simplicial complexes: Conjecture 2 (Zeeman [18]).Let K be a contractible 2-complex.Then after taking finitely many barycentric subdivisions the product K ˆI is collapsible.
This conjecture remains open and implies the 3-dimensional conjecture [18].
Next we bridge the question of the collapsibility of a complex K to the fiber of PH over barcodes D that are elementary: those have 1 infinite bar pb 0 , 8q in dimension 0 followed by 7K´1 2 non-overlapping intervals pb i , d i q, that is: Proposition A.1.Let K be a contractible complex.Then K is collapsible if and only if there exists an elementary barcode D with nonempty fiber, i.e.PH ´1pDq ‰ H.
Proof.If K is collapsible let K " L n OE L n´1 OE L n´2 OE ¨¨¨OE L 1 OE L 0 " tvu be a sequence of elementary collapses, with notations n " 7K´1 2 and L i`1 " L i Y tτ i Ď σ i u, and define a filter f by f pvq :" 0, f pτ i q :" 2i `1 and f pσ i q :" 2i `2.Then the barcode of f is clearly elementary by definition of an elementary collapse.
Conversely, let D " tpb 0 , 8quYtpb i , d i qu 1ďiď 7K´1 2 be an elementary barcode and f a filter in the fiber, i.e.PHpf q " D. Since D has exactly 7K distinct endpoint values, f establishes a bijection v Þ Ñ b 0 , pτ i , σ i q Þ Ñ pb i , d i q, from simplices of K to these endpoints.In particular τ n and then σ n are the last two simplices to enter the sub-level set filtration of f , so that σ n is a maximal face and no other simplex can contain τ n .However σ n itself contains τ n because the dim τ n " dim σ n ´1 " dimpb n , d n q-cycle created by τ n becomes a boundary when adding σ n in the filtration.Thus removing τ n and σ n defines an elementary collapse, and we conclude by induction.

B Adaptation for persistent (relative) (co)homology
In addition to the homology functor, the relative homology, cohomology, and relative cohomology functors engender distinct persistence modules of their own, each of which determines a barcode and thus a new persistence map.We claim that the procedure described to compute the fiber of the persistent homology map in this work also suffices to compute the fibers of these other maps.
Let pC, Eq be a based, finite-dimensional, k-linear chain complex equipped with a filter f : E Ñ I that surjects onto a finite subset of the unit interval I, denoted Γ " tγ 0 ă ¨¨¨ă γ m u, where γ 0 " 0 and γ m ă 1. Write L t for the linear span of te P E : f peq ď tu, which forms a subcomplex of C by hypothesis.
From these data we can construct four distinct sequences of vector spaces and homomorphisms, induced by either inclusion or quotient: H ˚pL γ0 q / / ¨¨¨/ / H ˚pL γm q / / H ˚pL 1 q H ˚pLq : H ˚pL γ0 q ¨¨ö o H ˚pL γm q o o H ˚pL 1 q o o H ˚pL 1 , Lq : H ˚pL 1 q / / H ˚pL 1 , L γ0 q / / ¨¨¨/ / H ˚pL 1 , L γm q H ˚pL 1 , Lq : We refer to these as the homology, cohomology, relative homology, and relative cohomology persistence modules, respectively.
A classic result of [8] states that the barcode for H ˚pLq uniquely determines the barcodes for H ˚pLq, H ˚pL 1 , Lq, and H ˚pL 1 , Lq.
To compute the fiber of one of these other maps, therefore, one must simply convert the barcode to the associated PH barcode and apply any algorithm that is specialized to compute fibers for H ˚pLq. Barcodes in persistent homology can be converted into barcodes for the other three standard persistence modules as follows 21.H ˚pLq from H ˚pLq: no change 2. H ˚pLq from H ˚pL 1 , Lq or H ˚pL 1 , Lq: subtract 1 from the homology degree of each finite bar; replace each infinite bar of form p´8, aq with ra, 8q, leaving degree unchanged   Figure 12: Some statistics about fibers PH ´1pDq when K is a CW decomposition of the real projective plane, and when persistence modules are computed with coefficients in the field Q or Z 2 .

C Additional computations
Figure 13: Some statistics about fibers PH ´1pDq when K is a CW decomposition of the Möbius strip.

Figure 2 :
Figure 2: With a simplicial complex K and an injective filter f in the background, φ maps the barcode PHpf q to D via the arrows going up, so that pf, φq is D-compatible.In the corresponding D-compatible classification, there are 4 distinct equivalence classes Φ i of simplices, and they are distinguished by the use of different colors.Critical simplices are grayed and correspond to intervals via the upward solid arrows: Here πpb 1 , d 1 q " rσ 1 , σ 8 s, πpb 2 , d 2 q " rσ 6 , σ 9 s and πpb 3 , 8q " rσ 11 , 8s, hence the critical simplices form the set tσ 1 , σ 6 , σ 8 , σ 9 , σ 11 u.The other simplices are non-critical and cancelled in pairs by the dotted arrows: tσ 2 , σ 3 , σ 4 , σ 5 , σ 7 , σ 10 u.

Figure 3 :
Figure 3: We consider the barcode D (top) of Fig. 2 and cut the D-compatible classification at σ8 to get a partial classification.The first three classes Φ1, Φ2, Φ3 are fully present in the resulting partial classification F. So here Kin is a D ăj -compatible classification where D ăj (bottom) is the barcode spanned by the interval endpoints 1 and 2. The next endpoint value to consider is then j " 3.The current class Φcur " tσ7, σ8u is incomplete for two reasons.On the one hand Critical rule is violated: The current class Φcur is intended to contain critical simplices for the endpoint j " 3, as already it contains the critical simplex σ8 " π´pb1, d1q, but the intervals pb2, d2q and pb3, 8q (in red) also have the endpoint j " 3 and are yet unmatched: so Icur " tpb2, d2q, pb3, 8qu.Hence we should define the simplex π´pb2, d2q that destroys the cycle generated by σ6 " π`pb2, d2q, and a simplex π´pb3, 8q that creates a dimpb3, 8q-cycle, before completion of the class.On the other hand Non-critical rule is violated: here Φ n.c.cur " tσ7u contains the unpaired simplex σ7 which generates an unexpected (dotted red) interval, which shall be destroyed by another simplex before completion of the class.
(c) Finding a simplex σ to destroy the cycle generated by an unpaired non-critical simplex σ7 P Φ n.c.cur , resulting in the removal of σ7 in Φ n.c.cur .(d) Finding a non-critical simplex σ generating a new cycle, resulting in the addition of σ in Φ n.c.cur .

Figure 5 :
Figure 5: The four types of extensions of Φ cur (highlighted in blue).

Figure 7 :
Figure 7: Some statistics about fibers PH ´1pDq when K is homotopy equivalent to a circle.

Figure 10 :
Figure 10: Some statistics about fibers PH ´1pDq when K is a CW decomposition of the torus.

Figure 11 :
Figure 11: Some statistics about fibers PH ´1pDq when K is a CW decomposition of the Klein bottle, and when persistence modules are computed with coefficients in the field Q or Z 2 .

Figure 14 :
Figure 14: Some statistics about fibers PH ´1pDq when K is a CW decomposition of the cylinder.

Figure 15 :
Figure 15: Some statistics about fibers PH ´1pDq when K is a CW decomposition of the Dunce Hat.