Sei sulla pagina 1di 11

FT

FINITE STATE AUTOMATA

Dr. Sheetal A. Takale


RA Vidya Pratishthan’s Kamal Nayan Bajaj Institute of Engineering and Technology
sheetal.takale@vpkbiet.org

July 4, 2019

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 1 / 10
Non-determinitsic Finite Automata(NFA)

FT
Nondeterminism means that the next move is not uniquely
determined by the current state and the current input symbol.
RA In some cases, there is more than one possible transition to follow.
The automaton will leads to acceptance if it follows the “right”
transition, otherwise it leads to rejection.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 2 / 10
Non-determinitsic Finite Automata (NFA)

FT
RA
Figure: Non-determinitsic Finite Automata:Example

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 3 / 10
Non-determinitsic Finite Automata (NFA)

FT
RA
Figure: Non-determinitsic Finite Automata:Example

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 4 / 10
Non-determinitsic Finite Automata (NFA)

FT
RA
Figure: Non-determinitsic Finite Automata:Example

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 5 / 10
Non-determinitsic Finite Automata(NFA)

FT
A Non-determinitsic Finite Automaton(NFA) is defined as
a collection of 5-tuple M = (Q, Σ, δ, q0 , A)
where
Q- is finite set of states
Σ - finite input alphabet
δ - transition function(STF)
RA
Q × Σ → 2Q
q0 - initial state
A- finite set of accepting states
2Q - is Power set of Q
Assume, Q = {1, 2, 3}
2Q = {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 6 / 10
Non-determinitsic Finite Automata (NFA)

FT
A NFA (nondeterministic finite automata) is able to be in several
states at once.
In a DFA, we can only take a transition to a single deterministic state
In a NFA we can accept multiple destination states for the same input.
You can think of this as the NFA “guesses” something about its input
RA and will always follow the proper path if that can lead to an accepting
state.
Another way to think of the NFA is that it travels all possible paths,
and so it remains in many states at once. As long as at least one of
the paths results in an accepting state, the NFA accepts the input.
More expressive than a DFA.
BUT NFA is not more powerful than DFA! For any NFA we can
construct a corresponding DFA
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 7 / 10
Non-determinitsic Finite Automata (NFA)vs Finite

FT
Automata(FA)
Title Deterministic Non-deterministic
Finite Au- Finite Au-
tomata(DFA) tomata(NFA)
Number of For Every symbol For every symbol
state transi- of the alphabet, of alphabet, pos-
RA tions there is only one sible State Transi-
state transition in tions from a state
DFA. may be one or
more
Power NFA and DFA For every NFA
have same power there exists equiv-
alent DFA and
vice versa
Transition δ :Q×Σ→Q δ : Q × Σ → 2Q
Function . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .

Table: Set of Queries


Sheetal Takale (VPKBIET) TOCfor Image Collection July 4, 2019 8 / 10
Non-determinitsic Finite Automata with ϵ (NFA-ϵ)

FT
We extend the class of NFAs by allowing instantaneous ϵ transitions:
1 The automaton may be allowed to change its state without reading
RA the input symbol.
2 In diagrams, such transitions are depicted by labeling the appropriate
arcs with ϵ.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 9 / 10
Non-determinitsic Finite Automata(NFA)with ϵ moves

FT
A Non-determinitsic Finite Automaton-ϵ(NFA-ϵ) is defined
as a collection of 5-tuple M = (Q, Σ, δ, q0 , A)
where
Q- is finite set of states
Σ ∪ ϵ - finite input alphabet
RA
δ - transition function(STF)
Q × {Σ ∪ ϵ} → 2Q
q0 - initial state
A- finite set of accepting states

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 10 / 10
FT
RA The End

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Sheetal Takale (VPKBIET) TOC July 4, 2019 11 / 10

Potrebbero piacerti anche