Electronic – Is this Moore Diagram designed to identify a sequence Correct

design

I have to make a Moore Diagram in order to identify the following sequence: BABBAA
Two conditions: It shouldn't stop and it should be able to detect overlapped sequences. I don't really know if it is correct and as you can see by the question mark between the state E3 and the state E2 with input A, I don't really know if that is fine. Could anyone point the mistakes I made on this diagram or if its correct?

Diagram I made

Thanks for your help!

Best Answer

I've picked up on just one mistake. From E7, when input is "B", it should go to E2, not E4. E4 is supposed to have detected the sequence "BAB", but the way you have connected this would relate to a "BAAB" sequence. All else seems fine.

state | sequence | in = A | in = B
==================================
  E1  | ""       |   E1   |   E2
  E2  | "B"      |   E3   |   E2
  E3  | "BA"     |   E1   |   E4
  E4  | "BAB"    |   E3   |   E5
  E5  | "BABB"   |   E6   |   E2
  E6  | "BABBA"  |   E7   |   E4
  E7  | "BABBAA" |   E1   |   E2
Related Topic