Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following PDA, P, that recognizes the contextfree language L = {w {a, b} | w = w R}, i.e., all palindromes over the

Consider the following PDA, P, that recognizes the contextfree language L = {w {a, b} | w = w R}, i.e., all palindromes over the {a, b} alphabet:

image text in transcribed

Recall the proof of Lemma 2.27 in the class-book (the proof that every PDA recognizes a certain CFL), and note that P is of such form that every transition either pops a symbol from the stack, or pushes a symbol on the stack (but does not do both), as required by the proof. Let GP be the grammar constructed as suggested by the proof of the Lemma. Provide a step-by-step derivation of a string baaab generated by PG. That is, show the steps A1,5 = u1 = . . . = uk = baaab, where A1,5 is the start variable in grammar GP . Note: you do not need to write out all the rules in the grammar GP , but only the ones needed for the derivation

a.c-> a a,a-> a.e-> # b,c-> b .E-> # bb-> b,c-> # E,E->$ E,S-> 4-11-)-111 ( 5 E. 3 111

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

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

Students also viewed these Databases questions

Question

Distinguish between unenforceable contracts and illegal contracts.

Answered: 1 week ago

Question

=+ c. a company president deciding whether to open a new factory

Answered: 1 week ago