0

$S \rightarrow AB$

$A \rightarrow aA \mid bA \mid \epsilon$

$B \rightarrow aBb \mid \epsilon$

Does this grammar generate regular language?

According to me this grammar generates language of the form $$ L = \{ (a+b)^* a^nb^n \mid n\ge 1\} $$

I think it's a DCFL. If the condition would have been $n\ge0$ then it's regular according to me. But my book says it's regular language.

Am I correct ?

Raphael
  • 73,212
  • 30
  • 182
  • 400
Sagar P
  • 339
  • 3
  • 13

0 Answers0