An Efficient Data Retrieval Parallel Reeb Graph Algorithm

The Reeb graph of a scalar function defined on a domain gives a topological meaningful summary of that domain. Reeb graphs have been shown in the past decade to be of great importance in geometric processing, image processing, computer graphics and computational topology. The demand to compute large data sets has increased in the last decade and hence the consideration of parallelization of topological computations. We propose a parallel Reeb graph algorithm on triangulated meshes with and without a boundary. Furthermore, we give a description for extracting the original manifold data from the Reeb graph structure. As an application, we show how our algorithm can be utilized in mesh segmentation algorithms.


Introduction
Recent years have witnessed an extensive research in topological based method to analyze and study data [10,11]. The popularity of topological based techniques seem to be coming from the generality and the robustness of the these techniques and their applicability to a wide range of areas. The Reeb graph [62] has been one of the most successful topological tools in the data analysis and data understanding. The Reeb graph is a data structure associated to a scalar function defined on a manifold. It gives an efficient topological summary for the manifold by encoding the evolution of the connectivity of its level sets. Reeb graphs, and their loop-less version, contour trees [9], are of fundamental importance in computational topology, geometric processing, image processing, computer graphics, and more recently, data analysis and visualization. Examples of Reeb graph applications include quadrangulation [37], shape understanding [1], surface understanding and data simplification [6], parametrization [60,85], segmentation [79], animation [40], feature detection [70], data reduction and simplification [13,65], image processing [41], visualization of isosurfaces [2] and many others.
The past decade has witnessed an increase of large geometric data on which a scalar field is defined. This has yielded several challenges for the time efficiency computation of topological structures usually computed on such data. Parallelization of the utilized algorithms is a natural direction one usually takes in order to improve the computational-time efficiency. In this article we introduce an efficient shared memory parallel algorithm to compute the Reeb graph a scalar function defined on a triangulated surface with or without a boundary. In addition, our algorithm provides a fast method for retrieving the surface data from the constructed Reeb graph. Existing Reeb graph algorithms lack explicit description of manifold information from the Reeb graph. For this purpose we define an explicit map that associates the Reeb graph data to its corresponding data on the manifold. As an application we show how Reeb graph can be used to identify and calculate curves with certain homological properties on a surface. Finally, we show how the data retrieval aspect of our algorithm along with the curves that can be extracted from the Reeb graph structure can be used for mesh segmentation and mesh parametrization.
1.1. Prior work and contribution. Reeb graph literature has is vast and ranges from computational accuracy of the graph to its applications in data analysis and visualization. The first provably correct algorithm to compute a Reeb graph on a triangulated surface was presented by Shinagawa and Kunii in [66]. Computing Reeb graph in O(n 2 ) times where n in the number of triangles in the mesh. This time was improved to O(n log(n)) by Cole-McLaughlin et al. [18].
Reeb graphs have also been studied for higher dimensional manifolds and simplicial complexes. An algorithm for computing Reeb graph for a 3-manifold embedded in R 3 is proposed in [72]. The first Reeb graph algorithm on an arbitrary simplicial complex is given in [17]. Pascucci et al. [18], presented an online method that computes the graph by calculating the Reeb graph of the restriction of the input scalar field on the 2-skeleton of the input mesh. This algorithm can handle a non-manifold input, but its worse case time complexity is quadratic. Reeb graph for a varying scalar function is studied in [28]. Other Reeb graphs algorithms can be found in [25,26,35,57,59]. Approximating Reeb graphs algorithms can be found in [6,38]. However, such algorithms may lead to inaccurate results. A loop-free Reeb graph, also called a contour tree, has been used extensively in data analysis and data visualization. Algorithms for computing such graphs can be found in [17,27,61,71,76]. Contour tree have been used for scientific visualization [58], volume rendering [78], terrain applications [5,31]. For a thorough introduction to contour tree and its applications the reader is referred to [12,61] and the references within.
Reeb graphs have been also used to study and analyze points cloud data. The applications are numerous including data skeletonization [29], retrieving topological information from point data such as homology group computation [16,23], locus cut [20], data abstraction [54], and recovering structural information of a scalar function on a point data [15]. In the context of point cloud, a relatively recent constructed named Recently, Mapper [67] has received a lot of attention, as it generalizes both the Reeb graph and contour tree. Mapper has found numerous applications [46,56,63,64] and has been studied from multiple perspectives [14,22,34,53].
There is rich literature in computer graphics regarding the use of the Reeb graph. Reeb Graph has been used in mesh segmentation [81], shape similarity [75], shape matching [49], feature-extraction [2], surface reconstruction [8], extracting tunnel and handle loops of a surface [21], removing tiny handle in an iso-surface [80] and shape matching [38]. See also [7] for further applications of Reeb graph in computer graphics. Our algorithm relies on Morse theory to find a finite set of paths traced concurrently inside parts of the manifold where the topology of the manifold with respect to a given scalar function does not change. The sequential algorithm that we present here is essentially similar to Reeb graph algorithm given in [25], where tracing paths inside cylinders were used to construct the Reeb graph. We provide the sequential version of the parallel algorithm in this paper because it has some major differences from the algorithm given [25]. However our main contributions and focus, which are listed below, are not the sequential Reeb graph algorithm.
The demand to compute large data sets has increased in the last decade and hence the consideration of topological computations parallelization. Multiple attempts have been made in this direction, including multicore homology computation [43] spectral sequence parallelization [45], distributed contour tree [51], distributed merge tree [50], and distributed Mapper [32]. In this paper, we give a parallel Reeb graph algorithm on arbitrary triangulated mesh with and without a boundary. We prove the correctness of our method using fundamental theorems in Morse Theory. Moreover, we discuss the performance results that compare our approach to a reference sequential Reeb graph algorithm. We then show how we can use the Reeb graph to retrieve certain curves on the manifold. Finally, we utilize the data retrieval aspect of our algorithm and give an application to surface segmentation. This article has the following contributions: (1) We give an efficient parallel algorithm that computes the Reeb graph of piece-wise linear function defined on a triangulated 2-manifold with and without a boundary. (2) Our method can be used to retrieve the manifold data from the Reeb graph. In other words, given a point in the Reeb graph, we give an efficient method to retrieve the manifold data that corresponds to that point. (3) We show how the homological properties of a Reeb graph can be used to extract certain curves on a surface and we utilize our algorithms to give a mesh segmentation algorithm. (4) The algorithms presented here are easy to implement and require minimal memory storage.

