Number of ways to correctly arrange brackets

I thought a little about this problem:

How many ways correctly * arranges the brackets 2 * n.
* A correctly selected sequence of brackets has an equal number of open and closed parentheses at its end and a greater or equal number of open parentheses than closed throughout the sequence.

For example, for n=3 there are 5 ways: ((())), ()(()), ()()(), (())(), (()()) .

I was thinking of representing nested brackets as trees, but didn't get far.

+6
source share
1 answer

Your example is equivalent to the number of Dyck words , which can be calculated using combinatorics and will be equal to the Catalan number :

enter image description here

+7
source

All Articles