Skip to main content

Generating binary trees by transpositions

  • Conference paper
  • First Online:

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

Abstract

Let T(n) denote the set of all bitstrings with n 1's and n 0's such that in every prefix the number of 0's does not exceed the number of 1's. This is a well known representation of binary trees. We consider algorithms that generate the elements of T(n) in such way that successive bitstrings differ by the transposition of two bits. The presented algorithms have a constant average time per generated tree.

Partially supported by the Office of Naval research under contract N-00014-860419.

Research supported by the Natural Sciences and Engineering Research Council of Canada under grant A3379.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. J.R. Bitner, G. Ehrlich, and E.M. Reingold. Efficient generation of the binary reflected gray code and its applications. Comm. ACM, 19:517–521, 1976.

    Google Scholar 

  2. M. Buck and D. Wiedemann. Gray codes with restricted density. Discrete Math., 48:163–171, 1984.

    Google Scholar 

  3. P. Eades, M. Hickey, and R.C. Read. Some Hamilton paths and a minimal change algorithm. JACM, 31:19–29, 1984.

    Google Scholar 

  4. J.T. Joichi, D.E. White, and S.G. Williamson. Combinatorial gray codes. SIAM J. Computing, 9:130–141, 1980.

    Google Scholar 

  5. C.C. Lee, D.T. Lee, and C.K. Wong. Generating binary trees of bounded height. Acta Informatica, 23:529–544, 1986.

    Google Scholar 

  6. L. Li. Ranking and unranking of AVL trees. SIAM J. Computing, 15:1025–1035, 1986.

    Google Scholar 

  7. J. Lucas. The Rotation Graph of Binary Trees is Hamiltonian. Technical Report TR-021, Princeton U., 1986.

    Google Scholar 

  8. J. Pallo. Enumerating, ranking, and unranking binary trees. Computer J., 29:171–175, 1986.

    Google Scholar 

  9. A. Proskurowski. On the generation of binary trees. JACM, 27:1–2, 1980.

    Google Scholar 

  10. A. Proskurowski. Research problem 88. Discrete Math., 35:321–322, 1987.

    Google Scholar 

  11. A. Proskurowski and F. Ruskey. Binary tree gray codes. J. Algorithms, 6:225–238, 1985.

    Google Scholar 

  12. E.M. Reingold, J. Nievergelt, and N. Deo. Combinatorial Algorithms: Theory and Practice. Prentice-Hall, 1977.

    Google Scholar 

  13. D. Rotem and Y. Varol. Generation of binary trees from ballot sequences. J.ACM, 25:396–404, 1978.

    Google Scholar 

  14. F. Ruskey. Adjacent interchange generation of combinations. J. Algorithms, to appear.

    Google Scholar 

  15. F. Ruskey and T.C. Hu. Generating binary trees lexicographically. SIAM J. Computing, 6:745–758, 1977.

    Google Scholar 

  16. F. Ruskey and D.J. Miller. Adjacent Interchange Generation of Combinations and Trees. Technical Report DCS-44-IR, U. Victoria, 1984.

    Google Scholar 

  17. F. Ruskey and A. Proskurowski. Generating Binary Trees by Transpositions. Technical Report DCS-44-IR, U. Victoria, 1987.

    Google Scholar 

  18. D. Roelants van Baronaigien and F. Ruskey. A Hamilton path in the rotation lattice of binary trees. Congressus Numerantium, 1987 (to appear).

    Google Scholar 

  19. S. Zaks. Lexicographic generation of ordered trees. Theoretical Computer Science, 10:63–82, 1980.

    Google Scholar 

  20. D. Zerling. Generating binary trees using rotations. JACM, 32:694–701, 1985.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Rolf Karlsson Andrzej Lingas

Rights and permissions

Reprints and permissions

Copyright information

© 1988 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Proskurowski, A., Ruskey, F. (1988). Generating binary trees by transpositions. In: Karlsson, R., Lingas, A. (eds) SWAT 88. SWAT 1988. Lecture Notes in Computer Science, vol 318. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-19487-8_22

Download citation

  • DOI: https://doi.org/10.1007/3-540-19487-8_22

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-19487-3

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics