CFG for language l

354 Views Asked by At

please solve this question.thanks

Consider the language L expressed by (a+b)*a defined over Σ = {a, b}. Draw FA and construct the CFG corresponding to the language L.

3

There are 3 best solutions below

1
On

A context free grammar corresponding to the language $L$ is: $$S \to aS|bS|a$$

1
On

i am new here this is why i don't know how to post or where to write.sorry i bother you but i just want to match my answer because i was not sure about my answer.enter image description here

thank you for answer.

0
On

enter image description here Question:Consider the language L expressed by (a+b)*a defined over Σ = {a, b}. Draw FA and construct the CFG corresponding to the language L.

Solution: (a+b)*a