1,020 views
2 votes
2 votes

Design a DFA over w ∈ {a,b}* such that number of a = 2 and there is no restriction over length of b.
Answer
We will explain this intuitive approach
Step 1 Make smallest string DFA:
Means for number of a’s = 2 , crate a DFA then in next step we will take care of b’s.

Step 2 
Now we will take care of b’s 

Can anyone explain as in this  w =  {a,b}* is   given so we have to accept null string too ???? in dfa and we should make A as also final

1 Answer

0 votes
0 votes

DFA designed by you is correct,
w ∈ {a,b}* means string can contain anything means string can be {Ɛ, a, b ,ab, ba , aa, bb,...}  =(a+b)*

DFA accepts only those string that contains exactly two a.

Related questions

1 votes
1 votes
0 answers
4
eyeamgj asked Oct 22, 2018
271 views
https://gateoverflow.in/46562/cmi2012-b-02aHOW THE DFA IS DESIGNED AT LAST??