# Discrete Morse theory

Discrete Morse theory is a combinatorial adaptation of Morse theory developed by Robin Forman. The theory has various practical applications in diverse fields of applied mathematics and computer science, such as configuration spaces, homology computation, denoising, mesh compression, and topological data analysis.

## Notation regarding CW complexes

Let $X$ be a CW complex and denote by ${\mathcal {X}}$ its set of cells. Define the incidence function $\kappa \colon {\mathcal {X}}\times {\mathcal {X}}\to \mathbb {Z}$ in the following way: given two cells $\sigma$ and $\tau$ in ${\mathcal {X}}$, let $\kappa (\sigma ,~\tau )$ be the degree of the attaching map from the boundary of $\sigma$ to $\tau$. The boundary operator is the endomorphism $\partial$ of the free abelian group generated by ${\mathcal {X}}$ defined by
    $\partial (\sigma )=\sum _{\tau \in {\mathcal {X}}}\kappa (\sigma ,\tau )\tau .$
It is a defining property of boundary operators that $\partial \circ \partial \equiv 0$. In more axiomatic definitions one can find the requirement that $\forall \sigma ,\tau ^{\prime }\in {\mathcal {X}}$
    $\sum _{\tau \in {\mathcal {X}}}\kappa (\sigma ,\tau )\kappa (\tau ,\tau ^{\prime })=0$
which is a consequence of the above definition of the boundary operator and the requirement that $\partial \circ \partial \equiv 0$.

## Discrete Morse functions

A real-valued function $\mu \colon {\mathcal {X}}\to \mathbb {R}$ is a discrete Morse function if it satisfies the following two properties:
* For any cell $\sigma \in {\mathcal {X}}$, the number of cells $\tau \in {\mathcal {X}}$ in the boundary of $\sigma$ which satisfy $\mu (\sigma )\leq \mu (\tau )$ is at most one.
* For any cell $\sigma \in {\mathcal {X}}$, the number of cells $\tau \in {\mathcal {X}}$ containing $\sigma$ in their boundary which satisfy $\mu (\sigma )\geq \mu (\tau )$ is at most one.
It can be shown that the cardinalities in the two conditions cannot both be one simultaneously for a fixed cell $\sigma$, provided that ${\mathcal {X}}$ is a regular CW complex. In this case, each cell $\sigma \in {\mathcal {X}}$ can be paired with at most one exceptional cell $\tau \in {\mathcal {X}}$: either a boundary cell with larger $\mu$ value, or a co-boundary cell with smaller $\mu$ value. The cells which have no pairs, i.e., whose function values are strictly higher than their boundary cells and strictly lower than their co-boundary cells are called critical cells. Thus, a discrete Morse function partitions the CW complex into three distinct cell collections: ${\mathcal {X}}={\mathcal {A}}\sqcup {\mathcal {K}}\sqcup {\mathcal {Q}}$, where:
* ${\mathcal {A}}$ denotes the critical cells which are unpaired,
* ${\mathcal {K}}$ denotes cells which are paired with boundary cells, and
* ${\mathcal {Q}}$ denotes cells which are paired with co-boundary cells.
By construction, there is a bijection of sets between $k$-dimensional cells in ${\mathcal {K}}$ and the $(k-1)$-dimensional cells in ${\mathcal {Q}}$, which can be denoted by $p^{k}\colon {\mathcal {K}}^{k}\to {\mathcal {Q}}^{k-1}$ for each natural number $k$. It is an additional technical requirement that for each $K\in {\mathcal {K}}^{k}$, the degree of the attaching map from the boundary of $K$ to its paired cell $p^{k}(K)\in {\mathcal {Q}}$ is a unit in the underlying ring of ${\mathcal {X}}$. For instance, over the integers $\mathbb {Z}$, the only allowed values are $\pm 1$. This technical requirement is guaranteed, for instance, when one assumes that ${\mathcal {X}}$ is a regular CW complex over $\mathbb {Z}$.
The fundamental result of discrete Morse theory establishes that the CW complex ${\mathcal {X}}$ is isomorphic on the level of homology to a new complex ${\mathcal {A}}$ consisting of only the critical cells. The paired cells in ${\mathcal {K}}$ and ${\mathcal {Q}}$ describe gradient paths between adjacent critical cells which can be used to obtain the boundary operator on ${\mathcal {A}}$. Some details of this construction are provided in the next section.

## The Morse complex

A gradient path is a sequence of paired cells
    $\rho =(Q_{1},K_{1},Q_{2},K_{2},\ldots ,Q_{M},K_{M})$
satisfying $Q_{m}=p(K_{m})$ and $\kappa (K_{m},~Q_{m+1})\neq 0$. The index of this gradient path is defined to be the integer
    $\nu (\rho )={\frac {\prod _{m=1}^{M-1}-\kappa (K_{m},Q_{m+1})}{\prod _{m=1}^{M}\kappa (K_{m},Q_{m})}}.$
The division here makes sense because the incidence between paired cells must be $\pm 1$. Note that by construction, the values of the discrete Morse function $\mu$ must decrease across $\rho$. The path $\rho$ is said to connect two critical cells $A,A'\in {\mathcal {A}}$ if $\kappa (A,Q_{1})\neq 0\neq \kappa (K_{M},A')$. This relationship may be expressed as $A{\stackrel {\rho }{\to }}A'$. The multiplicity of this connection is defined to be the integer $m(\rho )=\kappa (A,Q_{1})\cdot \nu (\rho )\cdot \kappa (K_{M},A')$. Finally, the Morse boundary operator on the critical cells ${\mathcal {A}}$ is defined by
    $\Delta (A)=\kappa (A,A')+\sum _{A{\stackrel {\rho }{\to }}A'}m(\rho )A'$
where the sum is taken over all gradient path connections from $A$ to $A'$.

## Basic results

Many of the familiar results from continuous Morse theory apply in the discrete setting.

### The Morse inequalities

Let ${\mathcal {A}}$ be a Morse complex associated to the CW complex ${\mathcal {X}}$. The number $m_{q}=|{\mathcal {A}}_{q}|$ of $q$-cells in ${\mathcal {A}}$ is called the $q$-th Morse number. Let $\beta _{q}$ denote the $q$-th Betti number of ${\mathcal {X}}$. Then, for any $N>0$, the following inequalities hold
    $m_{N}\geq \beta _{N}$, and
    $m_{N}-m_{N-1}+\dots \pm m_{0}\geq \beta _{N}-\beta _{N-1}+\dots \pm \beta _{0}$
Moreover, the Euler characteristic $\chi ({\mathcal {X}})$ of ${\mathcal {X}}$ satisfies
    $\chi ({\mathcal {X}})=m_{0}-m_{1}+\dots \pm m_{\dim {\mathcal {X}}}$

### Discrete Morse homology and homotopy type

Let ${\mathcal {X}}$ be a regular CW complex with boundary operator $\partial$ and a discrete Morse function $\mu \colon {\mathcal {X}}\to \mathbb {R}$. Let ${\mathcal {A}}$ be the associated Morse complex with Morse boundary operator $\Delta$. Then, there is an isomorphism of homology groups
    $H_{*}({\mathcal {X}},\partial )\simeq H_{*}({\mathcal {A}},\Delta ),$
and similarly for the homotopy groups.

## Applications

Discrete Morse theory finds its application in molecular shape analysis, skeletonization of digital images/volumes, graph reconstruction from noisy data, denoising noisy point clouds and analysing lithic tools in archaeology.