# NFA with Epsilon Moves

Topics: Automata theory, Nondeterministic finite state machine, State diagram Pages: 11 (1499 words) Published: February 5, 2013
NFA with epsilon moves
Definition and example of a NFA with epsilon transitions. Finite Automata with Epsilon Transitions

We can extend an NFA by introducing a "feature" that allows us to make a transition on , the empty string. All the transition lets us do is spontaneously make a transition, without receiving an input symbol. This is another mechanism that allows our NFA to be in multiple states at once. Whenever we take an edge, we must fork off a new "thread" for the NFA starting in the destination state.

Just as nondeterminism made NFA's more convenient to represent some problems than DFA's but were not more powerful, the same applies to NFA's. While more expressive, anything we can represent with an NFA we can represent with a DFA that has no  transitions.

Epsilon Closure

Epsilon Closure of a state is simply the set of all states we can reach by following the transition function from the given state that are labeled . Generally speaking, a collection of objects is closed  under some operation if applying that operation to  members of the collection returns an object still in the collection.

In the above example:
 (q) = { q }
 (r) = { r, s}
let us define the extended transition function for an NFA. For a regular, NFA we said for the induction step:
Let
^(q,w) = {p1, p2, ... pk}
(pi,a) = Sifor i=1,2,...k
Then ^(q, wa) = S1,S2... Sk
For an -NFA, we change for ^(q, wa):
Union[  (Each state in S1, S2, ... Sk)]
This includes the original set S1,S2... Sk as well as any states we can reach via . When coupled with the basis that ^(q, ) =  (q) lets us inductively define an extended transition function for a NFA.

Eliminating Transitions

Transitions are a convenience in some cases, but do not increase the power of the NFA. To eliminate them we can convert a NFA into an equivalent DFA, which is quite similar to the steps we took for converting a normal NFA to a DFA, except we must now follow all Transitions and add those to our set of states. 1. Compute  for the current state, resulting in a set of states S. 2. (S,a) is computed for all a in  by

a. Let S = {p1, p2, ... pk}
b. Compute I=1k  (pi,a) and call this set {r1, r2, r3... rm}. This set is achieved by following input a,           not by following any  transitions
c. Add the  transitions in by computing (S,a)= I=1 m  (r1) 3. Make a state an accepting state if it includes any final states in the -NFA.

Note :The ε (epsilon) transition refers to a transition from one state to another without  the reading of an  input
symbol (ie without the tape containing the input string moving). Epsilon transitions can be inserted between
any states. There is also a conversion algorithm from a NFA with epsilon transitions to a NFA without
epsilon transitions.

Consider the NFA-epsilon move machine M = { Q, , , q0, F}
Q = { q0, q1, q2 }
= { a, b, c }  and  moves
q0 = q0
F = { q2 }

| a| b| C| | q0| {q0}| | | {q1}| q1| | {q2}| | {q2}| q2| | | {q2}| |

Note: add an arc from qz to qz labeled "c" to figure above.

The language accepted by the above NFA with...