5

Is my attempt is true or where am I wrong?

DFA : The set of strings over $\{a, b\} $ that have odd length or end with $aaa$.

My attempt

3SAT
  • 7,627
zxccxz
  • 89
  • Did you try finding a smaller automaton? – k.stm Mar 24 '16 at 20:29
  • @k.stm Yes, I tried but I couldn't find.Is this true? – zxccxz Mar 24 '16 at 20:30
  • 1
    Haven’t checked it. Actually, you probably do need eight states. Have you tried organizing them? Can you tell us what each of the states $1$, …, $8$ describe? (Oh, you have nine states – I think you can toss one.) – k.stm Mar 24 '16 at 20:33
  • @k.stm there are 8 states.It is hard to describe what each of states describe. – zxccxz Mar 24 '16 at 20:41
  • It looks correct to me, but the best thing to do is to run it in your computer – 3SAT Mar 24 '16 at 20:58

2 Answers2

1

Your automaton is correct but it is not minimal. The minimal automaton only has 5 states. Actually, you can obtain it by minimising your automaton. You will then identify states 2 and 4, states 3 and 5 and states 6 and 8.

J.-E. Pin
  • 42,871
0

Your DFA is correct; it consists of eight states, as you have, one for every combination of "Is the string odd or even length?" and "Have I most recently seen 0,1,2, or 3+ consecutive A's"? You can arrange your DFA like this for easier readability:

enter image description here

And there's an equivalent DFA with fewer states that might be easier to check: enter image description here

user326210
  • 19,274