Show that the PDA constructed in Example 7.6 (attached file) accepts the strings aabb and aaabbbb, and that both strings are in the language generated by the given grammar.
Show that the PDA constructed in Example 7.6 (attached file) accepts the strings aabb and aaabbbb, and that both strings are in the language generated by the given grammar.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Show that the PDA constructed in Example 7.6 (attached file) accepts the strings aabb and aaabbbb, and that both strings are in the language generated by the given grammar.

Transcribed Image Text:Example 7.6:
Construct a pda to accept the language generated by grammar with productions
S → aSbb | a.
First, we transform this grammar into Greibach Normal Form:
S → aSA | a
A → bB
B → b
We define the pda to have three states – an initial state qo, a final state q2, and
an intermediate state q1.
We define the initial transition rule to push the start symbol S on the stack:
8(%0; A, z) = {(41, S2)}
We simulate the production S → aSA with a transition that reads a from the
input and replaces S on the top of the stack by SA.
Similarly, we simulate the production S → a with a transition that reads a
while simply removing S from the top of the stack. We represent these two
productions in the pda as the nondeterministic transition rule:
8(41, a, S) = {(41, SA), (41, A) }
Doing the same for the other productions, we get transition rules:
8(q1, b, A) = {(q1, B)}
8(q1, b, B) = {(1, X)}
When the stack start symbol appears at the top of the stack, the derivation is
complete. We define a transition rule to move the pda into its final state:
8(41, A, z) = {(42, A)}
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 8 steps with 8 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY