Question: Given: S -> a S b | epsilon L(G) = { a^n b^n | n >= 0 } S => a S b => a

Given: S -> a S b | epsilon L(G) = { a^n b^n | n >= 0 }

S => a S b => a a S b b => a a a S b b b => a a a b b b

Q1. L(G) = { a^n c b^n | n >= 1 }

a. Describe the language in English without referring to n. Also state the shortest string(s). **

b. Change the above grammar to generate this language. (a very minor change) **

Q2. L(G) = { a^n b^n c a^m b^m | n >=0 m>=0}

a. Describe the language in English without referring to n. Also state the shortest string(s).**

b. Change the grammar to generate this language. (This is NOT S -> a S b a S b ) **

Q3. What is L(G)of the following grammar?

Give a set former description as done above. **

S -> a B b HINT:At least how many bs???

B -> b B

B -> 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 Databases Questions!