which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. On the combinatorics of sparsification

This peer-reviewed article can be downloaded, printed and distributed freely for any purposes (see copyright notice below). Articles in Algorithms for Molecular Biology are listed in PubMed and archived at PubMed Central. which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Abstract Background

constraints encoded at the level of secondary structure, i.e., by the mutual arrangements of the base pairs [1].
Secondary structures can be interpreted as (partial) matchings in a graph of permissible base pairs [2]. They can be represented as diagrams, i.e. graphs over the vertices 1, . . . , n, drawn on a horizontal line with bonds (arcs) in the upper half-plane. The length of an arc (i, j) is denoted by j − i. Furthermore, we call two arc (i, j) and (r, s) (suppose i < r) cross if i < r < j < s holds. In this representation one refers to a secondary structure without crossing arcs as a simple secondary structure and pseudoknot structure, otherwise, see Figure 1. http://www.almob.org/content/7/1/28 1 1 0 20 30  A diagram is a labeled graph over the vertex set [ n] = {1, . . . , n} in which each vertex has degree ≤ 3, represented by drawing its vertices in a horizontal line. The backbone of a diagram is the sequence of consecutive integers (1, . . . , n) together with the edges {{i, i + 1} | 1 ≤ i ≤ n − 1}. The arcs of a diagram, (i, j), where i < j, are drawn in the upper half-plane. We shall distinguish the backbone edge {i, i + 1} from the arc (i, i + 1), which we refer to as a 1-arc. A stack of length is a maximal sequence of "parallel" arcs, ((i, j), (i + 1, j − 1), . . . , (i + ( − 1), j − ( − 1))) and is also referred to as a -stack, see Figure 2.
We shall consider diagrams as fatgraphs, G, that is graphs G together with a collection of cyclic orderings, called fattenings. Each fatgraph G determines an oriented surface F(G) [3,4] which is connected if G is and has some associated genus g(G) ≥ 0 and number r(G) ≥ 1 of boundary components. Clearly, F(G) contains G as a deformation retract [5]. Fatgraphs were first applied to RNA secondary structures in [6,7].
A diagram G hence determines a unique surface F(G) (with boundary). Filling the boundary components with discs we can pass from F(G) to a surface without boundary. Euler characteristic, χ, and genus, g, of this surface is given by χ = v − e + r and g = 1 − 1 2 χ, respectively, where v, e, r is the number of discs, ribbons and boundary components in G, [5]. The genus of a diagram is that of its associated surface without boundary and a diagram of genus g is referred to as g-diagram.
A g-diagram without arcs of the form (i, i + 1) (1-arcs) is called a g-structure. A g-diagram that contains only vertices of degree three, i.e. does not contain any vertices not incident to arcs in the upper half-plane, is called a gmatching. A diagram is called irreducible, if and only if it cannot be split into two by cutting the backbone without cutting an arc, see Figure 2.

Folding algorithms
Folded configurations are energetically somewhat optimal. Here energy is obtained by adding contributions of loops [8] contained in RNA secondary and pseudoknot structures. Any RNA structure has a unique and disjoint decomposition into such loops which are really stems from the fatgraph [9,10] interpretation of such structures in which loops correspond to boundary components [11]. Additional constraints imply further properties, like for instance certain minimum arc-length conditions [12] and the nonexistence of isolated bonds. An mfe-RNA structure can be predicted in polynomials time by means of dynamic programming (DP) routines [12,13].
The most commonly used tools predicting simple RNA secondary structure mfold [13] and the Vienna RNA Package [14], require O(n 2 ) space and O(n 3 ) time. In the http://www.almob.org/content/7/1/28  (1,21) and (11,33) are crossing and the dashed arc (9, 10) is a 1-arc which is not allowed. This structure contains 4 stacks with length 7, 4, 6 and 4, from left to right respectively. Irreducibility relative also to a decomposition rule. The rule * splitting S i,j to S i,k and S k+1,j , S 1,55 is not * -irreducible, while S 2,40 and S 43,55 are. However, for a specific decomposition rule , which removes the outmost arc, S 43,55 is not -irreducible while S 2,40 is.
following we omit "simple" and refer to secondary structures containing crossing arcs as pseudoknot structures.
Note that RNA secondary structures are exactly structures of topological genus zero [27]. The topological classification of RNA structures [10,11,28] has recently been translated into an efficient DP-algorithm [9]. Fixing the topological genus of RNA structures implies that there are only finitely many types, the so called irreducible shadows [11].

