# From Trees to Barcodes and Back Again: Theoretical and Statistical Perspectives
## 5 Computational Exploration of Tree-Realization
### Tree-Realizations of Biological Barcodes  
Since the original objective in developing the TMD was to classify digital reconstructions of neurons, it is natural to ask whether those barcodes that arise biologically exhibit any special characteristics compared to those arising from other sets of geometric trees. In Figure 20, we employ the graphical representation of permutations introduced in Section 5.3 to display as red dots all possible permutations corresponding to TMD-barcodes of biological trees with at most 30 branches arising from a population of digital reconstructions of neurons. Clearly, only a small fraction of the set of all possible permutations can be realized as the barcode-equivalence classes of geometric trees extracted from digital reconstructions of neurons, as every black dot in this plot can arise as a pair \(\left(k,\sigma(k)\right)\) for some permutation \(\sigma\). In future work, we intend to study the biological relevance of this restriction.  
To provide further insight into the subset of TMD-equivalence classes of biological geometric trees within the set of all possible TMD-equivalence classes, we computed the tree-realization number as a function of the number of bars, for a population of barcodes obtained by applying the TMD to geometric trees extracted from a population of digitally reconstructed neurons. We compared the values obtained to the maximum tree-realization number and to the tree-realization numbers of randomly chosen barcodes with the same number of bars (Figure 21). Interestingly, the barcodes that correspond to apical dendrites (relatively complex neural trees that perform significant processing tasks) exhibit a more narrow range of possible tree-realization numbers than random barcodes of the same size. On the other hand, barcodes of basal dendrites (less complex neuronal trees) exhibit tree-realization numbers similar to those of the randomly generated barcodes.  
\begin{table}
\begin{tabular}{l l l l} \hline \hline  & **Permutation** & **TRN** & **Bars That Switch** \\ \hline \(B^{1}\) & \((2,6,8,1,5,7,4,3)\) & 810 & 4 and 5 \\ \(\hat{B}^{1}\) & \((2,6,8,5,1,7,4,3)\) & 540 & 4 and 5 \\ \(B^{2}\) & \((5,7,6,4,2,1,3)\) & 12 & 2 and 3 \\ \(\hat{B}^{2}\) & \((5,6,7,4,2,1,3)\) & 18 & 2 and 3 \\ \(B^{3}\) & \((5,7,6,4,2,1,3)\) & 12 & 3 and 4 \\ \(\hat{B}^{3}\) & \((5,7,4,6,2,1,3)\) & 18 & 3 and 4 \\ \(B^{4}\) & \((8,6,7,4,3,1,2,5)\) & 20 & 1 and 2 \\ \(\hat{B}^{4}\) & \((6,8,7,4,3,1,2,5)\) & 40 & 1 and 2 \\ \hline \hline \end{tabular}
\end{table}
Table 2: For each example displayed in Figure 19, we list the permutation type and the tree-realization number of the original barcode \(B\) and of \(\hat{B}=B_{50}\), and the indices of the bars that are switched. The superscript \(i\) in \(B^{i}\) indicates the corresponding row of Figure 19. For example, the largest death time of barcode \(B^{1}\) is the second bar (in order of birth times), and its shortest death is the third one. When we switch the 4 th and 5 th (from largest to smallest) death times in \(B^{1}\) and \(\hat{B}^{1}\), the TRN changes from 810 to 540.  
Figure 21: The log of the tree-realization number for barcodes with varying numbers of bars. (**A**) the log of tree-realization number for barcodes of basal dendrites (in blue) in comparison with random barcodes (in yellow) and the maximum tree-realization number (\(n!\) for \(n+1\) bars) (in red); (**B**) the log of the tree-realization number for barcodes of apical dendrites (in blue) in comparison with random barcodes (in yellow) and the maximum maximum tree-realization number (in red).  
Figure 20: (**A**) TMD-equivalence classes of a population of biological geometric trees with at most 30 bars (red dots), represented by their associated permutations; (**B**) examples of TMD-equivalence classes of individual biological geometric trees with eight branches, extracted from layer 4 pyramidal cells (red dots).