Reputation: 37
This is a general logic question, common to most introductory language and machines courses. However I've searched the internet and the forums for any help on this, but I cant seem to find a topic that details what the successive sets will contain. Here is an example question: (I have many HW problems like this, I just don't know where to start)
Let L be the language over {a,b} generated by the following recursive definition basis: λ ∈ L recursive step: If w ∈ L then awbb is in L. closure: A string w ∈ L only if it can be obtained from the basis set by a finite number of applications of the recursive step. Part a. Give the sets L1; L2; and L3 generated by the recursive definition. Note that L0 = λ
I get that The alphabet is {a,b}, Lo = the empty string, and if a string w is contained in L, then awbb is in L. But what does that mean for the next couple sets?
I think L1 = {λ ,awbb} and then L2={λ , awbb, aawbbwbb}?
Any help you could offer on this would be appreciated.
Upvotes: 3
Views: 483
Reputation: 372724
I think that you're misinterpreting what the rule
If w ∈ L, then awbb ∈ L
means. This doesn't mean that the literal string "awbb" is in L. Instead, it means that if you have some string w ∈ L, you can substitute that string w into the string awbb and that resulting string will be in L. For example, if ab ∈ L, then aabbb ∈ L as well.
Using this, try constructing the sets L1 and L2 again. I think that you'll spot an immediate pattern once you've built up the first few sets.
Hope this helps!
Upvotes: 5