Morse theory and Reeb graphs
In this section, we review the basic background needed in this paper. We start by reviewing the basics of Morse theory and Reeb graphs on a smooth manifolds. Then we discuss the corresponding piece-wise linear version. For more details on Morse theory the reader is referred to [4,47].
2.1. Morse theory. Morse Theory is a tool in differential topology that is concerned with the relations between the geometric and topological aspects of manifolds and the real-valued functions defined on them. One of the primary interest in this theory is the relationship between the topology of a smooth manifold M and the critical points of a real-valued smooth function f defined on M . Intuitively, Morse theory studies the topological changes of the level sets of a real-valued smooth function as the height of f varies. Morse theory was first introduced by Morse [52] for infinite dimensional spaces. A comprehensive introduction to Morse theory on finite-dimensional manifolds is given [48]. Also see [4,47]. Morse theory has been proven to be a very useful tool in computer graphics, geometric data processing and understanding. The theory was extended to triangulated 2-manifolds by [3]. Recently, Morse theory has found applications in global surface parameterization [30], finding a fundamental domain of a surface [55], surface quadrangulation [24], topological matching [38], implicit surfaces [69], surface segmentation [83], spline construction [77] and many other applications.
An analogous lemma holds for Morse functions on higher dimensional smooth manifolds. See [47] for more details. Morse Lemma implies that a Morse function around a critical point looks simple, and it is exactly one of the forms given in the Lemma, above up to change of coordinates. Notice that the number of minus signs in the standard form of the function f around p is equal to the index of the critical point p. In this article, we provide an efficient method to retrieve the data in X associated to a point on a Reeb graph.
When M is a manifold, and f is a Morse, then R(M, f ) exhibits certain additional properties. For instance, in this case every vertex of R(X, f ) arises from a critical point of f or a boundary component. Furthermore, every maximum or minimum of f gives rise to a degree 1-node of R(M, f ). Saddle points for a Morse function f defined on a 2-manifold have degree 3-node. This is not guaranteed if the scalar function is not Morse. See Figure 2 for an example of a Reeb graph.
f Figure 2. An example of a Reeb graph (right) of a scalar function (left) defined on a surface with a boundary.

