Theory of Computation
Section A
Section A
Nondeterministic
Finite Automaton
In NDFA, for a particular input symbol, the machine can move
to any combination of the states in the machine. In other words, the exact
state to which the machine moves cannot be determined. Hence, it is called
Non-deterministic Automaton. As it has finite number of states, the machine is
called Non-deterministic Finite Machine or Nondeterministic Finite Automaton.
Formal Definition of an NDFA
An NDFA can be
represented by a 5-tuple (Q, Σ, δ, q0, F) where:
·
Q is a finite set of states.
·
Σ is a finite set of symbols called the
alphabets.
·
δ is the transition function where δ: Q × Σ → 2
Q (Here the power set of Q (2Q) has been taken because in case of NDFA, from a
state, transition can occur to any combination of Q states)
·
q0 is the initial state from where any input is
processed (q0 ∈ Q).
·
F is a set of final state/states of Q (F ⊆
Q).
Graphical Representation of an NDFA: (same as DFA)
An NDFA is represented by digraphs called state diagram.
·
The vertices represent the states.
·
The arcs labeled with an input alphabet show the
transitions.
·
The initial state is denoted by an empty single
incoming arc.
·
The final state is indicated by double circles.
Example Let a non-deterministic finite automaton be ®
·
Q = {a, b, c}
·
Σ = {0, 1}
·
q0 = {a}
·
F={c}
The transition function d as shown below:
Present
State
|
Next
State for
Input 0
|
Next
State for
Input
1
|
a
|
a,b
|
b
|
b
|
c
|
a,c
|
b
|
b,c
|
c
|
Its
graphical representation would be as follows:
NFA Representation
No comments:
Post a Comment