Abstract
RNA secondary structures are important in many biological processes since there is a close relationship between structure and function in biology. There is a known bijection between the possible shapes of a single-stranded RNA molecule of fixed length and trees with n nodes and m leaves, \(\mathcal {T}(n, m)\). In this article, we present a sequential algorithm for generating such trees in A-order. The worst case time complexity of the presented algorithm is O(n). We also develop a parallel version of the algorithm which is both cost-optimal and adaptive. We use Exclusive Read Exclusive Write Shared Memory Single Instruction Multiple Data multi-processor architecture. Moreover, the generated trees are in A-order.
Similar content being viewed by others
References
Ahmadi-Adl, A., Ahrabian, H., Nowzari-Dalini, A.: Ranking and unranking algorithms for loopless generation of \(t\)-ary trees. Log. J. IGPL 19, 33–43 (2011)
Ahrabian, H., Nowzari-Dalini, A.: Parallel generation of \(t\)-ary trees in a-order. Comput. J. 50, 581–588 (2007)
Akl, S.G., Gries, D., Stojmenovic, I.: An optimal parallel algorithm for generating combination. Inf. Process. Lett. 33, 135–139 (1990)
Akl, S.G., Meijer, H., Stojmenovic, I.: An optimal systolic algorithm for generating permutations in lexicographic order. J. Parallel Distrib. Comput. 20, 84–91 (1994)
Akl, S.G., Stojmenovic, I.: Generating \(t\)-ary trees in parallel. Nordic J. Comput. 3, 63–71 (1996)
Chen, W.Y.: A general bijective algorithm for trees. PNAS 87, 9635–9639 (1990)
Dershowitz, N., Zaks, S.: Enumerations of ordered trees. Discrete Math. 31, 9–28 (1980)
Effler, S., Ruskey, F.: A CAT algorithm for generating permutations with a fixed number of inversions. Inf. Process. Lett. 86, 107–112 (2003)
Er, M.C.: Efficient generation of \(k\)-ary trees in natural order. Comput. J. 35, 306–308 (1992)
Heubach, S., Li, N., Mansour, T.: Staircase tilings and \(k\)-catalan structures. Discrete Math. 308, 5954–5964 (2008)
Kapralski, A.: New methods for the generation of permutations, combinations and other combinatorial objects in parallel. J. Parallel Distrib. Comput. 17, 315–329 (1992)
Knuth, D.E.: The art of computer programming, volume 4 combinatorial algorithms. Addison-Wesley, Reading (2006)
Korsh, J.F.: A-order generation of \(k\)-ary trees with \(4k-4\) letter alphabet. J. Inf. Optim. Sci. 16, 557–567 (1995)
Kreher, D.L., Stinson, D.R.: Combinatorial Algorithms. CRC Press, New York (1999)
Manes, K., Sapounakis, A., Tasoulas, I., Tsikouras, P.: Recursive generation of \(k\)-ary trees. J. Integer Seq. 12, 1–18 (2009)
Pallo, J.: Generating trees with \(n\) nodes and \(m\) leaves. Int. J. Comput. Math. 21, 133–144 (1987)
Pallo, J.: A simple algorithm for generating neuronal dendritic trees. Comput. Methods Progr. Biomed. 33, 165–169 (1990)
Pallo, J., Racca, R.: A note on generating binary tree in A-order and B-order. Int. J. Comput. Math. 18, 27–39 (1985)
Prodinger, H.: A correspondence between orderd trees and nondecreasing partitions. Discrete Math. 46, 205–206 (1983)
Roelants van Baronaigien, D., Ruskey, F.: Generating \(t\)-ary trees in A-order. Inf. Process. Lett. 27, 205–213 (1988)
Ruskey, F., Hu, T.C.: Generating binary tree lexicographically. SIAM J. Comput. 6, 745–758 (1977)
Ruskey, F., Williams, A.: The coolest way to generate combinations. Discrete Math. 309, 5305–5320 (2006)
Sawada, J.: Generating rooted and free plane trees. ACM Trans. Algorithms 2, 1–13 (2006)
Schmitt, W.R., Waterman, M.S.: Linear trees and RNA secondary structure. Discrete Appl. Math. 51, 317–323 (1994)
Skarbek, W.: Generating ordered trees. Theor. Comput. Sci. 57, 153–159 (1988)
Stojmenovic, I.: Listing combinatorial objects in parallel. Int. J. Parallel Emergent Distrib. Syst. 21, 127–146 (2006)
Tabari, S., Ahrabian, H., Nowzari-Dalini, A.: A new algorithm for generation of different types of RNA with length \(n\). Int. J. Comput. Math. 86, 1197–1207 (2010)
Takaoka, T.: \(O(1)\) time algorithms for combinatorial generation by tree traversal. Comput. J. 42, 400–408 (1999)
Vajnovszki, V., Pallo, J.: Parallel algorithms for listing well-formed parentheses strings. Parallel Process. Lett. 8, 19–28 (1998)
Waterman, M.S.: Introduction to Computational Biology. CRC Press, New York (1995)
Wright, R.A., Richmond, B., Odlyzko, A., McKey, B.D.: Constant time generation of free trees. SIAM J. Comput. 15, 540–548 (1986)
Wu, R., Chang, J., Chang, C.: Ranking and unranking of non-regular trees with a prescribed branching sequence. Math. Comput. Model. 53, 1331–1335 (2011)
Wu, R., Chang, J., Wang, Y.: Loopless generation of non-regular trees with a prescribed branching sequence. Comput. J. 53, 661–666 (2010)
Wu, R., Chang, J., Chen, A., Liu, C.: Ranking and unranking t-ary trees in a Gray-code order. Comput. J. 56, 1388–1395 (2013)
Xiang, L., Ushijima, K., Akl, S.: Generating regular \(k\)-ary trees efficiently. Comput. J. 43, 290–300 (2000)
Zaks, S.: Lexicographic generation of ordered tree. Theor. Comput. Sci. 10, 63–82 (1980)
Zaks, S.: Generation and ranking of \(k\)-ary trees. Inf. Process. Lett. 14, 44–48 (1982)
Zaks, S., Richards, D.: Generating trees and other combinatorial objects lexicographically. SIAM J. Comput. 8, 73–81 (1979)
Zoghbi, A., Stojmenovic, I.: Fast algorithms for generating integer partitions. Int. J. Comput. Math. 70, 319–332 (1998)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Mohammadi, S., Nowzari-Dalini, A. A parallel algorithm for generation of RNA secondary structures with length n and k base-pairs. Iran J Comput Sci 1, 11–17 (2018). https://doi.org/10.1007/s42044-017-0001-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s42044-017-0001-2