Reeb graphs on triangulated surfaces
3.1. Morse function in the piece-wise linear setting. In this paper we will be working with triangulated surfaces. We will denote to the vertices, edges and faces of a triangulated mesh M by V (M ), E(M ) and F (M ) respectively. The extension of Morse theory to triangulated manifolds was by given Banchoff [3]. Let M be a triangulated 2-manifold and let f : M −→ [a, b] ⊂ R be piece-wise linear function on M . The star of v, denoted by star(v), is the set of simplices that intersect with the vertex v. The closure star(v) of star(v) is the smallest simplicial complex of M that contains star(v). The link Lk(v) consists of the set of vertices of M that belong star(v) but do not belong to star(v). The upper link of v is defined to be the set: the lower link is defined similarly by:    [19]. Our choice here will be utilized the parallelization of the Reeb graph algorithm and the application section 8.

3.2.
Reeb graphs of general simplicial complexes. Reeb graph can be defined naturally on arbitrary simplicial complexes. Let K be a simplicial complex and f : K −→ R be a simplicial map defined on the vertices of K. The map f can be extended linearly to all simplices of K to PL function which we will denote also denote by f . Using this function, the Reeb graph of (K, f ) can be defined as before.

Reeb graph sequential algorithm on triangulated surfaces
In this section we assume that we are given a PL function f : M −→ R defined on a traingulated surface M possibly with a non-empty boundary ∂M . This includes the case when f is a Morse function. Then we discuss the degenerate case, when f has non-simple saddles.
As mentioned, the sequential algorithm that we present here is similar to Reeb graph algorithm given in [25]. We provide the sequential version of the algorithm because it has some keys differences from the algorithm given [25] that will be utilized later in our parallel algorithm.
The main idea of the algorithm is the construction of a sub-simplicial complex X of M such that the Reeb graph R(X, f | X ) of X with respect to f | X , the restriction of f on X, is identical to the Reeb graph R(M, f ). The constructed simplicial complex X does not only provide us with a Reeb graph of (M, f ) but also implies immediately an algorithm to compute the map F : R(M, f ) −→ M that allows us to extract the manifold data given the corresponding Reeb graph points. The main two ingredients of the algorithm are the critical sets and the ascending paths. We introduce these two concepts next. 4.1. Critical sets and ascending paths. We start by giving the definition of critical sets then we give the definition of ascending paths. Critical sets. Let p be a saddle point of f , and let t p be its corresponding critical value. Consider the connected components of the set f −1 (t p ). The connected components of f −1 (t p ) consist of a collection of simple closed curves embedded in M , as well as a single component, which contains a singularity. This singular set consists of multiple circles that intersect at the critical point p. We will denote this singular set by C p . See Figure 4 for an example. Note that for critical value t f −1 (t p ) might consist merely of the critical set C p ( with no other simple closed curves ). Choose > 0 small enough such that the interval [t p − , t p + ] has only the critical value t p . As we move from t p to t p − , the singular set C p becomes a non-singular one consisting of a disjoint union of simple closed curves A 1 , ...A n , for n ≥ 1. By convection we will consider the sets A 1 , ..., A n to be the connected components of the singular set C p , and we will refer to them as such for the rest of the paper. We talk more about about the components of a critical set and show exactly how to determine them in the piece-wise linear setting in Section 4.2.1. The following Lemma asserts that the number of connected components of C p of for a simple saddle point of a Morse function defined on surface is either 1 or 2. For a regular value t, we will denote to the number of simple closed curves of f −1 (t) by |f −1 (t)|. Lemma 4.1 implies that for a sufficiently small enough and for any saddle point p on a Morse function f , one has |f −1 (t p + )| − |f −1 (t p − )| = ±1. In other words, as we are passing through a saddle point p two circles merge or split. Figure 5 shows two types of saddles: a split saddle and a merge saddle The sequential version of the algorithm relies on Lemma 4.1 to handle the case when the function f is Morse and has only simple saddle points. The case when f has saddle points with higher multiplicities will be handled in Section 4.5.
Remark 4.2. If p is a maximum and minimum point, then by definition, C p will be the set that consists of the point p itself.
Ascending paths. The second main ingredient of the sequential Reeb graph algorithm is a collection of curves that we trace inside the manifold M using the function values. more precisely, an ascending path from a non-maximum vertex v 0 , denoted by apath(v 0 ), is defined to be a finite sequence of consecutive edges and v k is a maximum, a boundary or a saddle vertex.

