Relative persistent homology

The alpha complex efficiently computes persistent homology of a point cloud $X$ in Euclidean space when the dimension $d$ is low. Given a subset $A$ of $X$, relative persistent homology can be computed as the persistent homology of the relative \v{C}ech complex. But this is not computationally feasible for larger point clouds. The aim of this note is to present a method for efficient computation of relative persistent homology in low dimensional Euclidean space. We introduce the relative Delaunay \v{C}ech complex whose homology is the relative persistent homology. It can be constructed from the Delaunay complex of an embedding of the point clouds in $(d+1)$-dimensional Euclidean space.


Introduction
Persistent homology is receiving growing attention in the machine learning community. In that light, the scalability of persistent homology computations is of increasing importance. To date, the alpha complex is the most widely used method to compute persistent homology for large low-dimensional data sets.
Relative persistent homology has been considered several times in recent years. For example Edelsbrunner and Harrer [1] have presented an application of relative persistent homology to estimate the dimension of an embedded manifold. Relative persistent homology is also a way to introduce the concept of extended persistence [2]. De Silva and others have shown that the relative persistent homology H * (X, A t ) with an increasing family of sets A t and a constant X = ∪ t A t , and the corresponding relative persistent cohomology have the same barcode [3]. They also show that absolute persistent homology of A t can be computed from this particular type of relative persistent homology. More recently, Pokorny and others [4] have used relative persistent homology to cluster two-dimensional trajectories. Some software, such as PHAT [5], even allows for the direct computation of relative persistent homology. For an example see the PHAT github repository.
Despite the fact that relative persistent homology has been considered in many different situations, we are not aware of a relative version of the alpha-or DelaunayČech complexes being used.
Our contributions are as follows.
1. We give a new elementary proof that the DelaunayČech complex is homotopy equivalent to thě Cech complex. This has previously been shown using discrete Morse theory [6].
2. We extend this proof to the relative versions of the DelaunayČech complex and theČech complex.
3. We explain how the relative DelaunayČech complex can be computed through embedding in a higher dimension.
Together, these contributions result in theorem 1.1, which shows how the relative persistent homology ofČech persistence modulesČ * (X; k)/Č * (A; k) of low-dimensional spaces can be efficiently computed using a relative Delaunay-Čech complex. Theorem 1.1. Let A ⊆ X ⊆ R d be finite. The relative Delaunay-Čech complex DelČ(X, A) defined in section 6 is homotopy equivalent to the relativeČech complexČ(X, A).
Moreover, given the cardinalities n X of X and n A of A, the relative Delaunay-Čech complex contains at most O ((n X + n A )⌈(d + 1)/2⌉) simplices.
This manuscript is structured as follows. In section 2, we introduce relative persistent homology. section 3 introduces Dowker Nerves, the theoretical foundation we use to prove that the relative Delaunay Cech complex is homotopy equivalent to the relativeČech complex. In section 4, we introduce the alpha-and Delaunay-Čech complexes using the Dowker Nerve notation and show that they are homotopy equivalent to theČech complex. section 5 introduces the relative alpha-and Delaunay-Čech complexes, and proves that they are homotopy equivalent to the relativeČech complex. Finally, in section 6 we show how the relative Delaunay-Čech complex can actually be computed.

Relative Persistent Homology
Let X be a finite subset of Euclidean space R d . Given t > 0, theČech complexČ t (X) of X is the abstract simplicial complex with vertex set X and with σ ⊆ X a simplex ofČ t (X) if and only if there exists a point p ∈ R d with distance less than t to every point in σ. Varying t we obtain the filteredČech complex C(X).
Given a subset A of X we obtain an inclusionČ(A) ⊆Č(X) of filtered simplicial complexes and an induced inclusionČ * (A; k) ⊆Č * (X; k) of associated chain complexes of persistence modules over the field k. The relative persistent homology of the pair (X, A) is defined as the homology of the factor chain complex of persistence modulesČ * (X; k)/Č * (A; k).
For X of small cardinality, the relative persistent homology can be calculated as the reduced persistent homology of the relativeČech complexČ(X, A), where σ ⊆ X is a simplex ofČ(X, A) t if either σ ⊆ A or σ ∈Č t (X). However, as the cardinality of X grows, this quickly becomes computationally infeasible.

