# An Efficient Data Retrieval Parallel Reeb Graph Algorithm
## 4 Reeb Graph Sequential Algorithm on Triangulated Surfaces
### Outline of the Sequential Algorithm
#### 4.2.1 Construction of the Critical Sets  
We now describe how to compute the critical set of a critical point in the piece-wise setting. As before, we assume that \(f:M\longrightarrow[a,b]\subset\mathbb{R}\) a piece-wise linear function is defined on a triangulated surface \(M\), and it takes distinct values on the vertices of \(M\). This assumption will guarantee that, for a given value \(t\), the level curve \(f^{-1}(t)\) intersects with, at most, one vertex of \(M\).  
Now, let \(t\in\mathbb{R}\). The cross simplices \(CR_{f}(t)\) of the value \(t\) is the union of all simplices of \(M\), which intersect with the level curve \(f^{-1}(t)\). This is the set of vertices, edges, and faces in \(M\), which intersect with the level curve \(f^{-1}(t)\). We define \(\overline{CR_{f}(t)}\) to be the closure of the smallest subcomplex of \(M\), which contains \(CR_{f}(t)\). If \(f^{-1}(t)=v\) for a vertex \(v\) in \(V(M)\), then we define the subcomplex \(\overline{CR_{f}(t)}\) as above, but we also add to it the simplices of \(\overline{star(v)}\).  
When \(t\) is the maximal or the minimal value, then \(CR_{f}(t)\) consists of a single vertex \(v_{t}\). In this case, \(\overline{CR_{f}(t)}\) is simply \(\overline{star(v_{t})}\). When \(t\) is a regular value, then \(\overline{CR_{f}(t)}\) is a disjoint union of topological cylinders, that is, \(\overline{CR_{f}(t)}\) appears as a \"thickened\" band around the curve \(f^{-1}(t)\). Note that, when the value \(t\) that corresponds to a vertex \(v\) in \(V(M)\) with \(f(v)=t\) for some \(v\) in \(M\), then the set of simplices in the intersection \(CR_{f}(t)\cap f^{-1}(t)\) is simply the vertex \(\{v\}\). When \(t\) is the critical value of a saddle point, then the curve \(f^{-1}(t)\) consists of a finite collection of simple close curves that meet at the saddle point, and the set \(\overline{CR_{f}(t)}\) can be seen as the thickened band of these curves. See Figure 7.  
The over level of the cross subsimplex of a value \(t\), denoted by \(L(\overline{CR_{f}(t)})\), is the set of vertices and edges in \(\overline{CR_{f}(t)}\), which have values less than or equal to \(t\). Similarly, the higher level of the cross subsimplex of a value \(t\), denoted by \(H(\overline{CR_{f}(t)})\), is the set of vertices and edges in \(\overline{CR_{f}(t)}\), which have values higher than or equal to \(t\). See Figure 7.  
Figure 6: Summary of the sequential algorithm. (1) The input of the algorithm is a manifold \(M\) with a scalar function \(f\). (2) Computing the critical sets. (3) For each saddle point or minimum, we compute the ascending paths (4) creating the edges of the Reeb graph by the information encoded in the start vertex of the ascending vertex and its termination critical set.  
Recall the notion of the connected component of a critical set from Section 4.1. Specifically, for a critical vertex \(v\) with a critical value \(t_{v}\), we talked about the connected components of the critical set \(C_{v}\). Using the definitions that are introduced in this section, we can compute the connected components of the critical set \(C_{v}\) in the piece-wise linear setting by considering the connected components of \(L(\overline{CR_{f}(t_{v})})\).