740 views

1 Answer

0 votes
0 votes

first of all we have to think this kind of problem in mathematical way..now [any number here it is no of a i.e. n(a)] mod 3 it will give result {0 or 1 or 2}..similarly [any number here it is no of b i.e. n(b) ]mod 2 ..will give result { 0 or 1}.now we have to think how should we can  relate two different result.by relation yes,now we have to multiply both sets and it will give result {0,0} ,{0,1},{1,0},{1,1},{2,0},{2,1}.now we have to take only 6 states in our finite state machine for comparison between n(a)mod 3 and n(b) mod2.now draw 6 states dfa by  counting a and b and take all states as final states where  namod3>=nbmod2 .these states are{ 0,0 },{1,0},{ 1,1},{ 2,0},{ 2,1}.

Related questions

5 votes
5 votes
3 answers
1
Sangam asked Aug 1, 2016
3,752 views
Construct a minimal DFA for the given language.How to find the union of two DFA's ?
0 votes
0 votes
0 answers
3