Question: Q 1 . Construct a Context Free Grammar for each of the following languages: L = { a n b m c 2 n +

Q1. Construct a Context Free Grammar for each of the following languages:
L={anbmc2n+2n|n0,m0}
|=2j or {:j=2k}
L={0n1m|nm2n}
Q2. Consider the following Context Free Grammar ( S is the start variable):
SA1B
AOA|||
B0B|1B|
Give the leftmost and the rightmost derivations of the string 00011 and draw its parse tree.
Q3. Consider the following Pushdown Automata (the initial stack variable is $).
xx
1,$
Starting from the initial instantaneous description (q,0011, $), show all the reachable instantaneous descriptions (see Figure 6.3 on page 231 of the book).
Q4. Convert the following Context Free Grammar into Chomsky Normal Form ( S is the start variable).
SOAO|1B1|BB
AS|||
BS|A||
Q 1 . Construct a Context Free Grammar for each

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 Programming Questions!