edited by
2,090 views
2 votes
2 votes

Find the regular grammar for the following languages on {a,b}.

b) L={w: (na(w)- nb(w))mod3=1}

Here na is the no of 'a' in string w, nb is the no of 'b' in string b.

Here is my solution. Is this answer correct? Any other approach or solution is also welcomed.

edited by

1 Answer

Related questions

1 votes
1 votes
0 answers
1
0 votes
0 votes
2 answers
3