An infinite class of unsaturated rooted trees corresponding to designable RNA secondary structures
Abstract
An RNA secondary structure is designable if there is an RNA sequence which can attain its maximum number of base pairs only by adopting that structure. The combinatorial RNA design problem, introduced by Haleš et al. in 2016, is to determine whether or not a given RNA secondary structure is designable. Haleš et al. identified certain classes of designable and nondesignable secondary structures by reference to their corresponding rooted trees. We introduce an infinite class of rooted trees containing unpaired nucleotides at the greatest height, and prove constructively that their corresponding secondary structures are designable. This complements previous results for the combinatorial RNA design problem.
Keywords Combinatorial RNA design problem; secondary structure; nucleotide; unsaturated tree
1 Introduction
Ribonucleic acid (RNA) is a biomolecule which performs many roles in cellular organisms, including conveying genetic information, controlling protein synthesis, and catalyzing biological reactions. A strand of RNA comprises a chain of nucleotides, each of which is one of the nitrogenous bases guanine (G), cytosine (C), adenine (A), and uracil (U). The threedimensional spatial configuration of an RNA strand affects its biological function [4]. A first approximation to this configuration is given by the secondary structure, namely the twodimensional folding of the RNA strand onto itself under only the interaction of certain pairs of nucleotides in the sequences to form base pairs, as illustrated in Figure 1. The three allowable base pair types are , , and (less frequently) .
Given a nucleotide sequence, the stability of the RNA secondary structure increases with the number of base pairs. Nussinov and Jacobson [10] showed that, given an RNA sequence of nucleotides, a secondary structure with the maximum number of base pairs can be predicted in order time. Modern algorithms for secondary structure prediction are presented in [16, 8], for example, and are widely used in current software.
The inverse problem to secondary structure prediction is the RNA design problem: find an RNA sequence which adopts a target secondary structure in preference to all other secondary structures, under some specified energy model. There is an extensive literature on computational approaches to the RNA design problem as an optimization problem: see, for example, [3, 1, 14, 15, 7, 5, 4, 2]. Nonetheless, there is currently no known exact polynomialtime algorithm for solving the RNA design problem, and its complexity remains open [6]; a more general problem is known to be NPhard [13].
In view of these difficulties, Haleš et al. [6] proposed the combinatorial RNA design problem as an idealized version of the RNA design problem: given a target secondary structure, find an RNA sequence which can achieve its maximum number of base pairs only by adopting the specified secondary structure, or else show that no such sequence exists. This restricted problem is intended to be sufficiently tractable to allow algorithmic insights that could apply to more sophisticated models. Haleš et al. [6] considered a number of energy models under which minimizing the total energy score for an RNA sequence corresponds to maximizing a weighted sum of base pair types. In the NussinovJacobson model, the three base pair types {G,C}, {A,U}, {G,U} are assigned an energy score , , , respectively, where ; all other base pair types are assigned an energy score of in order to exclude them. The WatsonCrick model takes and , so that minimizing the total energy score is the same as maximizing the total number of {G,C} and {A,U} base pairs. We shall use the WatsonCrick model throughout this paper (except that in Section 3 we extend our main result to the NussinovJacobson model with , which corresponds to maximizing the total number of {G,C} and {A,U} and {G,U} base pairs).
2 Terminology and previous results
In this section we define some terminology and then summarize the main results of [6]. Consider the sequence of nucleotides
This sequence admits a secondary structure involving 7 base pairs of types {G,C} and {A,U}, represented on the left side of Figure 2 by arcs that are all drawn above the nucleotide sequence.
The right side of Figure 2 shows the corresponding representation of this labelled secondary structure in labelled tree form. We map from the labelled tree to the labelled secondary structure by visiting tree vertices in the order given by a preorder traversal (but visiting each internal vertex twice, traversing the subtree rooted at that internal vertex between the two visits), and then joining by an arc each pair of nucleotides that label the same tree vertex. We map in the reverse direction by representing the outermost arc as the tree root AU, the two arcs nested directly beneath the outermost arc as a left child GC and a right child CG of the tree root AU, and so on. In this way we associate each labelled secondary structure (a set of nucleotides and base pairs) with a labelled tree.
In Figure 3, we have removed the nucleotide labels to leave the underlying secondary structure and the corresponding tree representation.
Nucleotide positions belonging to a base pair are represented in the tree by a twodot vertex, while each unpaired nucleotide position is represented in the tree by a onedot vertex. The children of each twodot vertex are all the vertices corresponding to nucleotides nested directly beneath the arc corresponding to in the secondary structure.
We consider only secondary structures for which each nucleotide in the sequence is attached to at most one arc, and which are pseudoknotfree: arcs drawn above the nucleotide positions as in Figure 3, representing base pairs, do not intersect (because arc crossings lead to complex constraints that often cannot be realized in three dimensions [12]). We shall assume that the first and last nucleotide of the sequence form a base pair, so that the graph representation is a rooted tree. (Otherwise it is a forest, in which case we can introduce a virtual root in order to produce a tree.) Each tree vertex will be labelled with either one or two dots; the only vertices that can be labelled with one dot are the leaves.
Now suppose that we are given only the target secondary structure of Figure 3. The combinatorial RNA design problem then asks whether the nucleotide positions of the secondary structure can be labelled so that the resulting nucleotide sequence admits a unique set of {G,C} and {A,U} arcs of maximum size and so that this arc set equals . We shall see in Theorem 3.2 that the answer for this example is yes, and that one such labelling is given by Figure 2.
We formalize these ideas as follows.
Definition 2.1.
A (pseudoknotfree) secondary structure applied to a sequence of nucleotide positions is a set of arcs satisfying , for which no two arcs share the same endpoint and there are no two arcs and satisfying .
Definition 2.2.
A secondary structure applied to a nucleotide sequence is a maximumsize arc set for the sequence if it contains the largest possible number of arcs (where only arcs of types {G,C} and {A,U} are allowed).
Definition 2.3.
An RNA sequence is a design if it admits a unique maximumsize arc set. A secondary structure is designable if there is a design whose (unique) maximumsize arc set equals ; in that case, we say that is a design for .
Combinatorial RNA Design Problem: Given a target secondary structure , find a design for or else show that is not designable.
We introduce some further definitions in order to summarize prior results on the combinatorial RNA design problem. Following [6], a secondary structure in which all nucleotide positions are paired is saturated, and otherwise is unsaturated. The tree corresponding to a secondary structure is saturated when every leaf has two dots, and otherwise is unsaturated.
Theorem 2.4 (Haleš et al. [6, Result R4]).
The secondary structure corresponding to a rooted saturated tree is designable if and only if the root of has at most four children and every other vertex of has at most three children.
The proof of Theorem 2.4 given in [6] is constructive, and gives many possible nucleotide labellings for the tree.
Theorem 2.5 (Haleš et al. [6, Result R5]).
The secondary structure corresponding to a rooted unsaturated tree containing a vertex with at least two dot children and at least one dot child is not designable.
Theorem 2.5 shows that we cannot remove the constraint “saturated” from Theorem 2.4: for example, the secondary structure corresponding to the unsaturated tree
is not designable. Nonetheless, in this paper we generalize Theorem 2.4 by showing that an infinite class of unsaturated secondary structures is designable, thereby solving the combinatorial RNA design problem for a new class of structures.
Following [6], a colouring of a rooted tree assigns a colour drawn from the set {B, W, Y} (where B = black, W = white, Y = grey) to each paired vertex of a rooted tree except the root. The colouring is proper if it obeys the rules specified in Table 1. (These rules constrain the root to have at most four children, and each other vertex to have at most three children.) The level of a vertex in such a coloured tree is the difference between the number of black vertices and the number of white vertices on the path starting at the vertex and ending at the root. A proper colouring is separated if no grey vertex shares a level with an unpaired vertex.
Vertex colouring  The multiset of colours of the children must be contained in the multiset 

