TOPICS
Search

Dyck Word


A Dyck word of semilength n is a string containing n opening and n closing parentheses such that every initial segment contains at least as many opening as closing parentheses. Thus (()()) is a Dyck word, whereas ())(() is not. Equivalently, a Dyck word is a string in the Dyck language over a single pair of symbols. This formal language is generated by a context-free grammar.

Replacing each opening parenthesis by an up-step and each closing parenthesis by a down-step gives a Dyck path. Consequently, the number of Dyck words of semilength n is the Catalan number

 C_n=1/(n+1)(2n; n).

See also

Catalan Number, Context-Free Grammar, Dyck Language, Dyck Path

Explore with Wolfram|Alpha

References

Stanley, R. P. Enumerative Combinatorics, Vol. 2. Cambridge, England: Cambridge University Press, 1999.

Cite this as:

Weisstein, Eric W. "Dyck Word." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/DyckWord.html

Subject classifications