Finite Automat Machine to find binary string that contain 101

516 Views Asked by At

Finite state Machine to find binary string that contain 101 pattern anywhere
what i tried is
FSM
DFA TOOL

in the diagram above

  • Start:Empty String
  • S0:1
  • S1:10
  • S2:101

S2 is checked because its Accepting State i.e Final State

FSM1

If the input 1010000101 So my Question is will S2 go to Start State when it matches 101 for first time or will it stay on S2.Please bear me i'm learning Finite Automata and Sorry for weird diagram

Edit:The Input in diagraph is 0 1 not 1 0

1

There are 1 best solutions below

0
On BEST ANSWER

Add loops to your final state to ensure determinism. Then your DFA will accept on the first occurrence of $101$.