Dowker Nerves
A dissimilarity is a continuous function of the form Λ : X × Y → [0, ∞], for topological spaces X and Y , where [0, ∞] is given the order topology. A morphism f : consists of a pair (f 1 , f 2 ) of continuous functions f 1 : X → X ′ and f 2 : Y → Y ′ so that for all (x, y) ∈ X × Y the following inequality holds: This notion of morphism is less general than the definition in for example [7, Definition 2.10], but it is simpler and suffices for our purposes.
The Dowker Nerve N Λ of Λ is the filtered simplicial complex described as follows: For t > 0, the simplicial complex N Λ t consists of the finite subsets σ of X for which there exists y ∈ Y so that Λ(x, y) < t for every x ∈ σ.
Let f : Λ → Λ ′ be a morphism of dissimilarities as above and let σ ∈ N Λ t . Given y ∈ Y with Λ(x, y) < t for every x ∈ σ we see that for every x ∈ σ, so f 1 (σ) ∈ N Λ ′ t . Thus we have a simplicial map f : N Λ → N Λ ′ . Given x ∈ X and t > 0, the Λ-ball of radius t centered at x is the subset of Y defined as The t-thickening of Λ is the subset of Y defined as Note that by construction the set of Λ-balls of radius t is an open cover of the t-thickening of Λ.
The geometric realization |K| of a simplicial complex K on the vertex set V is the subspace of the space [0, 1] V of functions α : V → [0, 1] described as follows: 1. The subset α −1 ((0, 1]) of V consisting of elements where α is strictly positive is a simplex in K. In particular it is finite.
2. The sum of the values of α is one, that is v∈V α(v) = 1.
The subspace topology on |K| is called the strong topology on the geometric realization. It is convenient for construction of functions into |K|. The weak tooplogy on |K|, which we are not going to use here, is convenient for construction of functions out of |K|. The homotopy type of |K| is the same for these two topologies [8, p. 355, Coorllary A.2.9]. Given a simplex σ ∈ K, the simplex |σ| of |K| is the closure of The simplices of |K| are the sets of this form.
A partition of unity subordinate to the dissimilarity Λ : We say that Λ is numerable if a partition of unity subordinate to Λ exists. If Y is paracompact, then every dissimilarity of the form Λ : Every finite subset of this set is an element of N Λ t . This implies that for s ≤ t there is a simplex of |N Λ t | containing both ϕ s (y) and ϕ t (y). It also implies that given another partition of unity {ψ t : Λ t → |N Λ t |} subordinate to Λ there is a simplex of |N Λ t | containing both ϕ t (y) and ψ t (y). This is exactly the definition of contiguous maps, so ϕ t and ψ t are contiguous, and thus homotopic maps Recall that a cover U of Y is good if all non-empty finite intersections of members of U are contractible. We now state the Nerve Lemma in the context of dissimilarities.
Moreover, if the cover of Λ t by Λ-balls of radius t is a good cover, then ϕ t is a homotopy equivalence.
Proof. By the above discussion, we only need to note that the last statement about good covers is [9,Theorem 4.3].
A functorial version of the Nerve Lemma can be stated as follows: Proof. We show that the two compositions are contiguous. Recall that |f 1 | takes a point α : Then we have that for y ∈ Λ t , the elements |f 1 |(ϕ t (y)) and ψ t (f 2 (y)) of |N Λ ′ t | are contained in simplices |σ| and |τ | respectively. Both σ and τ are subsets of the set {x ′ ∈ X ′ | Λ ′ (x ′ , f 2 (y)) < t}. However every finite subset of this set is a simplex in N Λ ′ t . In particular, so is the union σ ∪ τ .