4.2.
Outline of the sequential algorithm. We present now the outline of the sequential Reeb graph algorithm. We assume that we are given a triangulated PL Morse function f : M −→ [a, b] ⊂ R defined on triangulated mesh M without boundary. The case when the function f is not Morse, or when the M has a boundary, will be discussed in later sections.
The sequential Reeb graph algorithm is given in the following steps: (1) We start by sorting the critical points of f by their critical values. Let CP be the set of the sorted critical points of f in an ascending order. (1)  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 ∈ 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). If f (t) = v for a vertex v in V (M ), then we also define CR f (t) to be CR f (t) ∪ 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 CR f (t) is simply star(v t ). When t is a regular value, CR f (t) is a disjoint union of topological cylinders, that is CR f (t) appears as a "thickened" band around the curve f −1 (t). Note that when the value t corresponding to a vertex When t is 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 the set CR f (t) can be seen as the thickened band of these curves. See Figure 7. The lower level of the cross subsimplex of a value t, denoted by L(CR f (t)), is the set of vertices and edges in 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(CR f (t)), is the set of vertices and edges in CR f (t) which have values higher than or equal to t. See Figure 7.
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 we introduced in this section we can computed the connected components of the critical set C v in the piece-wise linear setting by considering the connected components of L(CR f (t v )).

4.2.2.
Construction of the ascending paths. The ascending paths form a critical point v 0 are specified as follows: (1) If v 0 is a merge saddle or a minimum then we initiate a single ascending path apath(v 0 ) specified as follows. Let v 1 be a vertex in Lk If v 0 is a split saddle, then we start two ascending paths P 1 and P 2 starting from the point p specified as follows. Divide the set Lk + (p) into two disconnected components A and B. Choose . The path P 2 is constructed similarly.

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 at the k th iteration an ascending path starting from the vertex p is We continue this iteration until we arrive at an where v is the critical point with a critical value right after the critical value of the critical point v. At this point we check the condition C w ∩ E n = ∅. 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 ∩ E n = ∅ then we keep marching until the critical point w with the lowest critical value that satisfies the condition f (w) > f (v) as well as C w ∩ E n = ∅. Note that w can be either a saddle or a maximum vertex.
The check of intersection between the edge E n in an ascending path and a critical set C w , mentioned in step (4), can be done by checking if E n belongs with CR f (w). Remark 4.3. 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 the one of the connected components of the critical sets C q . If two ascending paths starts 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 give more details on this point in Section 4.5.

