-4
$\begingroup$

Can you verify this like please bro please tell me the answer to my question enter image description here

$\endgroup$
1
  • $\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$
    – user253751
    Feb 1 at 20:20

2 Answers 2

0
$\begingroup$

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.
$\endgroup$
-2
$\begingroup$

This automaton only accepts strings that START with aabb. You also need to accept strings such as baabb, bababaabbabab, aabaabb, etc.

$\endgroup$
1
  • 1
    $\begingroup$ It accepts also $baabb$, $bbaabb$ etc. The actual problem is it accepts non-consecutive $aabb$ $\endgroup$
    – kviiri
    Feb 1 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.