Discrete Mathematics and Its Applications, Seventh Edition

Published by McGraw-Hill Education
ISBN 10: 0073383090
ISBN 13: 978-0-07338-309-5

Chapter 13 - Section 13.1 - Languages and Grammers - Exercises - Page 857: 21

Answer

Let G1 and G2 be context-free grammars, generating the languages L(G1) and L(G2), respectively. Showing that there is a context-free grammar generating each of these sets. a) L(G1) ∪ L(G2) b) L(G1)L(G2) c) L(G1)*

Work Step by Step

Let S1 and S2 be the start symbols of G1 and G2, respectively. Let S be a new start symbol. a) Add S and productions S → S1 and S → S2. b) Add S and production S → S1 S2. c) Add S and production S → λ and S → S1S.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.