Does the automaton go directly to the next state if there is an ɛ-transition? Roughly speaking, yes. An ɛ-transition (in a non-deterministic finite automaton, or NFA, for short) is a transition that is not associated with the consumption of any symbol (0 or 1, in this case). Once you...

regex,automata,nfa,non-deterministic

You've chosen to create a DFA (and I can't tell how to make one with only 4 states either). However, you are allowed to build an NFA, which means you can have multiple transitions with the same letter. You could therefore omit state (2), move the b-edge that went from...

When a pattern contains an alternation, the regex engine tries to find a match with each branches from the leftmost to the last branch. It is the default behaviour of NFA engines. So, if there is a match with the leftmost branch other branches are not tested. What's happening in...

graph,ocaml,self-reference,nfa,cyclic

You can create data structures with cycles without explicit references, using lazy types or functions. Indeed, both of them hides some form of mutability. Here is an example of a simplest lazy structure, that is more complex than a list type 'a tree = 'a tr Lazy.t and 'a tr...

If you want more of an explanation on how I derived this, I'd be happy to explain, but for now I just drew the DFA and explained each state. Sorry about the screenshot...I didn't know how to convert it straight to an image. On input 0 at state 0, it...

racket,fsm,dfa,finite-state-machine,nfa

Your plan does not work. Consider this machine: States: S,L,F Alphabet: a,b Start state: S Final state S S-a->L (arrow from S to L given a) S-b->F L-a->L Strings accepted by this machine: {b} If you make a new machine where L is a final state, then {empty,a,aa,aaa,...} will be...

c#,multithreading,nfa,automaton

In order to block until a thread t executes to completion, you could use Thread.Join. t.Join(); This puts the main thread in an IDLE state until thread t completes. This means you'd have to keep track of all the threads created inside the foreach loop and then join them one...