Surfaces with boundaries.
In the case when the surface M has a boundary we modify the previous algorithm as follows. In this case f −1 (∂I) = f −1 (a) ∪ f −1 (b) is not empty and consists of a finite collection of simply closed curves. We treat each connected component of f −1 (a) as a minimal point, and we treat with the boundary f −1 (b) as a maximum point. More precisely, the following modifications are added to the previous algorithm from Section 4.2.
• In step (2) The correctness of our algorithm relies on the following two facts : (1) The only topological changes to the level sets of f occur when as pass a critical point. This is stated formally in Theorem 4.4. (2) The structure of the manifold around a critical point is completely determined by the index of that critical point. We give this in Theorem 4.5. The proof of Theorems 4.4 and 4.5 can be found in [48]. Our algorithm relies on Theorem 4.4. Namely, as we trace an ascending paths, we assume that no topological change occur until we reach the next critical point. The ascending path may not terminate at the next critical point, provided the part of the manifold in which this path is traveling in has not changed its topology. This will more evident after we provide the next theorem, which shows the exact structure of M [c,d] around a critical point. (1) If index(p) is equal to 0 or 2, then M I is homeomorphic to a disjoint union of a disk and a finite number of topological cylinders (that is a genus zero surface with two boundary components). (2) If index(p) = 1, then M I is homeomorphic to a pair of pants and finite number of topological cylinders.
The previous two theorems show that for a given Morse f function on M , we can arrange M so that at each critical point only a single topological event occurs, and this topological event occurs around the critical point. Moreover, we know exactly what topological event occurs by the index of the critical point. This is illustrated in the Figure 8.
This shows that any 2-manifold can be built from the building blocks in Figure 9. Moreover, Theorem 4.5 shows that the restriction of Reeb graph of the restriction of f on M I has the shapes given in Figure 10. In other words, this gives us the structure of the Reeb graph around an interval I that contains a single critical value.
Moreover, subcomplex X M,f constructed in the algorithm has the same Reeb graph structure of M around the critical points. More specifically, the algorithm creates an ascending path for each minimum and merge critical point and two such paths for a split saddle. Moreover, the algorithm terminates as ascending path when it passes from a critical set. See Figure 10.
Now let e = (p, q) be an edge in a Reeb graph R(M, f ) connecting between the two nodes p and q, which correspond to critical points of f . For each such edge, we can find a preimage arc E in M that is mapped to R(M, f ) via the map π : M −→ R(M, f ). The preimages of the points p and q under π are the critical set C p and C q in M , respectively. Hence each arc E must start at a point A in C p and end at a point in B in C q . Each such an arc on M characterizes the edge e.  An ascending path constructed in the sequential algorithm essentially traces an arc in the way described above. Namely, for a critical point p, with a critical value f (p), an ascending path created at a point p will terminate at a critical point point q with f (q) > f (p). This termination occurs when we pass through the critical set of the point q.

4.5.
Dealing with the degenerate cases. It is possible in practice to obtain a scalar function with saddle points that have multiplicity m ≥ 2. The algorithm that we present in Section 4.2 can be extended to handle such cases. We need to do the following modifications.
• In step (3) we calculate the connected components of the critical set C p . Here it is not enough to calculate the critical set C p . We need to also to compute the connected components of this set. This was explained in Section 4.2.1. • When the multiplicity m of a split saddle p is greater than or equal to 2 we create an ascending path for each connected component in Lk + (p). In the non-degenerate case every ascending path corresponds to an edge in the Reeb graph. This is not the case anymore in the degenerate case. We describe next the sequential algorithm of the Reeb graph when f has degenerate critical points.
(1) Sort the critical points of f an in ascending order. Let CP = {v 1 , ..., v n } be this set. This represents the vertex set of the Reeb graph, as we did before. (2) For each v in CP , compute the connected components of C v and include all these component in a single container S. We will denote by B j i to be the connected component j of the critical set C v i . In this way we index all elements in S. Note that the above procedure can be used to determine an the edges originating from a simple saddle. Namely, we do not need to check the type of the simple saddle point (merge or split) in step (3) of the algorithm given in Section 4.2, and for any saddle point we use the above procedure instead.

