Problem #6: Using the algorithm discussed in class, demonstrate equivalent PDA's for the following CFG's: a) The grammar given in Problem 2.13, p156 of the text. b) The grammar given in Problem 2.14, p156 of the text.
Added by Kristin M.
Close
Step 1
13, p156 of the text is: S -> aSb | ε To create an equivalent PDA, we can follow the algorithm discussed in class: Show more…
Show all steps
Your feedback will help us improve your experience
Rosemary Charnley and 82 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
a) Show that the grammar $G_{1}$ given in Example 6 generates the set $\left\{0^{m} 1^{n} | m, n=0,1,2, \ldots\right\} .$ b) Show that the grammar $G_{2}$ in Example 6 generates the same set.
Modeling Computation
Languages and Grammars
Problem 5. (20 points) A regular grammar is a grammar G = (V,T,S,P) in which production rules are of the form A → a or A → aB, where a ∈ T and A, B ∈ V. The rule S → λ is allowed, where S is the start variable. Regular grammars generate regular languages. Give a regular grammar for the following regular languages: L1 = L(a*b* + (a + b)(a + b)) L2 = {w ∈ {a, b}* : |w| = 3k, for some k ≥ 0}
Madhur L.
4. (15) Using the state-powerset procedure demonstrated in class and in the textbook, convert this NFA to a DFA. q1 a, b q2 a, b, c q3 a, b c, d, ε a, c, d, ε 5. (10) Reduce the DFA resulting from problem 3.
Sri K.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD