Module 3 - NFA To DFA
Module 3 - NFA To DFA
Deterministic
Finite No ambiguity in state
Automaton transitions.
(DFA)
Easier to implement in
hardware/software due to
deterministic behavior.
A state can have multiple
transitions for the same input
symbol or no transition.
Nondetermini
stic Finite Epsilon (ε) transitions are allowed,
meaning a transition can occur
Automaton without reading an input symbol.
(NFA)
More flexible but harder to
implement directly.
Why we Convert
NFA to DFA?
DFA is more practical for implementation,
but NFAs are often easier to design and
conceptualize.
For practical applications, any NFA can be
converted into an equivalent DFA that
accepts the same language.
Although DFAs may have more states than
NFAs, they provide clarity and
determinism in processing input.
Formal Definition of DFA
• A DFA is a collection of 5-tuples same as we described in the
definition of FA.
Where:
Q: finite set of states
∑: finite set of the input symbol
q0: initial state
F: final state
δ: Transition function
δ: Q x ∑→Q
Formal definition of NFA
• where:
Q = set of states
= set of input alphabets
= transition function
q0 = initial state
F = set of final state
δ: (Q x Σ) = 2Q
- 2Q is the power set of Q, the set of all subsets of Q δ(q,s)
-The set of all states p such that there is a transition labeled s from
q to p
NFA with back tracking
• L = {Set of all strings over(0,1) which every ‘1’ is (eventually) followed by an ‘0’. }