Mark Yourself Question
For S ::= empty string | 0S1, state (i) the base case, (ii) the induction hypothesis, and (iii) the constructor argument for the claim that every generated string has equal numbers of 0s and 1s.
Unlock full course notes by signing up
Structural Induction: difficulty 3
Strings are generated by S ::= empty string | (S) | SS. Prove that every generated string has equally many left and right parentheses.