L=a^n*b^n|n>=0 The PDA has to be deterministic and it has the capability of look- ahead one step. As to the programming languages, you can use your discretion, C++, Python, Java or others.
Added by Juan Carlos G.
Step 1
To design a deterministic pushdown automaton (PDA) that recognizes the language \( L = a^n b^n | n \geq 0 \) with one-step lookahead capability, we can follow these steps: Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 69 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
This semester project entails the design and implementation of a push-down automata which can recognize the context-free language L={ anbn | n ≥ 0}. (2) The PDA has to be deterministic and it has the capability of look-ahead one step. As to the programming languages, you can use your discretion, C++, Python, Java or others. (3) You will use the following eight sets of strings as inputs: a2b2$, a3b3$, a4b4$, a5b5$, a7b7$, a8b8$, a9b9$, a10b10$.
Akash M.
Exercise 4 PDAs with Finite Stack (10 credits) In a pushdown automaton, there is no limit on the size of the stack. In this exercise, we demonstrate that this is essential, as PDAs with bounded stack size only accept regular languages. This is made formal in the following definition. Definition. Let P = (Q, Σ, Γ, δ, q0, Z0, F) be a PDA and let w ∈ Σ* be a string. For a given natural number n ∈ ℕ, we say that P accepts w with stack bound n if there is a sequence (p0, w0, γ0), . . . , (pk, wk, γk) of IDs such that: (B1) every transition is legal, i.e. (pi, wi, γi) ⊢P (pi+1, wi+1, γi+1) for all 0 ≤ i < k; (B2) The stack never contains more than n symbols, i.e. |γi| ≤ n for all 0 ≤ i ≤ k (B3) The sequence starts with the initial ID, i.e. p0 = q0, w0 = w, and γ0 = Z0 (B4) The string is accepted by final state, i.e. wk = ε, qk ∈ F. For n ∈ ℕ, we write Bn(P) = {w ∈ Σ* | P accepts w with stack bound n} and say that a language L is a bounded stack language if there is a PDA P and n ∈ ℕ such that L = Bn(P). It is easy to see (and you don't need to prove that) that every language accepted by a DFA is also accepted with stack bound 1: from the DFA for the language, we construct a PDA that never modifies the stack. The converse is more interesting, and the subject of this exercise: show that every bounded stack language is regular.
Sri K.
Design a pushdown automaton which accept strings of the form 1*0n1n and one which accepts strings which contain twice as many zeros as ones. Can pushdown automata accept sets of strings of the form: a) 0n1*[(0 + 11)*(1 + 00)*]*0*1n b) ww where w is a string of zeros and ones c) ww where w is a string of zeros Prove that acceptance by empty stack is equivalent to accepting by final state for pushdown automata. Provide pushdown machines that accept sets of strings composed of zeros and ones which are: a) of the form 1n 0n or 1n 02n. b) not of the form ww. Consider pushdown automata that write output on separate one directional tapes (that is, they never go back to change any of what they have written). This basically means that they may write a string as part of each instruction. Design a machine that changes infix arithmetic expressions to postfix expressions. Design a pushdown machine that generates output which will change postfix expressions into assembly language code. Define pushdown automata with two stacks. Prove that they can simulate Turing machines. When a pushdown machine executes an instruction and does not move its reading head, we say that it has made an epsilon move. Does this new capability add power to these automata? Why?
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD