Question
Asked Apr 20, 2019
131 views

Construct an npda corresponding to the grammar

S→aABB|aAA,A→aBB|b,B→bBB|A.

check_circle

Expert Answer

Step 1

Firstly, we will convert the given grammar into GNF

S → aABB|aAA

A → aBB|b

B → bBB|aBB|a

Step 2

To construct npda, W= ({q0, q1, q2}, {a, b}, {S, A, B, Z}, δ, q0, Z, {q2}) following steps are followed.

  1. Initialize δ(q0, λ, z) = {(q1, Sz)}
  2. Processing the input as:
  • S → aABB|aAA : δ(q1, a, S) = {(q1, ABB),(q1, AA)}
  • A → aBB|b : δ...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in

Engineering

Computer Science

Related Computer Science Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: Question: Write a function to display a pattern as follows: 1 2       1 ... ... n       n-1         ...

A: Solution:The python program has the following algorithm:In the displayPattern() function,Declare and...

question_answer

Q: Create a program that will input the 3 game scores of a player and then output the level of the play...

A: Since there are no messages given in the question for the condition where the weighted average falls...

question_answer

Q: Problem: Develop a class encapsulating the concept of a college course, assuming that a course has f...

A: The program has the following algorithm: Course.javaCreate default constructors.Test the “set” metho...

question_answer

Q: What is the best way to pass 2D arrays to a function? (C++) For my program, I have a 2D array (size:...

A: There are two ways to pass 2-D array to a function either by sending the array name in the function ...

question_answer

Q: Give an implementation of the macroinstruction searchleft (a, qi, qj), which indicates that the mach...

A: Turing machine uses “searchleft” for an implementation of the macroinstructions. If the machine read...

question_answer

Q: Develop pseudocode for the problem of reading in the radius of a circle (r), calculate the area of t...

A: The program will have the following steps:Receive the input as a parameter passed to the function wh...

question_answer

Q: Create a trigger called Trig_Enroll_BI on the ENROLLMENT table that fires before an INSERT statement...

A: Solution:Create the trigger with name of “Trig_Enroll_BI” for ENROLLMENT table.The followings algori...

question_answer

Q: 4-20) (Process a string) Write a program that prompts the user to enter a string and displays its le...

A: Program to enter string by the user to displays string length and its first character. as in the giv...

question_answer

Q: how to write a function in python 3 that take a tuple t = (7,8,4,20,11) and returns a list which inc...

A: Note: The below program has been complied and executed in “repl.it” online complier