none (root)  {B, W, Y, Y} 
B  {B, Y, Y} 
W  {W, Y, Y} 
Y  {B, W, Y} 
Theorem 2.6 (Haleš et al. [6, Result R6]).
The secondary structure corresponding to a rooted tree which admits a separated proper colouring is designable.
Theorem 2.6 is proved in [6] using an algorithm for constructing a design for the secondary structure in which all leaves are labelled with A, and then the remaining black vertices are labelled with GC, white vertices with CG, and grey vertices with one of AU and UA.
In Section 3 we shall introduce the infinite class of “Punsaturated full floral trees”, and state without proof our main result (Theorem 3.2) that these trees corresponds to designable secondary structures under the “natural labelling” of the structure with nucleotides. We then show that our main result complements the previous result of Theorem 2.6, in that each can be used to establish the designability of a secondary structure that the other cannot. We then establish some extensions of the main result, as Corollaries 3.3 and 3.4. Verifying that the natural labelling gives a maximumsize arc set is straightforward, but proving that the corresponding sequence is a design for the target structure appears to be much more difficult and subtle. In Section 4 we illustrate the proof techniques for Theorem 3.2 by reference to an extended example. We then prove the main result in full generality in Section 5. We conclude in Section 6 with some open questions.
3 Main result and some extensions
We wish to identify a new class of unsaturated trees that are designable (and which must necessarily avoid the class of unsaturated trees described in Theorem 2.5). In order to do so, we introduce Definition 3.1. Note that the height of a vertex in a rooted tree is the length of the path from the root to .
Definition 3.1.
A rooted tree is Punsaturated if every leaf at the maximum height is assigned exactly one dot and all other vertices exactly two dots.
A binary tree is a rooted tree in which every vertex has at most two children. A full binary tree is a rooted tree in which every internal vertex has exactly two children and all leaves are at the same height. We call a rooted tree floral if removing all vertices at the maximum height leaves a binary tree, and full floral if removing all vertices at the maximum height leaves a full binary tree. For example, Figure 6 shows a Punsaturated full floral tree of height 3.
Theorem 3.2 (whose full proof is postponed until Section 5) states that the secondary structure correponding to a Punsaturated full floral tree is designable. Consider the following assignment of nucleotides to a Punsaturated full floral tree of height , which we call the natural labelling. Label all the vertices at height with A if is even, and with C if is odd. Label the remaining vertices at even heights from left to right with alternating AU and UA, and those at odd heights from left to right with alternating GC and CG. For example, the natural labelling of the tree in Figure 6 is shown in Figure 7.
Theorem 3.2 (Main Result).
The secondary structure corresponding to a Punsaturated full floral tree is designable, and a design for is given by the nucleotide sequence corresponding to the natural labelling of .
Theorems 2.6 and 3.2 complement each other. The unsaturated tree shown in Figure 8, for example, admits the displayed separated colouring and so is designable by Theorem 2.6, but is not floral and so cannot be shown to be designable using Theorem 3.2 (nor by its Corollary 3.3 below). Conversely, we claim with reference to Figure 9 that a Punsaturated full floral tree of height 6, which we know to be designable by Theorem 3.2, cannot be shown to be designable using Theorem 2.6. Suppose, for a contradiction, that we can assign a separated proper colouring to the tree . By the separated colouring condition, no vertex at height 5 can be coloured Y, and then by the colouring rules given in Table 1 each pair of sibling vertices at height 5 must be coloured as one B and one W. The colouring rules applied to vertices at height 4, then height 3, and so on, then force all vertices at heights 2 and 4 to be coloured Y, and all vertices at heights 1, 3, 5 to be coloured in sibling pairs as one B and one W. But then the grey vertices at height 2 and the leaves at height 6 contained in the subtree of shown in Figure 9 share the same level 1, contradicting that the proper colouring is separated and proving the claim.
We show in Corollary 3.3 that we can relax the condition “full floral” in Theorem 3.2 to “floral”. The example structures appearing directly after the proof of Corollary 3.3 illustrate the main ideas of the proof.
Corollary 3.3.
The secondary structure corresponding to a Punsaturated floral tree is designable, and a design for is given by the nucleotide sequence corresponding to a labelled subtree of the natural labelling of a full floral tree.
Proof.
Let be the smallest full floral tree containing as a subtree; is necessarily Punsaturated. Let be the labelled full floral tree obtained by assigning nucleotides to according to the natural labelling. By Theorem 3.2, the labelled tree yields a design of nucleotides whose (unique) maximumsize arc set corresponds to . Let be the labelled subtree of whose unlabelled version is , and let be the associated sequence of nucleotides.
Colour the differences between and and their corresponding arc sets red, and the common parts (corresponding to ) black. The red structure consists of all nucleotides and corresponding arcs that must be pruned from the labelled full floral tree to obtain the labelled floral tree . It follows that the secondary structure corresponding to is a maximumsize arc set for : if admits a larger arc set than then that arc set, together with the red substructures, gives a larger arc set for (contradicting that the secondary structure corresponding to is a maximumsize arc set for ). It also follows that is a design for : if admits an alternative maximumsize arc set to then that arc set, together with the red substructures, gives an alternative maximumsize arc set for (contradicting that is a design). ∎
Recall from Section 1 that we have assumed the WatsonCrick model (under which minimizing the total energy is equivalent to maximizing the number of {G,C} and {A,U} base pairs). We show in Corollary 3.4 that the result of Corollary 3.3 carries over to the NussinovJacobson model with , under which minimizing the total energy is equivalent to maximizing the number of {G,C} and {A,U} and {G,U} base pairs.
Corollary 3.4.
The secondary structure corresponding to a Punsaturated floral tree is designable under the model in which minimizing the total energy is equivalent to maximizing the number of {G,C} and {A,U} and {G,U} base pairs.
Proof.
Let be the secondary structure corresponding to a Punsaturated floral tree . By Corollary 3.3, there is a design for under the WatsonCrick model (containing no {G,U} base pairs), and corresponds to a labelled subtree of the natural labelling of a full floral tree. Since all G and U nucleotides are paired in the natural labelling, the number of arcs in equals the number of nucleotides in plus the number of nucleotides in .
We shall show that is also a design for under the model which involves maximizing the number of {G,C} and {A,U} and {G,U} base pairs, by showing that an alternative arc set to that includes at least one {G,U} base pair must contain fewer arcs than the contained in . Let the number of {G,U} base pairs in an arc set under this more general model be . Then there are at most nucleotides G remaining to form {G,C} base pairs, and at most nucleotides U remaining to form {A,U} base pairs, giving a total base pair count of at most . ∎
4 Illustration of proof techniques
Although the natural labelling of a Punsaturated full floral tree follows a simple pattern, and it is relatively straightforward to show that Theorem 3.2 holds when has small height, finding a general argument that applies to all tree heights appears to be very delicate. In Section 5 we will prove Theorem 3.2 according to the following outline. We must establish that has a unique maximumsize arc set, and that this arc set equals . We first show that all nucleotides in that are unpaired in (those at height ) must also remain unpaired in every maximumsize arc set. In view of this, we show how to reduce to the case of a saturated full binary tree. Our main tool is a running difference of strategically chosen subsets of the nucleotides in , and a key insight is to focus on the parity of these running differences.
Having reduced a Punsaturated full floral tree to a saturated full binary tree, we could then apply Theorem 2.4 to show that the secondary structure is designable. However, to keep our proof selfcontained and to demonstrate the versatility of the method of running differences, we instead give our own proof in which we show that for every height of the reduced tree, nucleotides at height must all pair with one another, and that this forces a maximumsize arc set for to equal .
We now give a detailed illustration of the proof of Theorem 3.2, using the example of a Punsaturated full binary tree of height 4. (We use a binary tree in this illustration simply for convenience: the arguments readily extend to a Punsaturated full floral tree.) The natural labelling of is:
The corresponding sequence (represented on two lines to assist reading) is:
We shall show that admits a unique maximumsize arc set, and that this arc set equals . We introduce the following definition.
Definition 4.1.
A set of nucleotides is balanced if it comprises either an equal number of Gs and Cs or an equal number of As and Us.
For example, in Figure 10 the subset of G and C nucleotides shown boxed and coloured forms a balanced set within the nucleotide sequence . The tag shown in Figure 10 above each nucleotide (not in ) is the difference between the number of Gs and the number of Cs occurring in to the left of , namely the running difference with respect to . We use the corresponding definition for the running difference with respect to a balanced set of A and U nucleotides.
In order to prove Theorem 3.2 for , we iteratively define a succession of balanced sets of nucleotides, occurring as disjoint subsets of the sequence , and use the running difference with respect to these balanced sets to constrain the possible arcs of a maximumsize arc set.
Suppose a maximumsize arc set is applied to the sequence . The labelled tree from which is derived shows that admits an arc set for which only A nucleotides are unpaired; therefore in all G, C, and U nucleotides of the sequence must be paired.
Iteration 1:
has an equal number of Gs and Cs, forming a balanced set which is boxed and coloured as shown in Figure 10. To achieve the maximum number of arcs, all elements of must pair with one another; this is indicated by the colouring, which will be retained in all subsequent iterations (whereas the boxes are a temporary notation used only in the current iteration). To avoid inducing an arc crossing, every arc in joining uncoloured nucleotides (As and Us) must therefore enclose equally many of the two types of boxed nucleotides (Gs and Cs). Tag the uncoloured nucleotides with the running difference with respect to , as in Figure 10.
Then the uncoloured nucleotides with a given tag cannot pair with uncoloured nucleotides with a different tag, and cannot pair with coloured nucleotides (because those must all pair with one another). Therefore, the uncoloured nucleotides with a given tag can pair only with one another. This implies the weaker result that uncoloured nucleotides whose tags have the same parity can pair only with one another. (We have not yet shown that the uncoloured nucleotides with a given tag must all pair with one another, nor what the pairings must be.)
As a visual aid, we copy the boxing, colouring, and tagging applied to the nucleotides of onto the corresponding labelled tree : the nucleotides belonging to (the Gs and Cs) are boxed and coloured, and the uncoloured nucleotides (the As and Us) are tagged as above. (This does not assume the result we wish to prove, namely that applying a maximumsize arc set to results in the labelled tree .)
As described, all uncoloured nucleotides whose tags are odd (this being the opposite parity to that of the nucleotides at height 4) can pair only with one another. But these nucleotides form a new balanced set (comprising A and U nucleotides), and so must all pair with one another to achieve the maximum number of arcs; this will be indicated by colouring in the next iteration. Remove the tags and boxes but retain the colouring.
Iteration 2:
Box and colour the nucleotides of the new balanced set , as shown below.
To avoid inducing an arc crossing, every arc in joining two nucleotides not in must enclose an equal number of the two nucleotide types in (boxed As and boxed Us). Tag the uncoloured nucleotides with the running difference with respect to .
Uncoloured nucleotides whose tags have the same parity can pair only with one another. The corresponding version of (again shown only as a visual aid) is:
All uncoloured nucleotides whose tags are even (this being the opposite parity to that of the nucleotides at height 4) can pair only with one another. There are only two such nucleotides, namely the initial A and final U of the sequence . They form a trivial new balanced set and so must pair with one another. Remove the tags and boxes but retain the colouring.
Iteration 3:
Box and colour the nucleotides of the new balanced set .
At this point, only the nucleotides at height 4 are uncoloured, which is the stopping criterion. Since all coloured nucleotides must pair with one another, and all nucleotides at height 4 (the uncoloured nucleotides) are As, the nucleotides at height 4 must remain unpaired in .
We will use this fact to determine completely. Before doing so, we observe several properties that allow us to simplify the argument presented so far. Consider the balanced sets , , in iterations 1 to 3. Observe that the nucleotides in occurring at a given height in are either all in, or all not in, the current balanced set. Furthermore the tags (with respect to this balanced set) of all nucleotides at a given height share the same parity, and the parity switches between successive tagged heights. As a result, the labelled tree for each iteration 1 to 3 can be condensed as follows:
In the condensed tree, all vertices at a given height in the original tree are represented by a single vertex labelled with either AU or GC according to the nucleotide types appearing at that height in . The numbers placed at uncoloured heights give the parity of the running difference with respect to the current balanced set.
We now show that must equal the arc set corresponding to . Since all nucleotides in occurring at height 4 in remain unpaired in , we may remove them from to obtain the labelled height 3 saturated full binary tree , namely:
The corresponding nucleotide sequence is:
We claim that all nucleotides in occurring at a given height in must pair with one another in . By then considering arcs joining nucleotides in that occur at height 0 to 3 in in that order, and applying the condition of no arc crossings, we obtain the following nested sequence of arcs:
This arc set is exactly the arc set of (because the nucleotides occurring at height 4 in remain unpaired in ). Therefore equals , as required.
It remains to prove the claim. To show that all nucleotides in occurring at height () in must pair with one another in , we modify the previous process involving boxes, colouring, and tags so that the last remaining uncoloured tree height is (rather than 4, as in Figure 13). We illustrate this modified process for the case , using a condensed tree representation for . The argument for other values of is similar.
In Figure 15, box and colour the even heights (having opposite parity to ). The nucleotides occurring at these heights belong to a balanced set , and so they must all pair with one another. Place at uncoloured heights the parity of the running difference with respect to . Nucleotides whose running difference has even parity (opposite to that of the nucleotides at height ) form a new balanced set .
In Figure 15, box and colour the height at which the nucleotides of the new balanced set occur. All nucleotides at coloured heights must pair with one another. The only height remaining uncoloured is , all of whose nucleotides can therefore pair only with one another. The existence of (in which every nucleotide is paired) then shows that the nucleotides at height must all pair with one another. This establishes the claim.
5 Proof of main result (Theorem 3.2)
We shall require two preliminary results. Observation 5.1 states that we cannot “jump over” a height of a labelled tree as it is traversed to produce its corresponding nucleotide sequence. Lemma 5.2 counts the number of nucleotides at a fixed height that occur in a subsequence of the nucleotide sequence corresponding to the natural labelling of a Punsaturated full floral tree. The four cases of Lemma 5.2 are illustrated in Figure 16 using a tree of height , with nucleotides and marked in red in the tree representation (left) and corresponding arc representation (right), and the nucleotides occurring at height between and marked in green.
Observation 5.1.
Let be the nucleotide sequence corresponding to a labelled tree. Then adjacent nucleotides in occur either at the same height or at heights that differ by one.
Lemma 5.2.
Let be the nucleotide sequence corresponding to the natural labelling of a Punsaturated full floral tree of height . Let be a nucleotide at height . Suppose at least one nucleotide following in is at height , and let be the first such nucleotide.
Further suppose the subsequence of starting at and ending at passes through height at least once. Then the total number of nucleotides at height occurring between and in is
Proof.
Consider the path through the tree corresponding to the subsequence of that starts at and ends at .
 Case 1: and .

