Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is community psychology?

Answered: 1 week ago

Question

1. How might volunteering help the employer and the employee?

Answered: 1 week ago