edited by
487 views
3 votes
3 votes
$L = \left \{ a^{n} b^{m} : n\geq 0,m>n \right \}$

Find a grammar that generates $L^3$
edited by

1 Answer

Best answer
6 votes
6 votes

$L^3 = \{a^pb^qa^rb^sa^tb^u|p,r,t\geq 0, q >p, s>r, u>t \}$

Grammar for this language:

$S \rightarrow AAA$

$A \rightarrow aAb\ |\ B$

$B \rightarrow bB\ |\ b$

P.S. If you take $A$ as the starting symbol, then you get the language $L$.

selected by

Related questions

0 votes
0 votes
0 answers
2
1 votes
1 votes
3 answers
3
1 votes
1 votes
1 answer
4
Mk Utkarsh asked Feb 26, 2018
357 views
Find the grammar for the following language$L = \left \{ w: \left | w \right | mod 3 \geq \left | w \right | mod 2 \right \}$