# From Trees to Barcodes and Back Again: Theoretical and Statistical Perspectives
## 6 Discussion  
In this paper, we presented and analyzed two algorithms that are relevant in topological data analysis: the TMD, which encodes the structure of a geometric tree in a barcode, and the TNS, which generates a geometric tree from a barcode. We proved that, for a good choice of parameter, the TNS is robust with respect to small perturbations of barcodes; an analogous stability result for the TMD was established in [13]. We observed that ordering the bars in the persistence barcode according to birth times results in the natural association of a permutation to the barcode, based on death times, giving rise to a meaningful equivalence relation on the set of barcodes. We also introduced a natural, combinatorial equivalence relation on geometric trees. For any barcode, we analyzed the set of combinatorial equivalence classes of those geometric trees whose TMD corresponds to that barcode, providing a simple, explicit formula for its cardinality in terms of the permutation associated with the barcode. Cayley graphs of symmetric groups provide a useful visualization of how this cardinality varies as bars in the barcode are transposed. We illustrated our theoretical results computationally. In addition, we computed the probability for the TNS to generate different combinatorial tree types from a fixed barcode and found it to be a function of the parameter \(\lambda\) on which the TNS depends, a result which can be explained only by the stochastic nature of the TNS algorithm. The stochastic nature of the TNS algorithm also leads to variation in the equivalence classes of barcodes associated by the TMD to the trees generated from a fixed barcode by the TNS. In particular, when starting with the TMD of a \"biological\" tree (i.e., arising from a digital neuron reconstruction) including bars with similar birth or death times, we observed an oscillatory behavior between two (or more) different classes states, increasing the variance of the generated trees. We also initiated an analysis of the distinctive features of biological trees compared to random trees. We discovered that the barcodes associated by the TMD to trees representing neuronal morphologies represent a small fraction of possible equivalence classes of barcodes. It follows that the set of combinatorial types of geometric trees that are biologically realized is also constrained, indicating a biological preference for specific tree structures. There is much still to discover about which geometric or combinatorial features distinguish biological trees among all geometric trees and why. In future work, we intend to further investigate the effect of different types of noise on the TNS algorithm. For instance, we have considered only the effect of transposing two bars, but other types of changes are certainly also relevant, such as investigating the effects of switching both births and deaths, as mentioned in Remark 1. On a more neuroscientific note, we intend to continue exploring the distinguishing characteristics of biological trees, with the goal of explaining the structural and functional reasons for the observed geometric and combinatorial constraints. On the mathematical side, we are currently analyzing the structure on the space of barcodes revealed by the symmetric groups and determining what information can be extracted from the induced stratification of this space. This structure on the space of barcodes should also provide significant insights into the still somewhat mysterious space of geometric trees, which is of considerable interest to a wide range of mathematicians. Conceptualization by [PERSON], experiments performed by [PERSON] and [PERSON]. Formal analysis and theorem formulation by [PERSON], [PERSON], and [PERSON] Supervision by [PERSON] All authors have read and agreed to the published version of the manuscript. This study was supported by funding to the Blue Brain Project, a research center of the Ecole polytechnique federale de Lausanne (EPFL), from the Swiss government's ETH Board of the Swiss Federal Institutes of Technology.