Random generation of colored trees

  • L. Alonso
  • R. Schott
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 911)


We present a linear time algorithm which generates uniformly a colored tree. This algorithm has numerous applications in image synthesis of plants and trees and in statistical complexity analysis. We use a one-to-one correspondence between colored trees and sequences which are then uniformly generated in linear time.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    L. Alonso, J.L. Rémy, R. Schott, A linear time algorithm for the generation of trees, Rapport CRIN 90-R-001 (submitted).Google Scholar
  2. 2.
    T. Beyer, S.M. Hedetniemi, Constant time generation of rooted trees, SIAM J. Comp. 9, 706–712, 1980.CrossRefGoogle Scholar
  3. 3.
    E.A. Dinits, M.A. Zaitsev, Algorithms for the generation of nonisomorphic trees, Autom. Remote Control, 38, 554–558, 1977Google Scholar
  4. 4.
    M.C. Er, Enumeration Ordered Trees Lexicographically, The Computer Journal, 28, 5, 538–542, 1985.CrossRefGoogle Scholar
  5. 5.
    P. Flajolet, P. Zimmermann, B.V. Cutsem, A calculus for the Random Generation of Combinatorial Structures, TCS, 29 pages, to appear. Also available as Inria Research Report 1830 (anonymous ftp on dir IN-RIA/ publication/RR file Scholar
  6. 6.
    D.E. Knuth, The Art of Computer Programming, vol 1, Fundamental Algorithms, Addison Wesley, 1973.Google Scholar
  7. 7.
    A.V. Kozima, Coding and generation of nonisomorphic trees, Cybernetics, 15, 645–651, 1975.Google Scholar
  8. 8.
    C.L. Liu, Generation of k-ary trees, Rapport INRIA, 27, 1980, Proceedings CAAP'80, 45–53, Université de Lille.Google Scholar
  9. 9.
    A. Meir, J.W. Moon, On the altitude of nodes in random trees, Canad. J. of Math. 30, 997–1015, 1978.Google Scholar
  10. 10.
    A. Nijenhuis, H.S. Wilf, Combinatorial Algorithms, second edition, Academic Press, N.Y., 1978.Google Scholar
  11. 11.
    R.C. Read, How to grow trees, in Combinatorial structures and Their Applications, Gordon and Breach, New-York, 1970.Google Scholar
  12. 12.
    J.L. Rémy, Un procédé itératif de dénombrement d'arbres et son application à leur génération aléatoire, RAIRO, Informatique Théorique, 19, 2, 179–195, 1985.Google Scholar
  13. 13.
    H.S. Wilf, Combinatorial Algorithms: An Update, CBMS-NSF Regional Conference Series in Applied Mathematics, SIAM Pub.1989.Google Scholar
  14. 14.
    H.S. Wilf, N.A. Yoshimura, Ranking rooted trees and a graceful application, Proc. Japon-US joint Seminar in Discrete Algorithms and Complexity, June 4–6, kyoto Japan, Academic Press, 341–350, 1986.Google Scholar
  15. 15.
    R.A. Wright, B.R. Richmond, A. Odlyzko, B.D. McKay, Constant time generation of freetreees, SIAM J. Comput. 15, 540–548, 1986.Google Scholar
  16. 16.
    N.A. Yoshimura, Ranking and unranking algorithms for trees and the combinatorial objects, PhD. thesis University of Pennsylvania, 1987.Google Scholar
  17. 17.
    S. Zaks, Lexicographic generation of ordered trees, T.C.S., 10, 63–82, 1980.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • L. Alonso
    • 1
  • R. Schott
    • 2
  1. 1.CRIN, INRIA-LorraineUniversité de Nancy 1Vandoeuvre-lès-NancyFrance
  2. 2.CRIN, INRIA-LorraineUniversité de Nancy 1Vandoeuvre-lès-NancyFrance

Personalised recommendations