CS5371 Theory of Computation: Lecture 3: Automata Theory I (DFA and NFA)
CS5371 Theory of Computation: Lecture 3: Automata Theory I (DFA and NFA)
Theory of Computation
Lecture 3: Automata Theory I
(DFA and NFA)
Objectives
•This time, we will look at how to
define a very simple “ computer”called
deterministic finite automaton (DFA)
•Show that DFA can solve some string
decision problem
•Then, we give slightly change the
definition of DFA to give another
computer called non-deterministic
finite automaton (NFA)
DFA
Accept
Input
or
String
Reject
DFA
start q1 q2
0,1
start q1 q2
0,1
0
Designing a DFA (Quick Quiz)
•How to design a DFA that accepts all
binary strings representing a multiple
of 5? (E.g., 101, 1111, 11001, …)
NFA
•Every step of DFA’ s computation
follows in a unique way from the
preceding step
–When a machine is in a given state, and
reads the next input character, we know
what the next state is
•In an NFA, several choices may exist
for the next state
Example of NFA
0,1 0,1
start 1 0, 1
q1 q2 q3 q4
0,1 0,1
start 1 0, 1
q1 q2 q3 q4
Next time
•Continue the discussion on NFA
•Properties of language recognized by
DFA or NFA