The Prague Stringology Conference 2002

Kirke Bent

A Recursive Function for Calculating the Number of Legal Strings of Parentheses and for Calculating Catalan Numbers

Abstract:
This paper discusses the number of legal strings of $n$ pairs of parentheses as well as a structure of the set of these strings. As the number of such strings is known to be the Catalan number, a structure of Catalan numbers is thereby developed. A recursive function is developed that counts the set and calculates the Catalan number. The function uses two parameters and is thus a generalization of Catalan numbers.

Download article: Article in PostScript Article in PDF
 PostScript   PDF