2 votes 2 votes The language which is generated by the grammar $S \rightarrow aSa \mid bSb \mid a \mid b$ over the alphabet of $\{a,b\}$ is the set of Strings that begin and end with the same symbol All odd and even length palindromes All odd length palindromes All even length palindromes Theory of Computation isro-2020 theory-of-computation context-free-grammar normal + – Satbir asked Jan 13, 2020 edited Apr 10, 2020 by go_editor Satbir 2.1k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Strings generated by grammar are $\{a, b, aba, aaa, bab, ababa, aaaaa,..\}$ all are odd length palindromes. Option b) & d) eliminated. Option a) is not correct as $'aaba'$ is a string starts and ends with same symbol but not generated by given grammar. Hence Option C) is correct Ashwani Kumar 2 answered Jan 13, 2020 Ashwani Kumar 2 comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Answer: c) All odd length palindromes. Tuhin Dutta answered Jan 13, 2020 Tuhin Dutta comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes the string generated by this grammar are {a,b,aaa,aba,bab,bbb,aaaaa,ababb..........} so the option C is correct. DIBAKAR MAJEE answered May 7, 2020 DIBAKAR MAJEE comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes We can solve such kinds of question with the help of OPTION ELIMINATION METHOD. FOR OPTION A,B,D: It does not generate {aa}. Hence,OPTION C is correct. (: Shivani gaikawad answered May 11, 2020 Shivani gaikawad comment Share Follow See all 0 reply Please log in or register to add a comment.