Intro To Nfa v2
Intro To Nfa v2
Finite Automaton (DFA), but allows multiple possible transitions for a given state and input. This
means that from a single state, the NFA can move to several different states depending on the
input, or even choose to move without consuming any input symbols (epsilon transitions).
Slide 2: Components of an NFA
3. Transition Function (delta): A function that returns a set of states for each state and input symbol.
4. Start State (q0): The state from which the computation begins.
5. Accept States (F): The set of states representing the accepting conditions.
6. Epsilon Transitions (e): Optional transitions that allow the NFA to move between states without
1. Determinism vs Non-determinism: In a DFA, for each state and input symbol, there is exactly one
transition. In an NFA, there can be multiple possible transitions for the same input.
2. Epsilon Transitions: NFAs can have transitions that do not consume input symbols (e), while
DFAs cannot.
3. Acceptance: An NFA accepts a string if there exists at least one path from the start state to an
Consider an NFA that accepts binary strings ending in either '01' or '10'.
- Alphabet: {0, 1}
- Start State: q0
- Transition Function: delta(q0, 0) = {q1}, delta(q0, 1) = {q3}, delta(q1, 1) = {q2}, delta(q3, 0) = {q2}
This NFA moves to multiple states depending on the input and can accept both strings ending in '01'
and '10'.
Slide 5: Converting an NFA to a DFA
Although NFAs and DFAs are different in how they process input, they recognize the same class of
languages (regular languages). Any NFA can be converted into an equivalent DFA. The conversion
process involves creating a DFA where each state represents a set of NFA states, known as the
'powerset construction'.