edited by
640 views
0 votes
0 votes
IF possible find the number of states in Minimal FA of the Machine M which accept

L={w $\epsilon$ (0+1)*  | For Every prefix w' of w , Modulus of  difference in number of 0's in w' and number of 1's in w' are <= 2 }

 

Please tell me how to contruct DFA of the same
edited by

1 Answer

0 votes
0 votes
-2   -1  0   1    2  

the states are -2  -1  0  1   2  ,

states represents diffrence between # zeros and # ones in string parsed uptil now,

draw the transtions properly and all of 0,1,2,-1,-2 are final states and from 2 there will a transition to dead state if diffrence increase to 3.

think on this now

Related questions

1 votes
1 votes
1 answer
2
sripo asked Oct 13, 2018
1,265 views
For the given GrammarS->aA|bBA->bC|aSB->aC|bSC->aB|bA Construct DFA I am getting confused in understanding how to take the final state.
0 votes
0 votes
0 answers
4