Dyck Word Generator

Dyck word generator is a utility that lexicographically generate a sequence of Dyck words for specific lengthn. The algorithm used was designed by Kostas Manes and me.

Catalan Number & Dyck Words

Source: wikipedia - Catalan number

There are many counting problems in combinatorics whose solution is given by the Catalan numbers. The book Enumerative Combinatorics: Volume 2 by combinatorialist Richard P. Stanley contains a set of exercises which describe 66 different interpretations of the Catalan numbers. Following are some examples, with illustrations of the case C3 = 5.

XXXYYY     XYXXYY     XYXYXY     XXYYXY     XXYXYY.
((()))     ()(())     ()()()     (())()     (()())

Download & Usage

Here you can download binaries for: Its usage is rather simple:
nsp <length>
For the output a binary format is used and the result are stored in file output.result. The source code is not available. Be advised that this implementation uses double for the calculation of the Catalan number. Consequently, this will not work accurately when the length exceeds the data type's capacity. This will be fixed in future releases.