Counting all possible pairs of parenthesis

209 Views Asked by At

If we want to count how many possible pairs $n$ of parenthesis we have when $n = 1$ then I think the way to count is $2 \choose 1$ since if we have $2$ symbols and we pick $one$ position to place $1$ the other will be at the other position hence total of ${2 \choose 1} = 2$.
But we have:
$()$ and $)($ and $(($ and $))$ total of $4$

For the case of $n = 2$, following the same reasoning i.e. I have $4$ positions for the symbols, I pick any $2$ and use that as the count I get ${4 \choose 2} = 6$ but when I actually enumerate all the cases I count $9$
I.e.

  1. $()()$
  2. $(())$
  3. $))()$
  4. $((()$
  5. $()))$
  6. $())($
  7. $)()($
  8. $(((($
  9. $))))$

I thought the idea is that we have $n + n$ positions and we care about choosing $n$ and get the total count.
E.g. I have seen the same logic when counting lattice paths

What am I messing up here?