The path passes through height exactly once in the upward direction and exactly once in the downward direction.
 Case 2: and .

The nucleotides and form a base pair (by definition of ), and the path traverses the entire subtree rooted at the vertex labelled by the base pair .
 Case 3: .

By definition of , the path passes through height exactly once.
 Case 4: .

Consider the subtrees rooted at the vertices at height . Nucleotide occurs in one of these subtrees, say , and in it lies between the two nucleotides labelling the root of . To reach from , the path passes through the second of these two nucleotides and then through both the nucleotides labelling the root of all the subtrees (if any) lying to the right of in the tree before reaching height .
∎
The crucial property which we shall use from Lemma 5.2 is that the nucleotide count is even if and is odd if . Note that we have excluded from Lemma 5.2 the case where and , because the count of the nucleotides at height of the tree is then not determined by the conditions of the lemma.
We now prove Theorem 3.2. Let be a Punsaturated full floral tree of height , and let be the nucleotide sequence corresponding to the natural labelling of . Suppose a maximumsize arc set is applied to the sequence .
Claim 1: All nucleotides in occurring at height in remain unpaired in .
By Claim 1, we may remove the nucleotides at height in to obtain a labelled saturated full binary tree of height . Let be the sequence corresponding to .
Claim 2: For each satisfying , all nucleotides in occurring at height in must pair with one another in .
Apply Claim 2 to successive values of starting from . The case forces the leftmost and rightmost nucleotide of to be paired, giving the outermost arc shown below. Each successive case , together with the condition that there are no arc crossings, forces a further arcs of to take the nested form shown below.
Note that this repeated application of Claim 2 to establishes that admits the unique maximumsize arc set shown above, corresponding to a saturated full binary tree, and so is a design. Furthermore, by Claim 1 this arc set is exactly the arc set . Therefore is a design whose unique maximumsize arc set equals the secondary structure corresponding to . It remains to prove Claims 1 and 2.
Proof of Claim 1..
We use the following algorithm to iteratively tag the nucleotides of the labelled tree . This algorithm is modelled on the examples of Section 4 involving boxes, colouring, and tags. However, instead of indicating successive balanced sets by and using boxes to indicate the current balanced set, we update the current balanced set by replacing it with a set that will be shown to be balanced.
Algorithm 1.
 Input:

