# An Efficient Data Retrieval Parallel Reeb Graph Algorithm
## 4 Reeb Graph Sequential Algorithm on Triangulated Surfaces
### Outline of the Sequential Algorithm
#### 4.2.3 Termination of an Ascending Path  
The condition at which we terminate the ascending paths we initiated in step (4) is specified as follows. Assume that we initiated an ascending path from a critical vertex \(v\). Let \(w\) be the critical vertex with the critical value \(t_{w}\) right after the critical value \(t_{v}\) of \(v\). Assume that, at the \(k\)th iteration, an ascending path starting from the vertex \(v\) is \(\{[v,v_{1}],...,[v_{k-1},v_{k}]\}\). We continue this iteration until we arrive at an edge \(E_{n}=[v_{n-1},v_{n}]\) with \(f(v_{n})\geq t_{w}\) and \(f(v_{n-1})<t_{w}\). At this point, we check the condition \(C_{w}\cap E_{n}\
eq\emptyset\). If this condition is satisfied, then we insert an edge for the Reeb graph \(R(M,f)\) between the vertex \(v\) and the vertex \(w\). If \(C_{w}\cap E_{n}=\emptyset\), then we keep marching until an edge in the  
Figure 7: The set of vertices, edges, and faces in the mesh \(M\), which \(f^{-1}(t)\) intersects. The top two figures depict cases where \(t\) is a regular value. The top figure shows an example of when there exists a vertex \(v\) in \(M\), such that \(v\in f^{-1}(t)\). The second figure shows the case where no such a vertex exists. In other words, \(f^{-1}(t)\) intersects only edges and faces of \(M\). The third figure is an example of the local neighborhood, a critical point of \(f\) or when \(f^{-1}(t)\) contains a critical point. The purple simplices represent the set \(CR_{f}(t)\). The union of the green and purple simplices represents the set \(\overline{CR_{f}(t)}\). The blue edges and nodes are the edges in the complexes that are shown in the figure and nodes in \(\overline{CR_{f}(t)}\), which have \(f\)-values less than or equal to \(t\). The red edges and nodes are the edges in the complexes shown in the figure and nodes in \(\overline{CR_{f}(t)}\), which have \(f\)-values that are higher than or equal to \(t\).  
ascending path meets a critical point \(w\) that satisfy these two conditions. Note that \(w\) can be either a saddle or maximum vertex.  
The check of intersection between the edge \(E_{n}\) in an ascending path and a critical set \(C_{w}\), as mentioned in step (4), can be done by checking if \(E_{n}\) belongs with \(CR_{f}(w)\).  
**Remark 2**.: _It is important to notice how an ascending path corresponds to an edge in the Reeb graph. The ascending path starts at a critical point \(p\) with a critical value \(t_{p}\) and terminates at a critical set that corresponds to a critical point \(q\) with a critical value \(t_{q}\) with \(t_{q}>t_{p}\). More precisely, an ascending path starts at one of the connected components of the upper link of a critical point \(p\) and ends at one of the connected components of the critical sets \(C_{q}\). If two ascending paths start at two different connected components of the upper link of \(p\), but still end up in the same connected component of \(C_{q}\), then these two paths correspond to the exact same edge in the Reeb graph. Therefore, only one of these ascending paths corresponds to an edge in the final Reeb graph. For this reason, we say that each ascending path starting from a connected component of the upper star of a vertex gives rise to a potential edge in the Reeb graph. We provide more details on this point in Section 4.5._