Parallelization of the algorithm
In this section we give the details of our strategy to compute the Reeb graph in parallel. We describe the three stages of the parallel algorithm as follows.
(1) The partition stage. In this stage we partition the manifold M into submanifolds such that the vertices counts of each submanifold are approximately equal to each other.
(2) Computing the Reeb graph for the submanifold stage. Computing the Reeb graphs for each submanifold obtained from stage one concurrently. (3) The gluing stage. In this step we glue the Reeb graphs obtained from the stage 2.
5.1. The partition stage. In this first stage of the parallel algorithm we sort the vertices of the manifold with respect to the function f . This step can be done efficiently in parallel [68,74]. The critical sets for saddle points are then determined by assigning a thread to each saddle point. This computation is only necessarily to determine the number of ascending paths that we need to initiate from that saddle point. Next we partition the manifold M to submanifolds along certain regular values of the scalar function f . More precisely the partition stage is given as follows: (1) Compute the critical points of f by assigning a thread to each vertex in M . Let p 1 , p 2 , ..., p n be the list critical points of f , and let t 1 , t 2 , ..., t n be their corresponding critical values. After visiting all edges, we also will have determined the connected components of f −1 (c i ) for each c i ∈ C. We will denote the set of all connected components of f −1 (c i ) for 1 ≤ i ≤ k by C f . We also call an edge in M that crosses f −1 (c i ) a crossing edge. See Figure 11 for an illustration.  Figure 12 for an illustration. The purpose of extending the submanifolds M i to M i in step (3) will be justified in the gluing stage in Section 5.3.

5.2.
Computing the Reeb graph of each submanifold. The manifold M i is in general homeomorphic to the manifold M i , since the former is obtained from the latter by extending its boundary slightly. However, in the piece-wise linear case the extension specified in the previous section may change the topology of the manifold. This will occur when a crossing edge in E i or E i−1 contain a critical vertex of f . When this case occurs, we exclude this vertex from M i in order to keep it homeomorphic to M i . Using this convention, we can assume that the Reeb graph of the restriction of f on M i is identical to the Reeb graph of the restriction of the Reeb graph of f on M i .
Computing the Reeb graphs R(M i , f ) for M i , for 1 ≤ i ≤ k + 1, now goes as follows. To each connected component in M i for 1 ≤ i ≤ k + 1, we assign a thread and the Reeb graph R(M i , f ) on the submanifold M i , which can be computed concurrently.
An ascending path that starts at a crossing edge or ends at an crossing edge will be treated specially. We call the Reeb graph edge that corresponds to such an ascending path a crossing arc. Furthermore if the starting or the ending edge of this ascending path is a crossing edge then we will call the corresponding node in the Reeb graph a crossing node. Every crossing node is determined by its crossing edge. In other words, given a crossing edge we can recover its crossing node in the graphs R(M i , f ) for 1 ≤ i ≤ k + 1. In practice we need to be able to do this in constant time, so we create a global map G that takes as an input a crossing edge and returns its corresponding crossing node. In the case when a single crossing edge is associated with two crossing nodes from two consecutive submanifolds then the map G associates that edge crossing edge to the two crossing nodes (this occur when is the ending edge of a crossing arc and the starting edge of the crossing arc in the consequent submanifold are the same). If the crossing edge is not associated with any crossing node, then this map returns a constant value indicating that this edge is not a starting or an ending crossing edge for any ascending path. Note that each connected component in C f has either two crossing edges that are associated with two crossing nodes or a single crossing edge that is associated with two crossing nodes. This map will be utilized in the gluing stage.
5.3. The gluing stage. For the gluing stage we need to glue the nodes of the Reeb graphs that occur in duplication C f . For this purpose we utilize the function G that we constructed in Section 5.2. For each connected component in C f , we visit its crossing edges and check if two edges within that connected component have been flagged by G. If this is the case, then we retrieve the crossing nodes that corresponds to these two edges via the function G and glue them. In the case when connected component of C f has a single crossing edge, then we retrieve the two crossing nodes that corresponds associated with that edge and glue them. When we finish visiting all connected components of C f , all duplicate nodes will have been glued, and the final graph is R(M, f ). See Figure 12 for an illustration of this process.

