3
$\begingroup$

I understand that a regular language can be specified by either regular or non-regular grammars. What is an example of a non-regular grammar for a regular language?

$\endgroup$
  • $\begingroup$ Is it worthwhile to add an example to the Wikipedia article? $\endgroup$ – reinierpost Feb 2 '15 at 22:19
  • $\begingroup$ I'll offer that as an extra credit opportunity to my students. :-) $\endgroup$ – Ellen Spertus Feb 3 '15 at 0:17
  • $\begingroup$ hey how can we tell that if the grammar is regular or not? $\endgroup$ – Kaushal28 Sep 21 '16 at 15:51
5
$\begingroup$

Regular Language L = {aab}

Non-regular grammar

S -> aAb

A -> a

$\endgroup$
  • $\begingroup$ hey how can we tell that if the grammar is regular or not? $\endgroup$ – Kaushal28 Sep 21 '16 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.