In computer science, a string is a finite sequence of characters. For strings $A$ and $B$, we express $AB$ as $A$ followed by $B$. A balanced string of parentheses is a string of open and closed parentheses that is $()$, $ST$ or $(S)T$ where $S$ and $T$ are both balanced strings of parentheses. For example,
() (())() ()()()
are balanced strings of parentheses where as
)( ())( (()
are not.
I am trying to prove by induction that a balanced string of parentheses has the same number of open parentheses as closed parentheses. I started with the base case N(1) being true, since any of $()$, $ST$, $S(T)$ or $(S)T$ has an equal number of left and right parentheses. But I got stumped when thinking of the assumption for $N(k)$ since there are so many possible arrangements. Can anyone help please? Much appreciated!