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 856: 5

Answer

a) Showing that 10101 belongs to the language generated by G. b) Showing that 10110 does not belong to the language generated by G. c) showing what the language generated by G

Work Step by Step

--Let G = (V, T, S, P) be the phrase-structure grammar with V = {0, 1,A,B, S}, T = {0, 1}, and set of productions P consisting of S → 0A, S → 1A, A → 0B, B → 1A, B → 1. a) S ⇒1A⇒10B ⇒101A⇒1010B ⇒10101 b) Because of the productions in this grammar, every 1 must be followed by a 0 unless it occurs at the end of the string. c) All strings consisting of a 0 or a 1 followed by one or more repetitions of 01
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.