Question: Suppose = { a , b } and you have two given grammars, G 1 and G 2 : G 1 has productions S aas

Suppose ={a,b} and you have two given grammars, G 1 and G 2 :
G1 has productions S aas |bbS|, where S is the start symbol.
G2 has productions T abT || baT ||, where T is the start symbol.
You can combine G1 and G2 into a new grammar that contains all the productions that are either in G1 or G1 and adding a new start symbol R and the productions R S|T|.
Which of the following strings can G generate?
bbab
abaa
abbb
Suppose = { a , b } and you have two given

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!