7 votes 7 votes Which of the following sentences can be generated by S -> aS $\mid$ bA A -> d $\mid$ cA bccdd abbcca abcabc abcd Theory of Computation isro2011 theory-of-computation context-free-language grammar + – go_editor asked Jun 23, 2016 retagged Jul 4, 2017 by Arjun go_editor 5.1k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 10 votes 10 votes S=>aS =>abA =>abcA =>abcd Hence,Option(D) abcd is the correct choice. LeenSharma answered Jun 23, 2016 selected Jun 23, 2016 by Praveen Saini LeenSharma comment Share Follow See all 0 reply Please log in or register to add a comment.
4 votes 4 votes 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 -> abcA -> abcd Rajesh Pradhan answered Jun 23, 2016 Rajesh Pradhan comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes option D in any case d would come at end, that eliminate option B,C d cannot come twice, that eliminate option A so option D is the winner rameshbabu answered Jun 23, 2016 rameshbabu comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes ans is (d) kvkumar answered Jun 26, 2016 kvkumar comment Share Follow See all 0 reply Please log in or register to add a comment.