Problem – Design a non deterministic PDA for accepting the language L = {0n1n | n>=1}, i.e.,
L = {01, 0011, 000111, ......}
In each of the string, the number of 0’s are followed by equal number of 1’s.
Explanation –
Here, we need to maintain the order of 0’s and 1’s. That is, all
the 0’s are are coming first and then all the 1’s are coming. Thus,
we need a stack along with the state diagram. The count of 0’s and
1’s is maintained by the stack. We will take 2 stack alphabets:
= { 0, z }
Where,
= set of all the stack alphabet
z = stack start symbol
Approach used in the construction of PDA
–
As we want to design a NPDA, thus every time ‘0’ comes before ‘1’.
When ‘0’ comes then push it in stack and if again ‘0’ comes then
also push it. After that, when ‘1’ comes then pop one ‘0’ from the
stack each time. So, at the end if the stack becomes empty then we
can say that the string is accepted by the PDA.
Stack transition functions –
(q0, 0, z) (q0, 0z) (q0, 0, 0) (q0, 00) (q0, 1, 0) (q1, ) (q1, 1, 0) (q1, ) (q1, , z) (qf, z)
Where, q0 = Initial state
qf = Final state
= indicates pop operation
How can this problem solved? Design a PDA that accepts the following language: Design a PDA that accepts the following language:
Describe (or draw) a pushdown automaton (PDA) that accepts the language L5 in the previous question. Especially if you are drawing the PDA, you must explain your design in 1-2 sentences.
(c) Let Sigma = {0, 1}. Consider the problem of determining whether a PDA accepts some string that contains substring �101� is decidable. Formulate it as a language, and then show that this language is decidable
Define a deterministic PDA (give table of moves) that accepts the language of balanced strings of parentheses. For convenience, a special end-marker is added to the end of each string. Use the grammar S rightarrow T$ T rightarrow T[T] elmentof (b) Show the moves that parses the string []$, alongside with the corresponding steps in the left derivation of the string.
answer question 3 Q.3 Maximum score 20 Construct a Non-deterministic PDA that accepts the language L (w: n(w)+n(w) n(w) 1 over 2-(a.b.c).Give the rules (in the form of a diagram are acceptable Q.3 Maximum score 20 Construct a Non-deterministic PDA that accepts the language L (w: n(w)+n(w) n(w) 1 over 2-(a.b.c).Give the rules (in the form of a diagram are acceptable
4. Show that the pda constructed in Example 7.6 accepts the strings aabb and aaabbbb, and that both strings are in the language generated by the given grammar. EXAMPLE 7.6 Construct a pda that accepts the language generated by a grammar with productions We first transform the grammar into Greibach normal form, changing the productions to A bB, The corresponding automaton will have three states (go, 91,92), with initial state go and final state q2. First, the start symbol S...
2. [10 marks] Give a PDA (Pushdown Automata) that recognizes the language L = {o€ {n,y, z}* | 2|이|z = |0ly V 2\이 You can choose whether your PDA accepts by empty stack or final state, but make sure you clearly note, which acceptance is assumed 2. [10 marks] Give a PDA (Pushdown Automata) that recognizes the language L = {o€ {n,y, z}* | 2|이|z = |0ly V 2\이 You can choose whether your PDA accepts by empty stack or...
[20 points] As an example of a PDA look at the one below that accepts the following language (Z is the stack start symbol): {a”br | n >0} U{a}. a, 1; 11 b, 1; a, Z; 12 b, 1 ; 90 q1 q2 1,2; a, Z;À Z: 93 We want to show that the language L below is a CFL by designing the PDA P, defined as P= {{90, 91, 92}, {0, 1}, {x, Z},0,40, 2, {92}}, that accepts it:...
Give a PDA (Pushdown Automata) that recognizes the language L = {σ ∈ {x, y, z} ∗ | 2|σ|x = |σ|y ∨ 2|σ|y = |σ|z} You can choose whether your PDA accepts by empty stack or final state, but make sure you clearly note, which acceptance is assumed.
5.18. For each of the following languages, give a transition table for a deterministic PDA that accepts that language. a. x E a, b* na(x) < nb(x))