Recursive definition of Balanced Parentheses

Language of Balanced Parentheses

  • Base Case: The empty string ε is in the language LLL.
  • Recursive Step:
    • If xxx is in LLL, then (x) is in LLL.
    • If xxx and yyy are in LLL, then xyxyxy is in LLL.
  • Closure: A string is in LLL if and only if it can be derived from the base case using a finite number of applications of the recursive step.