Binary Tree Gray Codes. Proskurowski, A. & Ruskey, F. Journal of Algorithms, 6(2):225--238, June, 1985.
Binary Tree Gray Codes [link]Paper  doi  abstract   bibtex   
In this paper the problem of generating all binary trees, as represented by well-formed parentheses strings, in such a way that the changes in successively generated trees are constant is discussed. In particular, an algorithm is developed that generates the strings by simply interchanging a left and a right parenthesis. It is also proven that it is impossible to generate all trees by interchanging an adjacent left and right (or right and left) parenthesis pair. The Appendix contains a Pascal program that implements the generation algorithm. Also, ranking and unranking algorithms are given.
@article{ Proskurowski1985,
  abstract = {In this paper the problem of generating all binary trees, as represented by well-formed parentheses strings, in such a way that the changes in successively generated trees are constant is discussed. In particular, an algorithm is developed that generates the strings by simply interchanging a left and a right parenthesis. It is also proven that it is impossible to generate all trees by interchanging an adjacent left and right (or right and left) parenthesis pair. The Appendix contains a Pascal program that implements the generation algorithm. Also, ranking and unranking algorithms are given.},
  author = {Proskurowski, Andrzej and Ruskey, Frank},
  doi = {10.1016/0196-6774(85)90040-9},
  file = {:Users/KunihiroWASA/Dropbox/paper/1985/Proskurowski, Ruskey, Binary Tree Gray Codes, 1985.pdf:pdf},
  issn = {01966774},
  journal = {Journal of Algorithms},
  month = {June},
  number = {2},
  pages = {225--238},
  title = {{Binary Tree Gray Codes}},
  url = {http://www.sciencedirect.com/science/article/pii/0196677485900409 http://linkinghub.elsevier.com/retrieve/pii/0196677485900409},
  volume = {6},
  year = {1985}
}

Downloads: 0