In the context-free grammar below, S is the start symbol, a and b are terminals, and ε denotes the empty string S→aSa|bSb|a|b|ε
Which of the following strings is NOT generated by grammar?
Open in App
Solution
L(G)= Set of all palindrome strings.
"baba" is not a palindrome string