Skip to main content

Constant Time Generation of Trees with Specified Diameter

  • Conference paper
Graph-Theoretic Concepts in Computer Science (WG 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3353))

Included in the following conference series:

Abstract

Many algorithms to generate all trees with n vertices without repetition are already known. The best algorithm runs in time proportional to the number of trees. However, the time needed to generate each tree may not be bounded by a constant, even though it is “on average”. In this paper we give a simple algorithm to generate all trees with exactly n vertices and diameter d, without repetition. Our algorithm generates each tree in constant time. It also generates all trees so that each tree can be obtained from the preceding tree by at most three operations. Each operation consists of a deletion of a vertex and an addition of a vertex. By using the algorithm for each diameter 2,3, ⋯ , n − 1, we can generate all trees with n vertices.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A.V., Ullman, J.D.: Foundations of Computer Science. Computer Science Press, New York (1995)

    Google Scholar 

  2. Beyer, T., Hedetniemi, S.M.: Constant Time Generation of Rooted Trees. SIAM J. Comput. 9, 706–712 (1980)

    Article  MATH  MathSciNet  Google Scholar 

  3. Goldberg, L.A.: Efficient Algorithms for Listing Combinatorial Structures. Cambridge University Press, New York (1993)

    Book  MATH  Google Scholar 

  4. Joichi, J.T., White, D.E., Williamson, S.G.: Combinatorial Gray Codes. SIAM J. Comput. 9, 130–141 (1980)

    Article  MATH  MathSciNet  Google Scholar 

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

    Google Scholar 

  6. Li, Z., Nakano, S.-i.: 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 

  7. Li, G., Ruskey, F.: The Advantage of Forward Thinking in Generating Rooted and Free Trees. In: Proc. 10th Annual ACM-SIAM Symp. on Discrete Algorithms, pp. 939–940 (1999)

    Google Scholar 

  8. McKay, B.D.: Isomorph-free Exhaustive Generation. J. of Algorithms 26, 306–324 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  9. Nakano, S.: Efficient Generation of Plane Trees. Information Processing Letters 84, 167–172 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  10. Read, R.C.: How to Avoid Isomorphism Search When Cataloguing Combinatorial Configurations. Annals of Discrete Mathematics 2, 107–120 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  11. Rosen, K.H. (ed.): Handbook of Discrete and Combinatorial Mathematics. CRC Press, Boca Raton (2000)

    MATH  Google Scholar 

  12. Savage, C.: A Survey of Combinatorial Gray Codes. SIAM Review 39, 605–629 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  13. West, D.B.: Introduction to Graph Theory, 2nd edn. Prentice-Hall, NJ (2001)

    Google Scholar 

  14. Wilf, H.S.: Combinatorial Algorithms: An Update. SIAM, Philadelphia (1989)

    Google Scholar 

  15. Wright, R.A., Richmond, B., Odlyzko, A., McKay, B.D.: Constant Time Generation of Free Trees. SIAM J. Comput. 15, 540–548 (1986)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nakano, Si., Uno, T. (2004). Constant Time Generation of Trees with Specified Diameter. In: Hromkovič, J., Nagl, M., Westfechtel, B. (eds) Graph-Theoretic Concepts in Computer Science. WG 2004. Lecture Notes in Computer Science, vol 3353. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30559-0_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30559-0_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-24132-4

  • Online ISBN: 978-3-540-30559-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics