Question: 1 . Draw a derivation tree for the string bab from the CFG given by S - > bSb | a | b 2 .
Draw a derivation tree for the string "bab" from the CFG given by
S bSb a b
Construct a derivation tree for the string aabbabba for the CFG given by
S aB bA
A a aS bAA
B b bS aBB
Show the derivation tree for string "aabbbb" with the following grammar.
S AB epsi
A aB
B Sb
Check whether the given grammar G is ambiguous or not.
A AA
A A
A a
ANSWER THE FOLLOWING QUESTION
Convert the given CFG to CNF
S a aA B
A aBB epsi
B Aa b
Convert the given grammar into Chomsky's Normal Form CNF
SAAAB
AaAB
Bepsi
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
