Question: ( a ) [ 2 marks ] Convert the following CFG to an NPDA that accepts the same language, by empty stack. S aSb |

(a)[2 marks] Convert the following CFG to an NPDA that accepts the same language, by
empty stack.
SaSb|bSa|c|
(b)[2 marks] Give a sequence of configurations to show how the string abcab is accepted
by your NPDA.
(c)[1 mark] Give an informal description of the strings that make up the language
generated by the grammar, or, equivalently, the language accepted by your NPDA.
11(5 marks)
Convert the following grammar to Chomsky Normal Form (CNF), explaining each step.
SaSa|B
BbbC|bb
CcC|
12(10 marks)
(a)[5 marks] Draw an NPDA that accepts, by final state, the following language:
L={anbn+mcm:n0,m1}
(b)[5 marks] Give a CFG for the language L from part (a), and draw a parse tree for the
string a2b3c
 (a)[2 marks] Convert the following CFG to an NPDA that accepts

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!