Session 3 and 4: �Finite State systems – Deterministic Finite Automaton – DFA
By
Dr. Ashok Kumar
Amity School of Engineering & Technology
Automaton
CPU
input memory
output memory
Program memory
temporary memory
Automaton
Amity School of Engineering & Technology
CPU
input memory
output memory
Program memory
temporary memory
compute
compute
Amity School of Engineering & Technology
Different Kinds of Automata
Automata are distinguished by the temporary memory
Amity School of Engineering & Technology
input memory
output memory
temporary memory
Finite
Automaton
Finite Automaton
Example: Vending Machines
(small computing power)
Amity School of Engineering & Technology
input memory
output memory
Stack
Pushdown
Automaton
Pushdown Automaton
Example: Compilers for Programming Languages
(medium computing power)
Push, Pop
Amity School of Engineering & Technology
input memory
output memory
Random Access Memory
Turing
Machine
Turing Machine
Examples: Any Algorithm
(highest computing power)
Amity School of Engineering & Technology
Finite
Automata
Pushdown
Automata
Turing
Machine
Power of Automata
Less power
More power
Solve more
computational problems
Amity School of Engineering & Technology
Finite State systems – Basic Definitions – Finite Automaton – DFA & NDFA
Amity School of Engineering & Technology
Formal Definition
10
Deterministic Finite Accepter (DFA)
: set of states
: input alphabet
: transition function
: initial state
: set of final states
Amity School of Engineering & Technology
Input Alphabet
11
Amity School of Engineering & Technology
Set of States
12
Amity School of Engineering & Technology
Initial State
13
Amity School of Engineering & Technology
Set of Final States
14
Amity School of Engineering & Technology
Transition Function
15
Amity School of Engineering & Technology
16
Amity School of Engineering & Technology
17
Amity School of Engineering & Technology
18
Amity School of Engineering & Technology
Transition Function
19
Amity School of Engineering & Technology
Extended Transition Function
20
Amity School of Engineering & Technology
21
Amity School of Engineering & Technology
22
Amity School of Engineering & Technology
23
Amity School of Engineering & Technology
24
Observation: There is a walk from to with label
Amity School of Engineering & Technology
25
Example: There is a walk from to with label
Amity School of Engineering & Technology
Languages Accepted by DFAs
26
Amity School of Engineering & Technology
Example
27
accept
Amity School of Engineering & Technology
Another Example
28
accept
accept
accept
Amity School of Engineering & Technology
Formally
29
Amity School of Engineering & Technology
Observation
30
Amity School of Engineering & Technology
Examples
Amity School of Engineering & Technology
Examples
Amity School of Engineering & Technology
Examples
Amity School of Engineering & Technology
Examples
Amity School of Engineering & Technology
Examples
Amity School of Engineering & Technology
More Examples
36
Design a DFA that accepts the following Language:
Amity School of Engineering & Technology
accept
trap state
Amity School of Engineering & Technology
38
Design a DFA which accepts the following language.
L(M)= { all strings without substring 001 }
Amity School of Engineering & Technology
Regular Languages
39
Amity School of Engineering & Technology
Example
40
Amity School of Engineering & Technology
41
There exist languages which are not Regular:
There is no DFA that accepts such a language
(we will prove this later in the class)
Example:
Amity School of Engineering & Technology