555 views
1 votes
1 votes

Hi.  please tell me the Regular Expresion of image given DFA below

image:toc2-5.png

1 Answer

0 votes
0 votes
1*0(10)*0(0+10)*

Explanation :

By looking at the DFA one can easily tell, the DFA accepts the set of strings that ends in two consecutive zeroes or ends in "10".

In state 1 : If we get 1's, we loop over. Hence 1*

In state 2 : We reach here by scanning single zero. If we scan a 1, our pattern is destroyed and hence we should can two zeros again hence going to state 1 again. So used (10)*

State 3 : if we scan another zero on state 1, we move to final state 2, because our pattern is complete now and we can scan any number of zeroes and stay at final state.

If a 1 occurs at final state, our pattern is destroyed but we can also scan a 10, hence the last state can scan either a 0 or 10 to stay in final state so used. (0 + 10)*

So the RE is : 1*0(10)*0(0+10)*

Related questions

0 votes
0 votes
3 answers
1
gateexplore asked Jul 3, 2023
515 views
Which of the following pairs of regular expression are equivalent?(a) 1(01)* and (10)*1(b) x(xx)* and (xx)*x(c) x* and x*x(d) All of the above