TDA in NLP
TDA in NLP
TDA in NLP
Author Name
1
transformations. These include concepts like connectedness and compactness,
which we will explore later.
—
2 Historical Background
The development of topology can be traced back to the 18th century, with
the work of mathematicians like Leonhard Euler. Euler’s solution to the
Königsberg bridge problem in 1736 is often regarded as one of the first results
in topology, although it was not recognized as such at the time. The problem
asked whether it was possible to walk through the city of Königsberg, crossing
each of its seven bridges exactly once. Euler proved that it was impossible
and, in doing so, laid the foundation for graph theory and the notion of
connectivity, a key concept in topology.
Topology, as a formal mathematical discipline, began to emerge in the
late 19th and early 20th centuries, primarily through the work of Henri
Poincaré, who is often credited as the founder of algebraic topology. Poincaré
introduced concepts like homotopy and homology, which relate topological
spaces to algebraic structures, allowing mathematicians to study spaces us-
ing algebraic tools.
In the early 20th century, mathematicians such as Felix Hausdorff,
Maurice Fréchet, and L.E.J. Brouwer further formalized the field. Haus-
dorff’s introduction of Hausdorff spaces and Fréchet’s work on metric spaces
played a significant role in the development of general topology, also known
as point-set topology.
—
2
3.1 Knot Theory
Knot theory, a subfield of topology, studies mathematical knots, which are
loops in 3D space that do not intersect themselves. While this might seem
esoteric, knot theory has applications in understanding the structure of DNA
molecules, where the long strands of DNA often form knots.
3.4 Cosmology
Topology is also used in cosmology to study the shape and structure of the
universe. Cosmologists use topological methods to explore whether the uni-
verse is finite or infinite, and whether it has a complex structure, such as
being doughnut-shaped or connected in higher dimensions.
—
4 Conclusion
Topology provides a powerful framework for understanding the intrinsic prop-
erties of spaces that remain unchanged under continuous deformations. While
it originated from purely mathematical questions, its applications now span
fields ranging from biology and chemistry to engineering and data science. In
3
the next sections, we will dive deeper into the fundamental concepts of topo-
logical spaces, open sets, and continuous maps, setting the stage for more
advanced topics like algebraic topology and topological data analysis.
5.1 Sets
A set is simply a collection of distinct objects, often called elements. For
example, the set X = {1, 2, 3, 4} contains the elements 1, 2, 3, and 4. The
collection of all subsets of X is called the power set of X, denoted by 2X .
4
6 Basis for a Topology
The concept of a basis is a convenient way to describe a topology. A collec-
tion B of subsets of a space X is called a basis for a topology if:
• Every element of B is an open set.
• For every x ∈ X and every open set U containing x, there exists a basis
element B ∈ B such that x ∈ B ⊆ U .
Once we have a basis, we can define the topology on X as the collection
of all unions of sets from B. For example, the collection of open intervals in
R forms a basis for the standard topology on R.
7.2 Closure
The closure of a subset A of a topological space X, denoted by A, is the
smallest closed set containing A. In other words, it is the intersection of all
closed sets that contain A.
Alternatively, A consists of all points in A together with any limit points
of A. For example, if A = (0, 1) in R, then A = [0, 1].
7.3 Boundary
The boundary of a subset A of a topological space X, denoted by ∂A, is
the set of points that are neither in the interior nor in the exterior of A.
Formally, the boundary is defined as:
∂A = A \ int(A).
For example, if A = (0, 1) in R, then ∂A = {0, 1}.
5
8 Continuous Functions and Homeomorphisms
8.1 Continuous Functions
A function f : X → Y between two topological spaces is said to be con-
tinuous if the preimage of every open set in Y is an open set in X. This
definition generalizes the familiar notion of continuity from calculus, where
the idea is to avoid “jumps” or “breaks” in the function.
Formally, f is continuous if for every open set V ⊆ Y , the set f −1 (V ) is
open in X.
8.2 Homeomorphisms
A homeomorphism is a special type of continuous function that defines
an equivalence between two topological spaces. Specifically, a function f :
X → Y is a homeomorphism if it is a continuous bijection with a continuous
inverse. If such a function exists, we say that X and Y are homeomorphic,
meaning that they have the same topological structure.
For example, the unit circle S 1 and the square [0, 1] × [0, 1] are homeo-
morphic, since they can be continuously deformed into one another without
tearing or gluing.
Homeomorphisms are the isomorphisms of topology, meaning they are
the functions that preserve all topological properties.
9 Conclusion
In this chapter, we have explored some of the basic concepts in topology,
including open and closed sets, bases for topologies, and important opera-
tions such as interior, closure, and boundary. We also discussed continu-
ous functions and homeomorphisms, which are central to understanding how
topological spaces relate to one another. These foundational ideas will be
essential as we move forward in studying more advanced topics in topology
and its applications.
6
10 Discrete and Indiscrete Topologies
10.1 Discrete Topology
The discrete topology on a set X is the topology in which every subset of
X is open. In other words, the discrete topology is defined by the power set
of X, i.e., every possible subset is an open set:
Tdiscrete = 2X .
This topology is often the finest topology that can be given to a set, as
it distinguishes between all elements. Consequently, all functions from a
discrete space to any topological space are continuous. This is because the
preimage of any open set is an open set, as all sets in a discrete topology are
open.
The indiscrete topology makes all functions from X to any other space triv-
ially continuous because the only non-empty open set is the entire space X,
and the preimage of X is always X.
Both the discrete and indiscrete topologies represent extreme cases of
topologies, one being the finest possible and the other the coarsest.
11 Metric Topology
A metric space is a set X equipped with a distance function, or metric,
d : X × X → R, which satisfies the following properties for all x, y, z ∈ X:
• d(x, y) ≥ 0 (non-negativity),
7
• d(x, z) ≤ d(x, y) + d(y, z) (triangle inequality).
Given a metric space (X, d), the metric topology on X is defined by
taking the open sets as those that can be expressed as unions of open balls.
An open ball of radius ϵ > 0 centered at a point x ∈ X is the set:
The collection of all open balls forms a basis for the metric topology. Intu-
itively, a set is open in the metric topology if, around each of its points, one
can find an
12 Product Topology
Let (X, TX ) and (Y, TY ) be two topological spaces. The product topol-
ogy on the Cartesian product X × Y is the coarsest topology for which the
projection maps:
πX : X × Y → X and πY : X × Y → Y
13 Quotient Topology
Let (X, T ) be a topological space, and let ∼ be an equivalence relation on
X. The quotient space X/ ∼ is the set of equivalence classes under ∼.
8
The quotient topology on X/ ∼ is defined as follows: a subset U ⊆ X/ ∼
is open if and only if its preimage under the quotient map q : X → X/ ∼ is
open in X.
That is, U is open in X/ ∼ if q −1 (U ) is open in X. The quotient map
q : X → X/ ∼ is continuous by construction.
13.1 Example
A classic example of a quotient space is the circle S 1 . Consider the unit
interval [0, 1] ⊂ R, and define an equivalence relation that identifies 0 ∼ 1.
The quotient space [0, 1]/ ∼ is homeomorphic to the circle S 1 .
The quotient topology is useful in constructing spaces by “gluing” points
together. For instance, one can form the Möbius strip, the Klein bottle, or
projective spaces using quotient topologies.
15 Compact Spaces
Definition 15.1. A topological space X is called compact if every open
cover of X has a finite subcover.
S That is, if for every collection of open sets
{Ui }i∈I
S such that X ⊆ U
i∈I i , there exists a finite subset J ⊆ I such that
X ⊆ j∈J Uj .
9
16 Tychonoff ’s Theorem
Theorem 16.1 (Tychonoff’s Theorem). The product of any collection of
compact topological spaces is compact in the product topology.
Proof. QLet {Xi }i∈I be a collection of compact spaces. Consider the product
space i∈I Xi with the product topology. Let {Uα }α∈A be an open cover of
Q
i∈I Xi . For each i ∈ I, there exists an index αi ∈ A such that xi ∈ Uαi .
Since each Xi is compact, we can extract a finite subcover for each finite
subset J ⊆ I. The union of these finite subcovers will yield a finite subcover
for the entire product space.
17 Heine-Borel Theorem
The Heine-Borel Theorem provides a characterization of compactness in Eu-
clidean spaces.
Theorem 17.1 (Heine-Borel Theorem). In Rn , a subset A is compact if and
only if it is closed and bounded.
Proof. (⇒) If A is compact, let x ∈ Rn be any point not in A. The sets
B(x, r) (balls centered at x of radius r) form an open cover of A but do not
include any points from A. Therefore, A must be bounded. Also, if A were
not closed, there would be a limit point not contained in A, which would
contradict the compactness.
(⇐) If A is closed and bounded, then every open cover has a finite sub-
cover due to the Bolzano-Weierstrass theorem, establishing that A is com-
pact.
18 Separation Axioms
In topology, separation axioms are conditions that define how distinct points
and sets can be separated by open sets. These axioms are used to classify
topological spaces based on their separation properties.
18.1 T0 Spaces
Definition 18.1. A topological space X is called a T0 (Kolmogorov) space
if for any two distinct points x, y ∈ X, there exists an open set U such that
10
x ∈ U and y ∈ / U . This means that at least one of the points can be
”separated” from the other by an open set.
18.2 T1 Spaces
Definition 18.2. A topological space X is called a T1 (Frechet) space if
for any two distinct points x, y ∈ X, there exist open sets Ux and Uy such
that x ∈ Ux and y ∈/ Ux , and y ∈ Uy and x ∈
/ Uy . In a T1 space, every single
point is closed.
Theorem 18.8. Every normal space is regular, and every T2 space is normal
if it is also second-countable (has a countable base).
11
19 Homotopy
Definition 19.1. Let X and Y be topological spaces and let f, g : X → Y
be continuous functions. We say that f is homotopic to g (denoted f ≃ g)
if there exists a continuous function H : X × [0, 1] → Y such that:
• H(x, 0) = f (x) for all x ∈ X
• H(x, 1) = g(x) for all x ∈ X
The function H is called a homotopy between f and g.
Theorem 19.2. Homotopy is an equivalence relation on the set of continuous
functions from X to Y .
20 Homology Theory
Homology is a mathematical tool used to associate a sequence of abelian
groups or modules with a topological space, providing a way to analyze its
shape and structure.
Definition 20.1. Let X be a topological space. The singular homology
groups Hn (X) are defined using singular simplices, which are continuous
maps from the standard n-simplex ∆n to X. The n-th homology group is
defined as:
ker(∂n )
Hn (X) =
im(∂n+1 )
where ∂n is the boundary map that sends n-simplices to their boundaries.
Theorem 20.2. The homology groups Hn (X) are topological invariants,
meaning that homeomorphic spaces have isomorphic homology groups.
12
Theorem 21.2. If X is path-connected, then the fundamental group π1 (X, x0 )
is well-defined, independent of the choice of the base point x0 .
22 Simplicial Complexes
Definition 22.1. A simplicial complex is a set K of simplices such that:
13
23 Nerve of a Cover
Definition 23.1. Let U = {Ui }i∈I be an open cover of a topological space X.
The nerve of the cover U is a simplicial complex N (U) whose vertices corre-
spond to the open sets Ui in the cover, and a finite subset {Ui0 , Ui1 , . . . , Uik }
forms a k-simplex if and only if the intersection Ui0 ∩ Ui1 ∩ . . . ∩ Uik ̸= ∅.
Theorem 23.2. The nerve of an open cover captures information about the
topology of the underlying space X.
25 Euler Characteristic
Definition 25.1. The Euler characteristic χ(X) of a finite simplicial com-
plex X is defined as:
χ(X) = V − E + F
where V is the number of vertices, E is the number of edges, and F is the
number of faces in X. For higher-dimensional complexes, this generalizes to:
n
X
χ(X) = (−1)k bk
k=0
14
Theorem 25.2. For any convex polyhedron, the Euler characteristic is given
by χ = 2.
Theorem 25.3 (Euler-Poincaré Formula). For a compact, orientable mani-
fold M of dimension n,
Xn
χ(M ) = (−1)i bi
i=0
where bi are the Betti numbers of M .
26 Betti Numbers
Definition 26.1. The Betti numbers bk of a topological space X are de-
fined as the rank of the k-th homology group Hk (X):
bk = rank(Hk (X))
b0 = 1, b1 = g, b2 = 1
27 Poincaré Conjecture
Definition 27.1. The Poincaré Conjecture states that every simply con-
nected, closed 3-manifold is homeomorphic to the 3-sphere S 3 . This con-
jecture was one of the most famous in topology and was proven by Grigori
Perelman in 2003.
Theorem 27.2. If M is a compact, simply connected 3-manifold, then M is
homeomorphic to S 3 .
Theorem 27.3. The Poincaré Conjecture implies that any two simply con-
nected, compact 3-manifolds are homotopy equivalent if and only if they are
homeomorphic.
15