Question: Example 7 . 6 Construct a PDA that accepts the language generated by a grammar with productions S aSbb | a . Solution: Transform the

Example 7.6
Construct a PDA that accepts the language
generated by a grammar with productions
SaSbb|a.
Solution:
Transform the grammar into Greibach normal
form as follows:
SaSA|a,
AbB,
Bb.
The corresponding automaton M has three states
{q0,q1,q2} where q0 is initial state and q2 is final state. Example 7.6(Con't)
Solution: (Con't)
First, put the start symbol S on the stack by
(q0,,z)={(q1,Sz)}.
The production SaSA will be simulated in the PDA
by removing S from the stack and
replacing it with SA,
while reading a from the input.
Similarly, Sa should cause the PDA to read
an a while simply removing S.
Thus, these two productions are represented in M :
(q1,a,S)={(q1,SA),(q1,)}.
In the similar way, the other productions give:
(q1,b,A)={(q1,B)},
(q1,b,B)={(q1,)},
(q1,,z)={(q2,z)}.Prove that the pda in Example 7.6 accepts the language L={an+1b2n:n0}.[10 pts]
 Example 7.6 Construct a PDA that accepts the language generated by

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!