Consider the CFG with {S,A,B) as the non-terminal alphabet, {a,b) as the…
GATE · 2007 · CS
Consider the CFG with {S,A,B) as the non-terminal alphabet, {a,b) as the terminal alphabet, S as the start symbol and the following set of production rules
S --> aB S --> bA
B --> b A --> a
B --> bS A --> aS
B --> aBB A --> bAAWhich of the following strings is generated by the grammar?
- A.
aaaabb
- B.
aabbbb
- C.
aabbab
- D.
abbbba
Attempted by 52 students.
Sign up free to check your answer
Sign up freeLoading lesson…