edited by
405 views
0 votes
0 votes
What will be regular grammar for given regular expression
$r=(ab^*+b)^*ab$
edited by

1 Answer

3 votes
3 votes

Regex can also be written as $\left (a+b \right )^{*}ab$

Corresponding DFA is

and grammar will be

$S \rightarrow bS|aA$
$A \rightarrow aA|bB$
$B\rightarrow λ |aA|bS$

Related questions

0 votes
0 votes
1 answer
4