Question
G1 is a context-free grammar with start symbol S1, and no other nonterminals whose name begins with S. Similarly, G2 is a contextfree grammar with
G1 is a context-free grammar with start symbol S1, and no other nonterminals whose name begins with "S." Similarly, G2 is a contextfree grammar with start symbol S2, and no other nonterminals whose name begins with "S." S1 and S2 appear on the right side of no productions. Also, no nonterminal appears in both G1 and G2.
We wish to combine the symbols and productions of G1 and G2 to form a new grammar G, whose language is the union of the languages of G1 and G2. The start symbol of G will be S. All productions and symbols of G1 and G2 will be symbols and productions of G. Which of the following sets of productions, added to those of G, is guaranteed to make L(G) be L(G1) [union] L(G2)?
a) S S1 | S3, S3 S2
b) S S1S2, S1 , S2
c) S S1S3, S3 S2
d) S S1, S1 S2, S2
Would you plz explain me? will learn for my knowldge
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started