Catalan number Created 2026-09-24 Updated 2026-10-14
The Catalan number counts Dyck paths with semilength of a Dyck path . For a nonnegative integer ,
The count includes the empty path. Of the paths with three up steps and three down steps, exactly five stay at nonnegative height. Their shapes and balanced parentheses encodings appear below.[ref]
Figure 1.
All five Dyck paths of semilength three and their balanced parentheses encodings
. Original enumeration of six-step up/down paths with nonnegative prefix heights. An up step encodes an opening parenthesis and a down step a closing one. Each panel shows one distinct string; no path shape or illustration is copied from a source. Details.
The useful connection is a shared decomposition. A Dyck path splits uniquely at its first-return decomposition of a Dyck path; a binary tree splits at its root into left and right subtrees; a binary parenthesization splits at its last operation. Each removes one outer unit and leaves an ordered pair of smaller objects. The resulting Catalan recurrence lets one count several different structures with the same calculation. A count of five does not mean the structures are physically identical: a bijection supplies the precise translation between them.
Dyck path Created 2026-09-24 Updated 2026-10-14
A Dyck path starts at , ends at , uses steps and , and never passes below the horizontal axis. Its semilength of a Dyck path is : there are up steps and down steps. The nonnegative height records a constraint throughout the journey, not just the endpoint. The Catalan number counts the Dyck paths of this size.
A nonempty Dyck path starts with . At its first later return to height zero, cut after the matching . The segment between these two steps stays at height at least one; translating it down one level gives a Dyck path . The remaining suffix is another Dyck path . This gives the unique form .
If the original semilength of a Dyck path is and that of is , then has semilength of a Dyck path . The first return occurs after steps. For the illustrated path UUUDDDUD, , is UUDD, is UD, and the first return occurs after six steps.
Figure 1.
First return decomposes a Dyck path and explains the Catalan recurrence
. Original chosen path of semilength four. Purple steps enclose a blue two-pair path; the orange suffix has one pair. The bar chart independently counts all paths of semilength four by the inside semilength : the four groups have sizes , totaling . The highlighted group contains the displayed path. Details.
Semilength of a Dyck path 2026-10-14
Half the number of steps in a Dyck path. A Dyck path with semilength of a Dyck path has steps and up/down pairs; the empty Dyck path has .