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$.
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$.
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.
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:
And there's an equivalent DFA with fewer states that might be easier to check:
