How to give the recursive definition of set A consisting of arbitrary nested, properly matched brackets

541 Views Asked by At

Like for example {}[{()}] $ \in$B, but {( $ \notin $ B. We have these brackets available: {}()[].

I dont know how to do this since i cant come up with a base case and the induction case. Most of the times there was something like n, or something with numbers. How to give the recursive definition of this set?

1

There are 1 best solutions below

2
On

You can build any matched string by concatenating two matched strings or by putting a matched set of brackets around a matched string. The base case is the empty string.