Skip to main content

Efficient Enumeration of Ordered Trees with k Leaves (Extended Abstract)

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5431))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Avis, D., Fukuda, K.: Reverse search for enumeration. Discrete Appl. Math. 65(1-3), 21–46 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  2. Beyer, T., Hedetniemi, S.M.: Constant time generation of rooted trees. SIAM J. Comput. 9(4), 706–712 (1980)

    Article  MathSciNet  MATH  Google Scholar 

  3. Fenner, T.I., Loizou, G.: A binary tree representation and related algorithms for generating integer partitions. The Computer J. 23(4), 332–337 (1980)

    Article  MathSciNet  MATH  Google Scholar 

  4. Goldberg, L.: Efficient algorithms for listing combinatorial structures. Cambridge University Press, New York (1993)

    Book  MATH  Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. Knuth, D.: The art of computer programming. Generating all tuples and permutations, vol. 4, fascicle 2. Addison-Wesley, Reading (2005)

    MATH  Google Scholar 

  7. Knuth, D.E.: The art of computer programming. Generating all trees, history of combinatorial generation, vol. 4, fascicle 4. Addison-Wesley, Reading (2006)

    Google Scholar 

  8. 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)

    Article  MathSciNet  MATH  Google Scholar 

  9. Korsh, J.F., LaFollette, P.: Loopless generation of trees with specified degrees. The Computer Journal 45(3), 364–372 (2002)

    Article  MATH  Google Scholar 

  10. Kreher, D.L., Stinson, D.R.: Combinatorial algorithms. CRC Press, Boca Raton (1998)

    MATH  Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Chapter  Google Scholar 

  13. McKay, B.D.: Isomorph-free exhaustive generation. J. Algorithms 26(2), 306–324 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  14. 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)

    Google Scholar 

  15. Nakano, S.: Efficient generation of plane trees. Inf. Process. Lett. 84(3), 167–172 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  16. Nakano, S.: Efficient generation of triconnected plane triangulations. Comput. Geom. Theory and Appl. 27(2), 109–122 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  17. 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)

    Chapter  Google Scholar 

  18. Nakano, S., Uno, T.: Generating colored trees. In: Kratsch, D. (ed.) WG 2005. LNCS, vol. 3787, pp. 249–260. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  19. Pallo, J.: Generating trees with n nodes and m leaves. International Journal of Computer Mathematics 21(2), 133–144 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  20. Read, R.C.: Every one a winner or how to avoid isomorphism search. Annuals of Discrete Mathematics 2, 107–120 (1978)

    Article  MATH  Google Scholar 

  21. Reingold, E.M., Nievergelt, J., Deo, N.: Combinatorial Algorithms. Prentice-Hall, Englewood Cliffs (1977)

    MATH  Google Scholar 

  22. Ruskey, F., van Baronaigien, D.R.: Fast recursive algorithms for generating combinatorial objects. Congressus Numerantium 41, 53–62 (1984)

    MathSciNet  MATH  Google Scholar 

  23. Sawada, J.: Generating rooted and free plane trees. ACM Transactions on Algorithms 2(1), 1–13 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  24. Stanley, R.P.: Enumerative combinatorics, vol. 2. Cambridge University Press, Cambridge (1999)

    Book  MATH  Google Scholar 

  25. Wilf, H.S.: Combinatorial algorithms: An update. SIAM, Philadelphia (1989)

    Book  MATH  Google Scholar 

  26. Wright, R.A., Richmond, B., Odlyzko, A., McKay, B.D.: Constant time generation of free trees. SIAM J. Comput. 15(2), 540–548 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  27. Yamanaka, K., Kawano, S., Kikuchi, Y., Nakano, S.: Constant time generation of integer partitions. IEICE Trans. Fundamentals E90-A(5), 888–895 (2007)

    Article  Google Scholar 

  28. 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)

    Chapter  Google Scholar 

  29. Zaks, S., Richards, D.: Generating trees and other combinatorial objects lexicographically. SIAM J. Comput. 8(1), 73–81 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  30. Zoghbi, A., Stojmenović, I.: Fast algorithms for generating integer partitions. Int. J. Comput. Math. 70, 319–332 (1998)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics