barcode $B({\mathsf{diag}})$ if it holds that ${\mathsf{Dgm}}(f,z) = {\mathsf{diag}}$. It was shown in [@curry] that there is at least one piecewise linear function realizing the barcode, and this argument can be transferred directly to our setting.

To distinguish functions realizing the barcode $B({\mathsf{diag}})$, we group them into equivalence classes. We remark that to characterize equivalence classes we can use the notion of *chiral merge tree* as defined in [@curry].

It was shown in \[Corollary 5.5, [@curry]\] that the number of chiral merge trees realizing a barcode $B$ is equal to $2^{N-1}\prod_{j=2}^N{\mu_B(I_j)}$, where $\mu_B(I_j)$ denotes the number of intervals in $B$ containing $I_j$.

Now we recall the known result saying that ${\mathsf{Per}}^{-1}({\mathsf{diag}})$ is composed out of a finite number of components. For the moment we use an abstract notion $C(\operatorname{cv}(z)^i)$, which we will make precise later. Each component is represented by a *chiral merge tree*, which was proved in [@curry] in the case of *Morse* functions. The functions we consider in our setting are not necessarily Morse, below we provide a suitable lemma fitted to our setting.

\[lempreim\] Let ${\mathsf{diag}}\in{\mathsf{Per}}$. Then the preimage ${\mathsf{Dgm}}^{-1}({\mathsf{diag}})\subset {\mathbb{R}}^N$ is composed out of a finite number of components $${\mathsf{Dgm}}^{-1}({\mathsf{diag}}) = \bigcup_{i=1}^{I({\mathsf{Dgm}}(z))}{C(\operatorname{cv}(z)^i)},$$ where ${\mathsf{diag}}= {\mathsf{Dgm}}(z)$. $C(\operatorname{cv}(z)^i)\subset 