Question: Let L be the language over the alphabet { a , b } that consists of strings that have equal many a ' s and

Let L be the language over the alphabet {a,b} that consists of strings that have equal many a's and b's. Consider a grammar for L with one rule:
S|ba|bSa|aSb|SS
(a) The string aababbba can be derived from S in 5 steps. Show these steps.
S
(b) Which of the following languages are regular (list all that are):
La**b**,La**b**,L*a**b**,L**
(c) Is L countable? (Answer with: Yes or No.)
(d) Modify the grammar for L to write a grammar for the language over {a,b,c,d} that consists of all strings which the total number of a's and b's is equal to the total number of c's and d's.
Let L be the language over the alphabet { a , b }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!