Computational Topology For Data Analysis: Notes From Book by
Computational Topology For Data Analysis: Notes From Book by
from Book by
Yusu Wang
Halıcıoğlu Data Science Institute
University of California, San Diego
La Jolla, California, USA 92093
Computational Topology for Data Analysis: Notes from book by T.K. Dey and Y. Wang 1
Example 2. Let T = {u, v, w}. The power set 2T = {∅, {u}, {v}, {w}, {u, v}, {u, w}, {v, w}, {u, v, w}}
is a topology. For any ground set T, the power set is always a topolgy on it which is called the
discrete topology.
One may take a subset of the power set as a ground set and define a topology as the next
example shows. We will recognize later the ground set here correspond to simplices in a simplicial
complex and the ’stars’ of simplices generate all open sets of a topology.
v u v u v u
z z z
w w w
(a) (b) (c)
Figure 1.1: Example 3: (a) a graph as a topological space, stars of the vertices as open sets, (b) a
closed cover with three elements, (c) an open cover with four elements.
Example 3. Let T = {u, v, w, z, (u, z), (v, z), (w, z)}; this can be viewed as a graph with four vertices
and three edges as shown in Figure 1.1. Let
• T 1 = {{(u, z)}, {(v, z)}, {(w, z)}} and
• T 2 = {{(u, z), u}, {(v, z), v}, {(w, z), w}, {(u, z), (v, z), (w, z), z}}.
Then, T = {2T 1 ∪T2 } is a topology because it satisfies all three axioms. All open sets of T are
generated by union of elements in B = T 1 ∪ T 2 and there is no smaller set with this property. Such
a set B is called a basis of T . We will see later in the next topic on simplicial complexes that these
are open stars of vertices and edges.
We now present some more definitions that will be useful later.
Definition 2 (Closure, Closed sets). A set Q is closed if its complement T\ Q is open. The closure
Cl Q of a set Q ⊆ T is the smallest closed set containing Q.
In Example 1, the set {3, 5, 7} is closed because its complement {0, 1} in T is open. The closure
of the open set {0} is {0, 3, 7} because it is the smallest closed set (complement of open set {1, 5})
containing 0. In Example 2, all sets are both open and closed. In Example 3, the set {u, z, (u, z)}
is closed, but the set {z, (u, z)} is neither open nor closed. Interestingly, observe that {z} is closed.
The closure of the open set {u, (u, z)} is {u, z, (u, z)}. In all examples, the sets ∅ and T are both
open and closed.
Definition 3. Given a topological space (T, T ), the interior Int A of a subset A ⊆ T is the union of
all open subsets of A. The boundary of A is Bd A = Cl A \ Int A.
Computational Topology for Data Analysis: Notes from book by T.K. Dey and Y. Wang 3
The interior of the set {3, 5, 7} in Example 1 is {5} and its boundary is {3, 7}.
Definition 4 (Connected). A topological space (T, T ) is disconnected if there are two disjoint
non-empty open sets U, V ∈ T so that T = U ∪ V. A topological space is connected if its not
disconnected.
The topological space in Example 1 is connected. However, the topological subspace induced
by the subset {0, 1, 5} is disconnected because it can be obtained as the union of two disjoint open
sets {0, 1} and {5}. The topological space in Example 3 is also connected, but the subspace induced
by the subset {(u, z), (v, z), (w, z)} is disconnected.
Definition 5 (Cover and compactness). An open (closed) cover of a topological space (T, T ) is
a collection C of open (closed) sets so that T = c∈C c. The topological space (T, T ) is called
S
compact if every open cover C of it has a finite subcover, that is, there exists C 0 ⊆ C so that
T = c∈C 0 c and C 0 is finite.
S
In Figure 1.1(b), the cover consisting of {{u, z, (u, z)}, {v, z, (v, z)}, {w, z, (w, z)} is a closed cover
whereas the cover consisting of {{u, (u, z)}, {v, (v, z)}, {w, (w, z)}, {z, (u, z), (v, z), (w.z)} in Figure 1.1(c)
is an open cover. Any topological space with finite point set T is compact because all of its cov-
ers are finite. Thus, all topological spaces in the discussed examples are compact. We will see
example of non-compact topological spaces where the ground set is infinite.
Definition 6 (Subspace topology). For every point set U ⊆ T, the topology T induces a subspace
topology on U, namely the system of open subsets U = {P ∩ U : P ∈ T }. The point set U endowed
with the system U is said to be a topological subspace of T.
In Example 1, consider the subset U = {1, 5, 7}. It has the subspace topology
In Example 3, the subset U = {u, (u, z), (v, z)} has the subspace topology
{∅, {u, (u, z)}, {(u, z)}, {(v, z)}, {(u, z), (v, z)}, {u, (u, z), (v, z)}}.
In the above examples, the ground set T is finite. It can be infinite in general and topology
may have uncountably infinitely many open sets containing uncountably infinitely many points.
We introduce the next concept of quotient topology assuming T is infinite. Given a space (T, T )
and an equivalence relation ∼ on elements in T, one can define a topology induced by the original
topology T on the quotient set T/ ∼ whose elements are equivalence classes [x] for every point
x ∈ T.
Definition 7 (Quotient topology). Given a topological space (T, T ) and an equivalence relation ∼
defined on the set T, a quotient space (S, S ) induced by ∼ is defined by the set S = T/ ∼ and the
quotient topology S where
S := {U ⊆ S | {x : [x] ∈ U} ∈ T }.
4 Computational Topology for Data Analysis: Notes from book by T. K. Dey and Y. Wang
We will see the use of quotient topology when we study Reeb graphs.
Infinite topological spaces may seem baffling from a computational point of view, because
they may have uncountably infinitely many open sets containing uncountably infinitely many
points. The easiest way to define such a topological space is to inherit the open sets from a metric
space. A topology on a metric space excludes information that is not topologically essential. For
instance, the act of stretching a rubber sheet changes the distances between points and thereby
changes the metric, but it does not change the open sets or the topology of the rubber sheet. In
the next section, we construct such a topology on a metric space and examine it from the concept
of limit points.
In a metric space T, an open metric ball with center c and radius r is defined to be the point
set Bo (c, r) = {p ∈ T : d(p, c) < r}. Metric balls define a topology on a metric space.
Definition 9 (Metric space topology). Given a metric space T, all metric balls {Bo (c, r) | c ∈
T and 0 < r ≤ ∞} and their union constituting the open sets define a topology on T.
All definitions for general topological spaces apply to metric spaces with the above defined
topology. However, there are alternative definitions using the concept of limit points which may
be more intuitive. More details can be found in the book.
In the Euclidean space Rd we can use the Euclidean distance to define its metric space topol-
ogy. On the surface of the coffee mug, we could choose the Euclidean distance too; alternatively,
we could choose the geodesic distance, namely the length of the shortest path from p to q on the
mug’s surface.
Example 4 (Euclidean ball). In Rd , the Euclidean d-ball with center c and radius r, denoted
B(c, r), is the point set B(c, r) = {p ∈ Rd : d(p, c) ≤ r}. A 1-ball is an edge, and a 2-ball is called
a disk. A unit ball is a ball with radius 1. The boundary of the d-ball is called the Euclidean
(d − 1)-sphere and denoted S (c, r) = {p ∈ Rd : d(p, c) = r}. The name expresses the fact that we
consider it a (d − 1)-dimensional point set—to be precise, a (d − 1)-dimensional manifold—even
though it is embedded in d-dimensional space. For example, a circle is a 1-sphere, and a layman’s
“sphere” in R3 is a 2-sphere. If we remove the boundary from a ball, we have the open Euclidean
d-ball Bo (c, r) = {p ∈ Rd : d(p, c) < r}.
Computational Topology for Data Analysis: Notes from book by T.K. Dey and Y. Wang 5
The topological spaces that are subspaces of a metric space such as Rd inherit their topology
as a subspace topology. Examples of topological subspaces are the Euclidean d-ball Bd , Euclidean
d-sphere Sd , open Euclidean d-ball Bdo , and Euclidean halfball Hd , where
Bd = {x ∈ Rd : kxk ≤ 1},
Sd = {x ∈ Rd+1 : kxk = 1},
Bdo = {x ∈ Rd : kxk < 1},
Hd = {x ∈ Rd : kxk < 1 and xd ≥ 0}.
Figure 1.2: Each point set in this figure is homeomorphic to the point set above or below it, but
not to any of the others. Open circles indicate points missing from the point set, as do the dashed
edges in the point sets second from the right.
Figure 1.3: Two tori knotted differently, one triangulated and the other not. Both are homeomor-
phic to the standard unknotted torus on the left.
For maps between compact spaces, there is a weaker condition to be verified for homeomor-
phism because of the following property.
Proposition 1. If T and U are compact metric spaces, every bijective map from T to U has a
continuous inverse.
One can take advantage of this fact to prove that certain functions are homeomorphisms by
showing continuity only in the forward direction.
There is another notion of similarity among topological spaces that is weaker than homeomor-
phism, called homotopy equivalence. It relates spaces that can be continuously deformed to one
another but may not be homeomorphic. For example, a ball can shrink to a point, but they are not
homeomorphic; there is not even a bijective function from an infinite point set to a single point.
However, homotopy preserves some aspects of connectedness, such as the number of connected
components and the number of holes in a space. Thus a coffee cup is homotopy equivalent to a
circle, but not to a ball or a point.
To get to homotopy equivalence, we first need the concept of homotopies, which generalize
isotopies so that homeomorphism is not required.
Computational Topology for Data Analysis: Notes from book by T.K. Dey and Y. Wang 7
Figure 1.4: All three of these point sets are homotopy equivalent, because they are all deformation
retracts of the leftmost point set.
For example, if g : B3 → R3 is the identity map on a unit ball and h : B3 → R3 maps every
point in the ball to the origin, the fact that g and h are homotopic is demonstrated by the homotopy
H(x, t) = (1 − t) · g(x); hence H(B3 , t) deforms continuously a ball at time zero to a point at time
one. A key property of a homotopy is that, as H is continuous, at every time t the map H(·, t) is
continuous.
It is more revealing to consider two maps that are not homotopic. Let g : S1 → S1 be the
identity map from the circle to itself, and let h : S1 → S1 map every point on the circle to a
single point p ∈ S1 . Although it is easy to imagine contracting a circle to a point, that image is
misleading: the map H is constrained by the requirement that every point on the circle at every
time maps to a point on the circle. The circle can contract to a point only if we cut it somewhere,
implying that H is not continuous.
Observe that whereas a homeomorphism is a topological relationship between two topological
spaces T and U, a homotopy or an isotopy (which is a special kind of homotopy) is a relationship
between two maps, which indirectly establishes a relationship between two topological subspaces
g(X) ⊆ U and h(X) ⊆ U. That relationship is not necessarily an equivalence class, but the
following relationship is.
Definition 14 (Homotopy equivalent). Two topological spaces T and U are homotopy equivalent
if there exist maps g : T → U and h : U → T such that h ◦ g is homotopic to the identity map
ιT : T → T and g ◦ h is homotopic to the identity map ιU : U → U.
Whereas homeomorphic spaces have the same dimension, homotopy equivalent spaces some-
times do not. To see that the 2-ball is homotopy equivalent to a single point p, construct a map
h : B2 → {p} and a map g : {p} → B2 where g(p) is any point q in B2 . Observe that h ◦ g is the
identity map on {p}, which is trivially homotopic to itself. In the other direction, g ◦ h : B2 → B2
sends every point in B2 to q. There is a homotopy connecting g ◦ h to the identity map idB2 ,
namely the map H(x, t) = (1 − t)q + tx.
The definition of homotopy equivalent is somewhat mysterious. A useful intuition for under-
standing it is the fact that two spaces T and U are homotopy equivalent if and only if there exists
a third space X such that both T and U are deformation retracts of X, illustrated in Figure 1.4.
1.4 Manifolds
A manifold is a set of points that is locally connected in a particular way. A 1-manifold has the
structure of a string, possibly with its ends tied forming a loop. A 2-manifold (with boundary)
has the structure of a piece of paper or rubber sheet, possibly with the boundaries glued together
forming a closed surface—a category that includes disks, spheres, tori, and Möbius bands.
Definition 16 (Manifold). A topological space M is an m-manifold, or simply manifold, if every
point x ∈ M has a neighborhood homeomorphic to Bm m
o or H . The dimension of M is m.
A manifold can be viewed as a purely abstract topological space, or it can be embedded into a
metric space or a Euclidean space. Even without an embedding, every manifold can be partitioned
into boundary and interior points. Observe that these words mean very different things for a
manifold than they do for a metric space or topological space.
Definition 17 (Boundary; interior). The interior Int M of an m-manifold M is the set of points in
M that have a neighborhood homeomorphic to Bm o . The boundary Bd M of M is the set of points
M \ Int M. The boundary Bd M, if not empty, consists of the points that have a neighborhood
homeomorphic to Hm . If Bd M is the empty set, we say that M is without boundary.
A single point, a 0-ball, is a 0-manifold without boundary according to this definition. The
closed disk B2 is a 2-manifold whose interior is the open disk B2o and whose boundary is the circle
S1 . The open disk B2o is a 2-manifold whose interior is B2o and whose boundary is the empty set.
There is some subtlety here: when B2o is viewed as a point set in the space R2 , its boundary is S1 ;
but viewed as a manifold, its boundary is empty. The boundary of a manifold is always included
in the manifold.
The open disk B2o , the Euclidean space R2 , the sphere S2 , and the torus are all connected 2-
manifolds without boundary. The first two are homeomorphic to each other, but the last two are
topologically different from the others. The sphere and the torus in R3 are compact (bounded and
closed with respect to R3 whereas B2o and R2 are not.
A 2-manifold M is non-orientable if, starting from a point p, one can walk on one side of M
and end up on the opposite side of M upon returning to p. Otherwise, M is orientable. Spheres
and balls are orientable, whereas the Möbius band in Figure 1.5 is a non-orientable 2-manifold.
Computational Topology for Data Analysis: Notes from book by T.K. Dey and Y. Wang 9
Figure 1.6: (a) Removal of the red and green loops opens up the torus into a topological disk, (b)
A double torus: every surface without boundary in R3 resembles a sphere or a conjunction of one
or more tori, (c) Double torus knotted.
10 Computational Topology for Data Analysis: Notes from book by T. K. Dey and Y. Wang
Exercises
1. A space is called Hausdorff if every two disjoint point sets have disjoint open sets containing
them.
4. Prove that the metric is a continuous function on the Cartesian space T × T of a metric space
T.
5. A space is called normal if it is Hausdorff and for any two disjoint closed sets X and Y,
there are disjoint open sets U X ⊃ X and UY ⊃ Y. Show that any metric space and compact
space are normal.
6. Deduce that homeomorphism is an equivalence relation. Show that the relation of homo-
topy among maps is an equivalence relation.
Bibliography
[1] Victor Guillemin and Alan Pollack. Differential Topology. Prentice Hall, 1974.
[2] Allen Hatcher. Algebraic Topology. Cambridge University Press, Cambridge, 2002.
[3] John W. Milnor. Topology from a differentiable viewpoint. Virginia Univ. Press, 1965.
11