Context-free grammar for the following language

40 Views Asked by At

How is the context-free grammar of the following language:

enter image description here

This -

enter image description here

How does the value of A terminate without an $A\to\epsilon$ transition?

Also, shouldn't the answer be:

$S \to aA B$

$A\to a A \mid \epsilon $

$B \to b B \mid \epsilon$

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

The grammar you describe is equivalent to the first one. The $A\to a$ transition guarantees that $m>0$ in the same way that your $S\to aAB$ transition does.