The Alpha-and DelaunayČech Complexes
Given a finite subset X of R d we define the Voronoi cell of x ∈ X as Let R d d be Euclidean space with the discrete topology. The discrete Delaunay dissimilarity of X is defined as The Delaunay complex Del(X) is the simplicial complex with vertex set X and with σ ⊆ X a simplex of Del(X) if and only if there exists a point in R d belonging to Vor(X, x) for every x ∈ σ. That is, Del(X) = N del X t for t > 0. Note that with respect to Euclidean topology, the discrete Delaunay dissimilarity is not continuous, and hence del X : is not a dissimilarity. One way to deal with this is to use the Nerve Lemma for absolute neighbourhood retracts [10,Theorem 8.2.1]. In order to use theorem 3.1 and proposition 3.2 from above, instead we construct a continuous version of the Delaunay dissimilarity.
Given a subset σ of X and p ∈ R d , let where for any A ⊆ R d , we define d(p, A) = inf a∈A {d(p, a)}.
Note that if σ / ∈ Del(X), then the infimum ε σ of the continuous function d Vor (−, σ) : R d → R is strictly positive. Choose ε > 0 so that 2ε < ε σ for every subset σ of X that is not in Del(X). Given x ∈ X we define the ε-thickened Voronoi cell Vor(X, x) ε by By construction the nerve of the open cover (Vor(X, x) ε ) x∈X of R d is equal to Del(X).
Let h : [0, ∞] → [0, ∞] be the order preserving map For each x ∈ X we let Del x : R d → [0, ∞] be the function defined by Del x (p) = h(d(p, Vor(X, x))) so that Del x (Vor(X, x)) = 0 and Del x (R d \ Vor(X, x) ε ) = ∞. The Delaunay dissimilarity of X is defined as By the above discussion we know that N Del X t = N del X t = Del(X) whenever t > 0. TheČech dissimilarity of X is defined as where d X (x, p) is the Euclidean distance between x ∈ X and p ∈ R d .
The alpha dissimilarity of X is defined as The DelaunayČech dissimilarity is defined as Note the nerve of the dissimilarity is identical to the nerve of DelČ X . Moreover, the Dowker nerves of the Delaunay-,Čech-, alpha-and DelaunayČech dissimilarities are the Delaunay-,Čech-, alpha-and DelaunayČech complexes respectively. For all these dissimilarities, the corresponding balls are convex, so the geometric realizations are homotopy equivalent to the corresponding thickenings. In order to see that the morphism A X → d X of dissimilarities induces homotopy equivalences |N A X t | ≃ − → |N d X t | it suffices to note that the corresponding map (A X ) t → (d X ) t is the identity map. This holds because B A X (x, t) = B d X (x, t)∩B Del X (x, t) and given y ∈ B d X (x, t) we have that y ∈ Vor(X, x ′ ) for some x ′ ∈ X with d X (y, x ′ ) minimal, so d X (y, x ′ ) ≤ d X (y, x) < t and y ∈ B d X (x ′ , t) ∩ B Del X (x ′ , t).
In order to see that the morphism DelČ X → d X of dissimilarities induces homotopy equivalences we use the following lemma: Lemma 4.1. For every (p, q) ∈ (DelČ X ) t , the entire line segment between (p, p) and (p, q) is contained Proof. In order not to clutter notation we omit superscript X on dissimilarities. Let γ : [0, 1] → R d be the function γ(s) = (p, (1 − s)p + sq). We claim that given (p, q) ∈ DelČ t and s ∈ [0, 1] the point We are left to show that, given s ∈ [0, 1], the point (p, γ ′ (s)) = (p, (1 − s)p + sq ′ ) is in delČ t . Suppose γ ′ (s) ∈ Vor(X, y) for some s ∈ [0, 1) and some y ∈ X. We claim that then p ∈ B d (y, t). To see this, we may without loss of generality assume that y = x. Let H be the hyperplane in between x and y, i.e.
Since γ ′ (s) ∈ Vor(X, y) we have γ ′ (s) ∈ H + . Since q ∈ Vor(X, x) we have q ∈ H − . Since the line segment between p and q either is contained in H or intersects H at most once we must have p ∈ H + . That is, d(y, p) ≤ d(x, p) < t, so p ∈ B d (y, t) as claimed.
By lemma 4.1, the inclusion is a deformation retract. In particular it is a homotopy equivalence.

The Relative DelaunayČech Complex
In this section we consider two subsets X 1 and X 2 of d-dimensional Euclidean space R d .
The Voronoi diagram of a finite subset X of R d is the set of pairs of the form (x, Vor(X, x)) for x ∈ X, that is, This may seem overly formal since the projection on the first factor gives a bijection Vor(X) → X. However, when we work with Voronoi cells with respect to different subsets X 1 and X 2 of R d it may happen that Vor(X 1 , x 1 ) = Vor(X 2 , x 2 ) even when x 1 = x 2 . The Voronoi diagram of the pair of subsets X 1 and X 2 of R d is the set Vor(X 1 , X 2 ) = Vor(X 1 ) ∪ Vor(X 2 ).
The discrete Delaunay dissimilarity of X 1 and X 2 is defined as The simplicial complex N del X1,X2 t is independent of t > 0. It is the Delaunay complex Del(X 1 , X 2 ) on X 1 and X 2 . In order to describe the homotopy type of this simplicial complex we thicken the Voronoi cells like we did in the previous section: Given a subset σ of Vor(X 1 , X 2 ) and p ∈ R d , let Note that if σ / ∈ Del(X 1 , X 2 ), then the infimum ε σ of the continuous function d Vor (−, σ) : R d → R is strictly positive. Choose ε > 0 so that 2ε < ε σ for every subset σ of Vor(X 1 , X 2 ) that is not in Del(X 1 , X 2 ). Given (x, V ) ∈ Vor(X 1 , X 2 ) we define the ε-thickening V ε of V by By construction, the nerve of the open cover ((x, V ε )) (x,V )∈Vor(X1,X2) is equal to Del(X 1 , X 2 ). The Delaunay dissimilarity Del X1,X2 of X 1 and X 2 is defined as for h : [0, ∞] → [0, ∞] the order preserving map defined in the previous section.
The inclusion X 1 → Vor(X 1 , X 2 ) taking x ∈ X 1 to (x, Vor(x, X 1 )) induces a morphism of dissimilarities Del X1 → Del X1,X2 and an inclusion of nerves N Del X1 t ⊆ N Del X1,X2 t for t > 0. Next, we construct the dissimilarity A X1,X2 as Also here we have an obvious inclusion N A X1 t → N A X1,X2 t , and the A X1,X2 -balls are convex so the nerve lemma yields a homotopy equivalence Finally, we construct the dissimilarity DelČ X1,X2 Here again we have an obvious inclusion N DelČ The following variant of lemma 4.1 implies that (DelČ X1,X2 ) t is a deformation retract of (X 1 ∪ X 2 ) t .

