A Note on Generating Well-formed Parenthesis Strings Lexicographically
Open Access
- 1 January 1983
- journal article
- research article
- Published by Oxford University Press (OUP) in The Computer Journal
- Vol. 26 (3) , 205-207
- https://doi.org/10.1093/comjnl/26.3.205
Abstract
An efficient recursive algorithm for generating well-formed parenthesis strings lexicographically is shown. This algorithm can be easily adapted to generate stack-sortable permutations without changing the main control structures of the algorithm. The connection between well-formed parenthesis strings and ordered trees is also illustrated.Keywords
This publication has 0 references indexed in Scilit: