870 views

Find a context-free grammar for the following language (with n ≥ 0, m ≥ 0):

L = {anwwRbn : w ∈ {a, b} ∗ , n ≥ 1}.

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.

1
469 views