Let L be a language that consists of the set of strings over the alphabet {a, b} generated by the recursive definition I define below:
Recursive definition:
i) Basis: $b \in L $
ii) Recursive Step: if u is in L then $ub \in L, uab \in L, uba \in L$, and $bua \in L$; where u is just some previously (but legal in this particular language) defined string.
iii) Closure: a string v is in L only if it can be obtained from the basis by a finite number of iterations of the Recursive step.
I need to come up with the legal strings of characters from the alphabet {a, b} are allowed in this language which are generated based off the recursive step.
I feel quite stumped when trying to identify these strings. I know my base case will give me a b as my first legal string, but I need to find all possible strings in this language by iterating through the recursive step until I have all acceptable/legal strings.
For instance:
If given some string made up of a's and or b's, how can I trace through the particular language I defined previously and the given string to see if its valid in this language?
Example: is the string bbaaba in this particular language L
I do understand what is being asked and that I must use the recursive step to produce all the legal strings, I just don't know exactly how to go about it in a way that is efficient and accurate. Any help with an explanation is greatly appreciated.