# From Trees to Barcodes and Back Again: Theoretical and Statistical Perspectives
## 1 Introduction  
Although geometric approaches to analyzing data have been extensively used for many years, the first topological methods for data analysis were developed only recently, e.g., [1; 2; 3; 4; 5; 6]. Topological Data Analysis (TDA) is a fairly new field at the intersection of data science and algebraic topology, the aim of which is to provide robust mathematical, statistical, and algorithmic methods to infer and analyze the topological and geometric structures underlying complex data. These data are often represented as point clouds in Euclidean or metric spaces, though TDA methods have also been generalized to geometric objects and graphs. TDA has proved its utility in a wide range of applications in biology [7; 8; 9; 10], material science [11], and climate science [12], among other fields. Although it is still rapidly evolving, TDA now provides a set of powerful and efficient tools that can be used in combination with or as complements to other data science tools. One of the most promising applications of TDA is to the study of the brain, where it has served to analyze neuronal morphologies [13], brain networks [13; 14; 15], and brain functionality [16]. Motivated by the desire to objectively classify neuronal morphologies, in a previous publication ([PERSON] and [PERSON] in [13]), we designed a topological signature for trees, the Topological Morphology Descriptor (TMD), that assigns a _barcode_ (i.e., a multi-set of open intervals--called _bars_--in the real line) to any _geometric tree_ (i.e., any finite binary tree embedded in \(\mathbb{R}^{3}\)). We showed that the TMD algorithm effectively determines the reliability of the clustering of random and neuronal trees. Moreover, using the TMDalgorithm, we performed an objective, stable classification of pyramidal cells in the rat neocortex [17], based only on the shape of their dendrites. A frequent topic of discussion in the context of TDA is how to define an inverse to the process of associating a particular topological descriptor to a dataset, i.e., how to design a practical algorithm to recover the input data from a topological descriptor, such as a barcode. [PERSON] and [PERSON] [18] and [PERSON] et al. [19] have proposed partial solutions to this problem. The main obstacle that renders this endeavor particularly challenging has proven to be the computational complexity of the space of inputs considered. To avoid this obstacle, it is reasonable to constrain the input space and search only for an inverse transformation that is relevant in a specific context, for instance to look for solutions only in the space of embedded graphs, as in [20]. In the context of geometric trees, we have designed an algorithm to reverse-engineer the TMD [21], in order to digitally generate artificial neurons, to compensate for the dearth of available biological reconstructions. This algorithm, called Topological Neuron Synthesis (TNS), stochastically generates a geometric tree from a barcode, in a biologically grounded manner. As shown in [21], the synthesized neurons are statistically indistinguishable from the corresponding reconstructed neurons in terms of both their morphological characteristics and the networks they form. In this article, we further study the properties of this generative algorithm, from mathematical and statistical perspectives. We perform a theoretical and computational analysis of the TMD and TNS algorithms and their mathematical properties, in which symmetric groups play a key role. In particular, we investigate in detail the extent to which the TNS provides an inverse to the TMD. First, we carefully define our objects of study--geometric trees, barcodes, and persistence diagrams--and then recall the TMD and TNS algorithms. We also introduce two distinct classifications of geometric trees: into combinatorial types and into TMD-types. The symmetric groups play an important role in our classification of trees into TMD-types.