Sparsification
Let us have a closer look at sparsification and the results of [29][30][31]. Sparsification is a method tailored to speed up DP-algorithms predicting mfe-secondary structures [29,31]. The idea is to prune certain computation paths encountered in the DP-recursions, see Figure 3A. Let us consider the case of RNA secondary structure folding. Here sparsification reduces the DP-recursion paths to be based on so called candidates. A candidate is in this case an interval, for which the optimal solution cannot be written as a sum of optimal solutions of sub-intervals. This implies the structure over a candidate is an "irreducible" structures when tracing back from the optimal solution. Considering only these candidates gives the same optimal solution as considering all possible intervals. The crucial observation here is that if these irreducibles appear only at a low rate we have a significant reduction in time and space complexity.
Sparsification has been also applied in the context of RNA-RNA interaction structures [30] as well as RNA pseudoknot structures [32]. In difference to RNA secondary structures, however, not every decomposition rule in the DP-folding of RNA pseudoknot structures is amendable to sparsification. By construction, sparsification can only be applied for calculating mfe-energy structures. Since the computation of the partition function [20,33] needs to take into account all sub-structures, sparsification does not work.
Sparsification [29,31,32] can be described as follows: let V = {v 1 , v 2 , . . .} be a set whose elements v i are unions of pairwise disjoint intervals. Let furthermore L v denote an optimal solution (here optimal means to maximize the scores) of the DP-routine over v. By assumption L v is recursively obtained. Suppose we are given a decomposition rule 1 , for which the optimal solution Then, under certain circumstances, the DP-routine may interpret L v either as Figure 3B. To be precise, this situation is encountered iff • there exists an optimal solution L v 2 for a sub-structure over v 2 where v 2 = v 2∪ v 3 via 3 and L v is obtained by L v 1 and L v 2 via 1 .

Given a decomposition
, http://www.almob.org/content/7/1/28 Figure 3 (A) Sparsification of secondary structure folding. Suppose the optimal solution L i,j is obtained from the optimal solutions L i,k , L k+1,q and L q+1,j . Based on the recursions of the secondary structures, L i,k and L k+1,q produce an optimal solution of L i,q . Similarly, L k+1,q and L q+1,j produce an optimal solution of L k+1,j . Now, in order to obtain an optimal solution of L i,j it is sufficient to consider either the grouping L i,q and L q+1,j or L i,k and L k+1,j . (B) General idea of sparsification: L v is alternatively realized via L v1 and L v 2 , or L v 1 and L v3 . Thus it is sufficient to only consider one of the computation paths.
we call 2 s-compatible to 1 if there exists a decomposition rule 3 such that Note that if 2 is s-compatible to 1 then 3 is scompatible to 1 . To summarize Definition 1. (s-compatible) Suppose L v is the optimal solution for S v over v, L v = L v 1 +L v 3 under decomposition rule 1 . L v 1 is obtained from two optimal solutions L v 1 and L v 2 under rule 2 . Then 2 is called s-compatible to Figure 3B depicts two such ways that realize the same optimal solution L v . Sparsification prunes any such multiple computations of the same optimal value. Note that by symmetry, 2 and 3 are both s-compatible to 1 .
We next come to the important concept of candidates. The latter mark the essential computation paths for the DP-routine.

Definition 2. (Candidates)
Suppose L v is an optimal solution in a sense of maximizing. We call v is acandidate if for any v 1 v obtained by and v = v 1∪ v 2 , we have and we shall denote the set of -candidates set by Q .
By construction a -candidate v is a union of disjoint intervals such that its optimal solution L v cannot be obtained via a -splitting. This optimal solution allows to construct a non-unique arc-configuration (substructure) over v [13,14] and the above -splitting consequently translates into a splitting of this sub-structure. This connects the notion of -candidates with that of sub-structures and shows that a -candidate implies a sub-structure that is -irreducible. Lemma 1. [29,32] Suppose L v is obtained by selecting the optimal solution from the decomposition rules In summary, as for the impact of sparsification, [29] claims that sparsification reduces the time complexity by a linear factor. This claim is based on the assumption that RNA molecules satisfy the polymer-zeta property [29]. Subsequent studies draw a slightly different picture [31] concluding that that sparsification requires O(nZ) time, where n denotes the length of input sequence, and Z is a sparsity parameter satisfying n ≤ Z < n 2 . Recently, it has been shown in [34] that an asymptotic time complexity of a sparsified RNA folding algorithm using standard energy parameters remains O(n 3 ) under a wide variety of condition.

