1
$\begingroup$

So i'm taking this class automata and complexity at georgia tech and we were given practice material for our exam.

one of the question is to give context free grammar for these two languages

enter image description here

enter image description here

and the answers are:

L1

enter image description here

L2

enter image description here

I can understand these and verify that these are indeed correct once I know the solution, but I'm finding it incredibly hard to even come close to coming up with them.

Does anyone have any advice on how to intuitively come up with CFGs

$\endgroup$
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.