Which of the following sentences can be generated by
S -> aS $\mid$ bA
A -> d $\mid$ cA
S=>aS
=>abA
=>abcA
=>abcd
Hence,Option(D) abcd is the correct choice.
Option A-- two consecutive d can't generate
Option B&C can't generate bcz ..any string must endup with d to get accepted by this grammar.
Option D is correct bcz
S->aS
-> abA
ans is (d)
64.3k questions
77.9k answers
244k comments
80.0k users