Sparsification of RNA secondary structures
Here we recall some results of [29,31] on the sparsification of RNA secondary structures. Secondary structures satisfy a simple recursion which gives the optimal (maximum) solution over [ i, j] by L i,j = max{V i,j , W i,j }, where V i,j denotes the optimal solution in which (i, j) is a base pair, and W i,j denotes the optimal solution obtained by adding the optimal solutions of two subsequent intervals, respectively. Note that the optimal solution over a single vertex is denoted by L i,i . We have the recursion equation http://www.almob.org/content/7/1/28 for V i,j and W i,j : where w(i, j) is the energy contribution of (i, j) forming a base pair, see Figure 4. In case two positions, i, j in the sequence are incompatible then we have is in the candidate set of * , and we denote the set Q * by Q. Suppose the optimal solution W i,j is given by W i,j = L i,q + L q+1,j and suppose we have

Sparsification on RNA pseudoknot structures
Sparsification can also be applied to the DP-algorithm folding RNA structures with pseudoknots [32]. In contrast to the decomposition rule * that spliced an interval into two subsequent intervals, we encounter in the grammar for pseudoknotted structures additional more complex decomposition rules [15]. As shown in [32] there exist some decomposition rules which are not s-compatible and which can accordingly not be sparsified at all, see Figure 5B. For instance, given a decomposition rule in pknot-R&E subsequent decomposition rules which are s-compatible to are referred to as split type of [32]. In the following we will study RNA pseudoknot structures of fixed topological genus, see RNA structures, diagrams and genus filtration for details. An algorithm folding such pseudoknot structures, gfold, has been presented in [9]. The decomposition rules that appear in gfold are reminiscent to those of pknot-R&E but as they restrict the genus of sub-structures, the iteration of gap-matrices is severely restricted and the effect of sparsification of these decompositions is significantly smaller.
In the following, we restrict our analysis in pseudoknotted structures to only the decomposition rule * , which splices an interval into two subsequent intervals.
Put differently, * cuts the backbone of an RNA pseudoknot structure of fixed genus g over one interval without cutting a bond.

Efficiency of sparsification
By construction, the fewer candidates the DP-routine encounters, the more efficient the sparsification. Thus it is of utmost importance to analyze the number of candidates. In the case of sparsification of RNA secondary structures we have one basic decomposition rule * acting on intervals, namely * splices an interval into two disjoint, subsequent intervals. The implied notion of a *irreducible sub-structure is that of a sub-structure nested in a maximal arc, where maximal refers to the partial order of two arcs This observation relates irreducibility to nesting of arcs and following this line of thought [29] identifies a specific property of polymer-chains introduced in [35,36] to be of relevance for the size of candidate sets:

Definition 3. (Polymer-zeta property)
Let P(i, j) denote the probability of a structure over an interval [ i, j] under some decomposition rule . Then we say follows the polymer-zeta property if Polymer-zeta comes from modeling the 2D-folding of a polymer chain as a self-avoiding walk (SAW) in a 2D lattice [37]. It implies that the probability of a base pair (i, j) depends only on the length of the arc, i.e. P(i, j) = P(m), where m = j − i. In [29] stipulate that RNA molecules satisfy the polymer-zeta property and approximate P(i, j) by P(m) = bm −c [29] using 50, 000 mRNA sequences of an average length of 1992 nucleotides [38]. They find b ≈ 2.11 and c ≈ 1.47. The average probability P(m) is displayed in Figure 4, Page 865 [29] for increasing m. Furthermore, it is implied via Figure six, Page 867 [29] that the average number of candidates converges to a constant, implying that sparsification of DP-routine folding secondary structure takes (n 2 ) time complexity.
The recursion solving the optimal solution for secondary structures. http://www.almob.org/content/7/1/28 These findings have been questioned by [34], where it has been observed that the time complexity of a sparsified RNA folding algorithm based on energy minimization remains O(n 3 ) independently of the energy function used and the base composition of the RNA sequence. [34] argues that the significant effect of sparsification on the DP-routine is largely a finite-size effect. Namely, when the sequence length is below some threshold, the algorithm is dominated by the quadratic time factor. In this context, it may be worth pointing out that In [31] noticed that the improvement of a sparsified base-pairing maximization algorithm depends heavily on the base composition of the input. Backofen parameterizes explicitly the cardinality of candidate sets in [31].

