10. Design PDAs that recognises the following languages. For each automata, briefly explain in 3 sentences or less how your automata works: (a) \{ $a^n b^m a^n$ | $m, n \in \mathbb{N}$ \} (b) \{ $a^n b^m$ | $n \le m \le 2n \land m, n \in \mathbb{N}$ \}
Added by Sean W.
Close
Step 1
The initial state is q0 and the final state is q1. The PDA will push a symbol 'A' onto the stack for each 'a' read in the input string. When the PDA reads a 'b', it will pop a symbol 'A' from the stack for each 'b' read. When the PDA reads an 'a' again, it will Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 63 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
Akash M.
Design a PDA recognizing each of the following languages and draw its state diagram. Note that the transition function must be in the format of "a,b -> c", namely we can only push/pop one symbol into/from the stack one time upon one input symbol. You will receive 0 points if you push/pop multiple symbols into/from the stack one time upon one input symbol. (1) {w | w = a^nb^n, n is odd} (2) {w | w = wR, length of w is odd and ̲ = {a, b}} (3) {w | w = a^nb^2n, n ≥ 1} (4) {w | w = a^rb^mcm, n ≥ 0, m ≥ 1} (5) {w | w = a^2nb^3n, n > 0} (6) {w | w = a^nb^m, n ≥ 1, m ≥ 1 and n ≠ m}
3. Construct NPDA's that accept the following regular languages: (a) L1 = L(aaa* bab). (b) L2 = L(aab* aba*). (c) The union of L1 and L2. (d) L1 - L2. (e) The intersection of L1 and L2.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD