How to draw a Mealy Finite State Machine to detect a text?

  • Super User
  • Topic Author
More
#6 by Super User
Let’s say I want to detect the pattern “PARTY”.


First State: waiting for ‘P’.

If I got P, I go to second State.

Second State: got ‘P’.


Now...(Here’s my question)

If I got A..I’ll go to third state.

If not...I’ll have two options..if I got ‘P’.. I’ll go back to second State. If not, I’ll go back to first state.


Is this how it is supposed to be done?

Please Log in or Create an account to join the conversation.

Moderators: Bob Engineer