Can you verify this like please bro please tell me the answer to my question
$\begingroup$ No. Your machine accepts ababab. Well, actually it works if the aabb don't have to be together. But usually this question means they have to be all together in a row, so ababab doesn't count. $\endgroup$– user253751Feb 1 at 20:20
Have 5 states S, Sa, Saa, Saab, Saabb. Move to a state Sxxx after you parsed the first characters xxx of aabb, except you stay in the accepting state Saabb no matter what the input once you reached it.
S: a->Sa, b->S. Sa: a->Saa, b->S. Saa: a->Saa, b->Saab. Saab: a->Sa, b->Saabb. Saabb: a->Saabb, b->Saabb.
This automaton only accepts strings that START with aabb. You also need to accept strings such as baabb, bababaabbabab, aabaabb, etc.
1$\begingroup$ It accepts also $baabb$, $bbaabb$ etc. The actual problem is it accepts non-consecutive $aabb$ $\endgroup$– kviiriFeb 1 at 16:01