Going from the Reeb graph to the manifold
In this section we give an algorithm that describes an explicit description of the map F : R(M, f ) −→ M . This map associates to every vertex v in the graph R(M, f ) to the critical set C v associated to that critical point. More importantly, for each interior point p of an edge in R(M, f ), we want to associate a simple closed curve Cr in M such that π(Cr) = p.
In the construction above, for our Reeb graph algorithm an edge of the graph R(M, f ) is traced as a sequence of edges on the mesh running between two critical sets of the function f . This gives an embedding of the edges of the Reeb graph on the surface. This embedding is used to get the circle the corresponding to any points on the graph. More preciously we have the following correspondence. Let e be an edge of the graph R(M, f ). By the construction of our algorithm, every edge in R(M, f ) is determined by two critical points and a sequence of oriented edges on the mesh. Let E e := {E 1 , · · · , E n } be the sequence of oriented edges on the mesh M that corresponds to the edge e.
An interior point p on the edge e is specified by giving a value t p in the interval (0, 1). To obtain the circle Cr p on the mesh M that correspond to p we do the following procedure: (1) Map the interval (0, 1) linearly to the interval (0, T n (E e )).
(2) Use the previous linear function to map t p to its corresponding value t in (0, T n (E e )).
(3) Determine the edge E k = (p k , p k+1 ) in E e such that T k−1 (E e ) < t ≤ T k (E e ).
(4) Now we need to find the value t, in the range of [a, b], the range of f , such that f −1 (t) contains Cr p . We know that this value corresponds to t , which lies in the interval and determine the value t in [f (p k ), f (p k+1 )] that corresponds to t . (5) The required circle Cr p is the connected component of f −1 (t) that contains the edge E k . Note that in the previous procedure we rely on the fundamental assumption that f takes different values on the vertices of the mesh.

Run-time analysis and implementation
We tested the presented algorithm on meshes with various complexities. Our experiments were done on a AMD FX 6300 6-Core with 32 GB memory. The algorithm was implemented in C++ and Windows platform was used.
We test our test our parallel algorithm with the AIM@SHAPE Repository. This initial attempt did not give us an increase of performance over the sequential algorithm for most meshes available in the above dataset. In order to take advantage of the parallel implementation, we tested our algorithm on high resolution meshes. Specifically, we uniformly increase the resolution of the meshes available AIM@SHAPE library to 200k. Our implementation on the described above data gave us a minimum speedup of 3.6, a maximum one of 4.3 and an average speedup of 3.8 on 6 cores. Using this we obtain a 63% average parallel efficiency. The details are given in Figure 13. The x-axis represents the number of processes and the y-axis shows the speedup. The figure shows how the trends in the curves are increasing monotonically as the number of processes increase. Figure 13. Speedups obtained by our parallel Reeb graph algorithm.

