Find a context-free grammar for the following language (with n ≥ 0, m ≥ 0):
L = {anwwRbn : w ∈ {a, b} ∗ , n ≥ 1}.
S -> a S b | W
W -> a W a | b W b | $\epsilon$
First using S, get equal a and b then terminate it with palidrome which is given by W.
64.3k questions
77.9k answers
244k comments
80.0k users