Labelled tree and corresponding sequence .
 Step 1.

Initialize the set to be all nucleotides in occurring in at heights whose parity is opposite to that of .
 Step 2.

Colour all nucleotides in .
 Step 3.

If only the nucleotides at height are uncoloured, stop.
 Step 4.

Tag all uncoloured nucleotides by the running difference with respect to .
 Step 5.

Let be the set of all tagged nucleotides whose running difference has opposite parity to that of the leftmost nucleotide at height . Replace by .
 Step 6.

Remove tags (but not the colouring) and go to Step 2.
 Output:

Sequence with some nucleotides coloured.
We shall establish that the following six properties hold for Algorithm 1.
Property 1.
For each set , nucleotides at a given height are either all in , or all not in .
Property 2.
For each set , the nucleotides at height are not coloured at Step 2 (and so, if Step 4 is reached, these nucleotides receive a tag and therefore Step 5 is welldefined).
Property 3.
For each set , the tags (with respect to ) of all nucleotides at a given height share the same parity.
Property 4.
Parity alternates between successive tagged heights.
Property 5.
Each set is balanced.
Property 6.
Elements of each balanced set must all pair with one another in .
Assume Properties 1 to 6 hold, and consider how Algorithm 1 terminates at Step 3. Step 2 colours all nucleotides in set , which by Property 1 comprises all nucleotides at one or more heights. Therefore each application of Step 2 strictly decreases the number of uncoloured heights. This number is bounded below by 1 because, by Property 2, the nucleotides at height are never coloured. Therefore eventually this number is reduced to 1 at Step 2, at which point only the nucleotides at height are uncoloured and Algorithm 1 immediately terminates at Step 3. At this point, all nucleotides at other heights have been coloured (at some iteration of Step 2), and so belong to some balanced set by Property 5; by Property 6 these nucleotides must all pair with one another in . The nucleotides at height all have the same type (A or C) and so cannot pair with one another; therefore they remain unpaired in , establishing Claim 1.
Property 1: The initial set is all nucleotides at tree heights whose parity is opposite to that of .
Property 2: All nucleotides at height lie outside and so are uncoloured.
Properties 3 and 4: From Step 4, the tagged nucleotides are exactly the uncoloured nucleotides and so occur at heights whose parity is the same as that of . Let be an uncoloured nucleotide, and suppose another uncoloured nucleotide follows in . Let be the first such uncoloured nucleotide. We may assume that at least one nucleotide from occurs between and in (otherwise and receive identical tags with respect to ).
Let occur at height and at height . By Property 1 for , all nucleotides at height remain uncoloured at Step 2, and so is the first nucleotide at height following in . Observation 5.1 shows that , and all nucleotides in occurring in the subsequence of starting at and ending at occur at a single height .
The possibilities for are and . By definition of we have (which in fact implies that the case cannot occur). Then by Lemma 5.2, the number of nucleotides in occurring in the subsequence of starting at and ending at is even if and is odd if . Therefore the tags with respect to of all uncoloured nucleotides at a given height share the same parity, and the parity alternates between successive tagged heights.
We now assume Properties 1 to 4 hold for the current set , and show that they hold for the set defined in Step 5.
Property 1: By Properties 2 and 3 for , all nucleotides at height are tagged with respect to and have the same parity. So comprises all tagged nucleotides whose running difference with respect to has opposite parity to that of all the nucleotides at height . Then by Property 3 for , we see that Property 1 holds for .
Property 2: nucleotides at height do not belong to (from Step 5) and so are not coloured (in Step 2).
Properties 3 and 4: We represent the application of Steps 2 and 4 to by the following sequence of “condensed trees”.
Figure 20 represents the tree prior to applying Step 5 to produce ; only the heights containing nucleotides that are tagged with respect to (and which are necessarily uncoloured) are shown. (Previously coloured nucleotides may occur at other heights not shown.) By Property 1 for , all nucleotides at a given such height may be represented by a single vertex. By Property 3 for , each such vertex may be assigned a single parity ( or ), representing the parity of the tag shared by all nucleotides at that height. By Properties 2 and 4 for , the nucleotides at height appear as a tagged vertex in the condensed tree, say with parity , and the parity of vertices at successive tagged heights alternates. The set therefore comprises all nucleotides at heights tagged with parity . These heights are coloured in Figure 20 to indicate that the nucleotides at these heights are coloured when Step 2 is applied to .
Figure 20 shows the parity of the tags assigned to nucleotides when Step 4 is applied to , as we now describe; this establishes Properties 3 and 4 for . The uncoloured nucleotides are tagged in Step 4 by the running difference with respect to . Let be an uncoloured nucleotide, and suppose another uncoloured nucleotide follows in . Let be the first such uncoloured nucleotide. We may assume that at least one nucleotide from occurs between and in (otherwise and receive identical tags with respect to ).
Let occur at height and at height . By Property 1 for , all nucleotides at height remain uncoloured at Step 2, and so is the first nucleotide at height following in . Observation 5.1 shows that and are either the same height or are successive uncoloured heights. In both cases, all nucleotides in occurring in the subsequence of starting at and ending at occur at a single height (see Figure 20).
In order to apply Lemma 5.2, we verify the appropriate conditions on and . By Property 1 for , all nucleotides at height are in (coloured at Step 2 for ) and all nucleotides at heights and are not in (uncoloured). Therefore , and by Property 2 for we have . By Observation 5.1, if then either or .
Then by Lemma 5.2, the number of nucleotides in occurring in the subsequence of starting at and ending at is even if and is odd if . Therefore the tags with respect to of all uncoloured nucleotides at a given height share the same parity, and the parity alternates between successive tagged heights.
Property 5: The initial set comprises all G and C nucleotides if is even, or all A and U nucleotides if is odd, and so is balanced (by definition of the natural labelling).
Property 6: The labelled tree from which the sequence is derived shows that admits an arc set in which only nucleotides of a single type (A if is even, or C if is odd) are unpaired; therefore in the maximumsize arc set all nucleotides from the initial set must pair with one another.
Property 5: The initial application of Step 2 colours either all G and C nucleotides, or all A and U nucleotides. Since colouring is never removed, the set comprises only (a subset of the) A and U nucleotides, or G and C nucleotides, respectively. Furthermore, the set comprises all nucleotides occurring at some subset of heights not including height (see Figure 20). Therefore, from the definition of the natural labelling, the nucleotides at this subset of heights form a new balanced set.
Property 6: The elements of the balanced set must all pair with one another, by Property 6. So each arc joining two nucleotides not in must enclose an equal number of the two nucleotide types in (otherwise the arc will induce a crossing). Therefore nucleotides tagged in Step 4 with the same running difference with respect to can pair only with one another. In particular, nucleotides tagged in Step 4 whose running differences with respect to have the same parity can pair only with one another. It follows that the elements of the set defined in Step 5 (whose tags with respect to all share the same parity) can pair only with one another.
Now the labelled tree from which the sequence is derived shows that admits an arc set in which only nucleotides of a single type (A or C) are unpaired; therefore in the maximumsize arc set all nucleotides of the other three types must be paired. By Property 5 we know that forms a balanced set, and we have shown that its elements can pair only with one another. Therefore the elements of must all pair with one another.
Proof of Claim 2..
Fix satisfying . We shall apply Algorithm 1 to with replaced throughout by . We shall show that Properties 1 to 6 hold for this modified algorithm, again with replaced by . By the same argument as previously, these properties imply that all nucleotides at heights other than must pair with one another in . The nucleotides at height can therefore pair only with one another in , and the existence of (in which every nucleotide is paired) then shows that the nucleotides at height must all pair with one another in , proving Claim 2.
In order to establish that Properties 1 to 6 hold for the modified algorithm, we highlight only the places in which the argument differs from that given previously.
Changes throughout:

Replace by , by , and by .
Changes to the proof that Property 6 holds for the initial set :

The labelled tree from which the sequence is derived shows that admits an arc set in which all nucleotides are paired; therefore in the maximumsize arc set all nucleotides from the initial set (comprising all G and C nucleotides or all A and U nucleotides) must pair with one another.
Changes to the proof that Property 6 holds for :

As previously, the elements of can pair only with one another. The labelled tree from which the sequence is derived shows that admits an arc set in which all nucleotides are paired; therefore in the maximumsize arc set all nucleotides must be paired. Therefore the elements of must all pair with one another.
∎
Claims 1 and 2 have now been established and so the proof of Theorem 3.2 is complete.
6 Open Questions

Theorem 3.2 shows the existence of at least one design for the secondary structure corresponding to a Punsaturated full floral tree . How many such designs are there?

Theorem 2.5 shows that the secondary structures corresponding to rooted unsaturated trees are not designable in general, although Corollary 3.3 shows that those corresponding to a subclass of rooted unsaturated trees are. Is the secondary structure corresponding to a rooted unsaturated binary tree always designable?

Haleš et al. [6] proposed the combinatorial RNA design problem as an idealized version of the RNA design problem, in the expectation that it would produce algorithmic insights applicable to more sophisticated models (see Section 1). As a next step, how would the results of this paper change if, instead of seeking sequences which admit a unique maximumsize arc set, we allowed sequences to admit at most two maximumsize arc sets?
Acknowledgements
Our research was carried out on the unceded Aboriginal territories of the Coast Salish people, including the Musqueam, TsleilWaututh, and Squamish First Nations. Thanks to Ladislav Stacho for introducing us to this problem, to Marni Mishna for detailed comments on the manuscript, and to Stefan Hannie for interesting discussions. We appreciate Yann Ponty’s valuable assistance in giving helpful feedback on our results and methods, providing careful responses to our questions, and suggesting Corollary 3.4 and the comparison in Section 3 between Theorems 2.6 and 3.2.
References
 [1] R. AguirreHernández, H.H. Hoos, and A. Condon. Computational RNA secondary structure design: empirical complexity and improved methods. BMC Bioinformatics, 8(1):34, 2007.
 [2] É. Bonnet, P. Rzążewski, and F. Sikora. Designing RNA secondary structures is hard. 2017. arXiv:1710.1151.
 [3] A. Busch and R. Backofen. InfoRNA–a fast approach to inverse RNA folding. Bioinformatics, 22(15):1823–1831, 2006.
 [4] A. EsmailiTaheri, M. Ganjtabesh, and M. MohammadNoori. Evolutionary solution for the RNA design problem. Bioinformatics, 30(9):1250–1258, 2014.
 [5] J.A. GarciaMartin, P. Clote, and I. Dotu. RNAiFold: A constraint programming algorithm for RNA inverse folding and molecular design. Journal of Bioinformatics and Computational Biology, 11:1350001, 2013.
 [6] J. Haleš, A. Héliou, J. Maňuch, Y. Ponty, and L. Stacho. Combinatorial RNA Design: Designability and structureapproximating algorithm in WatsonCrick and NussinovJacobson energy models. Algorithmica, 79(3):835–856, 2017.
 [7] R.B. Lyngsø, J.W.J. Anderson, E. Sizikova, Am. Badugu, T. Hyland, and J. Hein. FRNAkenstein: multiple target inverse RNA folding. BMC Bioinformatics, 13(1):260, 2012.
 [8] D.H. Mathews, J. Sabina, M. Zuker, and D.H. Turner. Expanded sequence dependence of thermodynamic parameters improves prediction of RNA secondary structure. Journal of Molecular Biology, 288(5):911–940, 1999.
 [9] M.E. Nebel, A. Scheid, and F. Weinberg. Random generation of RNA secondary structures according to native distributions. Algorithms for Molecular Biology, 6:24, 2011. Available online: https://almob.biomedcentral.com/articles/10.1186/17487188624.
 [10] R. Nussinov and A.B. Jacobson. Fast algorithm for predicting the secondary structure of singlestranded RNA. Proc. National Academy of Sciences, 77(11):6309–6313, 1980.
 [11] T.J. Petrie. The combinatorial RNA design problem for binary trees. Master’s thesis, Simon Fraser University, 2017. Available online: http://summit.sfu.ca/item/17222.
 [12] Y. Ponty. Personal communication, August 2016.
 [13] M. SchnallLevin, L. Chindelevitch, and B. Berger. Inverting the Viterbi algorithm: an abstract framework for structure design. In Proceedings of the 25th International Conference on Machine Learning, pages 904–911. ACM, 2008.
 [14] A. Taneda. MODENA: a multiobjective RNA inverse folding. Advances and Applications in Bioinformatics and Chemistry, 4:1–12, 2011.
 [15] J.N. Zadeh, B.R. Wolfe, and N.A. Pierce. Nucleic acid sequence design via efficient ensemble defect optimization. Journal of Computational Chemistry, 32(3):439–452, 2011.
 [16] M. Zuker and P. Stiegler. Optimal computer folding of large RNA sequences using thermodynamics and auxiliary information. Nucleic Acids Research, 9(1):133–148, 1981.