Applications
Reeb graphs on a surface M encodes a rich amount of topological information from the original surface. In this section we show how the Reeb graph of a surface M gives rise to a natural collection of simple closed curves on M . The applications that we present can be described in terms of these curves. We first define these curves and show their relation with the Reeb graph. We then we give a procedure to extract them by utilizing the tools we described in Section 6. Finally, the curves are utilized to obtain two mesh segmentation algorithms.
While almost all Reeb graph-based segmentation algorithm focus on genus zero surfaces, see for instance [73,81,82], we present here two mesh segmentation algorithms for surfaces with higher genus.
Let R(M, f ) be a surface M and a scalar function f . The edges of the Reeb graph R(M, f ) determine the following types of simple closed curves on M : • Cutting system curves.
• Branch curves. We describe how a Reeb graph on a surface can be used to realize these curves next. Cutting System Curves. Reeb graphs can also be used to determined the so called cutting system. A cutting system for a connected, closed, orientable surface M of genus g is a collection of unordered disjoint simple closed loops embedded in M whose complement M \(l 1 · · · l g ) is a sphere with 2g boundary components [36]. Segmenting a surface along a cutting system curve yield a genus zero surface with multiple boundary components. Hence this can be used to aid in mesh parametrization. See for intance [84] and the references therein. We describe here a Reeb graph-based algorithm to obtain a cutting system. The algorithm goes as follows: (1) Let T be a spanning tree of R(M, f ) and consider the edges e 1 , ...e g in R(f )\T .
(2) Select an interior point in e i , for 0 ≤ i ≤ g.
(3) Each interior point selected in the previous step determines a loop l i which can be obtained using the Reeb graph algorithm we described here. Figure 14 show multiple examples of cutting system curves on triangulated surfaces. Figure 14. Examples of cut system curves on triangulated surfaces.
Pants Decomposition Curves. A Reeb graph naturally gives rise to a collection of curves that can be used to decompose a surface into a pair of pants. A pair of pant a is a genus zero surface with three boundary components. Beside surface segmentation [33], surface pants decomposition has found applications in mesh parametrization [42], surface matching [44] and surface classification and indexing [39]. The method to obtain a pants decomposition from the Reeb graph is illustrated in Figure 15 and is described as follows: (1) Let R (M, f ) be the deformation retract of R(M, f ). This graph can be obtained by recursively deleting nodes with valency one from R(M, f ) and the edge attached to them until no such indices exist. We exclude from this deletion the 1-valence nodes originating from the boundary of M . We also delete all nodes with valency 2 and combine the two edges that meet at that node to form a single edge. This step is illustrated in step (3) Figure 16. (2) We select one interior point from each edge in R (M, f ), provided this edge does not have a node of valency one. (3) We use the our Reeb algorithm to determine the curves on the surface that correspond to the points that we selected on the graph in the previous step. The results of the previous algorithm was tested on triangulated meshes with various topological complexities. We show some examples in Figure 16.
Branch Curves. A branch curve on a surface M is a simple closed curve that bounds a topological disk on M . Such a curve is also called null homotopic. A branch curve is determined by a Reeb graph edge which has a vertex of valence one. Note that cutting the surface along a branch curve increases the number of connected components of the surface. Cutting along such curves can be used for segmentation of a genus zero surfaces. There are many Reeb graph-based segmentation algorithms in the literature for segmentation of genus zero surfaces such as the surfaces obtained from a humanoid character. See for instance [73,81,82]. Since this type of curves is essentially utilized elsewhere in the literature, we simply list it here for for completeness of our discussion. All these methods however lack the description of a method to extract the manifold data from the Reeb graph data.

Conclusion and Future Work
Parallelization of topological data analysis algorithms is still in its infancy. There are plenty of existing topological machineries such as Morse theory that offer a plethora of tools which can be utilized to obtain robust and efficient parallel algorithms. In this paper we presented a work that utilizes Morse theory to obtain a parallel algorithm for Reeb graph.
The parallel algorithm that we present here has the elements that makes it generalizable to a Reeb graph algorithm on a general simplicial complex. However, we thought that this would make the discussion more complicated in many parts of the algorithm. We plan to peruse this direction in a future work. Figure 16. Examples of segmentation of higher genus surfaces into pair of pants using our Reeb graph algorithm.