Find a DFA that accepts words with "aa" twice

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
tomkoolen
Messages
39
Reaction score
1
Hi everyone,

I have just started learning about DFA's and I have to solve the problem from the thread title with
Σ = {a,b}.

My attempts so far are in the attachments.

I am struggling as to what to do with the words in state 2 that have a b*a*b* substring before getting their second "aa". Can anyone help me with this?

NB: It was noted in the exercise that "aaa" is accepted by the DFA because it contains the substring "aa" twice as well.
 

Attachments

  • DFA.jpg
    DFA.jpg
    14.6 KB · Views: 658
Physics news on Phys.org
Why do you have 4 and 0 and where is the difference between those states? What do they mean?
"abaaa" does not get accepted like that.

2b will need a new state I think.