Question on regular grammar


#1

construct a regular grammar accepting L={w E {a,b}*|w is a string over {a,b} such that the number of b’s is 3 mod 4}


#2

A-> aA | bB
B -> aB | bC
C -> aC | bD | b
D -> aD | a | bE
E -> aE | bA