Contribution
In this paper we study the sparsification of the decomposition rule * [31,32] for RNA secondary and RNA pseudoknot structures of fixed topological genus. Based on Assumption 1 below our paper provides a combinatorial framework for quantifying the effects of sparsification of the * rule.
We shall prove that the candidate set [29,31,32] is indeed small. We compute the probability of an interval being a candidate for two different energy models. For both models, this is facilitated via computing the generating function (GF) of structures and the generating function of irreducible structures. By studying the asymptotics of coefficients in these generating functions, we can compute the expected number of candidates of a uniformly random input sequence for large n. We show similar results for RNA pseudoknot structures of fixed topological genus. This provides new insights into the improvements of the sparsification of the concatenation-rule * in the presence of cross serial interactions. Our observations complement the detailed analysis of Backofen [31,32]. We show that although for pseudoknot structures of fixed topological genus [10,11] the effect of sparsification on the global time complexity is still unclear, the decomposition rule that splits an interval can be sped up significantly.

Methods
Suppose w is an energy function for RNA structures. Let w δ (σ ) denote the energy of an RNA structure σ over a sequence δ. The partition function of δ is given by where R is the universal gas constant and T is the temperature. (Here we consider w δ (σ ) as a positive score.) The partition function induces a probability space in which the probability of a structure σ is The concept of a partition function is close to that of a generating function. In case of e w δ (σ )/RT = 1, i.e., each structure contributes equally regardless the underlying sequence and the partition function equals [ z n ] G(z), where G is the generating function and [ z n ] G is the coefficient of the term z n .
Two important energy models are arc-based [39] and loop-based [8], respectively. The loop-based energyfiltration is different from the notion of "stickiness" [40]. The compatibility of two positions by folding random sequences is considered to be 6/16, reminiscent of the probability of two given positions to be compatible by Watson-Crick and Wobble base pairs rules.
where η > 1 is a constant, w(σ ) is the energy value assigned to σ based on a given energy model and is the number of arcs contained in σ . Then the probability of a particular structure σ to be the mfe-structure of a uniformly random input sequence is .

Asymptotics
In this section we compute two generating functions and their singular expansions [11]. Let c g (n) and d g (n) denote the number of g-matchings and g-structures having n arcs and n vertices, respectively, with GF The GF C g (z) has been computed in the context of the virtual Euler characteristic of the moduli-space of curves in [41] and D g (z) can be derived from C g (z) by means of symbolic enumeration [11]. The GF of genus zero diagrams C 0 (z) is well-known to be the GF of the Catalan numbers, i.e., the numbers of triangulations of a polygon with (n + 2) sides, As for g ≥ 1 we have the following situation [11] Theorem 1. Suppose g ≥ 1. Then the following assertions hold (a) D g (z) is algebraic and In particular, z 2 /(z 2 − z + 1) 2 = 1/4 is the only dominant singularity of D g (z). we have for some constant a g depending only on g and γ ≈ 2.618: (b) The bivariate GF of g-structures over n vertices, containing exactly m arcs, E g (z, t), is given by

Irreducible g-structures
In the context of * -candidates we observed that irreducible sub-structures are of key importance. It is accordingly of relevance to understand the combinatorics of these structures. To this end let D * g (z) = ∞ n=0 d * g (n)z n denote the GF of irreducible g-structures.
For a proof of Lemma 2, see Section Proofs.

