Asked by Excel

Create a finite-state machine which accepts strings whose characters are in {a, b, c} and produce output strings of T s and F s. The machine outputs a T once the character pair ab (the characters must be adjacent) is encountered in the string. Before this occurrence, it should output F s. Indicate the the starting state, and label the states and transitions. Give a diagram, not a state table.

Answers

Answered by Steve
can't draw a state machine here, but you should include states such as

0: outputs an <b>F</b> and loops back unless an <b>a</b> is received, when it transitions to state

1: outputs an <b>F</b> and goes back to 0 unless a <b>b</b> is received, when it outputs a T.

You haven't said what it does after <b>ab</b> is received. Maybe stops? Or, it could go back to 0.
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions