Find CFG for language

164 Views Asked by At

I'm trying to find CFG of language where

$L = \{ a^x b^y a^z \}$ where $x,y,z = 1 2 3\ldots$ and $y = 2x + 2z$

I have no idea, I'm completely stuck. Any help would be very appreciated thank you

1

There are 1 best solutions below

0
On

Hint: Since you can't solve this problem, try solving a simpler problem of the same type. For example, can you write a CFG for $L = \{a^xb^{2x}\}$?