$$S \to aSa \mid bSb\mid a\mid b$$ The language generated by the above grammar over the alphabet $\{a,b\}$ is the set of:
@Pranavpurkar Agreed! Bad framing of options
Abhrajyoti00
it all depends on what the question setter wants from us.
@Pranavpurkar
no both b and c cant be true, because in option c we can have ‘abaa’ in which first and last symbol is same but it can’t be generated by above grammar
Answer is B. String generated by this language is $a,b,aba,bab,aabaa,\ldots$
All this strings are odd length palindromes.
option b
64.3k questions
77.9k answers
243k comments
79.7k users