Theorem 2.
For g ≥ 1 we have (a) the GF of irreducible g-structures over n vertices is given by where u = z 2 (z 2 −z+1) 2 , U g (z) and V g (z) are both polynomials with lowest degree at least 2g, and U g (1/4), V g (1/4) = 0. In particular, for some constant a * g > 0 and γ ≈ 2.618: (b) the bivariate GF of irreducible g-structures over n vertices, containing exactly m arcs, E * g (z, t), is given by where We shall postpone the proof of Theorem 2 to Section Proofs.

Nussinov-like energy model
In the following we mimic some form of mfe-g-structures: inspired by the Nussinov energy model [39] we consider the weight of a g-structure over n vertices σ g,n to be given by w(σ g,n ) = c , where c is a constant contribution of a single arc and is the number of arcs in σ g,n [40]. Then by Assumption 1, we have the weight function W (σ g,n ) = (6/16) η c = ((6/16)η c ) . Note that the case (6/16)η c = 1 corresponds to the uniform distribution, i.e. all g-structure have identical weight.
This approach requires to keep track of the number of arcs, i.e. we need to employ bivariate GF. In Theorem 1 (b) we computed this bivariate GF and in Theorem 2 (b) we derived from this bivariate GF E * g (z, t), the GF of irreducible g-structures over n vertices containing arcs.
The idea now is to substitute for the second indeterminant, t, some fixed τ = (6/16)η c ∈ R. This substitution induces the formal power series D g,τ (z) = E g (z, τ ), which we regard as being parameterized by τ . Obviously, setting τ = 1 we recover D g (z), i.e. we have D g (z) = http://www.almob.org/content/7/1/28 D g,1 (z) = E g (z, 1). Note that for τ > 1/4, the polynomial τ z 2 − z + 1 has no real root. Thus we have for τ > 1/4 the asymptotics with identical exponential growth rates as long as the supercritical paradigm [42] applies, i.e. as long as γ τ , the real root of minimal modulus of is smaller than any singularity of 1 τ z 2 −z+1 . In this situation τ affects the constant a g,τ and the exponential growth rate γ τ but not the sub-exponential factor n 3(g− 1 2 ) . The latter stems from the singular expansion of C g (z). Analogously, we derive the τ -parameterized family of GF D * g,τ (z) = E * g (z, τ ). We set the contribution of a single arc c = 1 and the constant η = e, where e is the Euler number. Then we have the parameter τ = (6/16)e 1 ≈ 1.0125. By abuse of notation we will omit the subscript τ assuming τ = (6/16)e 1 .
The main result of this section is that the set of *candidates is a small proportion of all entries. To put this size into context we note that the total number of entries considered for the * -decomposition rule is given by M(n) = n m=1 (n − m + 1).

then the expected number of candidates of g-structures for sequences of lengths n satisfies
and furthermore, setting E g (n) = E g (n)/M(n) we have We provide an illustration of Theorem 3 in Figure 6.
Proof. We proof the theorem by quantifying the probability of [ i, j] being a * -candidate. In this case any (not necessarily unique) sub-structure, realizing the optimal solution L i,j , is * -irreducible, and therefore an irreducible structure over [ i, j].
Let m = (j − i + 1), by assumption, the probability that [ i, j] is a candidate conditional to the existence of a substructure over [ i, j] is given by Note that P * [ i, j] |[ i, j] is a candidate does not depend on the relative location of the interval but only on the interval-length. Let P g (m) = d * g (m)/d g (m), then according to Theorem 1, for m ≥ m 0 where m 0 > 0 and 0 < < 1 are constants. On the one hand where b g = a g /a * g > 0 is a constant. On the other hand, we have Figure 7. We next study the expected number of candidates over an interval of length m. To this end let The expected cardinality of the set of * -candidates of length m = (j − i + 1) encountered in the DP-algorithm is given by since there are n − (m − 1) starting points for such an interval [ i, j]. Therefore, by linearity of expectation, for sufficiently large m > m 0 , P g (m) ≤ (1 + )b g with being a small constant. Thus we have Consequently, the expected size of the * -candidate set is (n 2 ). We proceed by comparing the expected number of candidates of a sequence with length n with M(n), For sufficient large n ≥ n 0 , from which we can conclude E g (n)/M(n) ∼ d * g (m)/ d g (m) ∼ b g and the theorem is proved.

