# Peter Linz Edition 4 Exercise 7.2 Question 10 (Page No. 195)

1 vote
118 views
Find an npda with two states that accepts $L =$ {$a^nb^{2n} : n ≥1$}.

for every 'a' push two a's and see b's match it off and acceptance by empty stack

## Related questions

1
69 views
Find a context-free grammar that generates the language accepted by the npda $M =$ ({$q_0,q_1$}, {$a,b$}, {$A, z$}$,δ, q_0, z,$ {$q_1$}), with transitions $δ(q_0, a,z) =$ {$(q_0, Az)$}, $δ (q_0,b, A) =$ {$(q_0, AA)$}, $δ(q_0, a, A) =$ {$(q_1,λ)$}.
find an npda for the language $L =${ $ww^R : w ∈$ {a, b}$^+$}
Show that the npda in Example 7.8 accepts L (aa*b). Find the grammar that generates Example 7.8 and prove that this grammar generates the language L (aa*b). show that the variable ($q_0zq_1$) is useless. (see page no. 191-193) Example 7.8 : Consider the npda with transitions $\delta(q_0,a,z)=$ ... $(q_0,A)$}, $\delta(q_0,b,A)=${$(q_1,\lambda)$}, $\delta(q_1,\lambda,z)=${$(q_2,\lambda)$}.
Find an npda with two states for the language $L =$ {$a^nb^{n+1} : n ≥ 0$}.