Abstract
In this paper, we give a simple algorithm to generate all ordered trees with exactly n vertices including exactly k leaves. The best known algorithm generates such trees in O(nāāāk) time for each, while our algorithm generates such trees in O(1) time for each in worst case.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Avis, D., Fukuda, K.: Reverse search for enumeration. Discrete Appl. Math.Ā 65(1-3), 21ā46 (1996)
Beyer, T., Hedetniemi, S.M.: Constant time generation of rooted trees. SIAM J. Comput.Ā 9(4), 706ā712 (1980)
Fenner, T.I., Loizou, G.: A binary tree representation and related algorithms for generating integer partitions. The Computer J.Ā 23(4), 332ā337 (1980)
Goldberg, L.: Efficient algorithms for listing combinatorial structures. Cambridge University Press, New York (1993)
Kikuchi, Y., Tanaka, H., Nakano, S., Shibata, Y.: How to obtain the complete list of caterpillars. In: Warnow, T.J., Zhu, B. (eds.) COCOON 2003. LNCS, vol.Ā 2697, pp. 329ā338. Springer, Heidelberg (2003)
Knuth, D.: The art of computer programming. Generating all tuples and permutations, vol.Ā 4, fascicle 2. Addison-Wesley, Reading (2005)
Knuth, D.E.: The art of computer programming. Generating all trees, history of combinatorial generation, vol.Ā 4, fascicle 4. Addison-Wesley, Reading (2006)
Korsh, J.F., LaFollette, P.: Multiset permutations and loopless generation of ordered trees with specified degree sequence. Journal of AlgorithmsĀ 34(2), 309ā336 (2000)
Korsh, J.F., LaFollette, P.: Loopless generation of trees with specified degrees. The Computer JournalĀ 45(3), 364ā372 (2002)
Kreher, D.L., Stinson, D.R.: Combinatorial algorithms. CRC Press, Boca Raton (1998)
Li, G., Ruskey, F.: The advantages of forward thinking in generating rooted and free trees. In: Proc. 10th Annual ACM-SIAM Symp. on Discrete Algorithms (SODA 1999), pp. 939ā940 (1999)
Li, Z., Nakano, S.: Efficient generation of plane triangulations without repetitions. In: Orejas, F., Spirakis, P.G., van Leeuwen, J. (eds.) ICALP 2001. LNCS, vol.Ā 2076, pp. 433ā443. Springer, Heidelberg (2001)
McKay, B.D.: Isomorph-free exhaustive generation. J. AlgorithmsĀ 26(2), 306ā324 (1998)
Muramatsu, T., Nakano, S.: A random generation of plane trees with exactly k leaves. IEICE Transaction on FundamentalsĀ J90-A(12), 940ā947 (2007) (in Japanese)
Nakano, S.: Efficient generation of plane trees. Inf. Process. Lett.Ā 84(3), 167ā172 (2002)
Nakano, S.: Efficient generation of triconnected plane triangulations. Comput. Geom. Theory and Appl.Ā 27(2), 109ā122 (2004)
Nakano, S., Uno, T.: Constant time generation of trees with specified diameter. In: HromkoviÄ, J., Nagl, M., Westfechtel, B. (eds.) WG 2004. LNCS, vol.Ā 3353, pp. 33ā45. Springer, Heidelberg (2004)
Nakano, S., Uno, T.: Generating colored trees. In: Kratsch, D. (ed.) WG 2005. LNCS, vol.Ā 3787, pp. 249ā260. Springer, Heidelberg (2005)
Pallo, J.: Generating trees with n nodes and m leaves. International Journal of Computer MathematicsĀ 21(2), 133ā144 (1987)
Read, R.C.: Every one a winner or how to avoid isomorphism search. Annuals of Discrete MathematicsĀ 2, 107ā120 (1978)
Reingold, E.M., Nievergelt, J., Deo, N.: Combinatorial Algorithms. Prentice-Hall, Englewood Cliffs (1977)
Ruskey, F., van Baronaigien, D.R.: Fast recursive algorithms for generating combinatorial objects. Congressus NumerantiumĀ 41, 53ā62 (1984)
Sawada, J.: Generating rooted and free plane trees. ACM Transactions on AlgorithmsĀ 2(1), 1ā13 (2006)
Stanley, R.P.: Enumerative combinatorics, vol.Ā 2. Cambridge University Press, Cambridge (1999)
Wilf, H.S.: Combinatorial algorithms: An update. SIAM, Philadelphia (1989)
Wright, R.A., Richmond, B., Odlyzko, A., McKay, B.D.: Constant time generation of free trees. SIAM J. Comput.Ā 15(2), 540ā548 (1986)
Yamanaka, K., Kawano, S., Kikuchi, Y., Nakano, S.: Constant time generation of integer partitions. IEICE Trans. FundamentalsĀ E90-A(5), 888ā895 (2007)
Yamanaka, K., Nakano, S.: Listing all plane graphs. In: Nakano, S.-i., Rahman, M. S. (eds.) WALCOM 2008. LNCS, vol.Ā 4921, pp. 210ā221. Springer, Heidelberg (2008)
Zaks, S., Richards, D.: Generating trees and other combinatorial objects lexicographically. SIAM J. Comput.Ā 8(1), 73ā81 (1979)
Zoghbi, A., StojmenoviÄ, I.: Fast algorithms for generating integer partitions. Int. J. Comput. Math.Ā 70, 319ā332 (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
Ā© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Yamanaka, K., Otachi, Y., Nakano, Si. (2009). Efficient Enumeration of Ordered Trees with k Leaves (Extended Abstract). In: Das, S., Uehara, R. (eds) WALCOM: Algorithms and Computation. WALCOM 2009. Lecture Notes in Computer Science, vol 5431. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-00202-1_13
Download citation
DOI: https://doi.org/10.1007/978-3-642-00202-1_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-00201-4
Online ISBN: 978-3-642-00202-1
eBook Packages: Computer ScienceComputer Science (R0)