Professional Documents
Culture Documents
Types of FA:
• Deterministic Finite Automata (DFA)
- The machine can exist in only one state at any given time
b a
q3
a, b
a b
Deterministic Finite Automata (cont.)
Example #1 (cont.): q0 a q1 b q2
b a
q3
a, b
Deterministic Finite Automata (cont.)
Extension of δ to Strings
Extended transition function (Delta cap or Delta hat) describes what happens when we start
in any state and follow any sequence of inputs.
Deterministic Finite Automata (cont.)
Extension of δ to Strings (cont.)
We define by induction on the length of the input string as follows:
Deterministic Finite Automata (cont.) a b
Extension of δ to Strings (cont.) q0 a q1 b q2
The check involves computing (q0, w) for each prefix w of
aaabb, starting at ε and going in increasing size. b a
q3
a, b
Deterministic Finite Automata (cont.)
Language of a DFA
Nondeterministic Finite State Automata (NFA)
Nondeterministic Finite State Automata (cont.)
• An NFA is a five-tuple: NFA M = (Q, Σ, δ, q0, F)
Each state can have zero, one, or more transitions out labeled by the same symbol
Nondeterministic Finite State Automata (cont.)
Example #1:
Nondeterministic Finite State Automata (cont.)
Example #1 (cont.):
Nondeterministic Finite State Automata (cont.)
Example #1 (cont.): a
b
a b
q0 q1 q2
Nondeterministic Finite State Automata (cont.)
Example #1 (cont.): a
b
a b
q0 q1 q2
Nondeterministic Finite State Automata (cont.)
Extension of δ to Strings
Nondeterministic Finite State Automata (cont.)
Extension of δ to Strings (cont.)
We define by induction on the length of the input string as follows:
Nondeterministic Finite State Automata (cont.)
Extension of δ to Strings (cont.) a b
We use to describe how the string aaabb is a b
q0 q1 q2
processed by above NFA.
Nondeterministic Finite State Automata (cont.)
Extension of δ to Strings (cont.) a b
a b q2
q0 q1
Nondeterministic Finite State Automata (cont.)
The Language of an NFA