Question: 1 . Draw a derivation tree for the string bab from the CFG given by S - > bSb | a | b 2 .

1. Draw a derivation tree for the string "bab" from the CFG given by
S -> bSb | a | b
2. Construct a derivation tree for the string aabbabba for the CFG given by,
S -> aB | bA
A -> a | aS | bAA
B -> b | bS | aBB
3. Show the derivation tree for string "aabbbb" with the following grammar.
S -> AB |\epsi
A -> aB
B -> Sb
4. Check whether the given grammar G is ambiguous or not.
A -> AA
A ->(A)
A -> a
5. ANSWER THE FOLLOWING QUESTION
6. Convert the given CFG to CNF
S -> a | aA | B
A -> aBB |\epsi
B -> Aa | b
7. Convert the given grammar into Chomsky's Normal Form (CNF)
S->AAA|B
A->aA|B
B->\epsi
8. Convert the following CFG into GNF
S -> XB | AA
A -> a | SA
B -> b
X -> a

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!