Generation of Well-Formed Parenthesis Strings in Constant Worst-Case Time. Walsh, T. R. Journal of Algorithms, 29(1):165--173, October, 1998.
Generation of Well-Formed Parenthesis Strings in Constant Worst-Case Time [link]Paper  doi  abstract   bibtex   
Proskurowski and Ruskey (J. Algorithms11(1990), 68–84) published a recursive algorithm for generating well-formed parenthesis strings of length 2nand challenged the reader to find a loop-free version of their algorithm. We present two nonrecursive versions of their algorithm, one of which generates each string inO(n) worst-case time and requires space for onlyO(1) extra integer variables, and the other generates each string inO(1) worst-case time and usesO(n) extra space.
@article{ Walsh1998,
  abstract = {Proskurowski and Ruskey (J. Algorithms11(1990), 68–84) published a recursive algorithm for generating well-formed parenthesis strings of length 2nand challenged the reader to find a loop-free version of their algorithm. We present two nonrecursive versions of their algorithm, one of which generates each string inO(n) worst-case time and requires space for onlyO(1) extra integer variables, and the other generates each string inO(1) worst-case time and usesO(n) extra space.},
  author = {Walsh, Timothy R.},
  doi = {10.1006/jagm.1998.0960},
  file = {:Users/KunihiroWASA/Dropbox/paper/1998/Walsh, Generation of Well-Formed Parenthesis Strings in Constant Worst-Case Time, 1998.pdf:pdf},
  issn = {01966774},
  journal = {Journal of Algorithms},
  month = {October},
  number = {1},
  pages = {165--173},
  title = {{Generation of Well-Formed Parenthesis Strings in Constant Worst-Case Time}},
  url = {http://www.sciencedirect.com/science/article/pii/S0196677498909609 http://linkinghub.elsevier.com/retrieve/pii/S0196677498909609},
  volume = {29},
  year = {1998}
}

Downloads: 0