Loop-based energy model
In this section we discuss the loop-based energy model of RNA secondary structure folding. To be precise we evoke here trivariate GFs F(z, t, v) and F * (z, t, v) whose coefficients counting the numbers of secondary structures and irreducible secondary structures over n vertices having arcs and energy j, respectively. This becomes necessary since the loop-based model distinguishes between arcs and energy. The "cancelation" effect or reparameterization of stickiness [40] to which we referred to before does not appear in this context. Thus we need both an arc-as well as an energy-filtration. A further complication emerges. In difference to the GFs E g (z, t) and E * g (z, t) the new GFs are not simply obtained by formally substituting (tz 2 /((tz 2 −z+1) 2 ) into the power series D g (z) and D * g (z) as bivariate terms. The more complicated energy model requires a specific recursion for irreducible secondary structures.
The energy model used in prediction of secondary structure is more complicated than the simple arc-based energy model. Loops which are formed by arcs as well as isolated vertices between the arcs are considered to give energy contribution. Loops are categorized as hairpin loops (no nested arcs), interior loops (including bulge loops and stacks) and multi-loops (more than two arcs nested), see Figure 8. An arbitrary secondary structure can be uniquely decomposed into a collection of mutually disjoint loops. A result of the particular energy parameters [8] is that the energy model prefers interior loops, in particular stacks (no isolated vertex between two parallel arc), and disfavors multi-loops. Based on this observation, we give a simplified energy model for a loop λ contained in secondary structure which only depends on the loop types by where λ is a loop in a structure. The energy for a secondary structure σ accordingly is given by Let F * 0 (z) and F 0 (z) be the energy-filtered GFs obtained by setting t = 6/16 and v = η = e in F * (z, t, v) and F(z, t, v), where e is the Euler number. Then where σ is an arbitary and σ is an irreducible secondary structure. Along these lines, , denote the number of arcs in σ and σ . In other words, what happens here is that we find a suitable parameterization which brings us back to a simple univariate GF whose coefficients count the sum of weights of structures over n vertices. Lemma 3. The energy-filtered generating function of RNA secondary structures, F * 0 (z), satisfies the recursion and F * (z) is uniquely determined by the above equation. Furthermore Proof. We first consider the GF F * 0 (z) whose coefficient of z n denotes the total weight of irreducible secondary structures over n vertices, where (1, n) is an arc. Thus it gives a term 6/16z 2 . Isolated vertex lead to the term where p denotes the minimum number of isolated vertices to be inserted. Depending on the types of loops formed by (i, n), we have • hairpin loops: z 1−z , • interior loops: • multi-loops: there are at least two irreducible sub-structures, as well as isolated vertices, thus Considering the contributions from the energy model we compute which establishes the recursion. The uniqueness of the solution as a power series follows from the fact that each coefficient can evidently be recursively computed.
An arbitrary secondary structure can be considered as a sequence of irreducible sub-structures with certain intervals of isolated vertices. Thus Lemma 4. F * 0 (z) and F 0 (z) have the same singular expansion.
where α ≈ 0.24 and β ≈ 2.88 are constants and γ ≈ 2.1673 Proof. Solving eq. 14 we obtain a unique solution for F * 0 (z) whose coefficient are all positive. Observing the dominant singularity of F * 0 (z) is ρ ≈ 0.4614. F 0 (z) is a function of F * 0 (z) and we examine the real root of minimal modulus of 1 − F * 0 (z) 1 1−z = 0 is bigger than ρ. Then by the supercritical paradigm [42] applying, F 0 (z) and F * 0 (z) have identical exponential growth rates. Furthermore, F * 0 (z) and F 0 (z) have the same sub-exponential factor n − 3 2 , hence the lemma.
and furthermore, setting E g (n) = E g (n)/M(n), we have The proof is completely analogous to that of Theorem 3.
We show the distribution of P 0 (m) and E 0 (n) in Figure 9.

Conclusion
In this paper we quantify the effect of sparsification of the rule * . This rule splits intervals and separates concatenated sub-structures. The sparsification of * alone is claimed to provide a speed up of up to a linear factor of the DP-folding of RNA secondary structures [29]. A similar conclusion is drawn in [30] where the sparsification of RNA-RNA interaction structures is shown to experience also a linear reduction in time complexity. Both papers [29,30] base their conclusion on the validity of the polymer-zeta property. However, [34] comes to a different conclusion reporting a mere constant reduction in time complexity. While * is the key for the time complexity reduction of secondary structure folding, it is conceivable that for pseudoknot structures there may exist non-sparsifiable rules in which case the overall time complexity is not reduced.
In any case, the key is the set of candidates and we provide an analysis of * -candidates by combinatorial means. In general, the connection between candidates, i.e. unions of disjoint intervals and the combinatorics of structures is actually established by the algorithm itself via backtracking: at the end of the DP-algorithm a structure is being generated that realizes the previously computed energy as mfe-structure. This connects intervals and substructures.
So, does the condition c > 1 in polymer-zeta apply in the context of RNA structures? In fact this condition would follow if the intervals in question are distributed as in uniformly sampled structures. This however, is far from reasonable, due to the fact that the mfe-algorithm deliberately designs some mfe-structure over the given interval. What the algorithm produces is in fact antagonistic to uniform sampling. We here wish to acknowledge the help of one anonymous referee in clarifying this point.
Our results imply that polymer-zeta does not hold. Our framework critically depends on a specific distribution of mfe structures within irreducible and arbitrary structures, explicated in Assumption 1. We have cross-checked Assumption 1 with the number of candidates in DP-programs (using the same energy model), see Figure 7 and Figure 9. With this conclusion we are in accord with [31,34] but provide an entirely different approach.
The non validity of polymer-zeta has also been observed in the context of the limit distribution of the 5'-3' distances of RNA secondary structures [43]. Here it is observed that long arcs, to be precise arcs of lengths O(n) always exist. This is of course a contradiction to the polymer-zeta property in case of c > 1.
The key to quantification of the expected number of candidates is the singularity analysis of a pair of energyfiltered GF, namely that of a class of structures and that of the subclass of all such structures that are irreducible. We show that for various energy models the singular expansions of both these functions are essentially equal-modulo some constant. This implies that the expected number of candidates is (n 2 ) and all constants can explicitly be computed from a detailed singularity analysis. The good news is that depending on the energy model, a significant constant reduction, around 96% can be obtained. This is in accordance with data produced in [31] for the mfe-folding of random sequences. There a reduction by 98% is reported for sequences of length ≥ 500.
Our findings are of relevance for numerous results, that are formulated in terms of sizes of candidate sets [32]. These can now be quantified. It is certainly of interest to devise a full fledged analysis of the loop-based energy model. While these computations are far from easy our framework shows how to perform such an analysis.
Using the paradigm of gap-matrices Backofen has shown [32] that the sparsification of the DP-folding of RNA pseudoknot structures exhibits additional instances, where sparsification can be applied, see Figure 5B. Our results show that the expected number of candidates is (n 2 ), where the constant reduction is around 90%. This is in fact very good new since the sequence length in the context of RNA pseudoknot structure folding is in the order of hundreds of nucleotides. So sparsification of further instances does have an significant impact on the time complexity of the folding.

Proofs
In this section, we prove Lemma 2 and Theorem 2.
Proof for Lemma 2: let D(z, u) and D * (z, u) be the bivariate GF D(z, u) = n≥0 n 2 g=0 d g (n)z n u g , and D * (z, u) = n≥1 n 2 g=0 d * g (n)z n u g . Suppose a structure contains exactly j irreducible structures, then and as well as and (z,u) . Furthermore, we have F 0 (z) = 1 D 0 (z) and Proof for Theorem 2 Let [ n] k denote the set of compositions of n having k parts, i.e. for σ ∈[ n] k we have σ = (σ 1 , . . . , σ k ) and k i=1 σ i = n. Claim.
We shall prove the claim by induction on g. For g = 1 we have whence eq. (22) holds for g = 1. By induction hypothesis, we may now assume that for j ≤ g, eq. (22) holds. According to Lemma 2, we have We next observe and setting h = g 1 − j we obtain, Consequently, the Claim holds for any g ≥ 1.