Implementation Of The Relative DelaunayČech Complex
In this section we explain how the relative Delaunay complex can be realized as a standard Delaunay complex by embedding in one dimension higher. We fix some notation used in this section: X 1 ⊆ R d and X 2 ⊆ R d are finite subsets. We let s be a positive real number, we let Z = X 1 × {s} ∪ X 2 × {−s} and we let pr : R d+1 → R d be the projection omitting the last coordinate. Lemma 6.1. The projection pr : R d+1 → R d induces a surjection V )) consists of all elements of Vor(Z)) of the form ((x, a), V ) for a ∈ {±s}.
Let s 1 be larger than the largest filtration value of the alpha complex of X 1 . Then the function j 1 : Vor(X 1 ) → Vor(Z) defined by j 1 (x 1 , V ) = ((x 1 , s), V (Z, (x 1 , s))) induces a simplicial map of nerves del(X 1 ) → del(Z) for all s > s 1 . Similarly, there is a simplicial map del(X 2 ) → del(Z) for all s > s 2 when s 2 is larger than all filtration values of the alpha complex of X 2 . Let s(X 1 , X 2 ) = max(s 1 , s 2 ).
Let h : [0, ∞] → [0, ∞] be the order preserving map defined in eq. (1), and let Del Z and Del X1,X2 be constructed using h. We define a new dissimilarity Note that the underlying simplicial complex t>0 N D t of the nerve of D is the Delaunay complex del(Z).
In order to show that g induces a homotopy equivalence of geometric realizations, by the Nerve Lemma, it suffices to show that given a simplex σ of N DelČ X1,X2 t , the inverse image g −1 (σ) is a simplex of N D t . Let p be a point in the intersection of the Voronoi cells in σ. Write g −1 (σ) = τ 1 ∪ τ 2 , where τ 1 consists of Voronoi cells with centers at height s and τ 2 consists of Voronoi cells with centers at height −s. Let Suppose that τ 2 is empty. Then actually σ ∈ DelČ X1 t , and since s > s 1 we know that j 1 (σ) ∈ del(Z). Since g • j 1 is the inclusion of Vor(X 1 ) in Vor(X 1 , X 2 ) = Vor(X 1 ) ∪ Vor(X 2 ) we know that j 1 (σ) ⊆ g −1 (σ) = τ 1 and that j 1 (σ) ∈ N D t . On the other hand, since τ 2 is empty and j 1 is injective, we know that g −1 (σ) has the same cardinality as j 1 (σ), so they must be equal. We conclude that g −1 (σ) is a simplex of N D t . A similar argument applies when τ 1 is empty.
In the remaining case where both τ 1 and τ 2 are nonempty, the function has f ((p, −s)) > 0 and f ((p, s)) < 0. By the intermediate value theorem there exists t ∈ [−s, s] with f (p, t) = 0. Since (p, t) has the same distance to all elements of σ 1 and also has the same distance to all elements of σ 2 we conclude that (p, t) is in the intersection of the Voronoi cells in g −1 (σ) = τ 1 ∪ τ 2 . Thus DelČ Z ((z, V ), p) = 0 and d(pr(z), p) < t for all (z, V ) ∈ g −1 (σ). In particular g −1 (σ) ∈ N D t .
Finally, we note that the size of the relative Delaunay-Čech complex grows linearly with the sizes n i of the finite subsets X i . The Delaunay triangulation of n points in d dimensions contains at most O(n⌈d/2⌉) simplices [11]. Since we use the Delaunay triangulation of n 1 + n 2 points in d + 1 dimensions to compute the relative Delaunay-Čech complex, it contains at most O((n 1 + n 2 )⌈(d + 1)/2⌉) simplices. This concludes the proof of theorem 1.1.