993 views

1 Answer

3 votes
3 votes

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. 

Related questions

0 votes
0 votes
1 answer
1
atulcse asked Jan 21, 2022
876 views
Given a CFG and a string, what is the relation between the number of leftmost derivations, the number of rightmost derivations and the number of parse trees?