In this paper, we study the combinatorial set of RNA secondary structures of length $n$ with $m$ base-pairs. For a compact representation, we encode an RNA secondary structure by the corresponding Motzkin word. For this combinatorial set, we construct an AND/OR tree structure, find a bijection between the combinatorial set and the set of variants of the AND/OR tree, and develop algorithms for ranking and unranking the variants of the AND/OR tree. The developed ranking and unranking algorithms have polynomial time complexity $O(m^2 (n - m))$ for $m < n - 2 m$ and $O(m (n - m)^2)$ for $m > n - 2 m$. In contrast to the existing algorithms, the new algorithms do not require preprocessing steps and have better time complexity.
翻译:本文研究了长度为$n$、包含$m$个碱基对的RNA二级结构组合集合。为进行紧凑表示,我们通过对应的Motzkin词对RNA二级结构进行编码。针对该组合集合,我们构建了AND/OR树结构,发现了该组合集合与AND/OR树变体集合之间的双射关系,并开发了用于对AND/OR树变体进行排序与反排序的算法。所提出的排序与反排序算法在$m < n - 2m$时具有多项式时间复杂度$O(m^2 (n - m))$,在$m > n - 2m$时具有$O(m (n - m)^2)$复杂度。与现有算法相比,新算法无需预处理步骤,且时间复杂度更优。