Counting Proper Parenthesizations (Catalan Numbers)

Combinatorics · Medium · Free problem
A *proper parenthesization* of length
n$ is a string of $n$ left parentheses and $n$ right parentheses such that at every prefix, the number of right parentheses never exceeds the number of left parentheses. For example, with $n = 3$: the strings $()()()$, $((()))$, and $()(())$ are valid, while $())(()$ and $(((())$ are not. How many proper parenthesizations of length n$ are there? Compute the answer for $n = 6$.

Open the full interactive solver, hints, and worked solution →